	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdhci_finish_data
_sdhci_finish_data:                     ## @sdhci_finish_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_BUG_ON
	movq	16(%rbx), %r14
	movq	$0, 16(%rbx)
	movl	(%rbx), %eax
	movq	_SDHCI_REQ_USE_DMA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.1:
	movq	_SDHCI_USE_ADMA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_sdhci_adma_table_post
LBB0_7:
	cmpq	$0, 24(%r14)
	je	LBB0_8
LBB0_10:
	movl	$0, 4(%r14)
	cmpq	$0, 16(%r14)
	je	LBB0_9
## %bb.11:
	movq	_SDHCI_RESET_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sdhci_reset
	movq	_SDHCI_RESET_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sdhci_reset
	movq	16(%r14), %rsi
	jmp	LBB0_12
LBB0_3:
	movl	8(%rbx), %edi
	callq	_mmc_dev
	movl	32(%r14), %edx
	movl	36(%r14), %esi
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r14), %ecx
	jne	LBB0_4
## %bb.5:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ecx
	movl	%eax, %edi
	callq	_dma_unmap_sg
	cmpq	$0, 24(%r14)
	jne	LBB0_10
LBB0_8:
	movl	12(%r14), %eax
	imull	8(%r14), %eax
	movl	%eax, 4(%r14)
	movq	16(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_9
LBB0_12:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_sdhci_send_command             ## TAILCALL
LBB0_9:
	addq	$4, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tasklet_schedule               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_REQ_USE_DMA,4,2          ## @SDHCI_REQ_USE_DMA
	.comm	_SDHCI_USE_ADMA,4,2             ## @SDHCI_USE_ADMA
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_SDHCI_RESET_CMD,4,2            ## @SDHCI_RESET_CMD
	.comm	_SDHCI_RESET_DATA,4,2           ## @SDHCI_RESET_DATA
	.no_dead_strip	_sdhci_finish_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdhci_finish_data
_sdhci_finish_data:                     ; @sdhci_finish_data
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x20, [x19, #16]
	str	xzr, [x19, #16]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _SDHCI_REQ_USE_DMA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SDHCI_REQ_USE_DMA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _SDHCI_USE_ADMA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDHCI_USE_ADMA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_adma_table_post
LBB0_3:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_7
LBB0_4:
	str	wzr, [x20, #4]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_9
; %bb.5:
Lloh6:
	adrp	x8, _SDHCI_RESET_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDHCI_RESET_CMD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sdhci_reset
Lloh9:
	adrp	x8, _SDHCI_RESET_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDHCI_RESET_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sdhci_reset
	ldr	x1, [x20, #16]
	b	LBB0_8
LBB0_6:
	ldr	w0, [x19, #8]
	bl	_mmc_dev
	ldp	w2, w1, [x20, #32]
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh14:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh15:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x11, _DMA_TO_DEVICE@GOTPAGE
Lloh18:
	ldr	x11, [x11, _DMA_TO_DEVICE@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w3, [x8]
	bl	_dma_unmap_sg
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_4
LBB0_7:
	ldp	w8, w9, [x20, #8]
	mul	w8, w9, w8
	str	w8, [x20, #4]
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_9
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sdhci_send_command
LBB0_9:
	add	x0, x19, #4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tasklet_schedule
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_REQ_USE_DMA,4,2          ; @SDHCI_REQ_USE_DMA
	.comm	_SDHCI_USE_ADMA,4,2             ; @SDHCI_USE_ADMA
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_SDHCI_RESET_CMD,4,2            ; @SDHCI_RESET_CMD
	.comm	_SDHCI_RESET_DATA,4,2           ; @SDHCI_RESET_DATA
	.no_dead_strip	_sdhci_finish_data
.subsections_via_symbols
