	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btmrvl_sdio_poll_card_status
_btmrvl_sdio_poll_card_status:          ## @btmrvl_sdio_poll_card_status
	.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	_MAX_POLL_TRIES@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_6
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r13
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	_CARD_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_sdio_readb
	movl	-44(%rbp), %esi
	testl	%esi, %esi
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	notl	%eax
	testl	%eax, %r14d
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	imull	$1000, (%r12), %eax             ## imm = 0x3E8
	cmpl	%eax, %ebx
	jb	LBB0_2
LBB0_6:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	subl	(%rax), %esi
	movl	%esi, -44(%rbp)
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_BT_ERR
	movl	-44(%rbp), %eax
	jmp	LBB0_8
LBB0_4:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_POLL_TRIES,4,2             ## @MAX_POLL_TRIES
	.comm	_CARD_STATUS_REG,4,2            ## @CARD_STATUS_REG
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FAILED! ret=%d"

	.no_dead_strip	_btmrvl_sdio_poll_card_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btmrvl_sdio_poll_card_status
_btmrvl_sdio_poll_card_status:          ; @btmrvl_sdio_poll_card_status
	.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
Lloh0:
	adrp	x21, _MAX_POLL_TRIES@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAX_POLL_TRIES@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w22, #0
Lloh2:
	adrp	x23, _CARD_STATUS_REG@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CARD_STATUS_REG@GOTPAGEOFF]
	mov	w24, #1000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_sdio_readb
	ldr	w1, [sp, #12]
	cbnz	w1, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bics	wzr, w19, w0
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w22, w22, #1
	ldr	w8, [x21]
	mul	w8, w8, w24
	cmp	w22, w8
	b.lo	LBB0_2
LBB0_5:
Lloh4:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w1, w8
	str	w1, [sp, #12]
LBB0_6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BT_ERR
	ldr	w0, [sp, #12]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_POLL_TRIES,4,2             ; @MAX_POLL_TRIES
	.comm	_CARD_STATUS_REG,4,2            ; @CARD_STATUS_REG
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FAILED! ret=%d"

	.no_dead_strip	_btmrvl_sdio_poll_card_status
.subsections_via_symbols
