	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9v_init_sensor
_mt9v_init_sensor:                      ## @mt9v_init_sensor
	.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, %r15
	movl	$93, (%rdi)
	leaq	-28(%rbp), %rdx
	movl	$255, %esi
	callq	_i2c_r2
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	cmpl	$33347, -28(%rbp)               ## imm = 0x8243
	jne	LBB0_10
## %bb.2:
	movq	_mt9v011_init@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,8), %esi
	movl	4(%rax,%rbx,8), %edx
	movq	%r15, %rdi
	callq	_i2c_w2
	testq	%rax, %rax
	js	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_8:
	movabsq	$8589934594, %rax               ## imm = 0x200000002
	movq	%rax, 4(%r15)
	movq	_SENSOR_MT9V011@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_10:
	movl	$92, (%r15)
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$4, %edx
	callq	_i2c_w2
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	$255, %esi
	callq	_i2c_r2
	testl	%eax, %eax
	jne	LBB0_18
## %bb.11:
	cmpl	$33338, -28(%rbp)               ## imm = 0x823A
	jne	LBB0_18
## %bb.12:
	movq	_mt9v111_init@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_17
## %bb.13:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,8), %esi
	movl	4(%rax,%rbx,8), %edx
	movq	%r15, %rdi
	callq	_i2c_w2
	testq	%rax, %rax
	js	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_17:
	movq	_AUTOGAIN_IDX@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	_EXPOSURE_IDX@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movq	_GAIN_IDX@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movl	%eax, (%r15)
	movabsq	$8589934594, %rax               ## imm = 0x200000002
	movq	%rax, 4(%r15)
	movq	_SENSOR_MT9V111@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_9
LBB0_18:
	movl	$93, (%r15)
	movq	%r15, %rdi
	movl	$240, %esi
	xorl	%edx, %edx
	callq	_i2c_w2
	testl	$-2147483648, %eax              ## imm = 0x80000000
	je	LBB0_20
## %bb.19:
	movl	$72, (%r15)
	movq	%r15, %rdi
	movl	$240, %esi
	xorl	%edx, %edx
	callq	_i2c_w2
LBB0_20:
	xorl	%r14d, %r14d
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_i2c_r2
	testl	%eax, %eax
	jne	LBB0_28
## %bb.21:
	cmpl	$4649, -28(%rbp)                ## imm = 0x1229
	jne	LBB0_28
## %bb.22:
	movq	_mt9v112_init@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_27
## %bb.23:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,8), %esi
	movl	4(%rax,%rbx,8), %edx
	movq	%r15, %rdi
	callq	_i2c_w2
	testq	%rax, %rax
	js	LBB0_26
## %bb.24:                              ##   in Loop: Header=BB0_25 Depth=1
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_25
LBB0_27:
	movabsq	$8589934598, %rax               ## imm = 0x200000006
	movq	%rax, 4(%r15)
	movq	_SENSOR_MT9V112@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r15)
	leaq	L_.str.5(%rip), %rdi
LBB0_9:
	callq	_info
	xorl	%r14d, %r14d
	jmp	LBB0_30
LBB0_6:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_28:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
LBB0_26:
	leaq	L_.str.4(%rip), %rdi
LBB0_7:
	callq	_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_29:
	subl	(%rax), %r14d
LBB0_30:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mt9v011_init,8,3               ## @mt9v011_init
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MT9V011 sensor initialization failed"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SENSOR_MT9V011,4,2             ## @SENSOR_MT9V011
L_.str.1:                               ## @.str.1
	.asciz	"MT9V011 sensor detected"

	.comm	_mt9v111_init,8,3               ## @mt9v111_init
L_.str.2:                               ## @.str.2
	.asciz	"MT9V111 sensor initialization failed"

	.comm	_EXPOSURE_IDX,4,2               ## @EXPOSURE_IDX
	.comm	_AUTOGAIN_IDX,4,2               ## @AUTOGAIN_IDX
	.comm	_GAIN_IDX,4,2                   ## @GAIN_IDX
	.comm	_SENSOR_MT9V111,4,2             ## @SENSOR_MT9V111
L_.str.3:                               ## @.str.3
	.asciz	"MT9V111 sensor detected"

	.comm	_mt9v112_init,8,3               ## @mt9v112_init
L_.str.4:                               ## @.str.4
	.asciz	"MT9V112 sensor initialization failed"

	.comm	_SENSOR_MT9V112,4,2             ## @SENSOR_MT9V112
L_.str.5:                               ## @.str.5
	.asciz	"MT9V112 sensor detected"

	.no_dead_strip	_mt9v_init_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mt9v_init_sensor
