	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap2_onenand_dma_transfer
_omap2_onenand_dma_transfer:            ## @omap2_onenand_dma_transfer
	.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
	movl	%esi, %eax
	movq	%rdi, %r14
	movl	(%rdi), %edi
	xorl	%r15d, %r15d
	movl	%edx, %esi
	movl	%eax, %edx
	xorl	%r8d, %r8d
	callq	_dmaengine_prep_dma_memcpy
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	4(%r14), %r15
	movq	%r15, %rdi
	callq	_reinit_completion
	movq	_omap2_onenand_dma_complete_func@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r15, 8(%rbx)
	movq	%rbx, %rdi
	callq	*(%rbx)
	movl	%eax, %edi
	callq	_dma_submit_error
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%r15d, %r15d
	jmp	LBB0_7
LBB0_1:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r14), %edi
	callq	_dma_async_issue_pending
	movl	$20, %edi
	callq	_msecs_to_jiffies
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_io_timeout
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	(%r14), %edi
	callq	_dmaengine_terminate_sync
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to prepare DMA memcpy\n"

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

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_omap2_onenand_dma_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap2_onenand_dma_transfer
_omap2_onenand_dma_transfer:            ; @omap2_onenand_dma_transfer
	.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	x8, x1
	mov	x19, x0
	ldr	w0, [x0]
	mov	x1, x2
	mov	x2, x8
	mov	w4, #0
	bl	_dmaengine_prep_dma_memcpy
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	add	x20, x19, #4
	mov	x0, x20
	bl	_reinit_completion
Lloh0:
	adrp	x8, _omap2_onenand_dma_complete_func@GOTPAGE
Lloh1:
	ldr	x8, [x8, _omap2_onenand_dma_complete_func@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x21, #16]
	str	x20, [x21, #8]
	ldr	x8, [x21]
	mov	x0, x21
	blr	x8
	bl	_dma_submit_error
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_err
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	ret
LBB0_7:
	ldr	w0, [x19]
	bl	_dma_async_issue_pending
	mov	w0, #20
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_wait_for_completion_io_timeout
	cbz	w0, LBB0_9
; %bb.8:
	mov	w0, #0
	b	LBB0_6
LBB0_9:
	ldr	w0, [x19]
	bl	_dmaengine_terminate_sync
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to prepare DMA memcpy\n"

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

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_omap2_onenand_dma_transfer
.subsections_via_symbols
