	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_sdc_finish_data
_via_sdc_finish_data:                   ## @via_sdc_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, %r14
	xorl	%edi, %edi
	cmpq	$0, 8(%r14)
	sete	%dil
	callq	_BUG_ON
	movq	8(%r14), %rbx
	movq	$0, 8(%r14)
	xorl	%eax, %eax
	cmpq	$0, 32(%rbx)
	jne	LBB0_2
## %bb.1:
	movl	8(%rbx), %eax
	imull	4(%rbx), %eax
LBB0_2:
	movl	%eax, (%rbx)
	movl	4(%r14), %edi
	callq	_mmc_dev
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	12(%rbx), %ecx
	jne	LBB0_3
## %bb.4:
	movq	_PCI_DMA_TODEVICE@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ecx
	movl	%eax, %edi
	callq	_dma_unmap_sg
	movq	16(%rbx), %rsi
	movq	%r14, %rdi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_via_sdc_send_command           ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tasklet_schedule               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_PCI_DMA_TODEVICE,4,2           ## @PCI_DMA_TODEVICE
	.no_dead_strip	_via_sdc_finish_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_sdc_finish_data
_via_sdc_finish_data:                   ; @via_sdc_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, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x20, [x19, #8]
	str	xzr, [x19, #8]
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_3
LBB0_2:
	ldp	w8, w9, [x20, #4]
	mul	w8, w9, w8
LBB0_3:
	str	w8, [x20]
	ldr	w0, [x19, #4]
	bl	_mmc_dev
	ldp	w2, w1, [x20, #24]
	ldr	w8, [x20, #12]
Lloh0:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh2:
	adrp	x10, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x11, _PCI_DMA_TODEVICE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _PCI_DMA_TODEVICE@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w3, [x8]
	bl	_dma_unmap_sg
	ldr	x1, [x20, #16]
	cbz	x1, LBB0_5
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_via_sdc_send_command
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tasklet_schedule
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_PCI_DMA_TODEVICE,4,2           ; @PCI_DMA_TODEVICE
	.no_dead_strip	_via_sdc_finish_data
.subsections_via_symbols
