	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htc_tx_comp_update
_htc_tx_comp_update:                    ## @htc_tx_comp_update
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, 24(%rdx)
	movq	_HTC_HDR_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, 20(%rdx)
	movq	%rsi, %r14
	movl	16(%rdx), %esi
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	%rdi, %r15
	movl	12(%rdx), %edx
	movl	8(%rbx), %ecx
	movq	(%rbx), %r8
	leaq	L_.str(%rip), %rdi
	callq	_ath6kl_err
	movq	%r15, %rdi
	callq	_spin_lock_bh
	movl	(%rbx), %eax
	addl	%eax, 8(%r14)
	movq	%r14, %rdi
	callq	_get_queue_depth
	movl	%eax, 4(%r14)
	movq	_ATH6KL_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %edx
	leaq	4(%r15), %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rcx
	callq	_ath6kl_dbg
	movl	8(%r15), %edi
	movq	_HTC_CREDIT_DIST_SEND_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_ath6kl_credit_distribute
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HTC_HDR_LENGTH,8,3             ## @HTC_HDR_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"req failed (status:%d, ep:%d, len:%d creds:%d)\n"

	.comm	_ATH6KL_DBG_HTC,4,2             ## @ATH6KL_DBG_HTC
L_.str.1:                               ## @.str.1
	.asciz	"htc tx ctxt 0x%p dist 0x%p\n"

	.comm	_HTC_CREDIT_DIST_SEND_COMPLETE,4,2 ## @HTC_CREDIT_DIST_SEND_COMPLETE
	.no_dead_strip	_htc_tx_comp_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htc_tx_comp_update
_htc_tx_comp_update:                    ; @htc_tx_comp_update
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
Lloh0:
	adrp	x8, _HTC_HDR_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HTC_HDR_LENGTH@GOTPAGEOFF]
	str	xzr, [x2, #24]
Lloh2:
	ldr	w8, [x8]
	ldp	w1, w9, [x2, #16]
	add	w8, w9, w8
	str	w8, [x2, #20]
	cbz	w1, LBB0_2
; %bb.1:
	mov	x21, x2
	mov	x19, x0
	ldr	w2, [x2, #12]
	ldr	w3, [x21, #8]
	ldr	x4, [x21]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
	mov	x0, x19
	bl	_spin_lock_bh
	ldr	w8, [x21]
	ldr	w9, [x20, #8]
	add	w8, w9, w8
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_get_queue_depth
	str	w0, [x20, #4]
Lloh5:
	adrp	x8, _ATH6KL_DBG_HTC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATH6KL_DBG_HTC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w2, [x19, #8]
	add	x20, x19, #4
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x20
	bl	_ath6kl_dbg
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x8, _HTC_CREDIT_DIST_SEND_COMPLETE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HTC_CREDIT_DIST_SEND_COMPLETE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_ath6kl_credit_distribute
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_bh
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HTC_HDR_LENGTH,8,3             ; @HTC_HDR_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"req failed (status:%d, ep:%d, len:%d creds:%d)\n"

	.comm	_ATH6KL_DBG_HTC,4,2             ; @ATH6KL_DBG_HTC
l_.str.1:                               ; @.str.1
	.asciz	"htc tx ctxt 0x%p dist 0x%p\n"

	.comm	_HTC_CREDIT_DIST_SEND_COMPLETE,4,2 ; @HTC_CREDIT_DIST_SEND_COMPLETE
	.no_dead_strip	_htc_tx_comp_update
.subsections_via_symbols
