	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_mgmt_powersave_ap
_ath6kl_mgmt_powersave_ap:              ## @ath6kl_mgmt_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r12
	movl	(%r8), %edi
	callq	_is_multicast_ether_addr
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_ath6kl_find_sta
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	movl	(%rax), %edx
	movq	_STA_PS_SLEEP@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_13
## %bb.3:
	movq	_STA_PS_POLLED@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_4
## %bb.9:
	leaq	16(%rax), %r14
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	%rbx, %rdi
	addq	$20, %rdi
	callq	_skb_queue_empty
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	cmpq	$0, 8(%rbx)
	je	LBB0_12
LBB0_11:
	movq	16(%rbp), %rax
	movl	$1, (%rax)
LBB0_12:
	movq	%r14, %rdi
	callq	_spin_unlock_bh
LBB0_13:
	xorl	%ecx, %ecx
LBB0_14:
	movl	%ecx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %r12
	leaq	48(%r14), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	movl	$0, %ecx
	je	LBB0_14
## %bb.5:
	movq	%rax, %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movq	%rax, %r15
	addq	$12, %r14
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%r15)
	movq	%r13, 32(%r15)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%r15)
	movq	%r12, (%r15)
	movl	24(%rbp), %eax
	movl	%eax, 8(%r15)
	movl	16(%r15), %edi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_memcpy
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	leaq	20(%rbx), %rdi
	callq	_skb_queue_empty
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%r14, %rdi
	movq	8(%rbx), %r14
	movq	%rbx, %rsi
	addq	$28, %rsi
	callq	_list_add_tail
	incq	8(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movl	$1, %ecx
	testq	%r14, %r14
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_14
## %bb.7:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	(%rdx), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	24(%rax), %edx
	movl	$1, %ecx
	callq	_ath6kl_wmi_set_pvb_cmd
	movl	$1, %ecx
	jmp	LBB0_14
LBB0_8:
	movq	%rbx, %rsi
	addq	$28, %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	incq	8(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movl	$1, %ecx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_STA_PS_SLEEP,4,2               ## @STA_PS_SLEEP
	.comm	_STA_PS_POLLED,4,2              ## @STA_PS_POLLED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_ath6kl_mgmt_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_mgmt_powersave_ap
_ath6kl_mgmt_powersave_ap:              ; @ath6kl_mgmt_powersave_ap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x7
	mov	x24, x6
	mov	x21, x5
	mov	x22, x4
	mov	x25, x3
	mov	x26, x2
	mov	x27, x1
	mov	x20, x0
	ldr	x28, [x0, #8]
	ldr	w0, [x4]
	bl	_is_multicast_ether_addr
	cbz	x0, LBB0_3
LBB0_1:
	mov	w19, #0
LBB0_2:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	ldr	w1, [x22]
	mov	x0, x20
	bl	_ath6kl_find_sta
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.4:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _STA_PS_SLEEP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STA_PS_SLEEP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.5:
Lloh3:
	adrp	x9, _STA_PS_POLLED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STA_PS_POLLED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.6:
	add	x20, x19, #16
	mov	x0, x20
	bl	_spin_lock_bh
	add	x0, x19, #20
	bl	_skb_queue_empty
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
LBB0_8:
	mov	w8, #1
	str	w8, [x24]
LBB0_9:
	mov	x0, x20
	bl	_spin_unlock_bh
	b	LBB0_1
LBB0_10:
	str	x28, [sp, #8]                   ; 8-byte Folded Spill
	add	x0, x21, #48
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_1
; %bb.11:
	mov	x28, x0
	add	x24, x0, #12
	mov	x0, x24
	bl	_INIT_LIST_HEAD
	stp	x26, x27, [x28, #32]
	str	x25, [x28, #24]
	str	x21, [x28]
	str	w23, [x28, #8]
	ldr	w0, [x28, #16]
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_bh
	add	x0, x19, #20
	bl	_skb_queue_empty
	cbz	x0, LBB0_14
; %bb.12:
	ldr	x22, [x19, #8]
	add	x1, x19, #28
	mov	x0, x24
	bl	_list_add_tail
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_bh
	cbz	x22, LBB0_15
; %bb.13:
	mov	w19, #1
	b	LBB0_2
LBB0_14:
	add	x1, x19, #28
	mov	x0, x24
	bl	_list_add_tail
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	mov	x0, x21
	bl	_spin_unlock_bh
	mov	w19, #1
	b	LBB0_2
LBB0_15:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w0, [x8]
	ldr	w1, [x20]
	ldr	w2, [x19, #24]
	mov	w19, #1
	mov	w3, #1
	bl	_ath6kl_wmi_set_pvb_cmd
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_STA_PS_SLEEP,4,2               ; @STA_PS_SLEEP
	.comm	_STA_PS_POLLED,4,2              ; @STA_PS_POLLED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_ath6kl_mgmt_powersave_ap
.subsections_via_symbols