lCPI0_0:
	.long	6                               ; 0x6
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mt9v_init_sensor:                      ; @mt9v_init_sensor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	mov	w8, #93
	str	w8, [x0]
	add	x2, sp, #12
	mov	w1, #255
	bl	_i2c_r2
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w8, [sp, #12]
	mov	w9, #33347
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.2:
Lloh0:
	adrp	x20, _mt9v011_init@GOTPAGE
Lloh1:
	ldr	x20, [x20, _mt9v011_init@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x21, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x8, x8, x21
	ldp	w1, w2, [x8]
	mov	x0, x19
	bl	_i2c_w2
	tbnz	x0, #63, LBB0_24
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	add	x21, x21, #8
	cmp	x22, w0, sxtw
	b.lt	LBB0_4
LBB0_6:
	movi.2s	v0, #2
	stur	d0, [x19, #4]
Lloh2:
	adrp	x8, _SENSOR_MT9V011@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SENSOR_MT9V011@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_23
LBB0_7:
	mov	w8, #92
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #4
	bl	_i2c_w2
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #255
	bl	_i2c_r2
	cbnz	w0, LBB0_14
; %bb.8:
	ldr	w8, [sp, #12]
	mov	w9, #33338
	cmp	w8, w9
	b.ne	LBB0_14
; %bb.9:
Lloh7:
	adrp	x20, _mt9v111_init@GOTPAGE
Lloh8:
	ldr	x20, [x20, _mt9v111_init@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x21, #0
	mov	x22, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x8, x8, x21
	ldp	w1, w2, [x8]
	mov	x0, x19
	bl	_i2c_w2
	tbnz	x0, #63, LBB0_25
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	add	x21, x21, #8
	cmp	x22, w0, sxtw
	b.lt	LBB0_11
LBB0_13:
Lloh9:
	adrp	x8, _EXPOSURE_IDX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EXPOSURE_IDX@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
Lloh12:
	adrp	x10, _AUTOGAIN_IDX@GOTPAGE
Lloh13:
	ldr	x10, [x10, _AUTOGAIN_IDX@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	lsl	w10, w9, w10
	orr	w8, w10, w8
Lloh15:
	adrp	x10, _GAIN_IDX@GOTPAGE
Lloh16:
	ldr	x10, [x10, _GAIN_IDX@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	str	w8, [x19]
	movi.2s	v0, #2
	stur	d0, [x19, #4]
Lloh18:
	adrp	x8, _SENSOR_MT9V111@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SENSOR_MT9V111@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_23
LBB0_14:
	mov	w8, #93
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #240
	mov	w2, #0
	bl	_i2c_w2
	tbz	w0, #31, LBB0_16
; %bb.15:
	mov	w8, #72
	str	w8, [x19]
	mov	x0, x19
	mov	w1, #240
	mov	w2, #0
	bl	_i2c_w2
LBB0_16:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	bl	_i2c_r2
	cbnz	w0, LBB0_28
; %bb.17:
	ldr	w8, [sp, #12]
	mov	w9, #4649
	cmp	w8, w9
	b.ne	LBB0_28
; %bb.18:
Lloh23:
	adrp	x20, _mt9v112_init@GOTPAGE
Lloh24:
	ldr	x20, [x20, _mt9v112_init@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.19:
	mov	x21, #0
	mov	x22, #0
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x8, x8, x21
	ldp	w1, w2, [x8]
	mov	x0, x19
	bl	_i2c_w2
	tbnz	x0, #63, LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x22, x22, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	add	x21, x21, #8
	cmp	x22, w0, sxtw
	b.lt	LBB0_20
LBB0_22:
Lloh25:
	adrp	x8, lCPI0_0@PAGE
Lloh26:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
Lloh27:
	adrp	x8, _SENSOR_MT9V112@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SENSOR_MT9V112@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x19, #12]
Lloh30:
	adrp	x0, l_.str.5@PAGE
Lloh31:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_23:
	bl	_info
	mov	w0, #0
	b	LBB0_29
LBB0_24:
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_27
LBB0_25:
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_27
LBB0_26:
Lloh36:
	adrp	x0, l_.str.4@PAGE
Lloh37:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_27:
	bl	_err
LBB0_28:
Lloh38:
	adrp	x8, _ENODEV@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_29:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdrp	Lloh25, Lloh27
	.loh AdrpLdr	Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_mt9v011_init,8,3               ; @mt9v011_init
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MT9V011 sensor initialization failed"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SENSOR_MT9V011,4,2             ; @SENSOR_MT9V011
l_.str.1:                               ; @.str.1
	.asciz	"MT9V011 sensor detected"

	.comm	_mt9v111_init,8,3               ; @mt9v111_init
l_.str.2:                               ; @.str.2
	.asciz	"MT9V111 sensor initialization failed"

	.comm	_EXPOSURE_IDX,4,2               ; @EXPOSURE_IDX
	.comm	_AUTOGAIN_IDX,4,2               ; @AUTOGAIN_IDX
	.comm	_GAIN_IDX,4,2                   ; @GAIN_IDX
	.comm	_SENSOR_MT9V111,4,2             ; @SENSOR_MT9V111
l_.str.3:                               ; @.str.3
	.asciz	"MT9V111 sensor detected"

	.comm	_mt9v112_init,8,3               ; @mt9v112_init
l_.str.4:                               ; @.str.4
	.asciz	"MT9V112 sensor initialization failed"

	.comm	_SENSOR_MT9V112,4,2             ; @SENSOR_MT9V112
l_.str.5:                               ; @.str.5
	.asciz	"MT9V112 sensor detected"

	.no_dead_strip	_mt9v_init_sensor
.subsections_via_symbols
