	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_wx_get_powermode
_ipw_wx_get_powermode:                  ## @ipw_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_libipw_priv
	movq	%rax, %r12
	movl	(%rax), %edi
	callq	_IPW_POWER_LEVEL
	movl	%eax, %ebx
	movq	_MAX_WX_STRING@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_snprintf
	cltq
	leaq	(%r15,%rax), %r13
	cmpl	$128, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %ebx
	jne	LBB0_5
## %bb.2:
	movq	(%r14), %rsi
	subq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_3
LBB0_4:
	movq	(%r14), %rsi
	subq	%rax, %rsi
	leaq	L_.str.2(%rip), %rdx
LBB0_3:
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_6
LBB0_5:
	movq	(%r14), %rsi
	subq	%rax, %rsi
	movq	_timeout_duration@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rdx
	movslq	-4(%rax,%rdx,4), %rax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$38, %rcx
	addl	%eax, %ecx
	movq	_period_duration@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-4(%rax,%rdx,4), %rax
	imulq	$274877907, %rax, %r8           ## imm = 0x10624DD3
	movq	%r8, %rax
	shrq	$63, %rax
	sarq	$38, %r8
	addl	%eax, %r8d
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_snprintf
LBB0_6:
	cltq
	addq	%rax, %r13
	movq	_IPW_POWER_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	jne	LBB0_8
## %bb.7:
	movq	%r15, %rsi
	subq	%r13, %rsi
	addq	(%r14), %rsi
	leaq	L_.str.4(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_snprintf
	cltq
	addq	%rax, %r13
LBB0_8:
	subl	%r15d, %r13d
	incl	%r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_WX_STRING,8,3              ## @MAX_WX_STRING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Power save level: %d "

L_.str.1:                               ## @.str.1
	.asciz	"(AC)"

L_.str.2:                               ## @.str.2
	.asciz	"(BATTERY)"

L_.str.3:                               ## @.str.3
	.asciz	"(Timeout %dms, Period %dms)"

	.comm	_timeout_duration,8,3           ## @timeout_duration
	.comm	_period_duration,8,3            ## @period_duration
	.comm	_IPW_POWER_ENABLED,4,2          ## @IPW_POWER_ENABLED
L_.str.4:                               ## @.str.4
	.asciz	" OFF"

	.no_dead_strip	_ipw_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 ipw_wx_get_powermode
_ipw_wx_get_powermode:                  ; @ipw_wx_get_powermode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x19, x2
	bl	_libipw_priv
	mov	x21, x0
	ldr	w0, [x0]
	bl	_IPW_POWER_LEVEL
	mov	x23, x0
Lloh0:
	adrp	x24, _MAX_WX_STRING@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAX_WX_STRING@GOTPAGEOFF]
	ldr	x1, [x24]
	str	x23, [sp]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_snprintf
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	add	x22, x20, x8
	cmp	w23, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w23, #129
	b.ne	LBB0_4
; %bb.2:
	ldr	x9, [x24]
	sub	x1, x9, x8
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:
	ldr	x9, [x24]
	sub	x1, x9, x8
Lloh6:
	adrp	x2, l_.str.2@PAGE
Lloh7:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
	ldr	x9, [x24]
	sub	x1, x9, x8
Lloh8:
	adrp	x8, _timeout_duration@GOTPAGE
Lloh9:
	ldr	x8, [x8, _timeout_duration@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	sub	w9, w23, #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
Lloh11:
	adrp	x11, _period_duration@GOTPAGE
Lloh12:
	ldr	x11, [x11, _period_duration@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
	ldrsw	x9, [x11, x9]
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	stp	x8, x9, [sp]
Lloh14:
	adrp	x2, l_.str.3@PAGE
Lloh15:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_5:
	mov	x0, x22
	bl	_snprintf
	add	x22, x22, w0, sxtw
	ldr	w8, [x21]
Lloh16:
	adrp	x9, _IPW_POWER_ENABLED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IPW_POWER_ENABLED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x24]
	sub	x9, x20, x22
	add	x1, x9, x8
Lloh19:
	adrp	x2, l_.str.4@PAGE
Lloh20:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x22
	bl	_snprintf
	add	x22, x22, w0, sxtw
LBB0_7:
	sub	w8, w22, w20
	add	w8, w8, #1
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_WX_STRING,8,3              ; @MAX_WX_STRING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Power save level: %d "

l_.str.1:                               ; @.str.1
	.asciz	"(AC)"

l_.str.2:                               ; @.str.2
	.asciz	"(BATTERY)"

l_.str.3:                               ; @.str.3
	.asciz	"(Timeout %dms, Period %dms)"

	.comm	_timeout_duration,8,3           ; @timeout_duration
	.comm	_period_duration,8,3            ; @period_duration
	.comm	_IPW_POWER_ENABLED,4,2          ; @IPW_POWER_ENABLED
l_.str.4:                               ; @.str.4
	.asciz	" OFF"

	.no_dead_strip	_ipw_wx_get_powermode
.subsections_via_symbols
