	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rj54n1_reg_init
_rj54n1_reg_init:                       ## @rj54n1_reg_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_rj54n1
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_rj54n1_set_clock
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	_bank_7@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_reg_write_multiple
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	_bank_10@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_reg_write_multiple
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movq	_RJ54N1_SCALE_1_2_LEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$115, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movq	_RJ54N1_SCALE_4_LEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$15, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	_RJ54N1_RESIZE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RESIZE_HOLD_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	$1, %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	_RJ54N1_Y_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$132, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	movq	_RJ54N1_MIRROR_STILL_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$39, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_bank_4@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_reg_write_multiple
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	_RJ54N1_EXPOSURE_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$128, %edx
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	movq	_RJ54N1_WB_SEL_WEIGHT_I@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_reg_read
	movl	%eax, %ebx
LBB0_11:
	testl	%ebx, %ebx
	js	LBB0_18
## %bb.12:
	andl	$128, %ebx
	movl	%ebx, (%r14)
	movq	_bank_5@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_reg_write_multiple
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.13:
	movq	_bank_8@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_reg_write_multiple
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:
	movq	_RJ54N1_RESET_STANDBY@GOTPCREL(%rip), %r13
	movq	_E_EXCLK@GOTPCREL(%rip), %rax
	movq	_DSP_RSTX@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	orl	(%rax), %edx
	movl	(%r13), %esi
	movq	_SEN_RSTX@GOTPCREL(%rip), %r12
	orl	(%r12), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.15:
	movq	%r15, %rdi
	callq	_rj54n1_commit
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:
	movl	(%r13), %esi
	movl	(%r14), %edx
	movq	_E_EXCLK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_TG_RSTX@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	orl	(%r12), %edx
	movq	%r15, %rdi
	callq	_reg_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.17:
	movq	_RJ54N1_FWFLG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$2, %edx
	callq	_reg_write
	movl	%eax, %ebx
LBB0_18:
	movl	$700, %edi                      ## imm = 0x2BC
	callq	_msleep
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bank_7,4,2                     ## @bank_7
	.comm	_bank_10,4,2                    ## @bank_10
	.comm	_RJ54N1_SCALE_1_2_LEV,4,2       ## @RJ54N1_SCALE_1_2_LEV
	.comm	_RJ54N1_SCALE_4_LEV,4,2         ## @RJ54N1_SCALE_4_LEV
	.comm	_RJ54N1_RESIZE_CONTROL,4,2      ## @RJ54N1_RESIZE_CONTROL
	.comm	_RESIZE_HOLD_SEL,4,2            ## @RESIZE_HOLD_SEL
	.comm	_RJ54N1_Y_GAIN,4,2              ## @RJ54N1_Y_GAIN
	.comm	_RJ54N1_MIRROR_STILL_MODE,4,2   ## @RJ54N1_MIRROR_STILL_MODE
	.comm	_bank_4,4,2                     ## @bank_4
	.comm	_RJ54N1_EXPOSURE_CONTROL,4,2    ## @RJ54N1_EXPOSURE_CONTROL
	.comm	_RJ54N1_WB_SEL_WEIGHT_I,4,2     ## @RJ54N1_WB_SEL_WEIGHT_I
	.comm	_bank_5,4,2                     ## @bank_5
	.comm	_bank_8,4,2                     ## @bank_8
	.comm	_RJ54N1_RESET_STANDBY,4,2       ## @RJ54N1_RESET_STANDBY
	.comm	_E_EXCLK,4,2                    ## @E_EXCLK
	.comm	_DSP_RSTX,4,2                   ## @DSP_RSTX
	.comm	_SEN_RSTX,4,2                   ## @SEN_RSTX
	.comm	_TG_RSTX,4,2                    ## @TG_RSTX
	.comm	_RJ54N1_FWFLG,4,2               ## @RJ54N1_FWFLG
	.no_dead_strip	_rj54n1_reg_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rj54n1_reg_init
_rj54n1_reg_init:                       ; @rj54n1_reg_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_to_rj54n1
	mov	x20, x0
	mov	x0, x19
	bl	_rj54n1_set_clock
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.1:
Lloh0:
	adrp	x8, _bank_7@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bank_7@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_reg_write_multiple
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.2:
Lloh3:
	adrp	x8, _bank_10@GOTPAGE
