	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_tx_status_process_ampdu
_carl9170_tx_status_process_ampdu:      ## @carl9170_tx_status_process_ampdu
	.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
	movl	(%rdx), %eax
	movq	_IEEE80211_TX_CTL_AMPDU@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.1:
	movq	_IEEE80211_TX_CTL_INJECTED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rax), %r12
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	___carl9170_get_tx_sta
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_18
## %bb.3:
	movq	%r12, %rdi
	callq	_get_tid_h
	movq	(%rbx), %rbx
	movq	8(%rbx), %rcx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rcx,%rax,4), %edi
	callq	_rcu_dereference
	testq	%rax, %rax
	je	LBB0_18
## %bb.4:
	movq	%rax, %r14
	movq	%rax, %rdi
	addq	$8, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_bh
	movq	(%r14), %rax
	movq	_CARL9170_TID_STATE_IDLE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setge	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_get_seq_h
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_carl9170_tx_shift_bm
LBB0_6:
	movq	%rbx, %r12
	movq	(%rbx), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rcx,2), %rbx
	cmpl	$0, (%rax,%rbx,8)
	je	LBB0_7
## %bb.8:
	leaq	(%rax,%rbx,8), %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rcx)
	movq	$0, 16(%rcx)
	movl	$1, %ecx
	jmp	LBB0_9
LBB0_7:
	movq	16(%rax,%rbx,8), %rcx
	incq	%rcx
LBB0_9:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%rcx, 16(%rax,%rbx,8)
	movq	8(%r13), %rcx
	cmpl	$1, (%rcx)
	jne	LBB0_11
## %bb.10:
	incq	8(%rax,%rbx,8)
LBB0_11:
	movq	_IEEE80211_TX_STAT_ACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r13)
	jne	LBB0_13
## %bb.12:
	movl	$1, 4(%rax,%rbx,8)
LBB0_13:
	movl	16(%r15), %r14d
	movq	_AR9170_TX_MAC_IMM_BA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le16
	testl	%r14d, %eax
	je	LBB0_17
## %bb.14:
	movq	(%r12), %rax
	movups	8(%rax,%rbx,8), %xmm0
	movups	%xmm0, (%r15)
	movq	_IEEE80211_TX_STAT_AMPDU@GOTPCREL(%rip), %rdx
	movl	(%r13), %ecx
	orl	(%rdx), %ecx
	movl	%ecx, (%r13)
	cmpl	$0, 4(%rax,%rbx,8)
	je	LBB0_16
## %bb.15:
	movq	_IEEE80211_TX_STAT_AMPDU_NO_BACK@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, (%r13)
LBB0_16:
	movl	$1, (%rax,%rbx,8)
LBB0_17:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_bh
LBB0_18:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rcu_read_unlock                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_TX_CTL_AMPDU,4,2     ## @IEEE80211_TX_CTL_AMPDU
	.comm	_IEEE80211_TX_CTL_INJECTED,4,2  ## @IEEE80211_TX_CTL_INJECTED
	.comm	_CARL9170_TID_STATE_IDLE,8,3    ## @CARL9170_TID_STATE_IDLE
	.comm	_IEEE80211_TX_STAT_ACK,4,2      ## @IEEE80211_TX_STAT_ACK
	.comm	_AR9170_TX_MAC_IMM_BA,4,2       ## @AR9170_TX_MAC_IMM_BA
	.comm	_IEEE80211_TX_STAT_AMPDU,4,2    ## @IEEE80211_TX_STAT_AMPDU
	.comm	_IEEE80211_TX_STAT_AMPDU_NO_BACK,4,2 ## @IEEE80211_TX_STAT_AMPDU_NO_BACK
	.no_dead_strip	_carl9170_tx_status_process_ampdu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_tx_status_process_ampdu
