	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc32xx_nand_setup
_lpc32xx_nand_setup:                    ## @lpc32xx_nand_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_SLCCTRL_SW_RESET@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	(%rdi), %edi
	callq	_SLC_CTRL
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_writel
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	(%r15), %edi
	callq	_SLC_CFG
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_writel
	movl	(%r15), %edi
	callq	_SLC_IEN
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_writel
	movq	_SLCSTAT_INT_TC@GOTPCREL(%rip), %rax
	movq	_SLCSTAT_INT_RDY_EN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	orq	(%rax), %rbx
	movl	(%r15), %edi
	callq	_SLC_ICR
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_writel
	movl	16(%r15), %edi
	callq	_clk_get_rate
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_LPC32XX_DEF_BUS_RATE@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_2:
	movq	8(%r15), %rax
	movl	28(%rax), %edi
	callq	_SLCTAC_WDR
	movq	%rax, %rbx
	movq	8(%r15), %rax
	movl	24(%rax), %esi
	movq	%r14, %rdi
	callq	_SLCTAC_WWIDTH
	orq	%rax, %rbx
	movq	8(%r15), %rax
	movl	20(%rax), %esi
	movq	%r14, %rdi
	callq	_SLCTAC_WHOLD
	movq	%rax, %r12
	movq	8(%r15), %rax
	movl	16(%rax), %esi
	movq	%r14, %rdi
	callq	_SLCTAC_WSETUP
	orq	%rax, %r12
	orq	%rbx, %r12
	movq	8(%r15), %rax
	movl	12(%rax), %edi
	callq	_SLCTAC_RDR
	movq	%rax, %rbx
	movq	8(%r15), %rax
	movl	8(%rax), %esi
	movq	%r14, %rdi
	callq	_SLCTAC_RWIDTH
	orq	%rax, %rbx
	movq	8(%r15), %rax
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	_SLCTAC_RHOLD
	orq	%rax, %rbx
	orq	%r12, %rbx
	movq	8(%r15), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_SLCTAC_RSETUP
	orq	%rax, %rbx
	movl	(%r15), %edi
	callq	_SLC_TAC
	movq	%rbx, %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SLCCTRL_SW_RESET,8,3           ## @SLCCTRL_SW_RESET
	.comm	_SLCSTAT_INT_TC,8,3             ## @SLCSTAT_INT_TC
	.comm	_SLCSTAT_INT_RDY_EN,8,3         ## @SLCSTAT_INT_RDY_EN
	.comm	_LPC32XX_DEF_BUS_RATE,8,3       ## @LPC32XX_DEF_BUS_RATE
	.no_dead_strip	_lpc32xx_nand_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_setup
_lpc32xx_nand_setup:                    ; @lpc32xx_nand_setup
	.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	x19, x0
Lloh0:
	adrp	x8, _SLCCTRL_SW_RESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SLCCTRL_SW_RESET@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	ldr	w0, [x0]
	bl	_SLC_CTRL
	mov	x1, x0
	mov	x0, x20
	bl	_writel
	mov	w0, #1000
	bl	_udelay
	ldr	w0, [x19]
	bl	_SLC_CFG
	mov	x1, x0
	mov	x0, #0
	bl	_writel
	ldr	w0, [x19]
	bl	_SLC_IEN
	mov	x1, x0
	mov	x0, #0
	bl	_writel
Lloh3:
	adrp	x8, _SLCSTAT_INT_TC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SLCSTAT_INT_TC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _SLCSTAT_INT_RDY_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SLCSTAT_INT_RDY_EN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	orr	x20, x9, x8
	ldr	w0, [x19]
	bl	_SLC_ICR
	mov	x1, x0
	mov	x0, x20
	bl	_writel
	ldr	w0, [x19, #16]
	bl	_clk_get_rate
Lloh9:
	adrp	x8, _LPC32XX_DEF_BUS_RATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LPC32XX_DEF_BUS_RATE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x20, x8, x0, eq
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #28]
	bl	_SLCTAC_WDR
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #24]
	mov	x0, x20
	bl	_SLCTAC_WWIDTH
	orr	x21, x0, x21
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #20]
	mov	x0, x20
	bl	_SLCTAC_WHOLD
	orr	x21, x21, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #16]
	mov	x0, x20
	bl	_SLCTAC_WSETUP
	orr	x21, x21, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #12]
	bl	_SLCTAC_RDR
	orr	x21, x21, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_SLCTAC_RWIDTH
	orr	x21, x21, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_SLCTAC_RHOLD
	orr	x21, x21, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_SLCTAC_RSETUP
	orr	x20, x21, x0
	ldr	w0, [x19]
	bl	_SLC_TAC
	mov	x1, x0
	mov	x0, x20
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SLCCTRL_SW_RESET,8,3           ; @SLCCTRL_SW_RESET
	.comm	_SLCSTAT_INT_TC,8,3             ; @SLCSTAT_INT_TC
	.comm	_SLCSTAT_INT_RDY_EN,8,3         ; @SLCSTAT_INT_RDY_EN
	.comm	_LPC32XX_DEF_BUS_RATE,8,3       ; @LPC32XX_DEF_BUS_RATE
	.no_dead_strip	_lpc32xx_nand_setup
.subsections_via_symbols
