	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_ps_restore               ## -- Begin function ath9k_ps_restore
	.p2align	4, 0x90
_ath9k_ps_restore:                      ## @ath9k_ps_restore
	.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
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_ath9k_hw_common
	movq	%rax, %r15
	leaq	12(%rbx), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	decq	(%rbx)
	jne	LBB0_8
## %bb.1:
	cmpq	$0, 40(%rbx)
	je	LBB0_3
## %bb.2:
	addq	$32, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rsi
	addq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_mod_timer
LBB0_8:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_3:
	cmpq	$0, 24(%rbx)
	je	LBB0_8
## %bb.4:
	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
	movq	_PS_WAIT_FOR_ANI@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%ecx, 8(%rbx)
	jne	LBB0_8
## %bb.5:
	movq	_ATH9K_PM_NETWORK_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	16(%rbx), %edi
	callq	_ath9k_hw_btcoex_is_enabled
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_ath9k_btcoex_stop_gen_timer
LBB0_7:
	movq	%r15, %rdi
	callq	_spin_lock
	movq	%r15, %rdi
	callq	_ath_hw_cycle_counters_update
	movq	%r15, %rdi
	callq	_spin_unlock
	movl	16(%rbx), %edi
	movl	%r12d, %esi
	callq	_ath9k_hw_setpower
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.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	_PS_WAIT_FOR_ANI,4,2            ## @PS_WAIT_FOR_ANI
	.comm	_ATH9K_PM_NETWORK_SLEEP,4,2     ## @ATH9K_PM_NETWORK_SLEEP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_ps_restore               ; -- Begin function ath9k_ps_restore
	.p2align	2
_ath9k_ps_restore:                      ; @ath9k_ps_restore
	.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	x20, x0
	ldr	w0, [x0, #16]
	bl	_ath9k_hw_common
	mov	x21, x0
	add	x19, x20, #12
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
	subs	x8, x8, #1
	str	x8, [x20]
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_4
; %bb.2:
	add	x0, x20, #32
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _HZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #32
	lsr	x9, x9, #63
	add	w9, w9, w10, asr #2
	add	x1, x8, w9, sxtw
	bl	_mod_timer
LBB0_3:
	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	_spin_unlock_irqrestore
LBB0_4:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_3
; %bb.5:
Lloh6:
	adrp	x8, _PS_WAIT_FOR_BEACON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PS_WAIT_FOR_BEACON@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _PS_WAIT_FOR_CAB@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PS_WAIT_FOR_CAB@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGEOFF]
	ldr	w10, [x20, #8]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _PS_WAIT_FOR_TX_ACK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PS_WAIT_FOR_TX_ACK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, _PS_WAIT_FOR_ANI@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PS_WAIT_FOR_ANI@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w10
	b.ne	LBB0_3
; %bb.6:
Lloh21:
	adrp	x8, _ATH9K_PM_NETWORK_SLEEP@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ATH9K_PM_NETWORK_SLEEP@GOTPAGEOFF]
Lloh23:
	ldr	w22, [x8]
	ldr	w0, [x20, #16]
	bl	_ath9k_hw_btcoex_is_enabled
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_ath9k_btcoex_stop_gen_timer
LBB0_8:
	mov	x0, x21
	bl	_spin_lock
	mov	x0, x21
	bl	_ath_hw_cycle_counters_update
	mov	x0, x21
	bl	_spin_unlock
	ldr	w0, [x20, #16]
	mov	x1, x22
	bl	_ath9k_hw_setpower
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.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	_PS_WAIT_FOR_ANI,4,2            ; @PS_WAIT_FOR_ANI
	.comm	_ATH9K_PM_NETWORK_SLEEP,4,2     ; @ATH9K_PM_NETWORK_SLEEP
.subsections_via_symbols
