	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_nor_set_read_mode
_mtk_nor_set_read_mode:                 ## @mtk_nor_set_read_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %eax
	addl	$-128, %eax
	cmpl	$2, %eax
	ja	LBB0_1
## %bb.2:
	cltq
	leaq	l_switch.table.mtk_nor_set_read_mode(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	leaq	l_switch.table.mtk_nor_set_read_mode.1(%rip), %rdx
	movq	(%rdx,%rax,8), %r14
	leaq	l_switch.table.mtk_nor_set_read_mode.2(%rip), %rdx
	movq	(%rdx,%rax,8), %r15
	movl	12(%rbx), %edi
	movq	(%rcx), %rsi
	addq	(%rbx), %rsi
	callq	_writeb
	jmp	LBB0_3
LBB0_1:
	movq	_MTK_NOR_DUAL_DISABLE@GOTPCREL(%rip), %r15
	movq	_MTK_NOR_DUAL_REG@GOTPCREL(%rip), %r14
LBB0_3:
	movl	(%r15), %edi
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writeb                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_NOR_PRGDATA3_REG,8,3       ## @MTK_NOR_PRGDATA3_REG
	.comm	_MTK_NOR_FAST_READ,4,2          ## @MTK_NOR_FAST_READ
	.comm	_MTK_NOR_CFG1_REG,8,3           ## @MTK_NOR_CFG1_REG
	.comm	_MTK_NOR_DUAL_READ_EN,4,2       ## @MTK_NOR_DUAL_READ_EN
	.comm	_MTK_NOR_DUAL_REG,8,3           ## @MTK_NOR_DUAL_REG
	.comm	_MTK_NOR_PRGDATA4_REG,8,3       ## @MTK_NOR_PRGDATA4_REG
	.comm	_MTK_NOR_QUAD_READ_EN,4,2       ## @MTK_NOR_QUAD_READ_EN
	.comm	_MTK_NOR_DUAL_DISABLE,4,2       ## @MTK_NOR_DUAL_DISABLE
	.no_dead_strip	_mtk_nor_set_read_mode
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mtk_nor_set_read_mode
l_switch.table.mtk_nor_set_read_mode:
	.quad	_MTK_NOR_PRGDATA4_REG
	.quad	_MTK_NOR_PRGDATA3_REG
	.quad	_MTK_NOR_PRGDATA3_REG

	.p2align	3                               ## @switch.table.mtk_nor_set_read_mode.1
l_switch.table.mtk_nor_set_read_mode.1:
	.quad	_MTK_NOR_DUAL_REG
	.quad	_MTK_NOR_DUAL_REG
	.quad	_MTK_NOR_CFG1_REG

	.p2align	3                               ## @switch.table.mtk_nor_set_read_mode.2
l_switch.table.mtk_nor_set_read_mode.2:
	.quad	_MTK_NOR_QUAD_READ_EN
	.quad	_MTK_NOR_DUAL_READ_EN
	.quad	_MTK_NOR_FAST_READ

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_nor_set_read_mode
_mtk_nor_set_read_mode:                 ; @mtk_nor_set_read_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w8, [x0, #8]
	sub	w8, w8, #128
	cmp	w8, #2
	b.hi	LBB0_2
; %bb.1:
	sbfiz	x8, x8, #3, #32
Lloh0:
	adrp	x9, l_switch.table.mtk_nor_set_read_mode@PAGE
Lloh1:
	add	x9, x9, l_switch.table.mtk_nor_set_read_mode@PAGEOFF
	ldr	x9, [x9, x8]
Lloh2:
	adrp	x10, l_switch.table.mtk_nor_set_read_mode.1@PAGE
Lloh3:
	add	x10, x10, l_switch.table.mtk_nor_set_read_mode.1@PAGEOFF
	ldr	x20, [x10, x8]
Lloh4:
	adrp	x10, l_switch.table.mtk_nor_set_read_mode.2@PAGE
Lloh5:
	add	x10, x10, l_switch.table.mtk_nor_set_read_mode.2@PAGEOFF
	ldr	x21, [x10, x8]
	ldr	w0, [x19, #12]
	ldr	x8, [x19]
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writeb
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x21, _MTK_NOR_DUAL_DISABLE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MTK_NOR_DUAL_DISABLE@GOTPAGEOFF]
Lloh8:
	adrp	x20, _MTK_NOR_DUAL_REG@GOTPAGE
Lloh9:
	ldr	x20, [x20, _MTK_NOR_DUAL_REG@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x21]
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_writeb
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_NOR_PRGDATA3_REG,8,3       ; @MTK_NOR_PRGDATA3_REG
	.comm	_MTK_NOR_FAST_READ,4,2          ; @MTK_NOR_FAST_READ
	.comm	_MTK_NOR_CFG1_REG,8,3           ; @MTK_NOR_CFG1_REG
	.comm	_MTK_NOR_DUAL_READ_EN,4,2       ; @MTK_NOR_DUAL_READ_EN
	.comm	_MTK_NOR_DUAL_REG,8,3           ; @MTK_NOR_DUAL_REG
	.comm	_MTK_NOR_PRGDATA4_REG,8,3       ; @MTK_NOR_PRGDATA4_REG
	.comm	_MTK_NOR_QUAD_READ_EN,4,2       ; @MTK_NOR_QUAD_READ_EN
	.comm	_MTK_NOR_DUAL_DISABLE,4,2       ; @MTK_NOR_DUAL_DISABLE
	.no_dead_strip	_mtk_nor_set_read_mode
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mtk_nor_set_read_mode
l_switch.table.mtk_nor_set_read_mode:
	.quad	_MTK_NOR_PRGDATA4_REG
	.quad	_MTK_NOR_PRGDATA3_REG
	.quad	_MTK_NOR_PRGDATA3_REG

	.p2align	3                               ; @switch.table.mtk_nor_set_read_mode.1
l_switch.table.mtk_nor_set_read_mode.1:
	.quad	_MTK_NOR_DUAL_REG
	.quad	_MTK_NOR_DUAL_REG
	.quad	_MTK_NOR_CFG1_REG

	.p2align	3                               ; @switch.table.mtk_nor_set_read_mode.2
l_switch.table.mtk_nor_set_read_mode.2:
	.quad	_MTK_NOR_QUAD_READ_EN
	.quad	_MTK_NOR_DUAL_READ_EN
	.quad	_MTK_NOR_FAST_READ

.subsections_via_symbols
