	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc32xx_nand_dma_setup
_lpc32xx_nand_dma_setup:                ## @lpc32xx_nand_dma_setup
	.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	%rdi, %rbx
	addq	$16, %rdi
	callq	_nand_to_mtd
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movq	_ENOENT@GOTPCREL(%rip), %r15
	leaq	L_.str(%rip), %rsi
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.2:
	callq	_dma_cap_zero
	movq	_DMA_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dma_cap_set
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	callq	_dma_request_channel
	movl	%eax, %ecx
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %r15
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movl	(%r14), %edi
	callq	_dev_err
	xorl	%eax, %eax
	subl	(%r15), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no DMA platform data\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_DMA_SLAVE,4,2                  ## @DMA_SLAVE
L_.str.1:                               ## @.str.1
	.asciz	"nand-slc"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to request DMA channel\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_lpc32xx_nand_dma_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc32xx_nand_dma_setup
_lpc32xx_nand_dma_setup:                ; @lpc32xx_nand_dma_setup
	.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	x20, x0
	add	x0, x0, #16
	bl	_nand_to_mtd
	mov	x19, x0
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:
	bl	_dma_cap_zero
Lloh0:
	adrp	x8, _DMA_SLAVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_SLAVE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_dma_cap_set
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_dma_request_channel
	str	w0, [x20]
	cbz	w0, LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x20, _ENOENT@GOTPAGE
Lloh6:
	ldr	x20, [x20, _ENOENT@GOTPAGEOFF]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x20, _EBUSY@GOTPAGE
Lloh10:
	ldr	x20, [x20, _EBUSY@GOTPAGEOFF]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	ldr	w0, [x19]
	bl	_dev_err
	ldr	w8, [x20]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no DMA platform data\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_DMA_SLAVE,4,2                  ; @DMA_SLAVE
l_.str.1:                               ; @.str.1
	.asciz	"nand-slc"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to request DMA channel\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_lpc32xx_nand_dma_setup
.subsections_via_symbols
