	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmm_dma_copy
_dmm_dma_copy:                          ## @dmm_dma_copy
	.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
	movl	%esi, %eax
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movq	(%rdi), %r9
	xorl	%ebx, %ebx
	movl	%edx, %esi
	movl	%eax, %edx
	movl	$4, %ecx
	xorl	%r8d, %r8d
	callq	*(%r9)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_dma_submit_error
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	8(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_1:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_4:
	movq	(%r14), %rdi
	callq	_dma_async_issue_pending
	movq	(%r14), %rdi
	movl	%ebx, %esi
	callq	_dma_sync_wait
	movq	_DMA_COMPLETE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movl	8(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movq	(%r14), %rdi
	callq	_dmaengine_terminate_all
	xorl	%ebx, %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to prepare DMA memcpy\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to do DMA tx_submit\n"

	.comm	_DMA_COMPLETE,4,2               ## @DMA_COMPLETE
L_.str.2:                               ## @.str.2
	.asciz	"i878 wa DMA copy failure\n"

	.no_dead_strip	_dmm_dma_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmm_dma_copy
_dmm_dma_copy:                          ; @dmm_dma_copy
	.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	x8, x1
	mov	x19, x0
	ldr	x0, [x0]
	ldr	x9, [x0]
	ldr	x9, [x9]
	mov	x1, x2
	mov	x2, x8
	mov	w3, #4
	mov	w4, #0
	blr	x9
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x0]
	blr	x8
	mov	x20, x0
	bl	_dma_submit_error
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_err
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_5:
	ldr	x0, [x19]
	bl	_dma_async_issue_pending
	ldr	x0, [x19]
	mov	x1, x20
	bl	_dma_sync_wait
Lloh7:
	adrp	x8, _DMA_COMPLETE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_COMPLETE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_7:
	ldr	x0, [x19]
	bl	_dmaengine_terminate_all
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to prepare DMA memcpy\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to do DMA tx_submit\n"

	.comm	_DMA_COMPLETE,4,2               ; @DMA_COMPLETE
l_.str.2:                               ; @.str.2
	.asciz	"i878 wa DMA copy failure\n"

	.no_dead_strip	_dmm_dma_copy
.subsections_via_symbols
