	.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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	-20(%rbp), %rdx
	xorl	%esi, %esi
	callq	_i2c_r2
	cmpq	$0, (%rbx)
	js	LBB0_8
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	-20(%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_9
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	callq	_pr_info
	movq	_mt9m001_init@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_i2c_w2_buf
	cmpq	$0, (%rbx)
	jns	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_7:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, (%rbx)
	jmp	LBB0_8
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subq	(%rax), %r14
	movq	%r14, (%rbx)
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MT9M001 color sensor detected\n"

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

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

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

	.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, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x2, sp, #12
	mov	w1, #0
	bl	_i2c_r2
	ldr	x8, [x19]
	tbnz	x8, #63, LBB0_9
; %bb.1:
	ldr	w8, [sp, #12]
	mov	w9, #33809
	cmp	w8, w9
	mov	w9, #33825
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
	mov	w9, #33841
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.4:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_pr_info
Lloh4:
	adrp	x8, _mt9m001_init@GOTPAGE
Lloh5:
	ldr	x8, [x8, _mt9m001_init@GOTPAGEOFF]
Lloh6:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_i2c_w2_buf
	ldr	x8, [x19]
	tbz	x8, #63, LBB0_7
; %bb.6:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
LBB0_7:
	movi.2s	v0, #1
	str	d0, [x19]
	b	LBB0_9
LBB0_8:
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	neg	x8, x8
	str	x8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MT9M001 color sensor detected\n"

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

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

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

	.no_dead_strip	_mt9m001_init_sensor
.subsections_via_symbols
