	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __ath10k_htt_tx_txq_recalc
___ath10k_htt_tx_txq_recalc:            ## @__ath10k_htt_tx_txq_recalc
	.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	%rsi, %rbx
	movq	(%rdi), %r12
	movq	16(%rsi), %rax
	movq	(%rax), %r14
	leaq	40(%r12), %rdi
	callq	_lockdep_assert_held
	cmpl	$0, 32(%r12)
	je	LBB0_8
## %bb.1:
	movq	(%r12), %rax
	movq	_HTT_TX_MODE_SWITCH_PUSH_PULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.2:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rax), %r14
LBB0_4:
	movslq	(%r14), %r15
	movq	(%rbx), %r14
	leal	31(%r15), %r13d
	testl	%r15d, %r15d
	cmovnsl	%r15d, %r13d
	movl	%r13d, %eax
	andl	$-32, %eax
	movl	%r15d, %edi
	subl	%eax, %edi
	callq	_BIT
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	-64(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ieee80211_txq_get_depth
	movq	-56(%rbp), %rdi
	callq	_ath10k_htt_tx_txq_calc_size
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpl	8(%r12), %r15d
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	cmpq	16(%r12), %r14
	setae	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movq	%r14, %rcx
	callq	_ath10k_warn
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	sarl	$5, %r13d
	movq	24(%r12), %rax
	movq	(%rax), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	%rbx, (%rcx,%r15,8)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%edi, %ecx
	notl	%ecx
	movq	8(%rax), %rax
	movq	(%rax,%r14,8), %rax
	movslq	%r13d, %rdx
	andl	(%rax,%rdx,4), %ecx
	xorl	%esi, %esi
	testq	%rbx, %rbx
	cmovnel	%edi, %esi
	orl	%ecx, %esi
	movl	%esi, (%rax,%rdx,4)
	movq	_ATH10K_DBG_HTT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	movq	%r14, %r8
	movq	%rbx, %r9
	callq	_ath10k_dbg
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_HTT_TX_MODE_SWITCH_PUSH_PULL,8,3 ## @HTT_TX_MODE_SWITCH_PUSH_PULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"refusing to update txq for peer_id %hu tid %hhu due to out of bounds\n"

	.comm	_ATH10K_DBG_HTT,4,2             ## @ATH10K_DBG_HTT
L_.str.1:                               ## @.str.1
	.asciz	"htt tx txq state update peer_id %hu tid %hhu count %hhu\n"

	.no_dead_strip	___ath10k_htt_tx_txq_recalc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __ath10k_htt_tx_txq_recalc
___ath10k_htt_tx_txq_recalc:            ; @__ath10k_htt_tx_txq_recalc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x1
	ldr	x19, [x0]
	ldr	x8, [x1, #16]
	ldr	x20, [x8]
	add	x0, x19, #40
	bl	_lockdep_assert_held
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _HTT_TX_MODE_SWITCH_PUSH_PULL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HTT_TX_MODE_SWITCH_PUSH_PULL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x20, [x8]
LBB0_4:
	ldrsw	x20, [x20]
	ldr	x21, [x22]
	add	w8, w20, #31
	cmp	w20, #0
	csel	w24, w8, w20, lt
	and	w8, w24, #0xffffffe0
	sub	w0, w20, w8
	bl	_BIT
	mov	x23, x0
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x22
	bl	_ieee80211_txq_get_depth
	ldr	x0, [sp]
	bl	_ath10k_htt_tx_txq_calc_size
	mov	x22, x0
	ldr	w8, [x19, #8]
	cmp	w20, w8
	cset	w0, ge
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x8, [x19, #16]
	cmp	x21, x8
	cset	w0, hs
	bl	_unlikely
	cbz	x0, LBB0_8
LBB0_6:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	bl	_ath10k_warn
LBB0_7:
	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
	add	sp, sp, #80
	ret
LBB0_8:
	ldr	x8, [x19, #24]
	ldr	x9, [x8]
	lsl	x10, x21, #3
	ldr	x9, [x9, x10]
	asr	w11, w24, #5
	str	x22, [x9, x20, lsl #3]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x10]
	sbfiz	x9, x11, #2, #32
	ldr	w10, [x8, x9]
	bic	w10, w10, w23
	cmp	x22, #0
	csel	w11, wzr, w23, eq
	orr	w10, w10, w11
	str	w10, [x8, x9]
Lloh5:
	adrp	x8, _ATH10K_DBG_HTT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATH10K_DBG_HTT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	mov	x4, x21
	mov	x5, x22
	bl	_ath10k_dbg
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HTT_TX_MODE_SWITCH_PUSH_PULL,8,3 ; @HTT_TX_MODE_SWITCH_PUSH_PULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"refusing to update txq for peer_id %hu tid %hhu due to out of bounds\n"

	.comm	_ATH10K_DBG_HTT,4,2             ; @ATH10K_DBG_HTT
l_.str.1:                               ; @.str.1
	.asciz	"htt tx txq state update peer_id %hu tid %hhu count %hhu\n"

	.no_dead_strip	___ath10k_htt_tx_txq_recalc
.subsections_via_symbols
