	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msdc_cmd_is_ready
_msdc_cmd_is_ready:                     ## @msdc_cmd_is_ready
	.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	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_jiffies@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$20, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movq	_SDC_STS@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movq	_SDC_STS_CMDBUSY@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_4
## %bb.1:
	addq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	(%r14), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	testl	%eax, (%r15)
	jne	LBB0_2
LBB0_4:
	movq	(%r14), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_14
LBB0_6:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mmc_resp_type
	movq	_MMC_RSP_R1B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	cmpq	$0, (%rbx)
	je	LBB0_17
LBB0_8:
	movq	(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$20, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movq	(%r14), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	movq	_SDC_STS_SDCBUSY@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_12
## %bb.9:
	addq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	movq	(%r14), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	testl	%eax, (%r15)
	jne	LBB0_10
LBB0_12:
	movq	(%r14), %rdi
	addq	8(%r12), %rdi
	callq	_readl
	testl	%eax, (%r15)
	je	LBB0_17
## %bb.13:
	leaq	L_.str.1(%rip), %rsi
LBB0_14:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%r12), %edi
	callq	_dev_err
	movq	_REQ_CMD_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	movq	_MSDC_INT_CMDTMO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_msdc_cmd_done
	xorl	%eax, %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	$1, %eax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_SDC_STS,8,3                    ## @SDC_STS
	.comm	_SDC_STS_CMDBUSY,4,2            ## @SDC_STS_CMDBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CMD bus busy detected\n"

	.comm	_REQ_CMD_BUSY,4,2               ## @REQ_CMD_BUSY
	.comm	_MSDC_INT_CMDTMO,4,2            ## @MSDC_INT_CMDTMO
	.comm	_MMC_RSP_R1B,8,3                ## @MMC_RSP_R1B
	.comm	_SDC_STS_SDCBUSY,4,2            ## @SDC_STS_SDCBUSY
L_.str.1:                               ## @.str.1
	.asciz	"Controller busy detected\n"

	.no_dead_strip	_msdc_cmd_is_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msdc_cmd_is_ready
_msdc_cmd_is_ready:                     ; @msdc_cmd_is_ready
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x26, [x23]
	mov	w0, #20
	bl	_msecs_to_jiffies
	mov	x22, x0
	ldr	x8, [x21, #8]
Lloh2:
	adrp	x24, _SDC_STS@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SDC_STS@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
Lloh4:
	adrp	x25, _SDC_STS_CMDBUSY@GOTPAGE
Lloh5:
	ldr	x25, [x25, _SDC_STS_CMDBUSY@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.1:
	add	x22, x22, x26
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	mov	x1, x22
	bl	_time_before
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_cpu_relax
	ldr	x8, [x21, #8]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_2
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_14
LBB0_6:
	mov	x0, x19
	bl	_mmc_resp_type
Lloh8:
	adrp	x8, _MMC_RSP_R1B@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MMC_RSP_R1B@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
	ldr	x8, [x19]
	cbz	x8, LBB0_16
LBB0_8:
	ldr	x26, [x23]
	mov	w0, #20
	bl	_msecs_to_jiffies
	mov	x22, x0
	ldr	x8, [x21, #8]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
Lloh11:
	adrp	x25, _SDC_STS_SDCBUSY@GOTPAGE
Lloh12:
	ldr	x25, [x25, _SDC_STS_SDCBUSY@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.9:
	add	x22, x22, x26
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	mov	x1, x22
	bl	_time_before
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	bl	_cpu_relax
	ldr	x8, [x21, #8]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_10
LBB0_12:
	ldr	x8, [x21, #8]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_16
; %bb.13:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_14:
	ldr	w0, [x21, #4]
	bl	_dev_err
Lloh15:
	adrp	x8, _REQ_CMD_BUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REQ_CMD_BUSY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
Lloh18:
	adrp	x8, _MSDC_INT_CMDTMO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSDC_INT_CMDTMO@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_msdc_cmd_done
	mov	w0, #0
LBB0_15:
	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
LBB0_16:
	mov	w0, #1
	b	LBB0_15
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_SDC_STS,8,3                    ; @SDC_STS
	.comm	_SDC_STS_CMDBUSY,4,2            ; @SDC_STS_CMDBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CMD bus busy detected\n"

	.comm	_REQ_CMD_BUSY,4,2               ; @REQ_CMD_BUSY
	.comm	_MSDC_INT_CMDTMO,4,2            ; @MSDC_INT_CMDTMO
	.comm	_MMC_RSP_R1B,8,3                ; @MMC_RSP_R1B
	.comm	_SDC_STS_SDCBUSY,4,2            ; @SDC_STS_SDCBUSY
l_.str.1:                               ; @.str.1
	.asciz	"Controller busy detected\n"

	.no_dead_strip	_msdc_cmd_is_ready
.subsections_via_symbols
