	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function htc_get_credit_alloc
_htc_get_credit_alloc:                  ## @htc_get_credit_alloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rsi, %rdx
	movq	_ENDPOINT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	testl	%r9d, %r9d
	jle	LBB0_13
## %bb.1:
	movq	(%rdi), %r8
	cmpl	$1, %r9d
	jne	LBB0_3
## %bb.2:
	xorl	%edi, %edi
	xorl	%eax, %eax
LBB0_9:
	testb	$1, %r9b
	je	LBB0_12
## %bb.10:
	shlq	$4, %rdi
	cmpq	%rdx, (%r8,%rdi)
	jne	LBB0_12
## %bb.11:
	movq	8(%r8,%rdi), %rax
LBB0_12:
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	popq	%rbp
	retq
LBB0_13:
	movq	_ATH6KL_DBG_HTC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_ath6kl_dbg
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_3:
	movl	%r9d, %esi
	andl	$-2, %esi
	leaq	24(%r8), %rcx
	xorl	%edi, %edi
	xorl	%eax, %eax
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rdi
	addq	$32, %rcx
	cmpq	%rdi, %rsi
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, -24(%rcx)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-16(%rcx), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	%rdx, -8(%rcx)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rcx), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_ENDPOINT_MAX,4,2               ## @ENDPOINT_MAX
	.comm	_ATH6KL_DBG_HTC,4,2             ## @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HTC Service TX : 0x%2.2X : allocation is zero!\n"

	.no_dead_strip	_htc_get_credit_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function htc_get_credit_alloc
_htc_get_credit_alloc:                  ; @htc_get_credit_alloc
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x2, x1
Lloh0:
	adrp	x9, _ENDPOINT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ENDPOINT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x8, x0
	mov	x0, #0
	ldr	x8, [x8]
	add	x8, x8, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #16
	subs	x9, x9, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x10, [x8, #-8]
	cmp	x10, x2
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x8]
	b	LBB0_2
LBB0_5:
	cbz	x0, LBB0_7
; %bb.6:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh3:
	adrp	x8, _ATH6KL_DBG_HTC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH6KL_DBG_HTC@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ath6kl_dbg
	mov	x0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENDPOINT_MAX,4,2               ; @ENDPOINT_MAX
	.comm	_ATH6KL_DBG_HTC,4,2             ; @ATH6KL_DBG_HTC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HTC Service TX : 0x%2.2X : allocation is zero!\n"

	.no_dead_strip	_htc_get_credit_alloc
.subsections_via_symbols