_carl9170_tx_status_process_ampdu:      ; @carl9170_tx_status_process_ampdu
	.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
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _IEEE80211_TX_CTL_AMPDU@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_TX_CTL_AMPDU@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, _IEEE80211_TX_CTL_INJECTED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_TX_CTL_INJECTED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	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_3:
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x25, [x1]
	ldr	x23, [x25, #24]
	bl	_rcu_read_lock
	mov	x0, x22
	mov	x1, x20
	bl	___carl9170_get_tx_sta
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_19
; %bb.4:
	mov	x0, x23
	bl	_get_tid_h
	mov	x20, x0
	ldr	x26, [x21]
	ldr	x8, [x26, #8]
	ldr	w0, [x8, x0, lsl #2]
	bl	_rcu_dereference
	cbz	x0, LBB0_19
; %bb.5:
	mov	x24, x0
	add	x21, x0, #8
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x24]
Lloh6:
	adrp	x9, _CARL9170_TID_STATE_IDLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CARL9170_TID_STATE_IDLE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ge
	bl	_likely
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x23
	bl	_get_seq_h
	mov	x2, x0
	mov	x0, x22
	mov	x1, x24
	bl	_carl9170_tx_shift_bm
LBB0_7:
	ldr	x8, [x26]
	mov	w9, #24
	madd	x10, x20, x9, x8
	ldr	w9, [x10]
	cbz	w9, LBB0_9
; %bb.8:
	stp	xzr, xzr, [x10]
	mov	w9, #1
	str	xzr, [x10, #16]
	b	LBB0_10
LBB0_9:
	mov	w9, #24
	madd	x9, x20, x9, x8
	ldr	x9, [x9, #16]
	add	x9, x9, #1
LBB0_10:
	mov	w10, #24
	madd	x10, x20, x10, x8
	str	x9, [x10, #16]
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	cmp	w9, #1
	b.ne	LBB0_12
; %bb.11:
	mov	w9, #24
	madd	x9, x20, x9, x8
	ldr	x10, [x9, #8]
	add	x10, x10, #1
	str	x10, [x9, #8]
LBB0_12:
	ldr	w9, [x19]
Lloh9:
	adrp	x10, _IEEE80211_TX_STAT_ACK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IEEE80211_TX_STAT_ACK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_14
; %bb.13:
	mov	w9, #24
	madd	x8, x20, x9, x8
	mov	w9, #1
	str	w9, [x8, #4]
LBB0_14:
	ldr	w22, [x25, #16]
Lloh12:
	adrp	x8, _AR9170_TX_MAC_IMM_BA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AR9170_TX_MAC_IMM_BA@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_cpu_to_le16
	tst	w0, w22
	b.eq	LBB0_18
; %bb.15:
	ldr	x8, [x26]
	mov	w9, #24
	madd	x10, x20, x9, x8
	ldur	q0, [x10, #8]
Lloh15:
	adrp	x9, _IEEE80211_TX_STAT_AMPDU@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IEEE80211_TX_STAT_AMPDU@GOTPAGEOFF]
	str	q0, [x25]
Lloh17:
	ldr	w9, [x9]
	ldr	w11, [x19]
	orr	w9, w11, w9
	str	w9, [x19]
	ldr	w10, [x10, #4]
	cbz	w10, LBB0_17
; %bb.16:
Lloh18:
	adrp	x10, _IEEE80211_TX_STAT_AMPDU_NO_BACK@GOTPAGE
Lloh19:
	ldr	x10, [x10, _IEEE80211_TX_STAT_AMPDU_NO_BACK@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x19]
LBB0_17:
	mov	w9, #24
	mul	x9, x20, x9
	mov	w10, #1
	str	w10, [x8, x9]
LBB0_18:
	mov	x0, x21
	bl	_spin_unlock_bh
LBB0_19:
	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	_rcu_read_unlock
	.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	_IEEE80211_TX_CTL_AMPDU,4,2     ; @IEEE80211_TX_CTL_AMPDU
	.comm	_IEEE80211_TX_CTL_INJECTED,4,2  ; @IEEE80211_TX_CTL_INJECTED
	.comm	_CARL9170_TID_STATE_IDLE,8,3    ; @CARL9170_TID_STATE_IDLE
	.comm	_IEEE80211_TX_STAT_ACK,4,2      ; @IEEE80211_TX_STAT_ACK
	.comm	_AR9170_TX_MAC_IMM_BA,4,2       ; @AR9170_TX_MAC_IMM_BA
	.comm	_IEEE80211_TX_STAT_AMPDU,4,2    ; @IEEE80211_TX_STAT_AMPDU
	.comm	_IEEE80211_TX_STAT_AMPDU_NO_BACK,4,2 ; @IEEE80211_TX_STAT_AMPDU_NO_BACK
	.no_dead_strip	_carl9170_tx_status_process_ampdu
.subsections_via_symbols
