	.file	"extr_omap2.c_omap2_onenand_set_cfg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	omap2_onenand_set_cfg, @function
omap2_onenand_set_cfg:
.LFB0:
	.cfi_startproc
	endbr64
	mov	r9d, ecx
	movzx	eax, WORD PTR ONENAND_SYS_CFG1_INT[rip]
	movzx	ecx, WORD PTR ONENAND_SYS_CFG1_RDY[rip]
	mov	r11d, r9d
	or	eax, ecx
	mov	ecx, DWORD PTR ONENAND_SYS_CFG1_BRL_SHIFT[rip]
	sal	r11d, cl
	mov	ecx, r11d
	or	ecx, eax
	cmp	r8d, 32
	ja	.L2
	lea	r10, .L4[rip]
	mov	r8d, r8d
	mov	eax, ecx
	movsx	r8, DWORD PTR [r10+r8*4]
	add	r8, r10
	notrack jmp	r8
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L8-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L7-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L6-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L5-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L2-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L3:
	movzx	eax, WORD PTR ONENAND_SYS_CFG1_BL_32[rip]
	or	eax, ecx
.L8:
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	cmp	r9d, 5
	jle	.L10
.L23:
	or	ax, WORD PTR ONENAND_SYS_CFG1_HF[rip]
	cmp	r9d, 7
	jle	.L10
	or	ax, WORD PTR ONENAND_SYS_CFG1_VHF[rip]
.L10:
	test	esi, esi
	je	.L11
	or	ax, WORD PTR ONENAND_SYS_CFG1_SYNC_READ[rip]
.L11:
	test	edx, edx
	je	.L12
	or	ax, WORD PTR ONENAND_SYS_CFG1_SYNC_WRITE[rip]
.L12:
	mov	edx, DWORD PTR ONENAND_REG_SYS_CFG1[rip]
	movzx	esi, ax
	call	write_reg@PLT
	xor	eax, eax
	add	rsp, 8
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	movzx	eax, WORD PTR ONENAND_SYS_CFG1_BL_4[rip]
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	or	eax, ecx
	cmp	r9d, 5
	jle	.L10
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	movzx	eax, WORD PTR ONENAND_SYS_CFG1_BL_8[rip]
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	or	eax, ecx
	cmp	r9d, 5
	jle	.L10
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	movzx	eax, WORD PTR ONENAND_SYS_CFG1_BL_16[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	or	eax, ecx
	cmp	r9d, 5
	jle	.L10
	jmp	.L23
	.cfi_endproc
.LFE0:
	.size	omap2_onenand_set_cfg, .-omap2_onenand_set_cfg
	.comm	ONENAND_SYS_CFG1_VHF,2,2
	.comm	ONENAND_SYS_CFG1_SYNC_WRITE,2,2
	.comm	ONENAND_SYS_CFG1_SYNC_READ,2,2
	.comm	ONENAND_SYS_CFG1_RDY,2,2
	.comm	ONENAND_SYS_CFG1_INT,2,2
	.comm	ONENAND_SYS_CFG1_HF,2,2
	.comm	ONENAND_SYS_CFG1_BRL_SHIFT,4,4
	.comm	ONENAND_SYS_CFG1_BL_8,2,2
	.comm	ONENAND_SYS_CFG1_BL_4,2,2
	.comm	ONENAND_SYS_CFG1_BL_32,2,2
	.comm	ONENAND_SYS_CFG1_BL_16,2,2
	.comm	ONENAND_REG_SYS_CFG1,4,4
	.comm	EINVAL,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_omap2.c_omap2_onenand_set_cfg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	omap2_onenand_set_cfg, %function
omap2_onenand_set_cfg:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	ip, .L22
	ldr	r4, .L22+4
	ldr	lr, .L22+8
	ldrh	ip, [ip]
	ldrh	r4, [r4]
	ldr	lr, [lr]
	orr	ip, ip, r4
	orr	ip, ip, r3, lsl lr
	ldr	lr, [sp, #8]
	lsl	ip, ip, #16
	lsr	ip, ip, #16
	cmp	lr, #32
	ldrls	pc, [pc, lr, asl #2]
	b	.L2
.L4:
	.word	.L8
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L7
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L6
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L5
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L3
.L5:
	ldr	lr, .L22+12
	ldrh	lr, [lr]
	orr	ip, ip, lr
.L8:
	cmp	r3, #5
	ble	.L10
.L21:
	ldr	lr, .L22+16
	cmp	r3, #7
	ldrh	r3, [lr]
	orr	ip, ip, r3
	ldrgt	r3, .L22+20
	ldrhgt	r3, [r3]
	orrgt	ip, ip, r3
	lslgt	ip, ip, #16
	lsrgt	ip, ip, #16
.L10:
	cmp	r1, #0
	ldrne	r3, .L22+24
	ldrhne	r3, [r3]
	orrne	ip, ip, r3
	cmp	r2, #0
	ldrne	r3, .L22+28
	ldrhne	r3, [r3]
	orrne	ip, ip, r3
	ldr	r3, .L22+32
	mov	r1, ip
	ldr	r2, [r3]
	bl	write_reg
	mov	r0, #0
	pop	{r4, pc}
.L2:
	ldr	r3, .L22+36
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, pc}
.L7:
	ldr	lr, .L22+40
	cmp	r3, #5
	ldrh	lr, [lr]
	orr	ip, ip, lr
	ble	.L10
	b	.L21
.L6:
	ldr	lr, .L22+44
	cmp	r3, #5
	ldrh	lr, [lr]
	orr	ip, ip, lr
	ble	.L10
	b	.L21
.L3:
	ldr	lr, .L22+48
	cmp	r3, #5
	ldrh	lr, [lr]
	orr	ip, ip, lr
	ble	.L10
	b	.L21
.L23:
	.align	2
.L22:
	.word	ONENAND_SYS_CFG1_RDY
	.word	ONENAND_SYS_CFG1_INT
	.word	ONENAND_SYS_CFG1_BRL_SHIFT
	.word	ONENAND_SYS_CFG1_BL_16
	.word	ONENAND_SYS_CFG1_HF
	.word	ONENAND_SYS_CFG1_VHF
	.word	ONENAND_SYS_CFG1_SYNC_READ
	.word	ONENAND_SYS_CFG1_SYNC_WRITE
	.word	ONENAND_REG_SYS_CFG1
	.word	EINVAL
	.word	ONENAND_SYS_CFG1_BL_4
	.word	ONENAND_SYS_CFG1_BL_8
	.word	ONENAND_SYS_CFG1_BL_32
	.size	omap2_onenand_set_cfg, .-omap2_onenand_set_cfg
	.comm	ONENAND_SYS_CFG1_VHF,2,2
	.comm	ONENAND_SYS_CFG1_SYNC_WRITE,2,2
	.comm	ONENAND_SYS_CFG1_SYNC_READ,2,2
	.comm	ONENAND_SYS_CFG1_RDY,2,2
	.comm	ONENAND_SYS_CFG1_INT,2,2
	.comm	ONENAND_SYS_CFG1_HF,2,2
	.comm	ONENAND_SYS_CFG1_BRL_SHIFT,4,4
	.comm	ONENAND_SYS_CFG1_BL_8,2,2
	.comm	ONENAND_SYS_CFG1_BL_4,2,2
	.comm	ONENAND_SYS_CFG1_BL_32,2,2
	.comm	ONENAND_SYS_CFG1_BL_16,2,2
	.comm	ONENAND_REG_SYS_CFG1,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
