	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath9k_hw_set_powermode_wow_sleep
_ath9k_hw_set_powermode_wow_sleep:      ## @ath9k_hw_set_powermode_wow_sleep
	.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, %rbx
	callq	_ath9k_hw_common
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_ath9k_hw_set_sta_powersave
	movq	_AR_CR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_AR_CR_RXD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_WRITE
	movl	(%r15), %esi
	movq	_AR_CR_RXE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_ath9k_hw_wait
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	%rbx, %rdi
	callq	_AR_SREV_9462
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_AR_SREV_9565
	testq	%rax, %rax
	je	LBB0_4
LBB0_3:
	movq	_AR_MAC_PCU_GEN_TIMER_TSF_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_REG_READ
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	movq	_AR_DIRECT_CONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_DC_TSF2_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_CLR_BIT
LBB0_7:
	movq	%rbx, %rdi
	callq	_ath9k_hw_mci_is_enabled
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_AR_RTC_KEEP_AWAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_REG_WRITE
LBB0_9:
	movq	_AR_RTC_FORCE_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_RTC_FORCE_WAKE_ON_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
LBB0_10:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_REG_READ
	movl	%eax, %r15d
	movq	_AR_DIAG_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_REG_READ
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_err                        ## TAILCALL
LBB0_4:
	movq	%rbx, %rdi
	callq	_AR_SREV_9485
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_AR_NDP2_TIMER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_REG_READ
	movq	_AR_GEN_TIMERS2_MODE_ENABLE_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_7
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_CR,4,2                      ## @AR_CR
	.comm	_AR_CR_RXD,4,2                  ## @AR_CR_RXD
	.comm	_AR_CR_RXE,4,2                  ## @AR_CR_RXE
	.comm	_AH_WAIT_TIMEOUT,4,2            ## @AH_WAIT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to stop Rx DMA in 10ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n"

	.comm	_AR_DIAG_SW,4,2                 ## @AR_DIAG_SW
	.comm	_AR_MAC_PCU_GEN_TIMER_TSF_SEL,4,2 ## @AR_MAC_PCU_GEN_TIMER_TSF_SEL
	.comm	_AR_DIRECT_CONNECT,4,2          ## @AR_DIRECT_CONNECT
	.comm	_AR_DC_TSF2_ENABLE,4,2          ## @AR_DC_TSF2_ENABLE
	.comm	_AR_NDP2_TIMER_MODE,4,2         ## @AR_NDP2_TIMER_MODE
	.comm	_AR_GEN_TIMERS2_MODE_ENABLE_MASK,4,2 ## @AR_GEN_TIMERS2_MODE_ENABLE_MASK
	.comm	_AR_RTC_KEEP_AWAKE,4,2          ## @AR_RTC_KEEP_AWAKE
	.comm	_AR_RTC_FORCE_WAKE,4,2          ## @AR_RTC_FORCE_WAKE
	.comm	_AR_RTC_FORCE_WAKE_ON_INT,4,2   ## @AR_RTC_FORCE_WAKE_ON_INT
	.no_dead_strip	_ath9k_hw_set_powermode_wow_sleep
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath9k_hw_set_powermode_wow_sleep
_ath9k_hw_set_powermode_wow_sleep:      ; @ath9k_hw_set_powermode_wow_sleep
	.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, x0
	bl	_ath9k_hw_common
	mov	x20, x0
	mov	x0, x19
	bl	_ath9k_hw_set_sta_powersave
Lloh0:
	adrp	x21, _AR_CR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AR_CR@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _AR_CR_RXD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AR_CR_RXD@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_WRITE
	ldr	w1, [x21]
Lloh5:
	adrp	x8, _AR_CR_RXE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AR_CR_RXE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _AH_WAIT_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AH_WAIT_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w3, #0
	bl	_ath9k_hw_wait
	cbz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_AR_SREV_9462
	cbnz	x0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_AR_SREV_9565
	cbz	x0, LBB0_9
LBB0_3:
Lloh11:
	adrp	x8, _AR_MAC_PCU_GEN_TIMER_TSF_SEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_MAC_PCU_GEN_TIMER_TSF_SEL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_READ
	cbnz	w0, LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _AR_DIRECT_CONNECT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_DIRECT_CONNECT@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _AR_DC_TSF2_ENABLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AR_DC_TSF2_ENABLE@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_CLR_BIT
LBB0_5:
	mov	x0, x19
	bl	_ath9k_hw_mci_is_enabled
	cbz	x0, LBB0_7
; %bb.6:
Lloh20:
	adrp	x8, _AR_RTC_KEEP_AWAKE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AR_RTC_KEEP_AWAKE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	bl	_REG_WRITE
LBB0_7:
Lloh23:
	adrp	x8, _AR_RTC_FORCE_WAKE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AR_RTC_FORCE_WAKE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _AR_RTC_FORCE_WAKE_ON_INT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AR_RTC_FORCE_WAKE_ON_INT@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	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	_REG_WRITE
LBB0_8:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_REG_READ
	mov	x21, x0
Lloh29:
	adrp	x8, _AR_DIAG_SW@GOTPAGE
Lloh30:
	ldr	x8, [x8, _AR_DIAG_SW@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_READ
	mov	x3, x0
Lloh32:
	adrp	x1, l_.str@PAGE
Lloh33:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, 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
	b	_ath_err
LBB0_9:
	mov	x0, x19
	bl	_AR_SREV_9485
	cbz	x0, LBB0_5
; %bb.10:
Lloh34:
	adrp	x8, _AR_NDP2_TIMER_MODE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _AR_NDP2_TIMER_MODE@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_READ
Lloh37:
	adrp	x8, _AR_GEN_TIMERS2_MODE_ENABLE_MASK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _AR_GEN_TIMERS2_MODE_ENABLE_MASK@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_5
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_CR,4,2                      ; @AR_CR
	.comm	_AR_CR_RXD,4,2                  ; @AR_CR_RXD
	.comm	_AR_CR_RXE,4,2                  ; @AR_CR_RXE
	.comm	_AH_WAIT_TIMEOUT,4,2            ; @AH_WAIT_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to stop Rx DMA in 10ms AR_CR=0x%08x AR_DIAG_SW=0x%08x\n"

	.comm	_AR_DIAG_SW,4,2                 ; @AR_DIAG_SW
	.comm	_AR_MAC_PCU_GEN_TIMER_TSF_SEL,4,2 ; @AR_MAC_PCU_GEN_TIMER_TSF_SEL
	.comm	_AR_DIRECT_CONNECT,4,2          ; @AR_DIRECT_CONNECT
	.comm	_AR_DC_TSF2_ENABLE,4,2          ; @AR_DC_TSF2_ENABLE
	.comm	_AR_NDP2_TIMER_MODE,4,2         ; @AR_NDP2_TIMER_MODE
	.comm	_AR_GEN_TIMERS2_MODE_ENABLE_MASK,4,2 ; @AR_GEN_TIMERS2_MODE_ENABLE_MASK
	.comm	_AR_RTC_KEEP_AWAKE,4,2          ; @AR_RTC_KEEP_AWAKE
	.comm	_AR_RTC_FORCE_WAKE,4,2          ; @AR_RTC_FORCE_WAKE
	.comm	_AR_RTC_FORCE_WAKE_ON_INT,4,2   ; @AR_RTC_FORCE_WAKE_ON_INT
	.no_dead_strip	_ath9k_hw_set_powermode_wow_sleep
.subsections_via_symbols
