	.file	"extr_sh_flctl.c_set_cmd_regs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_cmd_regs, @function
set_cmd_regs:
.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, edx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	call	mtd_to_flctl@PLT
	mov	edi, DWORD PTR SEL_16BIT[rip]
	mov	r12, rax
	mov	ebp, edi
	not	ebp
	and	ebp, DWORD PTR [rax]
	cmp	QWORD PTR 16[rax], 0
	je	.L2
	or	ebp, DWORD PTR SNAND_E[rip]
.L3:
	mov	r8d, DWORD PTR DOCMD1_E[rip]
	mov	edx, DWORD PTR DOADR_E[rip]
	lea	esi, -128[rbx]
	mov	r14d, r8d
	or	r14d, edx
	cmp	esi, 8
	ja	.L4
	lea	rcx, .L6[rip]
	movsx	rax, DWORD PTR [rcx+rsi*4]
	add	rax, rcx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L10-.L6
	.long	.L11-.L6
	.long	.L8-.L6
	.long	.L10-.L6
	.long	.L8-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
	.p2align 4,,10
	.p2align 3
.L8:
	or	r14d, DWORD PTR CDSRC_E[rip]
.L17:
	or	edi, ebp
	mov	eax, DWORD PTR 12[r12]
	or	r14d, DWORD PTR 8[r12]
	test	DWORD PTR NAND_BUSWIDTH_16[rip], eax
	cmovne	ebp, edi
.L4:
	mov	rdi, r12
	call	FLCMNCR@PLT
	mov	edi, ebp
	mov	esi, eax
	call	writel@PLT
	mov	rdi, r12
	call	FLCMDCR@PLT
	mov	edi, r14d
	mov	esi, eax
	call	writel@PLT
	mov	rdi, r12
	call	FLCMCDR@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	edi, r13d
	pop	rbp
	.cfi_def_cfa_offset 32
	mov	esi, eax
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	jmp	writel@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR SNAND_E[rip]
	not	eax
	and	ebp, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	mov	eax, DWORD PTR SNAND_E[rip]
	or	edx, DWORD PTR DOSR_E[rip]
	not	edx
	not	eax
	and	r14d, edx
	and	ebp, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR SNAND_E[rip]
	not	eax
	and	ebp, eax
	mov	eax, DWORD PTR CDSRC_E[rip]
	or	eax, DWORD PTR ADRCNT_1[rip]
	or	r14d, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	not	edx
	mov	r14d, edx
	and	r14d, r8d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR DOCMD2_E[rip]
	or	eax, DWORD PTR CDSRC_E[rip]
	or	eax, DWORD PTR SELRW[rip]
	or	r14d, eax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L5:
	or	r14d, DWORD PTR DOCMD2_E[rip]
	or	r14d, DWORD PTR 4[r12]
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	set_cmd_regs, .-set_cmd_regs
	.comm	SNAND_E,4,4
	.comm	SEL_16BIT,4,4
	.comm	SELRW,4,4
	.comm	NAND_BUSWIDTH_16,4,4
	.comm	DOSR_E,4,4
	.comm	DOCMD2_E,4,4
	.comm	DOCMD1_E,4,4
	.comm	DOADR_E,4,4
	.comm	CDSRC_E,4,4
	.comm	ADRCNT_1,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_sh_flctl.c_set_cmd_regs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_cmd_regs, %function
set_cmd_regs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r7, r2
	bl	mtd_to_flctl
	mov	r4, r0
	ldr	r2, .L23
	ldr	r3, [r0, #16]
	ldr	r0, [r2]
	ldr	r2, .L23+4
	ldr	r6, [r4]
	cmp	r3, #0
	ldr	r3, [r2]
	bic	r6, r6, r0
	ldr	r1, .L23+8
	orrne	r6, r6, r3
	biceq	r6, r6, r3
	ldr	r3, .L23+12
	ldr	ip, [r1]
	ldr	r3, [r3]
	sub	r1, r5, #128
	orr	r5, ip, r3
	cmp	r1, #8
	ldrls	pc, [pc, r1, asl #2]
	b	.L4
.L6:
	.word	.L10
	.word	.L11
	.word	.L8
	.word	.L10
	.word	.L8
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L5
.L8:
	ldr	r3, .L23+16
	ldr	r2, .L23+20
	ldr	r3, [r3]
.L21:
	ldr	r2, [r2]
	ldr	r1, [r4, #12]
	orr	r5, r3, r5
	ldr	r3, [r4, #8]
	tst	r1, r2
	orr	r5, r5, r3
	orrne	r6, r6, r0
.L4:
	mov	r0, r4
	bl	FLCMNCR
	mov	r1, r0
	mov	r0, r6
	bl	writel
	mov	r0, r4
	bl	FLCMDCR
	mov	r1, r0
	mov	r0, r5
	bl	writel
	mov	r0, r4
	bl	FLCMCDR
	mov	r1, r0
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, lr}
	b	writel
.L10:
	ldr	r0, .L23+24
	ldr	r1, [r2]
	ldr	r2, [r0]
	bic	r6, r6, r1
	orr	r3, r3, r2
	bic	r5, r5, r3
	b	.L4
.L9:
	ldr	r3, .L23+16
	ldr	r1, .L23+28
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	orr	r3, r3, r1
	bic	r6, r6, r2
	orr	r5, r5, r3
	b	.L4
.L11:
	bic	r5, ip, r3
	b	.L4
.L7:
	ldr	r3, .L23+32
	ldr	r2, .L23+16
	ldr	r1, .L23+36
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, r2
	orr	r3, r3, r1
	ldr	r2, .L23+20
	b	.L21
.L5:
	ldr	r3, .L23+32
	ldr	r2, [r4, #4]
	ldr	r3, [r3]
	orr	r5, r5, r3
	orr	r5, r5, r2
	b	.L4
.L24:
	.align	2
.L23:
	.word	SEL_16BIT
	.word	SNAND_E
	.word	DOCMD1_E
	.word	DOADR_E
	.word	CDSRC_E
	.word	NAND_BUSWIDTH_16
	.word	DOSR_E
	.word	ADRCNT_1
	.word	DOCMD2_E
	.word	SELRW
	.size	set_cmd_regs, .-set_cmd_regs
	.comm	SNAND_E,4,4
	.comm	SEL_16BIT,4,4
	.comm	SELRW,4,4
	.comm	NAND_BUSWIDTH_16,4,4
	.comm	DOSR_E,4,4
	.comm	DOCMD2_E,4,4
	.comm	DOCMD1_E,4,4
	.comm	DOADR_E,4,4
	.comm	CDSRC_E,4,4
	.comm	ADRCNT_1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
