	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_disable_ps
_ath9k_disable_ps:                      ## @ath9k_disable_ps
	.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	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	_CONFIG_ATH9K_TX99@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	$0, (%r15)
	movq	_ATH9K_PM_AWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ath9k_hw_setpower
	movq	_ATH9K_HW_CAP_AUTOSLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ath9k_hw_setrxabort
	movq	_PS_WAIT_FOR_BEACON@GOTPCREL(%rip), %rax
	movq	_PS_WAIT_FOR_CAB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_PS_WAIT_FOR_PSPOLL_DATA@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_PS_WAIT_FOR_TX_ACK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, 4(%r15)
	movl	(%rbx), %eax
	movq	_ATH9K_INT_TIM_TIMER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
## %bb.3:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_ath9k_hw_set_interrupts
LBB0_4:
	movq	_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_ATH9K_TX99,4,2          ## @CONFIG_ATH9K_TX99
	.comm	_ATH9K_PM_AWAKE,4,2             ## @ATH9K_PM_AWAKE
	.comm	_ATH9K_HW_CAP_AUTOSLEEP,4,2     ## @ATH9K_HW_CAP_AUTOSLEEP
	.comm	_PS_WAIT_FOR_BEACON,4,2         ## @PS_WAIT_FOR_BEACON
	.comm	_PS_WAIT_FOR_CAB,4,2            ## @PS_WAIT_FOR_CAB
	.comm	_PS_WAIT_FOR_PSPOLL_DATA,4,2    ## @PS_WAIT_FOR_PSPOLL_DATA
	.comm	_PS_WAIT_FOR_TX_ACK,4,2         ## @PS_WAIT_FOR_TX_ACK
	.comm	_ATH9K_INT_TIM_TIMER,4,2        ## @ATH9K_INT_TIM_TIMER
	.comm	_PS,4,2                         ## @PS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PowerSave disabled\n"

	.no_dead_strip	_ath9k_disable_ps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_disable_ps
_ath9k_disable_ps:                      ; @ath9k_disable_ps
	.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	x21, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_ath9k_hw_common
	mov	x19, x0
Lloh0:
	adrp	x8, _CONFIG_ATH9K_TX99@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_ATH9K_TX99@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_2
; %bb.1:
	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
LBB0_2:
	str	wzr, [x21]
Lloh3:
	adrp	x8, _ATH9K_PM_AWAKE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH9K_PM_AWAKE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ath9k_hw_setpower
	ldr	w8, [x20, #4]
Lloh6:
	adrp	x9, _ATH9K_HW_CAP_AUTOSLEEP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATH9K_HW_CAP_AUTOSLEEP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x20
	mov	w1, #0
	bl	_ath9k_hw_setrxabort
Lloh9:
	adrp	x8, _PS_WAIT_FOR_BEACON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PS_WAIT_FOR_BEACON@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _PS_WAIT_FOR_CAB@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PS_WAIT_FOR_CAB@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _PS_WAIT_FOR_TX_ACK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PS_WAIT_FOR_TX_ACK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x21, #4]
	bic	w8, w9, w8
	str	w8, [x21, #4]
	ldr	w8, [x20]
Lloh21:
	adrp	x9, _ATH9K_INT_TIM_TIMER@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ATH9K_INT_TIM_TIMER@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	bic	w8, w8, w9
	str	w8, [x20]
	mov	x0, x20
	bl	_ath9k_hw_set_interrupts
LBB0_5:
Lloh24:
	adrp	x8, _PS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PS@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x2, l_.str@PAGE
Lloh28:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	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
	b	_ath_dbg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_ATH9K_TX99,4,2          ; @CONFIG_ATH9K_TX99
	.comm	_ATH9K_PM_AWAKE,4,2             ; @ATH9K_PM_AWAKE
	.comm	_ATH9K_HW_CAP_AUTOSLEEP,4,2     ; @ATH9K_HW_CAP_AUTOSLEEP
	.comm	_PS_WAIT_FOR_BEACON,4,2         ; @PS_WAIT_FOR_BEACON
	.comm	_PS_WAIT_FOR_CAB,4,2            ; @PS_WAIT_FOR_CAB
	.comm	_PS_WAIT_FOR_PSPOLL_DATA,4,2    ; @PS_WAIT_FOR_PSPOLL_DATA
	.comm	_PS_WAIT_FOR_TX_ACK,4,2         ; @PS_WAIT_FOR_TX_ACK
	.comm	_ATH9K_INT_TIM_TIMER,4,2        ; @ATH9K_INT_TIM_TIMER
	.comm	_PS,4,2                         ; @PS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PowerSave disabled\n"

	.no_dead_strip	_ath9k_disable_ps
.subsections_via_symbols