Lloh4:
	ldr	x8, [x8, _bank_10@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_reg_write_multiple
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.3:
Lloh6:
	adrp	x8, _RJ54N1_SCALE_1_2_LEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RJ54N1_SCALE_1_2_LEV@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #115
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.4:
Lloh9:
	adrp	x8, _RJ54N1_SCALE_4_LEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RJ54N1_SCALE_4_LEV@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #15
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.5:
Lloh12:
	adrp	x8, _RJ54N1_RESIZE_CONTROL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RJ54N1_RESIZE_CONTROL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _RESIZE_HOLD_SEL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RESIZE_HOLD_SEL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w2, w8, #0x1
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.6:
Lloh18:
	adrp	x8, _RJ54N1_Y_GAIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RJ54N1_Y_GAIN@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #132
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.7:
Lloh21:
	adrp	x8, _RJ54N1_MIRROR_STILL_MODE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RJ54N1_MIRROR_STILL_MODE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #39
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.8:
Lloh24:
	adrp	x8, _bank_4@GOTPAGE
Lloh25:
	ldr	x8, [x8, _bank_4@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_reg_write_multiple
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.9:
Lloh27:
	adrp	x8, _RJ54N1_EXPOSURE_CONTROL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RJ54N1_EXPOSURE_CONTROL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #128
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.10:
Lloh30:
	adrp	x8, _RJ54N1_WB_SEL_WEIGHT_I@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RJ54N1_WB_SEL_WEIGHT_I@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_reg_read
	mov	x21, x0
LBB0_11:
	tbnz	w21, #31, LBB0_18
; %bb.12:
	and	w8, w21, #0x80
	str	w8, [x20]
Lloh33:
	adrp	x8, _bank_5@GOTPAGE
Lloh34:
	ldr	x8, [x8, _bank_5@GOTPAGEOFF]
Lloh35:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_reg_write_multiple
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.13:
Lloh36:
	adrp	x8, _bank_8@GOTPAGE
Lloh37:
	ldr	x8, [x8, _bank_8@GOTPAGEOFF]
Lloh38:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_reg_write_multiple
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.14:
Lloh39:
	adrp	x20, _RJ54N1_RESET_STANDBY@GOTPAGE
Lloh40:
	ldr	x20, [x20, _RJ54N1_RESET_STANDBY@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh41:
	adrp	x23, _E_EXCLK@GOTPAGE
Lloh42:
	ldr	x23, [x23, _E_EXCLK@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh43:
	adrp	x24, _DSP_RSTX@GOTPAGE
Lloh44:
	ldr	x24, [x24, _DSP_RSTX@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh45:
	adrp	x22, _SEN_RSTX@GOTPAGE
Lloh46:
	ldr	x22, [x22, _SEN_RSTX@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.15:
	mov	x0, x19
	bl	_rj54n1_commit
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.16:
	ldr	w1, [x20]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
Lloh47:
	adrp	x9, _TG_RSTX@GOTPAGE
Lloh48:
	ldr	x9, [x9, _TG_RSTX@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x22]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_reg_write
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.17:
Lloh50:
	adrp	x8, _RJ54N1_FWFLG@GOTPAGE
Lloh51:
	ldr	x8, [x8, _RJ54N1_FWFLG@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	bl	_reg_write
	mov	x21, x0
LBB0_18:
	mov	w0, #700
	bl	_msleep
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_bank_7,4,2                     ; @bank_7
	.comm	_bank_10,4,2                    ; @bank_10
	.comm	_RJ54N1_SCALE_1_2_LEV,4,2       ; @RJ54N1_SCALE_1_2_LEV
	.comm	_RJ54N1_SCALE_4_LEV,4,2         ; @RJ54N1_SCALE_4_LEV
	.comm	_RJ54N1_RESIZE_CONTROL,4,2      ; @RJ54N1_RESIZE_CONTROL
	.comm	_RESIZE_HOLD_SEL,4,2            ; @RESIZE_HOLD_SEL
	.comm	_RJ54N1_Y_GAIN,4,2              ; @RJ54N1_Y_GAIN
	.comm	_RJ54N1_MIRROR_STILL_MODE,4,2   ; @RJ54N1_MIRROR_STILL_MODE
	.comm	_bank_4,4,2                     ; @bank_4
	.comm	_RJ54N1_EXPOSURE_CONTROL,4,2    ; @RJ54N1_EXPOSURE_CONTROL
	.comm	_RJ54N1_WB_SEL_WEIGHT_I,4,2     ; @RJ54N1_WB_SEL_WEIGHT_I
	.comm	_bank_5,4,2                     ; @bank_5
	.comm	_bank_8,4,2                     ; @bank_8
	.comm	_RJ54N1_RESET_STANDBY,4,2       ; @RJ54N1_RESET_STANDBY
	.comm	_E_EXCLK,4,2                    ; @E_EXCLK
	.comm	_DSP_RSTX,4,2                   ; @DSP_RSTX
	.comm	_SEN_RSTX,4,2                   ; @SEN_RSTX
	.comm	_TG_RSTX,4,2                    ; @TG_RSTX
	.comm	_RJ54N1_FWFLG,4,2               ; @RJ54N1_FWFLG
	.no_dead_strip	_rj54n1_reg_init
.subsections_via_symbols
