	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_process_uapsdq
_ath6kl_process_uapsdq:                 ## @ath6kl_process_uapsdq
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdi, %rbx
	movq	_STA_PS_APSD_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_4
## %bb.1:
	leaq	12(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	leaq	16(%rbx), %rdi
	callq	_skb_queue_empty
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	movq	_STA_PS_APSD_EOSP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.3:
	movq	_WMI_DATA_HDR_FLAGS_EOSP@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_4:
	cmpl	$0, 4(%rbx)
	je	LBB0_12
## %bb.5:
	movq	%rsi, %r15
	movq	8(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %r12
	movq	_WMM_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %rsi
	callq	_test_bit
	xorl	%r13d, %r13d
	movl	$0, %edi
	testq	%rax, %rax
	je	LBB0_18
## %bb.6:
	movl	(%r12), %edi
	callq	_be16_to_cpu
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_is_ethertype
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:
	addq	$4, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_8:
	movq	_WMI_DATA_HDR_FLAGS_MORE@GOTPCREL(%rip), %rcx
LBB0_9:
	movl	(%r14), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	jmp	LBB0_11
LBB0_10:
	movl	(%r14), %eax
LBB0_11:
	movq	_WMI_DATA_HDR_FLAGS_UAPSD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	movq	%r15, %rdi
	callq	_spin_unlock_bh
LBB0_12:
	xorl	%r13d, %r13d
LBB0_13:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	4(%r12), %edi
	callq	_be16_to_cpu
	addq	$8, %r12
LBB0_16:
	movq	_IP_ETHERTYPE@GOTPCREL(%rip), %rcx
	movl	$0, %edi
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_ath6kl_wmi_determine_user_priority
	movl	%eax, %edi
LBB0_18:
	callq	_ath6kl_wmi_get_traffic_class
	movl	4(%rbx), %ecx
	btl	%eax, %ecx
	jae	LBB0_13
## %bb.19:
	leaq	12(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_bh
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	callq	_skb_queue_empty
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_skb_queue_tail
	movq	%r12, %rdi
	callq	_spin_unlock_bh
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_21
## %bb.20:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	(%r15), %esi
	movl	8(%rbx), %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_ath6kl_wmi_set_apsd_bfrd_traf
LBB0_21:
	movq	_WMI_DATA_HDR_FLAGS_UAPSD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
	movl	$1, %r13d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_STA_PS_APSD_TRIGGER,4,2        ## @STA_PS_APSD_TRIGGER
	.comm	_WMI_DATA_HDR_FLAGS_MORE,4,2    ## @WMI_DATA_HDR_FLAGS_MORE
	.comm	_STA_PS_APSD_EOSP,4,2           ## @STA_PS_APSD_EOSP
	.comm	_WMI_DATA_HDR_FLAGS_EOSP,4,2    ## @WMI_DATA_HDR_FLAGS_EOSP
	.comm	_WMI_DATA_HDR_FLAGS_UAPSD,4,2   ## @WMI_DATA_HDR_FLAGS_UAPSD
	.comm	_WMM_ENABLED,4,2                ## @WMM_ENABLED
	.comm	_IP_ETHERTYPE,8,3               ## @IP_ETHERTYPE
	.no_dead_strip	_ath6kl_process_uapsdq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_process_uapsdq
_ath6kl_process_uapsdq:                 ; @ath6kl_process_uapsdq
	.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	x19, x3
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _STA_PS_APSD_TRIGGER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STA_PS_APSD_TRIGGER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	add	x21, x20, #12
	mov	x0, x21
	bl	_spin_lock_bh
	add	x0, x20, #16
	bl	_skb_queue_empty
	cbz	w0, LBB0_10
; %bb.2:
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _STA_PS_APSD_EOSP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STA_PS_APSD_EOSP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.3:
Lloh6:
	adrp	x8, _WMI_DATA_HDR_FLAGS_EOSP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WMI_DATA_HDR_FLAGS_EOSP@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_14
; %bb.5:
	mov	x22, x2
	mov	x21, x1
	ldr	x26, [x1, #8]
	ldr	x25, [x2]
Lloh8:
	adrp	x8, _WMM_ENABLED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WMM_ENABLED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, x1, #4
	bl	_test_bit
	cbz	x0, LBB0_17
; %bb.6:
	mov	x23, x25
	ldr	w0, [x23], #4
	bl	_be16_to_cpu
	mov	x24, x0
	bl	_is_ethertype
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x25, #4]
	bl	_be16_to_cpu
	mov	x24, x0
	add	x23, x25, #8
LBB0_8:
Lloh11:
	adrp	x8, _IP_ETHERTYPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IP_ETHERTYPE@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x24, x8
	b.ne	LBB0_16
; %bb.9:
	mov	x0, x23
	mov	w1, #0
	bl	_ath6kl_wmi_determine_user_priority
	b	LBB0_17
LBB0_10:
Lloh14:
	adrp	x8, _WMI_DATA_HDR_FLAGS_MORE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WMI_DATA_HDR_FLAGS_MORE@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_13
LBB0_12:
	ldr	w8, [x19]
LBB0_13:
Lloh16:
	adrp	x9, _WMI_DATA_HDR_FLAGS_UAPSD@GOTPAGE
Lloh17:
	ldr	x9, [x9, _WMI_DATA_HDR_FLAGS_UAPSD@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
	mov	x0, x21
	bl	_spin_unlock_bh
LBB0_14:
	mov	w0, #0
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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	w0, #0
LBB0_17:
	bl	_ath6kl_wmi_get_traffic_class
	ldr	w8, [x20, #4]
	lsr	w8, w8, w0
	tbz	w8, #0, LBB0_14
; %bb.18:
	add	x23, x20, #12
	mov	x0, x23
	bl	_spin_lock_bh
	add	x24, x20, #16
	mov	x0, x24
	bl	_skb_queue_empty
	mov	x25, x0
	mov	x0, x24
	mov	x1, x22
	bl	_skb_queue_tail
	mov	x0, x23
	bl	_spin_unlock_bh
	cbz	w25, LBB0_20
; %bb.19:
	ldr	w0, [x26]
	ldr	w1, [x21]
	ldr	w2, [x20, #8]
	mov	w3, #1
	mov	w4, #0
	bl	_ath6kl_wmi_set_apsd_bfrd_traf
LBB0_20:
Lloh19:
	adrp	x8, _WMI_DATA_HDR_FLAGS_UAPSD@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WMI_DATA_HDR_FLAGS_UAPSD@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_STA_PS_APSD_TRIGGER,4,2        ; @STA_PS_APSD_TRIGGER
	.comm	_WMI_DATA_HDR_FLAGS_MORE,4,2    ; @WMI_DATA_HDR_FLAGS_MORE
	.comm	_STA_PS_APSD_EOSP,4,2           ; @STA_PS_APSD_EOSP
	.comm	_WMI_DATA_HDR_FLAGS_EOSP,4,2    ; @WMI_DATA_HDR_FLAGS_EOSP
	.comm	_WMI_DATA_HDR_FLAGS_UAPSD,4,2   ; @WMI_DATA_HDR_FLAGS_UAPSD
	.comm	_WMM_ENABLED,4,2                ; @WMM_ENABLED
	.comm	_IP_ETHERTYPE,8,3               ; @IP_ETHERTYPE
	.no_dead_strip	_ath6kl_process_uapsdq
.subsections_via_symbols
