	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_txq_agg_enable
_il4965_txq_agg_enable:                 ## @il4965_txq_agg_enable
	.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
	movl	%r8d, %r13d
	movl	%edx, %r8d
	movl	%esi, %r14d
	movq	_IL49_FIRST_AMPDU_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	24(%rdi), %rax
	movl	(%rax), %eax
	cmpl	%esi, %edx
	jg	LBB0_2
## %bb.1:
	movl	%ecx, %ebx
	leal	(%rax,%rdx), %ecx
	cmpl	%r14d, %ecx
	jle	LBB0_2
## %bb.3:
	movq	%rdi, %r15
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	%r13d, %esi
	callq	_BUILD_RAxTID
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_il4965_sta_tx_modify_enable_tid
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_il4965_tx_queue_stop_scheduler
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_il4965_tx_queue_set_q2ratid
	movq	_IL49_SCD_QUEUECHAIN_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %r13d
	movl	%r14d, %ecx
	shll	%cl, %r13d
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_il_set_bits_prph
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movzbl	%dl, %eax
	movq	8(%r15), %rcx
	movslq	%r14d, %rsi
	leaq	(,%rsi,8), %r12
	movl	%eax, (%rcx,%rsi,8)
	movl	%eax, 4(%rcx,%rsi,8)
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_il4965_set_wr_ptrs
	movq	16(%r15), %rbx
	movl	%r14d, %edi
	callq	_IL49_SCD_CONTEXT_QUEUE_OFFSET
	movq	_IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_SCD_WIN_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	%cl, %edx
	addq	%rax, %rbx
	movq	_IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_il_write_targ_mem
	movq	16(%r15), %rbx
	movl	%r14d, %edi
	callq	_IL49_SCD_CONTEXT_QUEUE_OFFSET
	movq	_IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_SCD_FRAME_LIMIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	%cl, %edx
	leaq	(%rbx,%rax), %rsi
	addq	$4, %rsi
	movq	_IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	%r15, %rdi
	callq	_il_write_targ_mem
	movq	_IL49_SCD_INTERRUPT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_il_set_bits_prph
	addq	8(%r15), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	$1, %ecx
	callq	_il4965_tx_queue_set_status
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_2:
	leal	(%rdx,%rax), %ecx
	decl	%ecx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_IL_WARN
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IL49_FIRST_AMPDU_QUEUE,4,2     ## @IL49_FIRST_AMPDU_QUEUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queue number out of range: %d, must be %d to %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IL49_SCD_QUEUECHAIN_SEL,4,2    ## @IL49_SCD_QUEUECHAIN_SEL
	.comm	_SCD_WIN_SIZE,4,2               ## @SCD_WIN_SIZE
	.comm	_IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_POS,4,2 ## @IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_POS
	.comm	_IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK,4,2 ## @IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK
	.comm	_SCD_FRAME_LIMIT,4,2            ## @SCD_FRAME_LIMIT
	.comm	_IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS,4,2 ## @IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS
	.comm	_IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK,4,2 ## @IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK
	.comm	_IL49_SCD_INTERRUPT_MASK,4,2    ## @IL49_SCD_INTERRUPT_MASK
	.no_dead_strip	_il4965_txq_agg_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_txq_agg_enable
_il4965_txq_agg_enable:                 ; @il4965_txq_agg_enable
	.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	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _IL49_FIRST_AMPDU_QUEUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IL49_FIRST_AMPDU_QUEUE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	ldr	x8, [x0, #24]
	ldr	w8, [x8]
	add	w9, w8, w2
	cmp	w2, w1
	ccmp	w9, w1, #4, le
	b.gt	LBB0_2
; %bb.1:
	add	w8, w2, w8
	sub	w3, w8, #1
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_IL_WARN
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
	mov	x23, x5
	mov	x24, x4
	mov	x25, x3
	mov	x19, x0
	mov	x0, x3
	mov	x1, x4
	bl	_BUILD_RAxTID
	mov	x22, x0
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	bl	_il4965_sta_tx_modify_enable_tid
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x21
	bl	_il4965_tx_queue_stop_scheduler
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_il4965_tx_queue_set_q2ratid
Lloh8:
	adrp	x8, _IL49_SCD_QUEUECHAIN_SEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IL49_SCD_QUEUECHAIN_SEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w8, #1
	lsl	w22, w8, w21
	mov	x0, x19
	mov	x2, x22
	bl	_il_set_bits_prph
	and	w8, w23, #0xff
	ldr	x9, [x19, #8]
	sbfiz	x24, x21, #3, #32
	add	x9, x9, x24
	stp	w8, w8, [x9]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_il4965_set_wr_ptrs
	ldr	x23, [x19, #16]
	mov	x0, x21
	bl	_IL49_SCD_CONTEXT_QUEUE_OFFSET
	add	x1, x0, x23
Lloh11:
	adrp	x8, _SCD_WIN_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SCD_WIN_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_POS@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_POS@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh17:
	adrp	x9, _IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	and	w2, w8, w9
	mov	x0, x19
	bl	_il_write_targ_mem
	ldr	x23, [x19, #16]
	mov	x0, x21
	bl	_IL49_SCD_CONTEXT_QUEUE_OFFSET
	add	x8, x23, x0
	add	x1, x8, #4
Lloh20:
	adrp	x8, _SCD_FRAME_LIMIT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SCD_FRAME_LIMIT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh26:
	adrp	x9, _IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	and	w2, w8, w9
	mov	x0, x19
	bl	_il_write_targ_mem
Lloh29:
	adrp	x8, _IL49_SCD_INTERRUPT_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IL49_SCD_INTERRUPT_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_il_set_bits_prph
	ldr	x8, [x19, #8]
	add	x1, x8, x24
	mov	x0, x19
	mov	x2, x20
	mov	w3, #1
	bl	_il4965_tx_queue_set_status
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IL49_FIRST_AMPDU_QUEUE,4,2     ; @IL49_FIRST_AMPDU_QUEUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queue number out of range: %d, must be %d to %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IL49_SCD_QUEUECHAIN_SEL,4,2    ; @IL49_SCD_QUEUECHAIN_SEL
	.comm	_SCD_WIN_SIZE,4,2               ; @SCD_WIN_SIZE
	.comm	_IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_POS,4,2 ; @IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_POS
	.comm	_IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK,4,2 ; @IL49_SCD_QUEUE_CTX_REG1_WIN_SIZE_MSK
	.comm	_SCD_FRAME_LIMIT,4,2            ; @SCD_FRAME_LIMIT
	.comm	_IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS,4,2 ; @IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_POS
	.comm	_IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK,4,2 ; @IL49_SCD_QUEUE_CTX_REG2_FRAME_LIMIT_MSK
	.comm	_IL49_SCD_INTERRUPT_MASK,4,2    ; @IL49_SCD_INTERRUPT_MASK
	.no_dead_strip	_il4965_txq_agg_enable
.subsections_via_symbols
