	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdricoh_mmc_cmd
_sdricoh_mmc_cmd:                       ## @sdricoh_mmc_cmd
	.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
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_R21C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edx
	callq	_sdricoh_writel
	movq	_R204_CMD_ARG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_sdricoh_writel
	movq	_R200_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	16777216(%rbx), %edx
	movq	%r14, %rdi
	callq	_sdricoh_writel
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.1:
	movq	_CMD_TIMEOUT@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_9
## %bb.2:
	xorl	%ebx, %ebx
	movq	_STATUS_CMD_FINISHED@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_R21C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sdricoh_readl
	movl	%eax, %r15d
	movq	_R2E4_STATUS_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_sdricoh_writel
	testl	%r15d, (%r12)
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jb	LBB0_3
## %bb.5:
	cmpl	%eax, %ebx
	jne	LBB0_8
	jmp	LBB0_9
LBB0_7:
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	je	LBB0_9
LBB0_8:
	movq	_STATUS_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
LBB0_9:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_6:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R21C_STATUS,4,2                ## @R21C_STATUS
	.comm	_R204_CMD_ARG,4,2               ## @R204_CMD_ARG
	.comm	_R200_CMD,4,2                   ## @R200_CMD
	.comm	_CMD_TIMEOUT,4,2                ## @CMD_TIMEOUT
	.comm	_R2E4_STATUS_RESP,4,2           ## @R2E4_STATUS_RESP
	.comm	_STATUS_CMD_FINISHED,4,2        ## @STATUS_CMD_FINISHED
	.comm	_STATUS_CMD_TIMEOUT,4,2         ## @STATUS_CMD_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_sdricoh_mmc_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdricoh_mmc_cmd
_sdricoh_mmc_cmd:                       ; @sdricoh_mmc_cmd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _R21C_STATUS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _R21C_STATUS@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #24
	bl	_sdricoh_writel
Lloh2:
	adrp	x8, _R204_CMD_ARG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R204_CMD_ARG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_sdricoh_writel
Lloh5:
	adrp	x8, _R200_CMD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R200_CMD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	orr	w2, w21, #0x1000000
	mov	x0, x19
	bl	_sdricoh_writel
	cbz	w21, LBB0_9
; %bb.1:
Lloh8:
	adrp	x23, _CMD_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x23, [x23, _CMD_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_8
; %bb.2:
	mov	w21, #0
Lloh10:
	adrp	x24, _R2E4_STATUS_RESP@GOTPAGE
Lloh11:
	ldr	x24, [x24, _R2E4_STATUS_RESP@GOTPAGEOFF]
Lloh12:
	adrp	x25, _STATUS_CMD_FINISHED@GOTPAGE
Lloh13:
	ldr	x25, [x25, _STATUS_CMD_FINISHED@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdricoh_readl
	mov	x20, x0
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	bl	_sdricoh_writel
	ldr	w8, [x25]
	tst	w8, w20
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w21, w21, #1
	ldr	w8, [x23]
	cmp	w21, w8
	b.lo	LBB0_3
; %bb.5:
	cmp	w21, w8
	b.ne	LBB0_7
	b	LBB0_8
LBB0_6:
	ldr	w8, [x23]
	cmp	w21, w8
	b.eq	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _STATUS_CMD_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STATUS_CMD_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
LBB0_8:
Lloh17:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_R21C_STATUS,4,2                ; @R21C_STATUS
	.comm	_R204_CMD_ARG,4,2               ; @R204_CMD_ARG
	.comm	_R200_CMD,4,2                   ; @R200_CMD
	.comm	_CMD_TIMEOUT,4,2                ; @CMD_TIMEOUT
	.comm	_R2E4_STATUS_RESP,4,2           ; @R2E4_STATUS_RESP
	.comm	_STATUS_CMD_FINISHED,4,2        ; @STATUS_CMD_FINISHED
	.comm	_STATUS_CMD_TIMEOUT,4,2         ; @STATUS_CMD_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_sdricoh_mmc_cmd
.subsections_via_symbols
