	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath_rx_ps
_ath_rx_ps:                             ## @ath_rx_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	%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
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_ath9k_hw_common
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r14
	movl	(%r15), %eax
	movq	_PS_WAIT_FOR_BEACON@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_1
## %bb.4:
	testl	%r12d, %r12d
	jne	LBB0_14
	jmp	LBB0_5
LBB0_1:
	movq	%r15, %rdi
	callq	_ath9k_check_auto_sleep
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.2:
	testq	%rax, %rax
	je	LBB0_3
LBB0_14:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_rx_ps_beacon               ## TAILCALL
LBB0_3:
	movl	(%r15), %eax
LBB0_5:
	movq	_PS_WAIT_FOR_CAB@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.6:
	movl	(%r14), %edi
	callq	_ieee80211_is_data
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movl	(%r14), %edi
	callq	_ieee80211_is_action
	testq	%rax, %rax
	je	LBB0_10
LBB0_8:
	movl	4(%r14), %edi
	callq	_is_multicast_ether_addr
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	(%r14), %edi
	callq	_ieee80211_has_moredata
	testl	%eax, %eax
	je	LBB0_15
LBB0_10:
	movq	_PS_WAIT_FOR_PSPOLL_DATA@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r15)
	je	LBB0_13
## %bb.11:
	movl	4(%r14), %edi
	callq	_is_multicast_ether_addr
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movl	(%r14), %edi
	callq	_ieee80211_has_morefrags
	testl	%eax, %eax
	je	LBB0_16
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	(%r13), %eax
	orl	(%r12), %eax
	notl	%eax
	andl	%eax, (%r15)
	movq	_PS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_dbg                        ## TAILCALL
LBB0_16:
	movl	(%rbx), %eax
	notl	%eax
	andl	(%r15), %eax
	movl	%eax, (%r15)
	movl	(%r12), %ecx
	orl	(%r13), %ecx
	orl	(%rbx), %ecx
	movq	_PS@GOTPCREL(%rip), %rdx
	movq	_PS_WAIT_FOR_TX_ACK@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movl	(%rdx), %esi
	andl	%eax, %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PS_WAIT_FOR_BEACON,4,2         ## @PS_WAIT_FOR_BEACON
	.comm	_PS_WAIT_FOR_CAB,4,2            ## @PS_WAIT_FOR_CAB
	.comm	_PS,4,2                         ## @PS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"All PS CAB frames received, back to sleep\n"

	.comm	_PS_WAIT_FOR_PSPOLL_DATA,4,2    ## @PS_WAIT_FOR_PSPOLL_DATA
L_.str.1:                               ## @.str.1
	.asciz	"Going back to sleep after having received PS-Poll data (0x%lx)\n"

	.comm	_PS_WAIT_FOR_TX_ACK,4,2         ## @PS_WAIT_FOR_TX_ACK
	.no_dead_strip	_ath_rx_ps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath_rx_ps
_ath_rx_ps:                             ; @ath_rx_ps
	.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	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w0, [x0, #4]
	bl	_ath9k_hw_common
	mov	x19, x0
	ldr	x24, [x21]
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _PS_WAIT_FOR_BEACON@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PS_WAIT_FOR_BEACON@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	cbnz	w22, LBB0_4
	b	LBB0_6
LBB0_2:
	mov	x0, x20
	bl	_ath9k_check_auto_sleep
	cbz	w22, LBB0_5
; %bb.3:
	cbz	x0, LBB0_5
LBB0_4:
	mov	x0, x20
	mov	x1, x21
	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
	b	_ath_rx_ps_beacon
LBB0_5:
	ldr	w8, [x20]
LBB0_6:
Lloh2:
	adrp	x21, _PS_WAIT_FOR_CAB@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PS_WAIT_FOR_CAB@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.7:
	ldr	w0, [x24]
	bl	_ieee80211_is_data
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x24]
	bl	_ieee80211_is_action
	cbz	x0, LBB0_11
LBB0_9:
	ldr	w0, [x24, #4]
	bl	_is_multicast_ether_addr
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w0, [x24]
	bl	_ieee80211_has_moredata
	cbz	w0, LBB0_16
LBB0_11:
	ldr	w8, [x20]
Lloh4:
	adrp	x22, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGE
Lloh5:
	ldr	x22, [x22, _PS_WAIT_FOR_PSPOLL_DATA@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.12:
	ldr	w0, [x24, #4]
	bl	_is_multicast_ether_addr
	cbnz	x0, LBB0_15
; %bb.13:
	ldr	w0, [x24]
	bl	_ieee80211_has_morefrags
	cbnz	w0, LBB0_15
; %bb.14:
	ldr	w8, [x22]
	ldr	w9, [x20]
	bic	w8, w9, w8
Lloh6:
	adrp	x9, _PS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PS@GOTPAGEOFF]
	str	w8, [x20]
Lloh8:
	ldr	w1, [x9]
	ldr	w9, [x23]
	ldr	w10, [x21]
	orr	w9, w10, w9
	ldr	w10, [x22]
	orr	w9, w9, w10
Lloh9:
	adrp	x10, _PS_WAIT_FOR_TX_ACK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PS_WAIT_FOR_TX_ACK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w9, w10
	and	w8, w9, w8
	str	x8, [sp]
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
LBB0_15:
	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
LBB0_16:
	ldr	w8, [x21]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
Lloh14:
	adrp	x8, _PS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	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
	b	_ath_dbg
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PS_WAIT_FOR_BEACON,4,2         ; @PS_WAIT_FOR_BEACON
	.comm	_PS_WAIT_FOR_CAB,4,2            ; @PS_WAIT_FOR_CAB
	.comm	_PS,4,2                         ; @PS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"All PS CAB frames received, back to sleep\n"

	.comm	_PS_WAIT_FOR_PSPOLL_DATA,4,2    ; @PS_WAIT_FOR_PSPOLL_DATA
l_.str.1:                               ; @.str.1
	.asciz	"Going back to sleep after having received PS-Poll data (0x%lx)\n"

	.comm	_PS_WAIT_FOR_TX_ACK,4,2         ; @PS_WAIT_FOR_TX_ACK
	.no_dead_strip	_ath_rx_ps
.subsections_via_symbols
