	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_setpower              ## -- Begin function ath9k_hw_setpower
	.p2align	4, 0x90
_ath9k_hw_setpower:                     ## @ath9k_hw_setpower
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_ath9k_hw_common
	movq	%rax, %r12
	movslq	(%r15), %rax
	movl	$1, %ebx
	cmpl	%r14d, %eax
	je	LBB0_13
## %bb.1:
	movq	_RESET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	_ath9k_hw_setpower.modes(%rip), %rdx
	movq	(%rdx,%rax,8), %rcx
	movl	%r14d, %eax
	movq	(%rdx,%rax,8), %r8
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rdi
	callq	_ath_dbg
	cmpl	$128, %r14d
	je	LBB0_9
## %bb.2:
	cmpl	$129, %r14d
	je	LBB0_5
## %bb.3:
	cmpl	$130, %r14d
	jne	LBB0_8
## %bb.4:
	movq	%r15, %rdi
	callq	_ath9k_hw_set_power_awake
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_9:
	movq	%r15, %rdi
	callq	_ath9k_set_power_network_sleep
	jmp	LBB0_10
LBB0_5:
	movq	%r15, %rdi
	callq	_ath9k_hw_mci_is_enabled
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_ar9003_mci_set_full_sleep
LBB0_7:
	movq	%r15, %rdi
	callq	_ath9k_set_power_sleep
	movl	$1, 4(%r15)
LBB0_10:
	movl	$1, %ebx
LBB0_11:
	movl	%r14d, (%r15)
	movq	_AH_UNPLUGGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	jne	LBB0_13
## %bb.12:
	xorl	%edi, %edi
	testl	%ebx, %ebx
	sete	%dil
	callq	_ATH_DBG_WARN_ON_ONCE
	jmp	LBB0_13
LBB0_8:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_ath_err
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__const
	.p2align	4                               ## @ath9k_hw_setpower.modes
_ath9k_hw_setpower.modes:
	.quad	L_.str
	.quad	L_.str.1
	.quad	L_.str.2
	.quad	L_.str.3

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AWAKE"

L_.str.1:                               ## @.str.1
	.asciz	"FULL-SLEEP"

L_.str.2:                               ## @.str.2
	.asciz	"NETWORK SLEEP"

L_.str.3:                               ## @.str.3
	.asciz	"UNDEFINED"

	.comm	_RESET,4,2                      ## @RESET
L_.str.4:                               ## @.str.4
	.asciz	"%s -> %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"Unknown power mode %u\n"

	.comm	_AH_UNPLUGGED,4,2               ## @AH_UNPLUGGED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_setpower              ; -- Begin function ath9k_hw_setpower
	.p2align	2
_ath9k_hw_setpower:                     ; @ath9k_hw_setpower
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x20, x0
	bl	_ath9k_hw_common
	ldrsw	x8, [x20]
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #1
	b	LBB0_13
LBB0_2:
	mov	x21, x0
Lloh0:
	adrp	x9, _RESET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RESET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
Lloh3:
	adrp	x9, _ath9k_hw_setpower.modes@PAGE
Lloh4:
	add	x9, x9, _ath9k_hw_setpower.modes@PAGEOFF
	ldr	x3, [x9, x8, lsl #3]
	ldr	x4, [x9, w19, uxtw #3]
Lloh5:
	adrp	x2, l_.str.4@PAGE
Lloh6:
	add	x2, x2, l_.str.4@PAGEOFF
	bl	_ath_dbg
	cmp	w19, #128
	b.eq	LBB0_6
; %bb.3:
	cmp	w19, #129
	b.eq	LBB0_7
; %bb.4:
	cmp	w19, #130
	b.ne	LBB0_12
; %bb.5:
	mov	x0, x20
	bl	_ath9k_hw_set_power_awake
	mov	x21, x0
	b	LBB0_10
LBB0_6:
	mov	x0, x20
	bl	_ath9k_set_power_network_sleep
	mov	w21, #1
	b	LBB0_10
LBB0_7:
	mov	x0, x20
	bl	_ath9k_hw_mci_is_enabled
	cbz	w0, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_ar9003_mci_set_full_sleep
LBB0_9:
	mov	x0, x20
	bl	_ath9k_set_power_sleep
	mov	w21, #1
	str	w21, [x20, #4]
LBB0_10:
	str	w19, [x20]
	ldr	w8, [x20, #8]
Lloh7:
	adrp	x9, _AH_UNPLUGGED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AH_UNPLUGGED@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.11:
	cmp	w21, #0
	cset	w0, eq
	bl	_ATH_DBG_WARN_ON_ONCE
	b	LBB0_13
LBB0_12:
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_ath_err
	mov	w21, #0
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__const
	.p2align	3                               ; @ath9k_hw_setpower.modes
_ath9k_hw_setpower.modes:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AWAKE"

l_.str.1:                               ; @.str.1
	.asciz	"FULL-SLEEP"

l_.str.2:                               ; @.str.2
	.asciz	"NETWORK SLEEP"

l_.str.3:                               ; @.str.3
	.asciz	"UNDEFINED"

	.comm	_RESET,4,2                      ; @RESET
l_.str.4:                               ; @.str.4
	.asciz	"%s -> %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"Unknown power mode %u\n"

	.comm	_AH_UNPLUGGED,4,2               ; @AH_UNPLUGGED
.subsections_via_symbols
