	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m001_init_sensor
_mt9m001_init_sensor:                   ## @mt9m001_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
	xorl	%r14d, %r14d
	leaq	-28(%rbp), %rdx
	xorl	%esi, %esi
	callq	_i2c_r2
	testq	%rax, %rax
	js	LBB0_10
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	-28(%rbp), %esi
	cmpl	$33809, %esi                    ## imm = 0x8411
	je	LBB0_5
## %bb.2:
	cmpl	$33825, %esi                    ## imm = 0x8421
	je	LBB0_5
## %bb.3:
	cmpl	$33841, %esi                    ## imm = 0x8431
	jne	LBB0_11
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	callq	_info
	movq	_mt9m001_init@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%rbx,8), %edx
	movl	4(%rax,%rbx,8), %esi
	movq	%r15, %rdi
	callq	_i2c_w2
	testq	%rax, %rax
	js	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_9:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_err
LBB0_13:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_14:
	subl	(%rax), %r14d
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MT9M001 color sensor detected"

L_.str.1:                               ## @.str.1
	.asciz	"MT9M001 mono sensor detected"

L_.str.2:                               ## @.str.2
	.asciz	"No MT9M001 chip detected, ID = %x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_mt9m001_init,8,3               ## @mt9m001_init
L_.str.3:                               ## @.str.3
	.asciz	"MT9M001 sensor initialization failed"

	.comm	_HFLIP_IDX,4,2                  ## @HFLIP_IDX
	.comm	_VFLIP_IDX,4,2                  ## @VFLIP_IDX
	.no_dead_strip	_mt9m001_init_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m001_init_sensor
_mt9m001_init_sensor:                   ; @mt9m001_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
	add	x2, sp, #12
	mov	w1, #0
	bl	_i2c_r2
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	w8, [sp, #12]
	mov	w9, #33809
	cmp	w8, w9
	mov	w9, #33825
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_4:
	mov	w9, #33841
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.5:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_info
Lloh6:
	adrp	x20, _mt9m001_init@GOTPAGE
Lloh7:
	ldr	x20, [x20, _mt9m001_init@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x21, #0
	mov	x22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x8, x8, x21
	ldp	w2, w1, [x8]
	mov	x0, x19
	bl	_i2c_w2
	tbnz	x0, #63, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x22, x22, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	add	x21, x21, #8
	cmp	x22, w0, sxtw
	b.lt	LBB0_8
LBB0_10:
	mov	w0, #0
	movi.2s	v0, #1
	str	d0, [x19]
	b	LBB0_15
LBB0_11:
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_13:
	bl	_err
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MT9M001 color sensor detected"

l_.str.1:                               ; @.str.1
	.asciz	"MT9M001 mono sensor detected"

l_.str.2:                               ; @.str.2
	.asciz	"No MT9M001 chip detected, ID = %x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_mt9m001_init,8,3               ; @mt9m001_init
l_.str.3:                               ; @.str.3
	.asciz	"MT9M001 sensor initialization failed"

	.comm	_HFLIP_IDX,4,2                  ; @HFLIP_IDX
	.comm	_VFLIP_IDX,4,2                  ; @VFLIP_IDX
	.no_dead_strip	_mt9m001_init_sensor
.subsections_via_symbols
