	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function moxart_transfer_dma
_moxart_transfer_dma:                   ## @moxart_transfer_dma
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rsi), %rax
	cmpq	(%rdi), %rax
	jne	LBB0_1
## %bb.6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_MMC_DATA_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	andl	8(%rdi), %r15d
	setne	%al
	movq	40(%rsi,%rax,8), %rcx
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %rax
	movl	(%rax), %r13d
	movl	12(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	16(%rdi), %r12d
	callq	_mmc_get_dma_dir
	movl	%r13d, %edi
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	callq	_dma_map_sg
	testq	%rax, %rax
	jle	LBB0_2
## %bb.3:
	testl	%r15d, %r15d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmoveq	-64(%rbp), %rcx                 ## 8-byte Folded Reload
	movl	16(%rbx), %esi
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rdi
	movq	_DMA_CTRL_ACK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rdi), %r8d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_dmaengine_prep_slave_sg
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, 24(%r14)
	movq	_moxart_dma_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	%r14, (%rax)
	movq	%rax, %rdi
	callq	_dmaengine_submit
	movq	%r15, %rdi
	callq	_dma_async_issue_pending
	jmp	LBB0_5
LBB0_2:
	movl	32(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	-56(%rbp), %r15                 ## 8-byte Reload
LBB0_5:
	movq	8(%r14), %rax
	addq	%rax, (%rbx)
	movl	16(%r14), %esi
	addq	$20, %r14
	movq	%r14, %rdi
	callq	_wait_for_completion_interruptible_timeout
	movq	(%r15), %rax
	movl	(%rax), %r14d
	movl	12(%rbx), %r15d
	movl	16(%rbx), %r12d
	movq	%rbx, %rdi
	callq	_mmc_get_dma_dir
	movl	%r14d, %edi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_unmap_sg                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_WRITE,4,2             ## @MMC_DATA_WRITE
	.comm	_DMA_MEM_TO_DEV,8,3             ## @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.comm	_DMA_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.comm	_DMA_CTRL_ACK,4,2               ## @DMA_CTRL_ACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_map_sg returned zero length\n"

	.comm	_moxart_dma_complete,4,2        ## @moxart_dma_complete
	.no_dead_strip	_moxart_transfer_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function moxart_transfer_dma
_moxart_transfer_dma:                   ; @moxart_transfer_dma
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x1]
	ldr	x9, [x0]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MMC_DATA_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_DATA_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w22, [x0, #8]
	ands	w25, w8, w9
	mov	w8, #48
	mov	w9, #40
	csel	x8, x9, x8, eq
	ldr	x21, [x1, x8]
Lloh3:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh5:
	ldr	x26, [x8]
Lloh6:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh8:
	ldr	x27, [x8]
	ldr	x8, [x21]
	ldr	w23, [x8]
	ldr	w24, [x0, #16]
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x22
	bl	_dma_map_sg
	cmp	x0, #0
	b.le	LBB0_5
; %bb.3:
	mov	x2, x0
	cmp	w25, #0
	csel	x3, x26, x27, eq
Lloh9:
	adrp	x8, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
	ldr	w1, [x19, #16]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _DMA_CTRL_ACK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DMA_CTRL_ACK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, x21
	bl	_dmaengine_prep_slave_sg
	cbz	x0, LBB0_6
; %bb.4:
	str	x0, [x20, #24]
Lloh15:
	adrp	x8, _moxart_dma_complete@GOTPAGE
Lloh16:
	ldr	x8, [x8, _moxart_dma_complete@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x20, [x0]
	bl	_dmaengine_submit
	mov	x0, x21
	bl	_dma_async_issue_pending
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20, #32]
	bl	_mmc_dev
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_6:
	ldr	x8, [x20, #8]
	ldr	x9, [x19]
	add	x8, x9, x8
	str	x8, [x19]
	add	x0, x20, #20
	ldr	w1, [x20, #16]
	bl	_wait_for_completion_interruptible_timeout
	ldr	x8, [x21]
	ldr	w20, [x8]
	ldp	w22, w21, [x19, #12]
	mov	x0, x19
	bl	_mmc_get_dma_dir
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dma_unmap_sg
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_WRITE,4,2             ; @MMC_DATA_WRITE
	.comm	_DMA_MEM_TO_DEV,8,3             ; @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.comm	_DMA_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.comm	_DMA_CTRL_ACK,4,2               ; @DMA_CTRL_ACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_map_sg returned zero length\n"

	.comm	_moxart_dma_complete,4,2        ; @moxart_dma_complete
	.no_dead_strip	_moxart_transfer_dma
.subsections_via_symbols
