	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt9m111_init                   ## -- Begin function mt9m111_init
	.p2align	4, 0x90
_mt9m111_init:                          ## @mt9m111_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_init_mt9m111@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movl	$1, %r12d
	movq	_BRIDGE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	-8(%rax,%r12,8), %rax
	movq	(%rax), %rcx
	cmpq	(%r14), %rcx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rax), %rsi
	movq	16(%rax), %rdx
	movq	%r15, %rdi
	callq	_m5602_write_bridge
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movups	16(%rax), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	8(%rax), %rsi
	movq	%r15, %rdi
	leaq	-64(%rbp), %rdx
	movl	$2, %ecx
	callq	_m5602_write_sensor
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ebx
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %r12
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	testl	%ebx, %ebx
	je	LBB0_2
LBB0_7:
	movq	_dump_sensor@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_mt9m111_dump_registers
LBB0_9:
	movq	_VFLIP_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx,%rax,4), %esi
	movq	%r15, %rdi
	callq	_mt9m111_set_vflip
	testl	%eax, %eax
	js	LBB0_15
## %bb.10:
	movq	_HFLIP_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r15, %rdi
	callq	_mt9m111_set_hflip
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:
	movq	_GREEN_BALANCE_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r15, %rdi
	callq	_mt9m111_set_green_balance
	testl	%eax, %eax
	js	LBB0_15
## %bb.12:
	movq	_BLUE_BALANCE_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r15, %rdi
	callq	_mt9m111_set_blue_balance
	testl	%eax, %eax
	js	LBB0_15
## %bb.13:
	movq	_RED_BALANCE_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r15, %rdi
	callq	_mt9m111_set_red_balance
	testl	%eax, %eax
	js	LBB0_15
## %bb.14:
	movq	_GAIN_IDX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rbx,%rax,4), %esi
	movq	%r15, %rdi
	callq	_mt9m111_set_gain
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_init_mt9m111,8,3               ## @init_mt9m111
	.comm	_BRIDGE,8,3                     ## @BRIDGE
	.comm	_dump_sensor,8,3                ## @dump_sensor
	.comm	_VFLIP_IDX,8,3                  ## @VFLIP_IDX
	.comm	_HFLIP_IDX,8,3                  ## @HFLIP_IDX
	.comm	_GREEN_BALANCE_IDX,8,3          ## @GREEN_BALANCE_IDX
	.comm	_BLUE_BALANCE_IDX,8,3           ## @BLUE_BALANCE_IDX
	.comm	_RED_BALANCE_IDX,8,3            ## @RED_BALANCE_IDX
	.comm	_GAIN_IDX,8,3                   ## @GAIN_IDX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt9m111_init                   ; -- Begin function mt9m111_init
	.p2align	2
_mt9m111_init:                          ; @mt9m111_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x22, _init_mt9m111@GOTPAGE
Lloh1:
	ldr	x22, [x22, _init_mt9m111@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x23, #0
Lloh2:
	adrp	x24, _BRIDGE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _BRIDGE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	q0, [x8, #16]
	str	q0, [sp]
	ldr	x1, [x8, #8]
	mov	x2, sp
	mov	x0, x19
	mov	w3, #2
	bl	_m5602_write_sensor
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	add	x23, x23, #1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	ccmp	w20, #0, #0, lt
	b.ne	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x8, [x8, x23, lsl #3]
	ldr	x9, [x8]
	ldr	x10, [x24]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x1, x2, [x8, #8]
	mov	x0, x19
	bl	_m5602_write_bridge
	b	LBB0_3
LBB0_6:
Lloh4:
	adrp	x8, _dump_sensor@GOTPAGE
Lloh5:
	ldr	x8, [x8, _dump_sensor@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_mt9m111_dump_registers
LBB0_8:
Lloh7:
	adrp	x8, _VFLIP_IDX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _VFLIP_IDX@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_mt9m111_set_vflip
	tbnz	w0, #31, LBB0_14
; %bb.9:
Lloh10:
	adrp	x8, _HFLIP_IDX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HFLIP_IDX@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_mt9m111_set_hflip
	tbnz	w0, #31, LBB0_14
; %bb.10:
Lloh13:
	adrp	x8, _GREEN_BALANCE_IDX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GREEN_BALANCE_IDX@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_mt9m111_set_green_balance
	tbnz	w0, #31, LBB0_14
; %bb.11:
Lloh16:
	adrp	x8, _BLUE_BALANCE_IDX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BLUE_BALANCE_IDX@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_mt9m111_set_blue_balance
	tbnz	w0, #31, LBB0_14
; %bb.12:
Lloh19:
	adrp	x8, _RED_BALANCE_IDX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RED_BALANCE_IDX@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_mt9m111_set_red_balance
	tbnz	w0, #31, LBB0_14
; %bb.13:
Lloh22:
	adrp	x8, _GAIN_IDX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _GAIN_IDX@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	w1, [x21, x8, lsl #2]
	mov	x0, x19
	bl	_mt9m111_set_gain
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_init_mt9m111,8,3               ; @init_mt9m111
	.comm	_BRIDGE,8,3                     ; @BRIDGE
	.comm	_dump_sensor,8,3                ; @dump_sensor
	.comm	_VFLIP_IDX,8,3                  ; @VFLIP_IDX
	.comm	_HFLIP_IDX,8,3                  ; @HFLIP_IDX
	.comm	_GREEN_BALANCE_IDX,8,3          ; @GREEN_BALANCE_IDX
	.comm	_BLUE_BALANCE_IDX,8,3           ; @BLUE_BALANCE_IDX
	.comm	_RED_BALANCE_IDX,8,3            ; @RED_BALANCE_IDX
	.comm	_GAIN_IDX,8,3                   ; @GAIN_IDX
.subsections_via_symbols
