	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw2100_wx_get_powermode
_ipw2100_wx_get_powermode:              ## @ipw2100_wx_get_powermode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	callq	_libipw_priv
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_IPW_POWER_LEVEL
	movq	_IPW_POWER_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_1
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.5:
	movq	_MAX_POWER_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	$128, %ecx
	jmp	LBB0_2
LBB0_1:
	movq	_MAX_POWER_STRING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	jmp	LBB0_2
LBB0_6:
	movq	_MAX_POWER_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	movl	$129, %ecx
LBB0_2:
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_8
LBB0_7:
	movq	_timeout_duration@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rdx
	movslq	-4(%rcx,%rdx,4), %rcx
	imulq	$274877907, %rcx, %r8           ## imm = 0x10624DD3
	movq	%r8, %rcx
	shrq	$63, %rcx
	sarq	$38, %r8
	addl	%ecx, %r8d
	movq	_period_duration@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	-4(%rcx,%rdx,4), %rcx
	imulq	$274877907, %rcx, %r9           ## imm = 0x10624DD3
	movq	%r9, %rcx
	shrq	$63, %rcx
	sarq	$38, %r9
	addl	%ecx, %r9d
	movq	_MAX_POWER_STRING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	callq	_snprintf
LBB0_8:
	movq	%r15, %rdi
	callq	_strlen
	incq	%rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPW_POWER_ENABLED,4,2          ## @IPW_POWER_ENABLED
	.comm	_MAX_POWER_STRING,4,2           ## @MAX_POWER_STRING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Power save level: %d (Off)"

L_.str.1:                               ## @.str.1
	.asciz	"Power save level: %d (None)"

L_.str.2:                               ## @.str.2
	.asciz	"Power save level: %d (Auto)"

	.comm	_timeout_duration,8,3           ## @timeout_duration
	.comm	_period_duration,8,3            ## @period_duration
L_.str.3:                               ## @.str.3
	.asciz	"Power save level: %d (Timeout %dms, Period %dms)"

	.no_dead_strip	_ipw2100_wx_get_powermode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw2100_wx_get_powermode
_ipw2100_wx_get_powermode:              ; @ipw2100_wx_get_powermode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x3
	mov	x19, x2
	bl	_libipw_priv
	mov	x21, x0
	ldr	w0, [x0]
	bl	_IPW_POWER_LEVEL
	mov	x3, x0
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _IPW_POWER_ENABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IPW_POWER_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	cmp	w3, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w3, #128
	b.ne	LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _MAX_POWER_STRING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_POWER_STRING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _MAX_POWER_STRING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_POWER_STRING@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x8, _MAX_POWER_STRING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAX_POWER_STRING@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh18:
	adrp	x8, _timeout_duration@GOTPAGE
Lloh19:
	ldr	x8, [x8, _timeout_duration@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	sub	w9, w3, #1
	sbfiz	x9, x9, #2, #32
	ldrsw	x8, [x8, x9]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x8, x8, x10
	lsr	x11, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w11
Lloh21:
	adrp	x11, _period_duration@GOTPAGE
Lloh22:
	ldr	x11, [x11, _period_duration@GOTPAGEOFF]
Lloh23:
	ldr	x11, [x11]
	ldrsw	x9, [x11, x9]
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
Lloh24:
	adrp	x10, _MAX_POWER_STRING@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MAX_POWER_STRING@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x10]
	stp	x8, x9, [sp]
Lloh27:
	adrp	x2, l_.str.3@PAGE
Lloh28:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_7:
	mov	x0, x20
	bl	_snprintf
	mov	x0, x20
	bl	_strlen
	add	x8, x0, #1
	str	x8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IPW_POWER_ENABLED,4,2          ; @IPW_POWER_ENABLED
	.comm	_MAX_POWER_STRING,4,2           ; @MAX_POWER_STRING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Power save level: %d (Off)"

l_.str.1:                               ; @.str.1
	.asciz	"Power save level: %d (None)"

l_.str.2:                               ; @.str.2
	.asciz	"Power save level: %d (Auto)"

	.comm	_timeout_duration,8,3           ; @timeout_duration
	.comm	_period_duration,8,3            ; @period_duration
l_.str.3:                               ; @.str.3
	.asciz	"Power save level: %d (Timeout %dms, Period %dms)"

	.no_dead_strip	_ipw2100_wx_get_powermode
.subsections_via_symbols
