	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aml8726_sdxc_busy_check
_aml8726_sdxc_busy_check:               ## @aml8726_sdxc_busy_check
	.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	%rdi, %rbx
	movq	_AML_SDXC_BUSY_POLL_INTVL@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	addq	%rax, (%rdi)
	movq	_AML_SDXC_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CSR_READ_4
	movq	_AML_SDXC_STATUS_DAT0@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	8(%rbx), %rsi
LBB0_5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_aml8726_sdxc_finish_command    ## TAILCALL
LBB0_2:
	movq	(%rbx), %rax
	movq	_AML_SDXC_BUSY_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_3
## %bb.6:
	leaq	16(%rbx), %r14
	movq	(%r15), %rdi
	callq	_msecs_to_ticks
	leaq	_aml8726_sdxc_busy_check(%rip), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rcx
	callq	_callout_reset
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AML_SDXC_UNLOCK                ## TAILCALL
LBB0_3:
	movq	8(%rbx), %rsi
	movq	_MMC_ERR_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_5
## %bb.4:
	movq	_MMC_ERR_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rsi, 8(%rbx)
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_AML_SDXC_BUSY_POLL_INTVL,8,3   ## @AML_SDXC_BUSY_POLL_INTVL
	.comm	_AML_SDXC_STATUS_REG,4,2        ## @AML_SDXC_STATUS_REG
	.comm	_AML_SDXC_STATUS_DAT0,4,2       ## @AML_SDXC_STATUS_DAT0
	.comm	_AML_SDXC_BUSY_TIMEOUT,8,3      ## @AML_SDXC_BUSY_TIMEOUT
	.comm	_MMC_ERR_NONE,8,3               ## @MMC_ERR_NONE
	.comm	_MMC_ERR_TIMEOUT,8,3            ## @MMC_ERR_TIMEOUT
	.no_dead_strip	_aml8726_sdxc_busy_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aml8726_sdxc_busy_check
_aml8726_sdxc_busy_check:               ; @aml8726_sdxc_busy_check
	.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	x19, x0
Lloh0:
	adrp	x21, _AML_SDXC_BUSY_POLL_INTVL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AML_SDXC_BUSY_POLL_INTVL@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x0]
	add	x8, x9, x8
	str	x8, [x0]
Lloh2:
	adrp	x8, _AML_SDXC_STATUS_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AML_SDXC_STATUS_REG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_CSR_READ_4
Lloh5:
	adrp	x8, _AML_SDXC_STATUS_DAT0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AML_SDXC_STATUS_DAT0@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	ldr	x1, [x19, #8]
LBB0_2:
	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	_aml8726_sdxc_finish_command
LBB0_3:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _AML_SDXC_BUSY_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AML_SDXC_BUSY_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.4:
	add	x20, x19, #16
	ldr	x0, [x21]
	bl	_msecs_to_ticks
	mov	x1, x0
Lloh11:
	adrp	x2, _aml8726_sdxc_busy_check@PAGE
Lloh12:
	add	x2, x2, _aml8726_sdxc_busy_check@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	bl	_callout_reset
	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	_AML_SDXC_UNLOCK
LBB0_5:
	ldr	x1, [x19, #8]
Lloh13:
	adrp	x8, _MMC_ERR_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMC_ERR_NONE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_2
; %bb.6:
Lloh16:
	adrp	x8, _MMC_ERR_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MMC_ERR_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x8]
	str	x1, [x19, #8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AML_SDXC_BUSY_POLL_INTVL,8,3   ; @AML_SDXC_BUSY_POLL_INTVL
	.comm	_AML_SDXC_STATUS_REG,4,2        ; @AML_SDXC_STATUS_REG
	.comm	_AML_SDXC_STATUS_DAT0,4,2       ; @AML_SDXC_STATUS_DAT0
	.comm	_AML_SDXC_BUSY_TIMEOUT,8,3      ; @AML_SDXC_BUSY_TIMEOUT
	.comm	_MMC_ERR_NONE,8,3               ; @MMC_ERR_NONE
	.comm	_MMC_ERR_TIMEOUT,8,3            ; @MMC_ERR_TIMEOUT
	.no_dead_strip	_aml8726_sdxc_busy_check
.subsections_via_symbols
