	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_blk_read_single
_mmc_blk_read_single:                   ## @mmc_blk_read_single
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_req_to_mmc_queue_req
	movq	%rax, %r13
	addq	$8, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	movq	(%rbx), %r15
	movq	_BLK_STS_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	testq	%rcx, %rcx
	je	LBB0_9
LBB0_14:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rax), %r14d
	xorl	%r12d, %r12d
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	$512, %edx                      ## imm = 0x200
	callq	_blk_update_request
	testq	%rax, %rax
	je	LBB0_18
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_mmc_blk_rw_rq_prep
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_mmc_wait_for_req
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rsi
	callq	_mmc_send_status
	testl	%eax, %eax
	jne	LBB0_16
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_mmc_host_is_spi
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %edi
	callq	_mmc_blk_in_tran_state
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_mmc_blk_fix_state
	testl	%eax, %eax
	jne	LBB0_16
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r13), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_MMC_READ_SINGLE_RETRIES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%r12d
	jmp	LBB0_15
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	$0, 8(%rax)
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_mmc_host_is_spi
	testl	%eax, %eax
	je	LBB0_11
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_BLK_STS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r13), %rax
	movq	(%rax), %rdx
	movq	_CMD_ERRORS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	testl	%ecx, (%rdx)
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	testl	%ecx, -44(%rbp)
	jne	LBB0_14
	jmp	LBB0_13
LBB0_16:
	movq	8(%r13), %rax
	movq	$0, (%rax)
	movq	_BLK_STS_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$512, %edx                      ## imm = 0x200
	callq	_blk_update_request
	movq	_MMC_MAX_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, (%r13)
	jl	LBB0_18
## %bb.17:
	decl	%eax
	movl	%eax, (%r13)
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_STS_OK,4,2                 ## @BLK_STS_OK
	.comm	_MMC_READ_SINGLE_RETRIES,4,2    ## @MMC_READ_SINGLE_RETRIES
	.comm	_CMD_ERRORS,4,2                 ## @CMD_ERRORS
	.comm	_BLK_STS_IOERR,4,2              ## @BLK_STS_IOERR
	.comm	_MMC_MAX_RETRIES,4,2            ## @MMC_MAX_RETRIES
	.no_dead_strip	_mmc_blk_read_single
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_blk_read_single
_mmc_blk_read_single:                   ; @mmc_blk_read_single
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_req_to_mmc_queue_req
	mov	x19, x0
	mov	w26, #0
	add	x22, x0, #8
	ldr	x23, [x21]
	ldr	x24, [x23]
Lloh0:
	adrp	x8, _BLK_STS_OK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLK_STS_OK@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
Lloh3:
	adrp	x28, _MMC_READ_SINGLE_RETRIES@GOTPAGE
Lloh4:
	ldr	x28, [x28, _MMC_READ_SINGLE_RETRIES@GOTPAGEOFF]
Lloh5:
	adrp	x27, _BLK_STS_IOERR@GOTPAGE
Lloh6:
	ldr	x27, [x27, _BLK_STS_IOERR@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x25
	mov	w2, #512
	bl	_blk_update_request
	cbz	x0, LBB0_17
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	w2, #1
	mov	x3, x21
	bl	_mmc_blk_rw_rq_prep
	mov	x0, x24
	mov	x1, x22
	bl	_mmc_wait_for_req
	add	x1, sp, #12
	mov	x0, x23
	bl	_mmc_send_status
	cbnz	w0, LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	bl	_mmc_host_is_spi
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [sp, #12]
	bl	_mmc_blk_in_tran_state
	cbnz	w0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	mov	x1, x20
	bl	_mmc_blk_fix_state
	cbnz	w0, LBB0_15
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	ldr	w8, [x28]
	cmp	x9, #0
	ccmp	w26, w8, #0, ne
	b.lt	LBB0_1
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, x27
	cbnz	x9, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	ldr	x9, [x8, #8]
	mov	x8, x27
	cbnz	x9, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	bl	_mmc_host_is_spi
	cbz	w0, LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh7:
	adrp	x8, _BLK_STS_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BLK_STS_OK@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	w10, [x8]
Lloh9:
	adrp	x8, _CMD_ERRORS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CMD_ERRORS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x8]
	mov	x8, x27
	tst	w9, w10
	b.ne	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [sp, #12]
	mov	x8, x27
	tst	w10, w9
	b.eq	LBB0_11
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w26, #0
	ldr	w25, [x8]
	b	LBB0_2
LBB0_15:
	ldr	x8, [x19, #8]
	str	xzr, [x8]
	ldr	w1, [x27]
	mov	x0, x20
	mov	w2, #512
	bl	_blk_update_request
	ldr	w9, [x19]
Lloh12:
	adrp	x8, _MMC_MAX_RETRIES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MMC_MAX_RETRIES@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w9, w8
	b.lt	LBB0_17
; %bb.16:
	sub	w8, w8, #1
	str	w8, [x19]
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_STS_OK,4,2                 ; @BLK_STS_OK
	.comm	_MMC_READ_SINGLE_RETRIES,4,2    ; @MMC_READ_SINGLE_RETRIES
	.comm	_CMD_ERRORS,4,2                 ; @CMD_ERRORS
	.comm	_BLK_STS_IOERR,4,2              ; @BLK_STS_IOERR
	.comm	_MMC_MAX_RETRIES,4,2            ; @MMC_MAX_RETRIES
	.no_dead_strip	_mmc_blk_read_single
.subsections_via_symbols
