	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_blk_mq_rw_recovery
_mmc_blk_mq_rw_recovery:                ## @mmc_blk_mq_rw_recovery
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_rq_data_dir
	movq	_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_MMC_BLK_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_MMC_BLK_WRITE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_req_to_mmc_queue_req
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rax), %r12
	movq	(%r14), %rbx
	movq	8(%r14), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	___mmc_send_status
	testl	%eax, %eax
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_7
## %bb.4:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %r14
	movl	$0, (%r12)
	movl	(%rbx), %edi
	callq	_mmc_retune_release
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	___mmc_send_status
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_mmc_detect_card_removed
	testq	%rax, %rax
	jne	LBB0_38
## %bb.6:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movl	%r15d, %r13d
	jmp	LBB0_11
LBB0_7:
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_mmc_blk_status_error
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	$0, (%r12)
LBB0_9:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	callq	_mmc_retune_release
	movb	$1, %r12b
	jmp	LBB0_12
LBB0_10:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movb	$1, %r12b
LBB0_11:
	movq	%r14, %r15
	movq	-88(%rbp), %r14                 ## 8-byte Reload
LBB0_12:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_mmc_host_is_spi
	testl	%eax, %eax
	jne	LBB0_16
## %bb.13:
	testb	%r12b, %r12b
	je	LBB0_15
## %bb.14:
	movl	-44(%rbp), %edi
	callq	_mmc_blk_in_tran_state
	testl	%eax, %eax
	jne	LBB0_17
LBB0_15:
	movq	(%r14), %rdi
	movq	%r15, %rsi
	callq	_mmc_blk_fix_state
	movl	%eax, %r13d
LBB0_16:
	movb	$1, %r12b
	testl	%r13d, %r13d
	jne	LBB0_23
LBB0_17:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mmc_blk_cmd_started
	testq	%rax, %rax
	je	LBB0_22
## %bb.18:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mmc_card_sd
	testq	%rax, %rax
	je	LBB0_22
## %bb.19:
	movq	%r15, %rdi
	callq	_rq_data_dir
	movq	_WRITE@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_23
## %bb.20:
	leaq	-80(%rbp), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mmc_sd_num_wr_blocks
	movl	-80(%rbp), %ecx
	shll	$9, %ecx
	testq	%rax, %rax
	cmovnel	%r12d, %ecx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
	jmp	LBB0_23
LBB0_22:
	xorl	%r12d, %r12d
LBB0_23:
	movq	(%r14), %rax
	movl	(%rax), %edi
	callq	_mmc_host_is_spi
	testb	%r12b, %r12b
	je	LBB0_27
## %bb.24:
	testl	%eax, %eax
	jne	LBB0_27
## %bb.25:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	callq	_mmc_blk_reset
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movq	(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_MMC_NO_RETRIES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_38
LBB0_27:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	jne	LBB0_38
## %bb.28:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rax
	incq	%rax
	movq	_MMC_MAX_RETRIES@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_30
## %bb.29:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	callq	_mmc_blk_reset
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_30:
	cmpq	$0, 24(%rcx)
	jne	LBB0_38
## %bb.31:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 16(%rax)
	jne	LBB0_38
## %bb.32:
	movq	(%r12), %rax
	movq	_MMC_DATA_RETRIES@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, (%rcx)
	jge	LBB0_34
## %bb.33:
	movq	%rax, (%rcx)
	jmp	LBB0_38
LBB0_34:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mmc_large_sector
	testl	%eax, %eax
	jne	LBB0_38
## %bb.35:
	movq	%r15, %rdi
	callq	_rq_data_dir
	movq	_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_38
## %bb.36:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, 12(%rax)
	jl	LBB0_38
## %bb.37:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mmc_blk_read_single
LBB0_38:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_READ,8,3                       ## @READ
	.comm	_MMC_BLK_READ,4,2               ## @MMC_BLK_READ
	.comm	_MMC_BLK_WRITE,4,2              ## @MMC_BLK_WRITE
	.comm	_WRITE,8,3                      ## @WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: recovery failed!\n"

	.comm	_MMC_NO_RETRIES,8,3             ## @MMC_NO_RETRIES
	.comm	_MMC_MAX_RETRIES,8,3            ## @MMC_MAX_RETRIES
	.comm	_MMC_DATA_RETRIES,8,3           ## @MMC_DATA_RETRIES
	.no_dead_strip	_mmc_blk_mq_rw_recovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_blk_mq_rw_recovery
_mmc_blk_mq_rw_recovery:                ; @mmc_blk_mq_rw_recovery
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_rq_data_dir
Lloh0:
	adrp	x27, _READ@GOTPAGE
Lloh1:
	ldr	x27, [x27, _READ@GOTPAGEOFF]
Lloh2:
	adrp	x8, _MMC_BLK_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMC_BLK_READ@GOTPAGEOFF]
	ldr	x9, [x27]
Lloh4:
	adrp	x10, _MMC_BLK_WRITE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _MMC_BLK_WRITE@GOTPAGEOFF]
	cmp	x0, x9
	csel	x8, x8, x10, eq
	ldr	w23, [x8]
	mov	x0, x19
	bl	_req_to_mmc_queue_req
	mov	x21, x0
	add	x25, x0, #8
	ldp	x22, x24, [x20]
	add	x1, sp, #12
	mov	x0, x22
	mov	w2, #0
	bl	___mmc_send_status
	cbz	w0, LBB0_4
