	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap2_onenand_set_cfg
_omap2_onenand_set_cfg:                 ## @omap2_onenand_set_cfg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%ecx, %r9d
	movq	_ONENAND_SYS_CFG1_BRL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r9d, %eax
	shll	%cl, %eax
                                        ## kill: def $r8d killed $r8d def $r8
	roll	$30, %r8d
	cmpl	$8, %r8d
	ja	LBB0_5
## %bb.1:
	movq	_ONENAND_SYS_CFG1_RDY@GOTPCREL(%rip), %rbx
	movq	_ONENAND_SYS_CFG1_INT@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ecx
	orw	(%rbx), %cx
	orl	%eax, %ecx
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r8,4), %rbx
	addq	%rax, %rbx
	jmpq	*%rbx
LBB0_6:
	movq	_ONENAND_SYS_CFG1_BL_4@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_ONENAND_SYS_CFG1_BL_8@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_17
LBB0_3:
	movq	_ONENAND_SYS_CFG1_BL_16@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_ONENAND_SYS_CFG1_BL_32@GOTPCREL(%rip), %rax
LBB0_7:
	orw	(%rax), %cx
LBB0_8:
	xorl	%r14d, %r14d
	movl	$0, %ebx
	cmpl	$6, %r9d
	jl	LBB0_10
## %bb.9:
	movq	_ONENAND_SYS_CFG1_HF@GOTPCREL(%rip), %rax
	movzwl	(%rax), %ebx
LBB0_10:
	movl	$0, %eax
	cmpl	$8, %r9d
	jl	LBB0_12
## %bb.11:
	movq	_ONENAND_SYS_CFG1_VHF@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
LBB0_12:
	orl	%eax, %ebx
	movl	$0, %eax
	testl	%esi, %esi
	je	LBB0_14
## %bb.13:
	movq	_ONENAND_SYS_CFG1_SYNC_READ@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
LBB0_14:
	orl	%eax, %ebx
	orl	%ebx, %ecx
	movl	$0, %eax
	testl	%edx, %edx
	je	LBB0_16
## %bb.15:
	movq	_ONENAND_SYS_CFG1_SYNC_WRITE@GOTPCREL(%rip), %rax
	movzwl	(%rax), %eax
LBB0_16:
	orl	%eax, %ecx
	movq	_ONENAND_REG_SYS_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movzwl	%cx, %esi
	callq	_write_reg
LBB0_17:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_ONENAND_SYS_CFG1_RDY,2,1       ## @ONENAND_SYS_CFG1_RDY
	.comm	_ONENAND_SYS_CFG1_INT,2,1       ## @ONENAND_SYS_CFG1_INT
	.comm	_ONENAND_SYS_CFG1_BRL_SHIFT,4,2 ## @ONENAND_SYS_CFG1_BRL_SHIFT
	.comm	_ONENAND_SYS_CFG1_BL_4,2,1      ## @ONENAND_SYS_CFG1_BL_4
	.comm	_ONENAND_SYS_CFG1_BL_8,2,1      ## @ONENAND_SYS_CFG1_BL_8
	.comm	_ONENAND_SYS_CFG1_BL_16,2,1     ## @ONENAND_SYS_CFG1_BL_16
	.comm	_ONENAND_SYS_CFG1_BL_32,2,1     ## @ONENAND_SYS_CFG1_BL_32
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ONENAND_SYS_CFG1_HF,2,1        ## @ONENAND_SYS_CFG1_HF
	.comm	_ONENAND_SYS_CFG1_VHF,2,1       ## @ONENAND_SYS_CFG1_VHF
	.comm	_ONENAND_SYS_CFG1_SYNC_READ,2,1 ## @ONENAND_SYS_CFG1_SYNC_READ
	.comm	_ONENAND_SYS_CFG1_SYNC_WRITE,2,1 ## @ONENAND_SYS_CFG1_SYNC_WRITE
	.comm	_ONENAND_REG_SYS_CFG1,4,2       ## @ONENAND_REG_SYS_CFG1
	.no_dead_strip	_omap2_onenand_set_cfg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap2_onenand_set_cfg
