	.file	"extr_nand_legacy.c_nand_command_lp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nand_command_lp, @function
nand_command_lp:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	call	nand_to_mtd@PLT
	cmp	DWORD PTR NAND_CMD_READOOB[rip], ebx
	je	.L36
	cmp	ebx, 137
	je	.L4
.L3:
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	esi, ebx
	mov	rdi, rbp
	or	edx, DWORD PTR NAND_CLE[rip]
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	call	[QWORD PTR 16[rbp]]
.L4:
	mov	eax, r13d
	mov	edx, DWORD PTR NAND_NCE[rip]
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	and	eax, r12d
	cmp	eax, -1
	je	.L32
	or	edx, DWORD PTR NAND_ALE[rip]
	mov	r14d, edx
	cmp	r12d, -1
	je	.L7
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR NAND_BUSWIDTH_16[rip], eax
	jne	.L37
.L8:
	mov	edx, r14d
	mov	rdi, rbp
	mov	esi, r12d
	call	[QWORD PTR 16[rbp]]
	mov	eax, DWORD PTR NAND_CTRL_CHANGE[rip]
	mov	edi, ebx
	not	eax
	and	r14d, eax
	call	nand_opcode_8bits@PLT
	test	eax, eax
	jne	.L7
	mov	esi, r12d
	mov	edx, r14d
	mov	rdi, rbp
	sar	esi, 8
	call	[QWORD PTR 16[rbp]]
.L7:
	mov	rax, QWORD PTR 16[rbp]
	cmp	r13d, -1
	je	.L38
	mov	edx, r14d
	mov	esi, r13d
	mov	rdi, rbp
	call	rax
	mov	esi, r13d
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR NAND_ALE[rip]
	sar	esi, 8
	call	[QWORD PTR 16[rbp]]
	mov	eax, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR NAND_NCE[rip]
	test	DWORD PTR NAND_ROW_ADDR_3[rip], eax
	je	.L33
	mov	esi, r13d
	or	edx, DWORD PTR NAND_ALE[rip]
	mov	rdi, rbp
	sar	esi, 16
	call	[QWORD PTR 16[rbp]]
	mov	edx, DWORD PTR NAND_NCE[rip]
.L33:
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
.L32:
	mov	rax, QWORD PTR 16[rbp]