; %bb.1:
	str	wzr, [x25]
	ldr	w0, [x22]
	bl	_mmc_retune_release
	add	x1, sp, #12
	mov	x0, x22
	mov	w2, #0
	bl	___mmc_send_status
	mov	x26, x0
	cbz	w0, LBB0_7
; %bb.2:
	ldr	w0, [x22]
	bl	_mmc_detect_card_removed
	cbnz	x0, LBB0_34
; %bb.3:
	mov	w28, #0
	b	LBB0_8
LBB0_4:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_mmc_blk_status_error
	cbz	x0, LBB0_6
; %bb.5:
	str	wzr, [x25]
LBB0_6:
	ldr	w0, [x22]
	bl	_mmc_retune_release
	mov	w26, #0
LBB0_7:
	mov	w28, #1
LBB0_8:
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_mmc_host_is_spi
	cbz	w0, LBB0_10
; %bb.9:
	cbnz	w26, LBB0_13
	b	LBB0_14
LBB0_10:
	cbz	w28, LBB0_12
; %bb.11:
	ldr	w0, [sp, #12]
	bl	_mmc_blk_in_tran_state
	cbnz	w0, LBB0_14
LBB0_12:
	ldr	x0, [x20]
	mov	x1, x19
	bl	_mmc_blk_fix_state
	mov	x26, x0
	cbz	w26, LBB0_14
LBB0_13:
	mov	w26, #1
	b	LBB0_19
LBB0_14:
	mov	x0, x25
	bl	_mmc_blk_cmd_started
	cbz	x0, LBB0_18
; %bb.15:
	mov	x0, x22
	bl	_mmc_card_sd
	cbz	x0, LBB0_18
; %bb.16:
	mov	x0, x19
	bl	_rq_data_dir
Lloh6:
	adrp	x8, _WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WRITE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_18
; %bb.17:
	add	x1, sp, #8
	mov	x0, x22
	bl	_mmc_sd_num_wr_blocks
	mov	w26, #0
	ldr	w8, [sp, #8]
	lsl	w8, w8, #9
	cmp	x0, #0
	csel	w8, w8, wzr, eq
	str	w8, [x25]
	b	LBB0_19
LBB0_18:
	mov	w26, #0
LBB0_19:
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_mmc_host_is_spi
	cbz	w26, LBB0_23
; %bb.20:
	cbnz	w0, LBB0_23
; %bb.21:
	ldr	w1, [x22]
	mov	x0, x24
	mov	x2, x23
	bl	_mmc_blk_reset
	cbz	x0, LBB0_23
; %bb.22:
	ldr	x8, [x19]
	ldr	w1, [x8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _MMC_NO_RETRIES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MMC_NO_RETRIES@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x21]
	b	LBB0_34
LBB0_23:
	ldr	w8, [x25]
	cbnz	w8, LBB0_34
; %bb.24:
	ldr	x8, [x21]
	add	x8, x8, #1
Lloh14:
	adrp	x25, _MMC_MAX_RETRIES@GOTPAGE
Lloh15:
	ldr	x25, [x25, _MMC_MAX_RETRIES@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_26
; %bb.25:
	ldr	w1, [x22]
	mov	x0, x24
	mov	x2, x23
	bl	_mmc_blk_reset
LBB0_26:
	ldr	x8, [x21, #24]
	cbnz	x8, LBB0_34
; %bb.27:
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_34
; %bb.28:
	ldr	x9, [x21]
	ldr	x8, [x25]
Lloh16:
	adrp	x10, _MMC_DATA_RETRIES@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MMC_DATA_RETRIES@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	sub	x8, x8, x10
	cmp	x9, x8
	b.ge	LBB0_30
; %bb.29:
	str	x8, [x21]
	b	LBB0_34
LBB0_30:
	mov	x0, x22
	bl	_mmc_large_sector
	cbnz	w0, LBB0_34
; %bb.31:
	mov	x0, x19
	bl	_rq_data_dir
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_34
; %bb.32:
	ldr	w8, [x21, #12]
	cmp	w8, #2
	b.lt	LBB0_34
; %bb.33:
	mov	x0, x20
	mov	x1, x19
	bl	_mmc_blk_read_single
LBB0_34:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_READ,8,3                       ; @READ
	.comm	_MMC_BLK_READ,4,2               ; @MMC_BLK_READ
	.comm	_MMC_BLK_WRITE,4,2              ; @MMC_BLK_WRITE
	.comm	_WRITE,8,3                      ; @WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: recovery failed!\n"

	.comm	_MMC_NO_RETRIES,8,3             ; @MMC_NO_RETRIES
	.comm	_MMC_MAX_RETRIES,8,3            ; @MMC_MAX_RETRIES
	.comm	_MMC_DATA_RETRIES,8,3           ; @MMC_DATA_RETRIES
	.no_dead_strip	_mmc_blk_mq_rw_recovery
.subsections_via_symbols