_omap2_onenand_set_cfg:                 ; @omap2_onenand_set_cfg
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ror	w9, w4, #2
	cmp	w9, #8
	b.hi	LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _ONENAND_SYS_CFG1_RDY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ONENAND_SYS_CFG1_RDY@GOTPAGEOFF]
	ldrh	w8, [x8]
Lloh2:
	adrp	x10, _ONENAND_SYS_CFG1_INT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _ONENAND_SYS_CFG1_INT@GOTPAGEOFF]
	ldrh	w10, [x10]
	orr	w8, w10, w8
Lloh4:
	adrp	x10, _ONENAND_SYS_CFG1_BRL_SHIFT@GOTPAGE
Lloh5:
	ldr	x10, [x10, _ONENAND_SYS_CFG1_BRL_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	lsl	w10, w3, w10
	orr	w8, w8, w10
Lloh7:
	adrp	x10, lJTI0_0@PAGE
Lloh8:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
Lloh9:
	adrp	x9, _ONENAND_SYS_CFG1_BL_4@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_BL_4@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh11:
	adrp	x9, _ONENAND_SYS_CFG1_BL_8@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_BL_8@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh16:
	adrp	x9, _ONENAND_SYS_CFG1_BL_16@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_BL_16@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh18:
	adrp	x9, _ONENAND_SYS_CFG1_BL_32@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_BL_32@GOTPAGEOFF]
LBB0_7:
	ldrh	w9, [x9]
	orr	w8, w9, w8
LBB0_8:
Lloh20:
	adrp	x9, _ONENAND_SYS_CFG1_HF@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_HF@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w3, #5
	csel	w9, w9, wzr, gt
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _ONENAND_SYS_CFG1_VHF@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_VHF@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w3, #7
	csel	w9, w9, wzr, gt
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _ONENAND_SYS_CFG1_SYNC_READ@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_SYNC_READ@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w1, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh26:
	adrp	x9, _ONENAND_SYS_CFG1_SYNC_WRITE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _ONENAND_SYS_CFG1_SYNC_WRITE@GOTPAGEOFF]
	ldrh	w9, [x9]
	cmp	w2, #0
	csel	w9, wzr, w9, eq
	orr	w8, w8, w9
Lloh28:
	adrp	x9, _ONENAND_REG_SYS_CFG1@GOTPAGE
Lloh29:
	ldr	x9, [x9, _ONENAND_REG_SYS_CFG1@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x9]
	and	w1, w8, #0xffff
	bl	_write_reg
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_ONENAND_SYS_CFG1_RDY,2,1       ; @ONENAND_SYS_CFG1_RDY
	.comm	_ONENAND_SYS_CFG1_INT,2,1       ; @ONENAND_SYS_CFG1_INT
	.comm	_ONENAND_SYS_CFG1_BRL_SHIFT,4,2 ; @ONENAND_SYS_CFG1_BRL_SHIFT
	.comm	_ONENAND_SYS_CFG1_BL_4,2,1      ; @ONENAND_SYS_CFG1_BL_4
	.comm	_ONENAND_SYS_CFG1_BL_8,2,1      ; @ONENAND_SYS_CFG1_BL_8
	.comm	_ONENAND_SYS_CFG1_BL_16,2,1     ; @ONENAND_SYS_CFG1_BL_16
	.comm	_ONENAND_SYS_CFG1_BL_32,2,1     ; @ONENAND_SYS_CFG1_BL_32
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ONENAND_SYS_CFG1_HF,2,1        ; @ONENAND_SYS_CFG1_HF
	.comm	_ONENAND_SYS_CFG1_VHF,2,1       ; @ONENAND_SYS_CFG1_VHF
	.comm	_ONENAND_SYS_CFG1_SYNC_READ,2,1 ; @ONENAND_SYS_CFG1_SYNC_READ
	.comm	_ONENAND_SYS_CFG1_SYNC_WRITE,2,1 ; @ONENAND_SYS_CFG1_SYNC_WRITE
	.comm	_ONENAND_REG_SYS_CFG1,4,2       ; @ONENAND_REG_SYS_CFG1
	.no_dead_strip	_omap2_onenand_set_cfg
.subsections_via_symbols