.L6:
	add	ebx, -128
	mov	esi, 137
	mov	rdi, rbp
	call	rax
	cmp	ebx, 12
	ja	.L11
	lea	rdx, .L13[rip]
	movsx	rax, DWORD PTR [rdx+rbx*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L13:
	.long	.L1-.L13
	.long	.L1-.L13
	.long	.L1-.L13
	.long	.L17-.L13
	.long	.L34-.L13
	.long	.L15-.L13
	.long	.L1-.L13
	.long	.L14-.L13
	.long	.L1-.L13
	.long	.L1-.L13
	.long	.L1-.L13
	.long	.L1-.L13
	.long	.L1-.L13
	.text
	.p2align 4,,10
	.p2align 3
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L38:
	.cfi_restore_state
	mov	edx, DWORD PTR NAND_NCE[rip]
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	esi, DWORD PTR NAND_CMD_RNDOUTSTART[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR NAND_CLE[rip]
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	call	[QWORD PTR 16[rbp]]
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	esi, 137
	mov	rdi, rbp
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	call	[QWORD PTR 16[rbp]]
.L34:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	nand_ccs_delay@PLT
	.p2align 4,,10
	.p2align 3
.L36:
	.cfi_restore_state
	add	r12d, DWORD PTR [rax]
	mov	ebx, 135
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L14:
	and	r12d, r13d
	cmp	r12d, -1
	je	.L1
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	esi, DWORD PTR NAND_CMD_READSTART[rip]
	mov	rdi, rbp
	or	edx, DWORD PTR NAND_CLE[rip]
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	call	[QWORD PTR 16[rbp]]
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	esi, 137
	mov	rdi, rbp
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	call	[QWORD PTR 16[rbp]]
.L11:
	mov	eax, DWORD PTR 12[rbp]
	test	eax, eax
	je	.L39
.L18:
	mov	edi, 100
	call	ndelay@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	nand_wait_ready@PLT
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edx, DWORD PTR 12[rbp]
	test	edx, edx
	jne	.L18
	mov	edi, DWORD PTR 8[rbp]
	call	udelay@PLT
	mov	rdi, rbp
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	esi, 128
	or	edx, DWORD PTR NAND_CLE[rip]
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	call	[QWORD PTR 16[rbp]]
	mov	rdi, rbp
	mov	edx, DWORD PTR NAND_NCE[rip]
	mov	esi, 137
	or	edx, DWORD PTR NAND_CTRL_CHANGE[rip]
	call	[QWORD PTR 16[rbp]]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rdi, rbp
	mov	esi, 250
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	nand_wait_status_ready@PLT
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	mov	edi, ebx
	call	nand_opcode_8bits@PLT
	mov	r8d, eax
	mov	eax, r12d
	sar	eax
	test	r8d, r8d
	cmove	r12d, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L39:
	mov	edi, DWORD PTR 8[rbp]
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	udelay@PLT
	.cfi_endproc
.LFE0:
	.size	nand_command_lp, .-nand_command_lp
	.comm	NAND_ROW_ADDR_3,4,4
	.comm	NAND_NCE,4,4
	.comm	NAND_CTRL_CHANGE,4,4
	.comm	NAND_CMD_RNDOUTSTART,4,4
	.comm	NAND_CMD_READSTART,4,4
	.comm	NAND_CMD_READOOB,4,4
	.comm	NAND_CLE,4,4
	.comm	NAND_BUSWIDTH_16,4,4
	.comm	NAND_ALE,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_nand_legacy.c_nand_command_lp.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nand_command_lp, %function
nand_command_lp:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	mov	r7, r3
	mov	r6, r2
	mov	r4, r0
	bl	nand_to_mtd
	ldr	r3, .L39
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L34
	cmp	r5, #137
	beq	.L35
.L3:
	ldr	r2, .L39+4
	ldr	r8, .L39+8
	ldr	r9, .L39+12
	ldr	r1, [r2]
	ldr	r3, [r8]
	ldr	r2, [r9]
	orr	r3, r3, r1
	orr	r2, r3, r2
	mov	r1, r5
	mov	r0, r4
	ldr	r3, [r4, #12]
	blx	r3
.L4:
	ldr	r3, [r9]
	ldr	r2, [r8]
	and	r1, r7, r6
	cmn	r1, #1
	orr	r2, r2, r3
	ldreq	r3, [r4, #12]
	beq	.L6
	ldr	r10, .L39+16
	cmn	r6, #1
	ldr	fp, [r10]
	orr	fp, r2, fp
	beq	.L7
	ldr	r3, .L39+20
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	bne	.L36
.L8:
	mov	r2, fp
	mov	r1, r6
	ldr	r3, [r4, #12]
	mov	r0, r4
	blx	r3
	ldr	r3, [r9]
	mov	r0, r5
	bic	fp, fp, r3
	bl	nand_opcode_8bits
	cmp	r0, #0
	bne	.L7
	mov	r2, fp
	mov	r0, r4
	ldr	r3, [r4, #12]
	asr	r1, r6, #8
	blx	r3
.L7:
	cmn	r7, #1
	ldr	r3, [r4, #12]
	beq	.L37
	mov	r2, fp
	mov	r1, r7
	mov	r0, r4
	blx	r3
	ldr	r1, [r8]
	ldr	r2, [r10]
	ldr	r3, [r4, #12]
	orr	r2, r1, r2
	mov	r0, r4
	asr	r1, r7, #8
	blx	r3
	ldr	r3, .L39+24
	ldr	r2, [r4]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L31
	ldr	r1, [r8]
	ldr	r2, [r10]
	mov	r0, r4
	orr	r2, r1, r2
	ldr	r3, [r4, #12]
	asr	r1, r7, #16
	blx	r3
.L31:
	ldr	r2, [r8]
	ldr	r1, [r9]
	ldr	r3, [r4, #12]
	orr	r2, r2, r1
.L6:
	mov	r1, #137
	mov	r0, r4
	sub	r5, r5, #128
	blx	r3
	cmp	r5, #12
	ldrls	pc, [pc, r5, asl #2]
	b	.L11
.L13:
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L17
	.word	.L32
	.word	.L15
	.word	.L1
	.word	.L14
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
	.word	.L1
.L1:
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L37:
	ldr	r2, [r8]
	ldr	r1, [r9]
	orr	r2, r2, r1
	b	.L6
.L35:
	ldr	r8, .L39+8
	ldr	r9, .L39+12
	b	.L4
.L17:
	ldr	r2, .L39+4
	ldr	r3, [r8]
	ldr	r0, [r2]
	ldr	r1, .L39+28
	ldr	r2, [r9]
	orr	r3, r3, r0
	orr	r2, r3, r2
	ldr	r1, [r1]
	ldr	r3, [r4, #12]
	mov	r0, r4
	blx	r3
	ldr	r1, [r8]
	ldr	r2, [r9]
	mov	r0, r4
	orr	r2, r1, r2
	ldr	r3, [r4, #12]
	mov	r1, #137
	blx	r3
.L32:
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	nand_ccs_delay
.L34:
	ldr	r3, [r0]
	mov	r5, #135
	add	r6, r6, r3
	b	.L3
.L14:
	and	r6, r6, r7
	cmn	r6, #1
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r2, .L39+4
	ldr	r3, [r8]
	ldr	r0, [r2]
	ldr	r1, .L39+32
	ldr	r2, [r9]
	orr	r3, r3, r0
	orr	r2, r3, r2
	ldr	r1, [r1]
	ldr	r3, [r4, #12]
	mov	r0, r4
	blx	r3
	ldr	r1, [r8]
	ldr	r2, [r9]
	mov	r0, r4
	orr	r2, r1, r2
	ldr	r3, [r4, #12]
	mov	r1, #137
	blx	r3
.L11:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	beq	.L38
.L18:
	mov	r0, #100
	bl	ndelay
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	nand_wait_ready
.L15:
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bne	.L18
	ldr	r0, [r4, #4]
	bl	udelay
	ldr	r2, .L39+4
	ldr	r3, [r8]
	ldr	r1, [r2]
	ldr	r2, [r9]
	orr	r3, r3, r1
	orr	r2, r3, r2
	mov	r1, #128
	ldr	r3, [r4, #12]
	mov	r0, r4
	blx	r3
	ldr	r1, [r8]
	ldr	r2, [r9]
	mov	r0, r4
	ldr	r3, [r4, #12]
	orr	r2, r1, r2
	mov	r1, #137
	blx	r3
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r1, #250
	b	nand_wait_status_ready
.L36:
	mov	r0, r5
	bl	nand_opcode_8bits
	cmp	r0, #0
	asreq	r6, r6, #1
	b	.L8
.L38:
	ldr	r0, [r4, #4]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	udelay
.L40:
	.align	2
.L39:
	.word	NAND_CMD_READOOB
	.word	NAND_CLE
	.word	NAND_NCE
	.word	NAND_CTRL_CHANGE
	.word	NAND_ALE
	.word	NAND_BUSWIDTH_16
	.word	NAND_ROW_ADDR_3
	.word	NAND_CMD_RNDOUTSTART
	.word	NAND_CMD_READSTART
	.size	nand_command_lp, .-nand_command_lp
	.comm	NAND_ROW_ADDR_3,4,4
	.comm	NAND_NCE,4,4
	.comm	NAND_CTRL_CHANGE,4,4
	.comm	NAND_CMD_RNDOUTSTART,4,4
	.comm	NAND_CMD_READSTART,4,4
	.comm	NAND_CMD_READOOB,4,4
	.comm	NAND_CLE,4,4
	.comm	NAND_BUSWIDTH_16,4,4
	.comm	NAND_ALE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
