	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htc_process_credit_report
_htc_process_credit_report:             ## @htc_process_credit_report
	.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	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_spin_lock_bh
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	jg	LBB0_1
LBB0_7:
	movq	_ATH6KL_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_ath6kl_dbg
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	addl	8(%rbx), %r15d
	addq	$16, %rbx
	decl	%r12d
	je	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	movq	_ENDPOINT_MAX@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r14), %r13
	shlq	$4, %rax
	movq	8(%rbx), %rcx
	addq	%rcx, 8(%r13,%rax)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	addq	%rax, %r13
	movq	%r13, %rdi
	callq	_get_queue_depth
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_htc_try_send
	movq	%r14, %rdi
	callq	_spin_lock_bh
	jmp	LBB0_6
LBB0_2:
	movl	$1, %edi
	callq	_WARN_ON_ONCE
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_bh                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENDPOINT_MAX,8,3               ## @ENDPOINT_MAX
	.comm	_ATH6KL_DBG_HTC,4,2             ## @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Report indicated %d credits to distribute\n"

	.no_dead_strip	_htc_process_credit_report
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htc_process_credit_report
_htc_process_credit_report:             ; @htc_process_credit_report
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_spin_lock_bh
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w20, #0
Lloh0:
	adrp	x24, _ENDPOINT_MAX@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ENDPOINT_MAX@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22, #8]
	add	w20, w20, w8
	add	x22, x22, #16
	subs	w21, w21, #1
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x9, [x24]
	cmp	x8, x9
	b.hs	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x19, #8]
	add	x23, x9, x8, lsl #4
	ldr	x8, [x22, #8]
	ldr	x9, [x23, #8]
	adds	x8, x9, x8
	str	x8, [x23, #8]
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_get_queue_depth
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x19
	mov	x1, x23
	mov	x2, #0
	bl	_htc_try_send
	mov	x0, x19
	bl	_spin_lock_bh
	b	LBB0_2
LBB0_7:
	mov	w20, #0
LBB0_8:
Lloh2:
	adrp	x8, _ATH6KL_DBG_HTC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ATH6KL_DBG_HTC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_ath6kl_dbg
	b	LBB0_10
LBB0_9:
	mov	w0, #1
	bl	_WARN_ON_ONCE
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_bh
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ENDPOINT_MAX,8,3               ; @ENDPOINT_MAX
	.comm	_ATH6KL_DBG_HTC,4,2             ; @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Report indicated %d credits to distribute\n"

	.no_dead_strip	_htc_process_credit_report
.subsections_via_symbols
