	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function goldfish_mmc_xfer_done
_goldfish_mmc_xfer_done:                ## @goldfish_mmc_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpq	$0, 32(%rdi)
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_mmc_get_dma_dir
	movl	%eax, %r15d
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_3
## %bb.2:
	movq	8(%r14), %rdi
	movl	24(%rbx), %edx
	movq	(%rdi), %rcx
	movl	$1, %esi
	callq	_sg_copy_from_buffer
LBB0_3:
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	addl	%eax, (%rcx)
	movq	%rbx, %rdi
	callq	_mmc_from_priv
	movl	%eax, %edi
	callq	_mmc_dev
	movq	8(%r14), %rsi
	movq	8(%rbx), %rdx
	movl	%eax, %edi
	movl	%r15d, %ecx
	callq	_dma_unmap_sg
LBB0_4:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movl	(%r14), %esi
	testl	%esi, %esi
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_goldfish_mmc_start_command     ## TAILCALL
LBB0_5:
	movq	$0, (%rbx)
	movq	%rbx, %rdi
	callq	_mmc_from_priv
	movl	4(%r14), %esi
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmc_request_done               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_goldfish_mmc_xfer_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function goldfish_mmc_xfer_done
_goldfish_mmc_xfer_done:                ; @goldfish_mmc_xfer_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	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_mmc_get_dma_dir
	mov	x21, x0
Lloh0:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x0, [x19, #8]
	ldr	w2, [x20, #24]
	ldr	x3, [x0]
	mov	w1, #1
	bl	_sg_copy_from_buffer
LBB0_3:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldr	x9, [x20, #16]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
	mov	x0, x20
	bl	_mmc_from_priv
	bl	_mmc_dev
	ldr	x1, [x19, #8]
	ldr	x2, [x20, #8]
	mov	x3, x21
	bl	_dma_unmap_sg
LBB0_4:
	stp	xzr, xzr, [x20, #8]
	ldr	w1, [x19]
	cbz	w1, LBB0_6
; %bb.5:
	mov	x0, x20
	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
	b	_goldfish_mmc_start_command
LBB0_6:
	str	xzr, [x20]
	mov	x0, x20
	bl	_mmc_from_priv
	ldr	w1, [x19, #4]
	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
	b	_mmc_request_done
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_goldfish_mmc_xfer_done
.subsections_via_symbols
