	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_tx_agg_stop             ## -- Begin function il4965_tx_agg_stop
	.p2align	4, 0x90
_il4965_tx_agg_stop:                    ## @il4965_tx_agg_stop
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rcx, %rdi
	callq	_il4965_get_fifo_from_tid
	movl	%eax, %r13d
	movl	%eax, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_il_sta_id
	movl	%eax, %r15d
	movq	_IL_INVALID_STATION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	callq	_IL_ERR
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_3:
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r14), %rax
	movslq	%r15d, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %rax
	leaq	(%r12,%r12,2), %rdx
	movq	_IEEE80211_SCTL_SEQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	andl	(%rax,%rdx,4), %r15d
	movslq	4(%rax,%rdx,4), %rsi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	8(%rax,%rdx,4), %eax
	cmpl	$128, %eax
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	callq	_IL_WARN
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_7:
	movq	16(%r14), %rax
	movl	(%rax,%rsi,8), %ecx
	cmpl	4(%rax,%rsi,8), %ecx
	jne	LBB0_12
## %bb.8:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_9:
	sarl	$4, %r15d
	callq	_D_HT
	movq	_IL_AGG_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 8(%rcx,%rdx,4)
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	%r14, %rdi
	callq	_spin_lock
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r15d, %edx
	movl	%r13d, %ecx
	callq	_il4965_txq_agg_disable
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_ieee80211_stop_tx_ba_cb_irqsafe
	jmp	LBB0_10
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	callq	_D_HT
	movq	_IL_EMPTYING_HW_QUEUE_DELBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, 8(%rcx,%rdx,4)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_10:
	xorl	%r13d, %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IL_INVALID_STATION,4,2         ## @IL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid station for AGG tid %d\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_IEEE80211_SCTL_SEQ,4,2         ## @IEEE80211_SCTL_SEQ
L_.str.1:                               ## @.str.1
	.asciz	"AGG stop before setup done\n"

L_.str.2:                               ## @.str.2
	.asciz	"Stopping AGG while state not ON or starting\n"

L_.str.3:                               ## @.str.3
	.asciz	"Stopping a non empty AGG HW QUEUE\n"

	.comm	_IL_EMPTYING_HW_QUEUE_DELBA,4,2 ## @IL_EMPTYING_HW_QUEUE_DELBA
L_.str.4:                               ## @.str.4
	.asciz	"HW queue is empty\n"

	.comm	_IL_AGG_OFF,4,2                 ## @IL_AGG_OFF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il4965_tx_agg_stop             ; -- Begin function il4965_tx_agg_stop
	.p2align	2
_il4965_tx_agg_stop:                    ; @il4965_tx_agg_stop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x3
	bl	_il4965_get_fifo_from_tid
	mov	x23, x0
	lsr	w0, w0, #31
	bl	_unlikely
	cbnz	x0, LBB0_12
; %bb.1:
	mov	x0, x22
	bl	_il_sta_id
Lloh0:
	adrp	x8, _IL_INVALID_STATION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IL_INVALID_STATION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_IL_ERR
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_12
LBB0_3:
	mov	x25, x0
	add	x24, x20, #4
	mov	x0, x24
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	sxtw	x27, w25
	ldr	x8, [x8, w25, sxtw #3]
	mov	w9, #12
Lloh8:
	adrp	x10, _IEEE80211_SCTL_SEQ@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IEEE80211_SCTL_SEQ@GOTPAGEOFF]
	madd	x8, x19, x9, x8
Lloh10:
	ldr	w26, [x10]
	ldp	w28, w25, [x8]
                                        ; kill: def $w25 killed $w25 def $x25
	sxtw	x25, w25
	ldr	w8, [x8, #8]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.5:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_IL_WARN
LBB0_6:
	ldr	x8, [x20, #16]
	add	x8, x8, x25, lsl #3
	ldp	w9, w8, [x8]
	cmp	w9, w8
	b.ne	LBB0_10
; %bb.7:
Lloh13:
	adrp	x0, l_.str.4@PAGE
Lloh14:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	and	w8, w26, w28
	asr	w26, w8, #4
	bl	_D_HT
Lloh17:
	adrp	x8, _IL_AGG_OFF@GOTPAGE
Lloh18:
	ldr	x8, [x8, _IL_AGG_OFF@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	x9, [x20, #8]
	ldr	x9, [x9, x27, lsl #3]
	mov	w10, #12
	madd	x9, x19, x10, x9
	str	w8, [x9, #8]
	mov	x0, x24
	bl	_spin_unlock
	mov	x0, x20
	bl	_spin_lock
	mov	x0, x20
	mov	x1, x25
	mov	x2, x26
	mov	x3, x23
	bl	_il4965_txq_agg_disable
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w1, [x22]
	mov	x0, x21
	mov	x2, x19
	bl	_ieee80211_stop_tx_ba_cb_irqsafe
	b	LBB0_11
LBB0_10:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_D_HT
Lloh22:
	adrp	x8, _IL_EMPTYING_HW_QUEUE_DELBA@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IL_EMPTYING_HW_QUEUE_DELBA@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	x9, [x20, #8]
	ldr	x9, [x9, x27, lsl #3]
	mov	w10, #12
	madd	x9, x19, x10, x9
	str	w8, [x9, #8]
	mov	x0, x24
	bl	_spin_unlock_irqrestore
LBB0_11:
	mov	w23, #0
LBB0_12:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_IL_INVALID_STATION,4,2         ; @IL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid station for AGG tid %d\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_IEEE80211_SCTL_SEQ,4,2         ; @IEEE80211_SCTL_SEQ
l_.str.1:                               ; @.str.1
	.asciz	"AGG stop before setup done\n"

l_.str.2:                               ; @.str.2
	.asciz	"Stopping AGG while state not ON or starting\n"

l_.str.3:                               ; @.str.3
	.asciz	"Stopping a non empty AGG HW QUEUE\n"

	.comm	_IL_EMPTYING_HW_QUEUE_DELBA,4,2 ; @IL_EMPTYING_HW_QUEUE_DELBA
l_.str.4:                               ; @.str.4
	.asciz	"HW queue is empty\n"

	.comm	_IL_AGG_OFF,4,2                 ; @IL_AGG_OFF
.subsections_via_symbols
