	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_nor_set_addr
_mtk_nor_set_addr:                      ## @mtk_nor_set_addr
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_mtk_nor_set_addr_width
	movzbl	%bl, %edi
	movq	(%r14), %rsi
	movq	_MTK_NOR_RADR0_REG@GOTPCREL(%rip), %r15
	addq	(%r15), %rsi
	callq	_writeb
	movzbl	%bh, %edi
	movq	(%r14), %rax
	movq	(%r15), %rcx
	leaq	(%rax,%rcx), %rsi
	addq	$4, %rsi
	callq	_writeb
	movl	%ebx, %eax
	shrl	$16, %eax
	movzbl	%al, %edi
	movq	(%r14), %rax
	movq	(%r15), %rcx
	leaq	(%rax,%rcx), %rsi
	addq	$8, %rsi
	callq	_writeb
	shrl	$24, %ebx
	movq	_MTK_NOR_RADR3_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writeb                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_NOR_RADR0_REG,8,3          ## @MTK_NOR_RADR0_REG
	.comm	_MTK_NOR_RADR3_REG,8,3          ## @MTK_NOR_RADR3_REG
	.no_dead_strip	_mtk_nor_set_addr
.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_addr
_mtk_nor_set_addr:                      ; @mtk_nor_set_addr
	.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, x1
	mov	x20, x0
	bl	_mtk_nor_set_addr_width
	and	w0, w19, #0xff
	ldr	x8, [x20]
Lloh0:
	adrp	x21, _MTK_NOR_RADR0_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MTK_NOR_RADR0_REG@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x1, x8, x9
	bl	_writeb
	ubfx	w0, w19, #8, #8
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x8, x8, x9
	add	x1, x8, #4
	bl	_writeb
	ubfx	w0, w19, #16, #8
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x8, x8, x9
	add	x1, x8, #8
	bl	_writeb
	lsr	w0, w19, #24
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _MTK_NOR_RADR3_REG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MTK_NOR_RADR3_REG@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_NOR_RADR0_REG,8,3          ; @MTK_NOR_RADR0_REG
	.comm	_MTK_NOR_RADR3_REG,8,3          ; @MTK_NOR_RADR3_REG
	.no_dead_strip	_mtk_nor_set_addr
.subsections_via_symbols
