	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9v022_init
_mt9v022_init:                          ## @mt9v022_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_to_mt9v022
	movl	(%rax), %edx
	orl	$16, %edx
	movl	%edx, (%rax)
	movq	_MT9V022_CHIP_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_reg_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	_MT9V022_READ_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$768, %edx                      ## imm = 0x300
	callq	_reg_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	_MT9V022_AEC_AGC_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_reg_set
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_MT9V022_ANALOG_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_reg_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_MT9V022_TOTAL_SHUTTER_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$480, %edx                      ## imm = 0x1E0
	callq	_reg_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	_MT9V022_MAX_TOTAL_SHUTTER_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$480, %edx                      ## imm = 0x1E0
	callq	_reg_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	_MT9V022_BLACK_LEVEL_CALIB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_reg_clear
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	movq	_MT9V022_DIGITAL_TEST_PATTERN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_reg_write                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9V022_CHIP_CONTROL,4,2       ## @MT9V022_CHIP_CONTROL
	.comm	_MT9V022_READ_MODE,4,2          ## @MT9V022_READ_MODE
	.comm	_MT9V022_AEC_AGC_ENABLE,4,2     ## @MT9V022_AEC_AGC_ENABLE
	.comm	_MT9V022_ANALOG_GAIN,4,2        ## @MT9V022_ANALOG_GAIN
	.comm	_MT9V022_TOTAL_SHUTTER_WIDTH,4,2 ## @MT9V022_TOTAL_SHUTTER_WIDTH
	.comm	_MT9V022_MAX_TOTAL_SHUTTER_WIDTH,4,2 ## @MT9V022_MAX_TOTAL_SHUTTER_WIDTH
	.comm	_MT9V022_BLACK_LEVEL_CALIB_CTRL,4,2 ## @MT9V022_BLACK_LEVEL_CALIB_CTRL
	.comm	_MT9V022_DIGITAL_TEST_PATTERN,4,2 ## @MT9V022_DIGITAL_TEST_PATTERN
	.no_dead_strip	_mt9v022_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9v022_init
_mt9v022_init:                          ; @mt9v022_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_to_mt9v022
	ldr	w8, [x0]
	orr	w2, w8, #0x10
	str	w2, [x0]
Lloh0:
	adrp	x8, _MT9V022_CHIP_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT9V022_CHIP_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_reg_write
	cbnz	w0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _MT9V022_READ_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT9V022_READ_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #768
	bl	_reg_write
	cbnz	w0, LBB0_7
; %bb.2:
Lloh6:
	adrp	x8, _MT9V022_AEC_AGC_ENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT9V022_AEC_AGC_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #3
	bl	_reg_set
	cbnz	w0, LBB0_7
; %bb.3:
Lloh9:
	adrp	x8, _MT9V022_ANALOG_GAIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MT9V022_ANALOG_GAIN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #16
	bl	_reg_write
	cbnz	w0, LBB0_7
; %bb.4:
Lloh12:
	adrp	x8, _MT9V022_TOTAL_SHUTTER_WIDTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT9V022_TOTAL_SHUTTER_WIDTH@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #480
	bl	_reg_write
	cbnz	w0, LBB0_7
; %bb.5:
Lloh15:
	adrp	x8, _MT9V022_MAX_TOTAL_SHUTTER_WIDTH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT9V022_MAX_TOTAL_SHUTTER_WIDTH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #480
	bl	_reg_write
	cbnz	w0, LBB0_7
; %bb.6:
Lloh18:
	adrp	x8, _MT9V022_BLACK_LEVEL_CALIB_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MT9V022_BLACK_LEVEL_CALIB_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_reg_clear
	cbz	w0, LBB0_8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh21:
	adrp	x8, _MT9V022_DIGITAL_TEST_PATTERN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MT9V022_DIGITAL_TEST_PATTERN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_reg_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9V022_CHIP_CONTROL,4,2       ; @MT9V022_CHIP_CONTROL
	.comm	_MT9V022_READ_MODE,4,2          ; @MT9V022_READ_MODE
	.comm	_MT9V022_AEC_AGC_ENABLE,4,2     ; @MT9V022_AEC_AGC_ENABLE
	.comm	_MT9V022_ANALOG_GAIN,4,2        ; @MT9V022_ANALOG_GAIN
	.comm	_MT9V022_TOTAL_SHUTTER_WIDTH,4,2 ; @MT9V022_TOTAL_SHUTTER_WIDTH
	.comm	_MT9V022_MAX_TOTAL_SHUTTER_WIDTH,4,2 ; @MT9V022_MAX_TOTAL_SHUTTER_WIDTH
	.comm	_MT9V022_BLACK_LEVEL_CALIB_CTRL,4,2 ; @MT9V022_BLACK_LEVEL_CALIB_CTRL
	.comm	_MT9V022_DIGITAL_TEST_PATTERN,4,2 ; @MT9V022_DIGITAL_TEST_PATTERN
	.no_dead_strip	_mt9v022_init
.subsections_via_symbols
