	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc32xx_xmit_dma
_lpc32xx_xmit_dma:                      ## @lpc32xx_xmit_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_mtd_to_nand
	movq	%rax, %rdi
	callq	_nand_get_controller_data
	movq	%rax, %rbx
	movq	_DMA_CTRL_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_sg_init_one
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_dma_map_sg
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.3:
	orl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movq	8(%rbx), %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%r12d, %r8d
	callq	_dmaengine_prep_slave_sg
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%rbx, %r14
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_init_completion
	movq	_lpc32xx_dma_complete_func@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	%r14, (%r15)
	movq	%r15, %rdi
	callq	_dmaengine_submit
	movq	8(%rbx), %rdi
	callq	_dma_async_issue_pending
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_msecs_to_jiffies
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%r13), %ecx
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_dma_unmap_sg
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_2
LBB0_4:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	(%r13), %ecx
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_dma_unmap_sg
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_CTRL_ACK,4,2               ## @DMA_CTRL_ACK
	.comm	_DMA_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to map sg list\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to prepare slave sg\n"

	.comm	_lpc32xx_dma_complete_func,4,2  ## @lpc32xx_dma_complete_func
	.no_dead_strip	_lpc32xx_xmit_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc32xx_xmit_dma
_lpc32xx_xmit_dma:                      ; @lpc32xx_xmit_dma
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	bl	_mtd_to_nand
	bl	_nand_get_controller_data
	mov	x19, x0
Lloh0:
	adrp	x8, _DMA_CTRL_ACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_CTRL_ACK@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
Lloh3:
	adrp	x8, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	mov	x1, x23
	mov	x2, x22
	bl	_sg_init_one
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
Lloh6:
	adrp	x22, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x1, x19
	mov	w2, #1
	bl	_dma_map_sg
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.1:
	orr	w4, w25, w24
	ldr	x0, [x19, #8]
	mov	x1, x19
	mov	w2, #1
	mov	x3, x21
	bl	_dmaengine_prep_slave_sg
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	add	x20, x19, #16
	mov	x0, x20
	bl	_init_completion
Lloh8:
	adrp	x8, _lpc32xx_dma_complete_func@GOTPAGE
Lloh9:
	ldr	x8, [x8, _lpc32xx_dma_complete_func@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x21, #8]
	str	x20, [x21]
	mov	x0, x21
	bl	_dmaengine_submit
	ldr	x0, [x19, #8]
	bl	_dma_async_issue_pending
	mov	w0, #1000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x20
	bl	_wait_for_completion_timeout
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w3, [x22]
	mov	x1, x19
	mov	w2, #1
	bl	_dma_unmap_sg
	mov	w0, #0
	b	LBB0_6
LBB0_3:
	ldr	w0, [x20]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	ldr	w3, [x22]
	mov	x1, x19
	mov	w2, #1
	bl	_dma_unmap_sg
LBB0_5:
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_CTRL_ACK,4,2               ; @DMA_CTRL_ACK
	.comm	_DMA_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to map sg list\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to prepare slave sg\n"

	.comm	_lpc32xx_dma_complete_func,4,2  ; @lpc32xx_dma_complete_func
	.no_dead_strip	_lpc32xx_xmit_dma
.subsections_via_symbols
