	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_test_wait_busy
_mmc_test_wait_busy:                    ## @mmc_test_wait_busy
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	xorl	%r15d, %r15d
	leaq	-56(%rbp), %r12
	jmp	LBB0_1
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_mmc_test_busy
	movl	%r13d, %r15d
	testq	%rax, %rax
	je	LBB0_8
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	_MMC_SEND_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	(%r14), %rax
	movl	(%rax), %ecx
	shll	$16, %ecx
	movl	%ecx, -56(%rbp)
	movq	_MMC_CMD_AC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MMC_RSP_R1@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movl	%ecx, -52(%rbp)
	movq	8(%rax), %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_mmc_wait_for_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %r13d
	testl	%r15d, %r15d
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_mmc_test_busy
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	movq	_MMC_CAP_WAIT_WHILE_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
	jmp	LBB0_7
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_SEND_STATUS,4,2            ## @MMC_SEND_STATUS
	.comm	_MMC_RSP_R1,4,2                 ## @MMC_RSP_R1
	.comm	_MMC_CMD_AC,4,2                 ## @MMC_CMD_AC
	.comm	_MMC_CAP_WAIT_WHILE_BUSY,4,2    ## @MMC_CAP_WAIT_WHILE_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Warning: Host did not wait for busy state to end.\n"

	.no_dead_strip	_mmc_test_wait_busy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_test_wait_busy
_mmc_test_wait_busy:                    ; @mmc_test_wait_busy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	w26, #0
	str	wzr, [sp, #8]
	str	xzr, [sp]
Lloh0:
	adrp	x22, _MMC_SEND_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MMC_SEND_STATUS@GOTPAGEOFF]
Lloh2:
	adrp	x23, _MMC_RSP_R1@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MMC_RSP_R1@GOTPAGEOFF]
Lloh4:
	adrp	x24, _MMC_CMD_AC@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MMC_CMD_AC@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
Lloh8:
	adrp	x25, _MMC_CAP_WAIT_WHILE_BUSY@GOTPAGE
Lloh9:
	ldr	x25, [x25, _MMC_CAP_WAIT_WHILE_BUSY@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #1
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, sp
	bl	_mmc_test_busy
	cbz	x0, LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	w8, [x22]
	str	w8, [sp, #8]
	ldr	x8, [x19]
	ldr	w9, [x8]
	lsl	w9, w9, #16
	ldr	w10, [x23]
	ldr	w11, [x24]
	orr	w10, w11, w10
	stp	w9, w10, [sp]
	ldr	x0, [x8, #8]
	mov	x1, sp
	mov	w2, #0
	bl	_mmc_wait_for_cmd
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbnz	w26, LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, sp
	bl	_mmc_test_busy
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	ldr	w8, [x0]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_mmc_hostname
	mov	x1, x0
	mov	x0, x20
	bl	_pr_info
	b	LBB0_1
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #0
	b	LBB0_2
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_SEND_STATUS,4,2            ; @MMC_SEND_STATUS
	.comm	_MMC_RSP_R1,4,2                 ; @MMC_RSP_R1
	.comm	_MMC_CMD_AC,4,2                 ; @MMC_CMD_AC
	.comm	_MMC_CAP_WAIT_WHILE_BUSY,4,2    ; @MMC_CAP_WAIT_WHILE_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Warning: Host did not wait for busy state to end.\n"

	.no_dead_strip	_mmc_test_wait_busy
.subsections_via_symbols
