	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_davinci_xfer_done
_mmc_davinci_xfer_done:                 ## @mmc_davinci_xfer_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, 48(%rdi)
	movq	16(%rdi), %rax
	movq	_MMC_CAP_SDIO_IRQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_4
## %bb.1:
	cmpq	$0, 40(%rbx)
	je	LBB0_4
## %bb.2:
	movq	_DAVINCI_SDIOST0@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movq	_SDIOST0_DAT1_HI@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_SDIOIST_IOINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DAVINCI_SDIOIST@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	movq	16(%rbx), %rdi
	callq	_mmc_signal_sdio_irq
LBB0_4:
	cmpl	$0, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_davinci_abort_dma
	movq	16(%rbx), %rdi
	callq	_mmc_dev
	movl	%eax, %r15d
	movl	8(%r14), %r12d
	movl	12(%r14), %r13d
	movq	%r14, %rdi
	callq	_mmc_get_dma_dir
	movl	%r15d, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dma_unmap_sg
	movl	$0, (%rbx)
LBB0_6:
	movq	_DAVINCI_MMC_DATADIR_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movl	(%r14), %esi
	testl	%esi, %esi
	je	LBB0_9
## %bb.7:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	cmpq	$0, (%rax)
	je	LBB0_10
LBB0_9:
	movq	16(%rbx), %rdi
	movl	4(%r14), %esi
	callq	_mmc_request_done
	movq	_DAVINCI_MMCIM@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movl	$0, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_davinci_start_command      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_CAP_SDIO_IRQ,4,2           ## @MMC_CAP_SDIO_IRQ
	.comm	_DAVINCI_SDIOST0,8,3            ## @DAVINCI_SDIOST0
	.comm	_SDIOST0_DAT1_HI,4,2            ## @SDIOST0_DAT1_HI
	.comm	_SDIOIST_IOINT,4,2              ## @SDIOIST_IOINT
	.comm	_DAVINCI_SDIOIST,8,3            ## @DAVINCI_SDIOIST
	.comm	_DAVINCI_MMC_DATADIR_NONE,4,2   ## @DAVINCI_MMC_DATADIR_NONE
	.comm	_DAVINCI_MMCIM,8,3              ## @DAVINCI_MMCIM
	.no_dead_strip	_mmc_davinci_xfer_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_xfer_done
_mmc_davinci_xfer_done:                 ; @mmc_davinci_xfer_done
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	str	xzr, [x0, #48]
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MMC_CAP_SDIO_IRQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_CAP_SDIO_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _DAVINCI_SDIOST0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DAVINCI_SDIOST0@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh6:
	adrp	x8, _SDIOST0_DAT1_HI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDIOST0_DAT1_HI@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _SDIOIST_IOINT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDIOIST_IOINT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _DAVINCI_SDIOIST@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DAVINCI_SDIOIST@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x0, [x19, #16]
	bl	_mmc_signal_sdio_irq
LBB0_4:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_davinci_abort_dma
	ldr	x0, [x19, #16]
	bl	_mmc_dev
	mov	x21, x0
	ldp	w23, w22, [x20, #8]
	mov	x0, x20
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_dma_unmap_sg
	str	wzr, [x19]
LBB0_6:
Lloh15:
	adrp	x8, _DAVINCI_MMC_DATADIR_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DAVINCI_MMC_DATADIR_NONE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	w1, [x20]
	cbz	w1, LBB0_9
; %bb.7:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
LBB0_9:
	ldr	x0, [x19, #16]
	ldr	w1, [x20, #4]
	bl	_mmc_request_done
	ldr	x8, [x19, #8]
Lloh18:
	adrp	x9, _DAVINCI_MMCIM@GOTPAGE
Lloh19:
	ldr	x9, [x9, _DAVINCI_MMCIM@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	str	wzr, [x19, #4]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mmc_davinci_start_command
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_CAP_SDIO_IRQ,4,2           ; @MMC_CAP_SDIO_IRQ
	.comm	_DAVINCI_SDIOST0,8,3            ; @DAVINCI_SDIOST0
	.comm	_SDIOST0_DAT1_HI,4,2            ; @SDIOST0_DAT1_HI
	.comm	_SDIOIST_IOINT,4,2              ; @SDIOIST_IOINT
	.comm	_DAVINCI_SDIOIST,8,3            ; @DAVINCI_SDIOIST
	.comm	_DAVINCI_MMC_DATADIR_NONE,4,2   ; @DAVINCI_MMC_DATADIR_NONE
	.comm	_DAVINCI_MMCIM,8,3              ; @DAVINCI_MMCIM
	.no_dead_strip	_mmc_davinci_xfer_done
.subsections_via_symbols
