	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_powersave_ap
_ath6kl_powersave_ap:                   ## @ath6kl_powersave_ap
	.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
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	(%rsi), %rbx
	movq	8(%rdi), %r12
	movl	(%rbx), %edi
	callq	_is_multicast_ether_addr
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_AP_MAX_NUM_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	16(%r12), %rcx
	movq	_STA_PS_SLEEP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%edx, (%rcx,%rsi,4)
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_3
	jmp	LBB0_10
LBB0_6:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_ath6kl_find_sta
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:
	movq	%rax, %r12
	movq	_STA_PS_SLEEP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_10
## %bb.8:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_ath6kl_process_uapsdq
	movl	%eax, %ebx
	movq	_WMI_DATA_HDR_FLAGS_UAPSD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	jne	LBB0_20
## %bb.9:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath6kl_process_psq             ## TAILCALL
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_11:
	movq	_DTIM_EXPIRED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r13), %rsi
	callq	_test_bit
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_spin_lock_bh
	leaq	4(%r12), %rbx
	movq	%rbx, %rdi
	callq	_skb_queue_empty
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.12:
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	_WMI_DATA_HDR_FLAGS_MORE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_14:
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_15:
	movq	%r15, %rdi
	callq	_dev_kfree_skb
LBB0_19:
	movl	$1, %ebx
	jmp	LBB0_20
LBB0_17:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%eax, %ebx
	callq	_skb_queue_tail
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	testl	%ebx, %ebx
	je	LBB0_19
## %bb.18:
	movl	8(%r12), %edi
	movl	(%r13), %esi
	movq	_MCAST_AID@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %ebx
	movl	$1, %ecx
	callq	_ath6kl_wmi_set_pvb_cmd
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AP_MAX_NUM_STA,8,3             ## @AP_MAX_NUM_STA
	.comm	_STA_PS_SLEEP,4,2               ## @STA_PS_SLEEP
	.comm	_DTIM_EXPIRED,4,2               ## @DTIM_EXPIRED
	.comm	_MCAST_AID,4,2                  ## @MCAST_AID
	.comm	_WMI_DATA_HDR_FLAGS_MORE,4,2    ## @WMI_DATA_HDR_FLAGS_MORE
	.comm	_WMI_DATA_HDR_FLAGS_UAPSD,4,2   ## @WMI_DATA_HDR_FLAGS_UAPSD
	.no_dead_strip	_ath6kl_powersave_ap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_powersave_ap
_ath6kl_powersave_ap:                   ; @ath6kl_powersave_ap
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x23, [x1]
	ldr	x22, [x0, #8]
	ldr	w0, [x23]
	bl	_is_multicast_ether_addr
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _AP_MAX_NUM_STA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AP_MAX_NUM_STA@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.2:
	ldr	x9, [x22, #16]
Lloh3:
	adrp	x10, _STA_PS_SLEEP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _STA_PS_SLEEP@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9]
	tst	w10, w11
	b.ne	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #4
	subs	x8, x8, #1
	b.ne	LBB0_3
	b	LBB0_9
LBB0_5:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ath6kl_find_sta
	cbz	x0, LBB0_14
; %bb.6:
	mov	x23, x0
	ldr	w8, [x0]
Lloh6:
	adrp	x9, _STA_PS_SLEEP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _STA_PS_SLEEP@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_ath6kl_process_uapsdq
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _WMI_DATA_HDR_FLAGS_UAPSD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WMI_DATA_HDR_FLAGS_UAPSD@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.8:
	mov	x22, x0
	b	LBB0_18
LBB0_9:
	mov	w22, #0
	b	LBB0_18
LBB0_10:
Lloh12:
	adrp	x8, _DTIM_EXPIRED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DTIM_EXPIRED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_bit
	mov	x25, x0
	mov	x0, x22
	bl	_spin_lock_bh
	add	x24, x22, #4
	mov	x0, x24
	bl	_skb_queue_empty
	mov	x23, x0
	cbz	w25, LBB0_16
; %bb.11:
	cbnz	w23, LBB0_13
; %bb.12:
Lloh15:
	adrp	x8, _WMI_DATA_HDR_FLAGS_MORE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WMI_DATA_HDR_FLAGS_MORE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
LBB0_13:
	mov	x0, x22
	bl	_spin_unlock_bh
	mov	w22, #0
	b	LBB0_18
LBB0_14:
	mov	x0, x21
	bl	_dev_kfree_skb
LBB0_15:
	mov	w22, #1
	b	LBB0_18
LBB0_16:
	mov	x0, x24
	mov	x1, x21
	bl	_skb_queue_tail
	mov	x0, x22
	bl	_spin_unlock_bh
	cbz	w23, LBB0_15
; %bb.17:
	ldr	w0, [x22, #8]
	ldr	w1, [x19]
Lloh18:
	adrp	x8, _MCAST_AID@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MCAST_AID@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	w22, #1
	mov	w3, #1
	bl	_ath6kl_wmi_set_pvb_cmd
LBB0_18:
	mov	x0, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ath6kl_process_psq
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AP_MAX_NUM_STA,8,3             ; @AP_MAX_NUM_STA
	.comm	_STA_PS_SLEEP,4,2               ; @STA_PS_SLEEP
	.comm	_DTIM_EXPIRED,4,2               ; @DTIM_EXPIRED
	.comm	_MCAST_AID,4,2                  ; @MCAST_AID
	.comm	_WMI_DATA_HDR_FLAGS_MORE,4,2    ; @WMI_DATA_HDR_FLAGS_MORE
	.comm	_WMI_DATA_HDR_FLAGS_UAPSD,4,2   ; @WMI_DATA_HDR_FLAGS_UAPSD
	.no_dead_strip	_ath6kl_powersave_ap
.subsections_via_symbols
