	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpc32xx_nand_cmd_ctrl
_lpc32xx_nand_cmd_ctrl:                 ## @lpc32xx_nand_cmd_ctrl
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	callq	_nand_get_controller_data
	movq	%rax, %r12
	movl	(%rax), %edi
	callq	_SLC_CFG
	movl	%eax, %edi
	callq	_readl
	movq	_NAND_NCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%r15d, %ecx
	movq	_SLCCFG_CE_LOW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %edx
	orl	%eax, %edx
	notl	%ebx
	andl	%eax, %ebx
	testl	%ecx, %ecx
	cmovnel	%edx, %ebx
	movl	(%r12), %edi
	callq	_SLC_CFG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movq	_NAND_CMD_NONE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_1
## %bb.5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_NAND_CLE@GOTPCREL(%rip), %rax
	movl	(%r12), %edi
	testl	%r15d, (%rax)
	je	LBB0_3
## %bb.2:
	callq	_SLC_CMD
	jmp	LBB0_4
LBB0_3:
	callq	_SLC_ADDR
LBB0_4:
	movl	%r14d, %edi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_NCE,4,2                   ## @NAND_NCE
	.comm	_SLCCFG_CE_LOW,4,2              ## @SLCCFG_CE_LOW
	.comm	_NAND_CMD_NONE,4,2              ## @NAND_CMD_NONE
	.comm	_NAND_CLE,4,2                   ## @NAND_CLE
	.no_dead_strip	_lpc32xx_nand_cmd_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpc32xx_nand_cmd_ctrl
_lpc32xx_nand_cmd_ctrl:                 ; @lpc32xx_nand_cmd_ctrl
	.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	x20, x2
	mov	x19, x1
	bl	_nand_get_controller_data
	mov	x21, x0
	ldr	w0, [x0]
	bl	_SLC_CFG
	bl	_readl
Lloh0:
	adrp	x8, _NAND_NCE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_NCE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SLCCFG_CE_LOW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SLCCFG_CE_LOW@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w10, w9, w0
	bic	w9, w0, w9
	tst	w8, w20
	csel	w22, w9, w10, eq
	ldr	w0, [x21]
	bl	_SLC_CFG
	mov	x1, x0
	mov	x0, x22
	bl	_writel
Lloh6:
	adrp	x8, _NAND_CMD_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NAND_CMD_NONE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.1:
	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_2:
Lloh9:
	adrp	x8, _NAND_CLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_CLE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w0, [x21]
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	bl	_SLC_CMD
	b	LBB0_5
LBB0_4:
	bl	_SLC_ADDR
LBB0_5:
	mov	x1, x0
	mov	x0, x19
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_NCE,4,2                   ; @NAND_NCE
	.comm	_SLCCFG_CE_LOW,4,2              ; @SLCCFG_CE_LOW
	.comm	_NAND_CMD_NONE,4,2              ; @NAND_CMD_NONE
	.comm	_NAND_CLE,4,2                   ; @NAND_CLE
	.no_dead_strip	_lpc32xx_nand_cmd_ctrl
.subsections_via_symbols
