	.file	"extr_lpc32xx_slc.c_lpc32xx_nand_cmd_ctrl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lpc32xx_nand_cmd_ctrl, @function
lpc32xx_nand_cmd_ctrl:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	nand_get_controller_data@PLT
	mov	edi, DWORD PTR [rax]
	mov	rbx, rax
	call	SLC_CFG@PLT
	mov	edi, eax
	call	readl@PLT
	mov	ebp, eax
	test	DWORD PTR NAND_NCE[rip], r13d
	je	.L2
	or	ebp, DWORD PTR SLCCFG_CE_LOW[rip]
.L3:
	mov	edi, DWORD PTR [rbx]
	call	SLC_CFG@PLT
	mov	edi, ebp
	mov	esi, eax
	call	writel@PLT
	cmp	DWORD PTR NAND_CMD_NONE[rip], r12d
	je	.L1
	mov	edi, DWORD PTR [rbx]
	test	DWORD PTR NAND_CLE[rip], r13d
	jne	.L9
	call	SLC_ADDR@PLT
.L7:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edi, r12d
	mov	esi, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	writel@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR SLCCFG_CE_LOW[rip]
	not	eax
	and	ebp, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	call	SLC_CMD@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	lpc32xx_nand_cmd_ctrl, .-lpc32xx_nand_cmd_ctrl
	.comm	SLCCFG_CE_LOW,4,4
	.comm	NAND_NCE,4,4
	.comm	NAND_CMD_NONE,4,4
	.comm	NAND_CLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_lpc32xx_slc.c_lpc32xx_nand_cmd_ctrl.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lpc32xx_nand_cmd_ctrl, %function
lpc32xx_nand_cmd_ctrl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r7, r2
	bl	nand_get_controller_data
	mov	r5, r0
	ldr	r0, [r0]
	bl	SLC_CFG
	bl	readl
	ldr	r3, .L8
	ldr	r3, [r3]
	tst	r7, r3
	ldr	r3, .L8+4
	ldr	r4, [r3]
	orrne	r4, r0, r4
	biceq	r4, r0, r4
	ldr	r0, [r5]
	bl	SLC_CFG
	mov	r1, r0
	mov	r0, r4
	bl	writel
	ldr	r3, .L8+8
	ldr	r3, [r3]
	cmp	r3, r6
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L8+12
	ldr	r0, [r5]
	ldr	r3, [r3]
	tst	r7, r3
	beq	.L5
	bl	SLC_CMD
	mov	r1, r0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	writel
.L5:
	bl	SLC_ADDR
	mov	r1, r0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	writel
.L9:
	.align	2
.L8:
	.word	NAND_NCE
	.word	SLCCFG_CE_LOW
	.word	NAND_CMD_NONE
	.word	NAND_CLE
	.size	lpc32xx_nand_cmd_ctrl, .-lpc32xx_nand_cmd_ctrl
	.comm	SLCCFG_CE_LOW,4,4
	.comm	NAND_NCE,4,4
	.comm	NAND_CMD_NONE,4,4
	.comm	NAND_CLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
