	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_davinci_cmd_done
_mmc_davinci_cmd_done:                  ## @mmc_davinci_cmd_done
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, 32(%rdi)
	movl	(%rsi), %eax
	movq	_MMC_RSP_PRESENT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.1:
	movq	_MMC_RSP_136@GOTPCREL(%rip), %rcx
	movq	8(%rbx), %rdi
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_DAVINCI_MMCRSP01@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_readl
	leaq	24(%r14), %r15
	movq	24(%r14), %rcx
	movq	%rax, 24(%rcx)
	movq	_DAVINCI_MMCRSP23@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	24(%r14), %rcx
	movq	%rax, 16(%rcx)
	movq	_DAVINCI_MMCRSP45@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	24(%r14), %rcx
	movq	%rax, 8(%rcx)
	movq	_DAVINCI_MMCRSP67@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	jmp	LBB0_4
LBB0_3:
	movq	_DAVINCI_MMCRSP67@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_readl
	leaq	24(%r14), %r15
LBB0_4:
	movq	(%r15), %rcx
	movq	%rax, (%rcx)
LBB0_5:
	cmpq	$0, 24(%rbx)
	movl	16(%r14), %eax
	je	LBB0_7
## %bb.6:
	testl	%eax, %eax
	je	LBB0_10
LBB0_7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	movq	8(%r14), %rsi
	addl	(%rcx), %eax
	jne	LBB0_9
## %bb.8:
	movq	(%rsi), %rax
	movq	$0, (%rax)
LBB0_9:
	movl	16(%rbx), %edi
	callq	_mmc_request_done
	movq	_DAVINCI_MMCIM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movl	$0, (%rbx)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_RSP_PRESENT,4,2            ## @MMC_RSP_PRESENT
	.comm	_MMC_RSP_136,4,2                ## @MMC_RSP_136
	.comm	_DAVINCI_MMCRSP01,8,3           ## @DAVINCI_MMCRSP01
	.comm	_DAVINCI_MMCRSP23,8,3           ## @DAVINCI_MMCRSP23
	.comm	_DAVINCI_MMCRSP45,8,3           ## @DAVINCI_MMCRSP45
	.comm	_DAVINCI_MMCRSP67,8,3           ## @DAVINCI_MMCRSP67
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_DAVINCI_MMCIM,8,3              ## @DAVINCI_MMCIM
	.no_dead_strip	_mmc_davinci_cmd_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_davinci_cmd_done
_mmc_davinci_cmd_done:                  ; @mmc_davinci_cmd_done
	.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	x20, x1
	mov	x19, x0
	str	xzr, [x0, #32]
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _MMC_RSP_PRESENT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_RSP_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
Lloh3:
	adrp	x9, _MMC_RSP_136@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_RSP_136@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x9]
	ldr	x9, [x19, #8]
	tst	w10, w8
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _DAVINCI_MMCRSP01@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DAVINCI_MMCRSP01@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x0, x8, x9
	bl	_readl
	mov	x21, x20
	ldr	x8, [x21, #24]!
	str	x0, [x8, #24]
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _DAVINCI_MMCRSP23@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DAVINCI_MMCRSP23@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x21]
	str	x0, [x8, #16]
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _DAVINCI_MMCRSP45@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DAVINCI_MMCRSP45@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	ldr	x8, [x21]
	str	x0, [x8, #8]
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _DAVINCI_MMCRSP67@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DAVINCI_MMCRSP67@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x8, _DAVINCI_MMCRSP67@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DAVINCI_MMCRSP67@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x0, x8, x9
	bl	_readl
	add	x21, x20, #24
LBB0_4:
	ldr	x8, [x21]
	str	x0, [x8]
LBB0_5:
	ldr	x9, [x19, #24]
	ldr	w8, [x20, #16]
	cmp	x9, #0
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_9
; %bb.6:
Lloh21:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	ldr	x1, [x20, #8]
	cmn	w8, w9
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x1]
	str	xzr, [x8]
LBB0_8:
	ldr	w0, [x19, #16]
	bl	_mmc_request_done
	ldr	x8, [x19, #8]
Lloh24:
	adrp	x9, _DAVINCI_MMCIM@GOTPAGE
Lloh25:
	ldr	x9, [x9, _DAVINCI_MMCIM@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	str	wzr, [x19]
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_RSP_PRESENT,4,2            ; @MMC_RSP_PRESENT
	.comm	_MMC_RSP_136,4,2                ; @MMC_RSP_136
	.comm	_DAVINCI_MMCRSP01,8,3           ; @DAVINCI_MMCRSP01
	.comm	_DAVINCI_MMCRSP23,8,3           ; @DAVINCI_MMCRSP23
	.comm	_DAVINCI_MMCRSP45,8,3           ; @DAVINCI_MMCRSP45
	.comm	_DAVINCI_MMCRSP67,8,3           ; @DAVINCI_MMCRSP67
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_DAVINCI_MMCIM,8,3              ; @DAVINCI_MMCIM
	.no_dead_strip	_mmc_davinci_cmd_done
.subsections_via_symbols
