	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mci_send_cmd
_mci_send_cmd:                          ## @mci_send_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	_CMDARG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mci_writel
	xorl	%eax, %eax
	callq	_wmb
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_dw_mci_wait_while_busy
	movq	_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SDMMC_CMD_START@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%r12d, %edx
	movq	%rbx, %rdi
	callq	_mci_writel
	movq	_SDMMC_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movq	_USEC_PER_MSEC@GOTPCREL(%rip), %rax
	imull	$500, (%rax), %r8d              ## imm = 0x1F4
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_readl_poll_timeout_atomic
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMDARG,4,2                     ## @CMDARG
	.comm	_CMD,4,2                        ## @CMD
	.comm	_SDMMC_CMD_START,4,2            ## @SDMMC_CMD_START
	.comm	_SDMMC_CMD,8,3                  ## @SDMMC_CMD
	.comm	_USEC_PER_MSEC,4,2              ## @USEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout sending command (cmd %#x arg %#x status %#x)\n"

	.no_dead_strip	_mci_send_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mci_send_cmd
_mci_send_cmd:                          ; @mci_send_cmd
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _CMDARG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMDARG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_mci_writel
	bl	_wmb
	mov	x0, x22
	mov	x1, x20
	bl	_dw_mci_wait_while_busy
Lloh3:
	adrp	x8, _CMD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _SDMMC_CMD_START@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDMMC_CMD_START@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w2, w8, w20
	mov	x0, x22
	bl	_mci_writel
	ldr	x8, [x22]
Lloh9:
	adrp	x9, _SDMMC_CMD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SDMMC_CMD@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
Lloh12:
	adrp	x8, _USEC_PER_MSEC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _USEC_PER_MSEC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	w9, #500
	mul	w4, w8, w9
	mov	w1, #0
	mov	w2, #1
	mov	w3, #1
	bl	_readl_poll_timeout_atomic
	cbz	x0, LBB0_2
; %bb.1:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	ldr	x0, [x21]
	mov	x2, x20
	mov	x3, x19
	mov	w4, #0
	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	_dev_err
LBB0_2:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CMDARG,4,2                     ; @CMDARG
	.comm	_CMD,4,2                        ; @CMD
	.comm	_SDMMC_CMD_START,4,2            ; @SDMMC_CMD_START
	.comm	_SDMMC_CMD,8,3                  ; @SDMMC_CMD
	.comm	_USEC_PER_MSEC,4,2              ; @USEC_PER_MSEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout sending command (cmd %#x arg %#x status %#x)\n"

	.no_dead_strip	_mci_send_cmd
.subsections_via_symbols
