	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwlagn_tx_agg_flush            ## -- Begin function iwlagn_tx_agg_flush
	.p2align	4, 0x90
_iwlagn_tx_agg_flush:                   ## @iwlagn_tx_agg_flush
	.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	%rcx, %rbx
	movq	%rdi, %r12
	movq	%rdx, %rdi
	callq	_iwl_sta_id
	movl	%eax, %r14d
	leaq	8(%r12), %r13
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movq	16(%r12), %rax
	movslq	%r14d, %rdx
	movq	(%rax,%rdx,8), %r15
	movl	(%r15,%rbx,8), %r14d
	movl	4(%r15,%rbx,8), %r9d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%rbx, %rcx
	movl	%r14d, %r8d
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_IWL_DEBUG_TX_QUEUES
	movq	_IWL_AGG_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15,%rbx,8)
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	movl	%r14d, %edi
	callq	_BIT
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_iwlagn_txfifo_flush
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_IWL_ERR
LBB0_2:
	movl	4(%r12), %esi
	movl	%r14d, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_IWL_AGG_ON@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	(%rax), %edx
	jne	LBB0_5
## %bb.4:
	movl	(%r12), %edi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_iwl_trans_txq_disable
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_IWL_DEBUG_TX_QUEUES
LBB0_6:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_iwlagn_dealloc_agg_txq
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Flush AGG: sta %d tid %d q %d state %d\n"

	.comm	_IWL_AGG_OFF,4,2                ## @IWL_AGG_OFF
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't flush the AGG queue\n"

	.comm	_IWL_AGG_ON,4,2                 ## @IWL_AGG_ON
L_.str.2:                               ## @.str.2
	.asciz	"Don't disable tx agg: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwlagn_tx_agg_flush            ; -- Begin function iwlagn_tx_agg_flush
	.p2align	2
_iwlagn_tx_agg_flush:                   ; @iwlagn_tx_agg_flush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x3
	mov	x19, x0
	mov	x0, x2
	bl	_iwl_sta_id
	mov	x23, x0
	add	x24, x19, #8
	mov	x0, x24
	bl	_spin_lock_bh
	ldr	x8, [x19, #16]
	ldr	x8, [x8, w23, sxtw #3]
	add	x25, x8, x22, lsl #3
	ldp	w20, w21, [x25]
	stp	x20, x21, [sp, #8]
	str	x22, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_IWL_DEBUG_TX_QUEUES
Lloh2:
	adrp	x8, _IWL_AGG_OFF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IWL_AGG_OFF@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x25, #4]
	mov	x0, x24
	bl	_spin_unlock_bh
	mov	x0, x20
	bl	_BIT
	mov	x1, x0
	mov	x0, x19
	bl	_iwlagn_txfifo_flush
	cbz	x0, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
LBB0_2:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_test_bit
	cbz	x0, LBB0_7
; %bb.3:
Lloh7:
	adrp	x8, _IWL_AGG_ON@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IWL_AGG_ON@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x19]
	mov	x1, x20
	mov	w2, #1
	bl	_iwl_trans_txq_disable
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_IWL_DEBUG_TX_QUEUES
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_iwlagn_dealloc_agg_txq
LBB0_7:
	mov	w0, #0
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Flush AGG: sta %d tid %d q %d state %d\n"

	.comm	_IWL_AGG_OFF,4,2                ; @IWL_AGG_OFF
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't flush the AGG queue\n"

	.comm	_IWL_AGG_ON,4,2                 ; @IWL_AGG_ON
l_.str.2:                               ; @.str.2
	.asciz	"Don't disable tx agg: %d\n"

.subsections_via_symbols
