	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath6kl_sdio_bmi_credits
_ath6kl_sdio_bmi_credits:               ## @ath6kl_sdio_bmi_credits
	.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
	movq	%rdi, %r12
	movl	$0, (%rdi)
	movq	_COUNT_DEC_ADDRESS@GOTPCREL(%rip), %rax
	movq	_HTC_MAILBOX_NUM_MAX@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	_ENDPOINT1@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %r14
	addq	%rcx, %r14
	shlq	$2, %r14
	addq	(%rax), %r14
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	movq	_BMI_COMMUNICATION_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r15
	addq	%rbx, %r15
	movq	(%r13), %rdi
	movq	%r15, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_HIF_RD_SYNC_BYTE_INC@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r12)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %r8d
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	$4, %ecx
	callq	_ath6kl_sdio_read_write_sync
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movzbl	(%r12), %eax
	movl	%eax, (%r12)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r15, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_2
LBB0_7:
	xorl	%ebx, %ebx
	cmpl	$0, (%r12)
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ath6kl_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_ath6kl_err
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COUNT_DEC_ADDRESS,8,3          ## @COUNT_DEC_ADDRESS
	.comm	_HTC_MAILBOX_NUM_MAX,4,2        ## @HTC_MAILBOX_NUM_MAX
	.comm	_ENDPOINT1,4,2                  ## @ENDPOINT1
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_BMI_COMMUNICATION_TIMEOUT,4,2  ## @BMI_COMMUNICATION_TIMEOUT
	.comm	_HIF_RD_SYNC_BYTE_INC,4,2       ## @HIF_RD_SYNC_BYTE_INC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to decrement the command credit count register: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"bmi communication timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_ath6kl_sdio_bmi_credits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath6kl_sdio_bmi_credits
_ath6kl_sdio_bmi_credits:               ; @ath6kl_sdio_bmi_credits
	.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	x19, x0
	str	wzr, [x0]
Lloh0:
	adrp	x8, _COUNT_DEC_ADDRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COUNT_DEC_ADDRESS@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
Lloh3:
	adrp	x8, _HTC_MAILBOX_NUM_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HTC_MAILBOX_NUM_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _ENDPOINT1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENDPOINT1@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
Lloh9:
	adrp	x23, _jiffies@GOTPAGE
Lloh10:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x20, [x23]
Lloh11:
	adrp	x8, _BMI_COMMUNICATION_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BMI_COMMUNICATION_TIMEOUT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
	ldr	x0, [x23]
	mov	x1, x20
	bl	_time_before
	cbz	x0, LBB0_5
; %bb.1:
	add	w8, w24, w22
	lsl	w8, w8, #2
	add	x21, x21, w8, sxtw
Lloh14:
	adrp	x24, _HIF_RD_SYNC_BYTE_INC@GOTPAGE
Lloh15:
	ldr	x24, [x24, _HIF_RD_SYNC_BYTE_INC@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	cbnz	w8, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w4, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x19
	mov	w3, #4
	bl	_ath6kl_sdio_read_write_sync
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x19]
	str	w8, [x19]
	ldr	x0, [x23]
	mov	x1, x20
	bl	_time_before
	cbnz	x0, LBB0_2
LBB0_5:
	ldr	w8, [x19]
	cbz	w8, LBB0_8
LBB0_6:
	mov	w22, #0
	b	LBB0_9
LBB0_7:
	mov	x22, x0
	str	x22, [sp]
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ath6kl_err
	b	LBB0_9
LBB0_8:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ath6kl_err
Lloh20:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_COUNT_DEC_ADDRESS,8,3          ; @COUNT_DEC_ADDRESS
	.comm	_HTC_MAILBOX_NUM_MAX,4,2        ; @HTC_MAILBOX_NUM_MAX
	.comm	_ENDPOINT1,4,2                  ; @ENDPOINT1
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_BMI_COMMUNICATION_TIMEOUT,4,2  ; @BMI_COMMUNICATION_TIMEOUT
	.comm	_HIF_RD_SYNC_BYTE_INC,4,2       ; @HIF_RD_SYNC_BYTE_INC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to decrement the command credit count register: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"bmi communication timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_ath6kl_sdio_bmi_credits
.subsections_via_symbols
