	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_ov_sensor
_init_ov_sensor:                        ## @init_ov_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_ov51x_set_slave_ids
	movq	%r15, %rdi
	movl	$18, %esi
	movl	$128, %edx
	callq	_i2c_w
	movl	$150, %edi
	callq	_msleep
	movq	_i2c_detect_tries@GOTPCREL(%rip), %r12
	movl	$-1, %eax
	cmpl	$0, (%r12)
	jle	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	movq	_OV7610_REG_ID_HIGH@GOTPCREL(%rip), %r13
	movq	_OV7610_REG_ID_LOW@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_i2c_r
	cmpq	$127, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_i2c_r
	cmpq	$162, %rax
	je	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movl	$18, %esi
	movl	$128, %edx
	callq	_i2c_w
	movl	$150, %edi
	callq	_msleep
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_i2c_r
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_2
LBB0_7:
	movl	$-1, %eax
	jmp	LBB0_8
LBB0_4:
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_gspca_dbg
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i2c_detect_tries,4,2           ## @i2c_detect_tries
	.comm	_OV7610_REG_ID_HIGH,4,2         ## @OV7610_REG_ID_HIGH
	.comm	_OV7610_REG_ID_LOW,4,2          ## @OV7610_REG_ID_LOW
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C synced in %d attempt(s)\n"

	.no_dead_strip	_init_ov_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_ov_sensor
_init_ov_sensor:                        ; @init_ov_sensor
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_ov51x_set_slave_ids
	mov	x0, x19
	mov	w1, #18
	mov	w2, #128
	bl	_i2c_w
	mov	w0, #150
	bl	_msleep
Lloh0:
	adrp	x21, _i2c_detect_tries@GOTPAGE
Lloh1:
	ldr	x21, [x21, _i2c_detect_tries@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w20, #0
Lloh2:
	adrp	x22, _OV7610_REG_ID_HIGH@GOTPAGE
Lloh3:
	ldr	x22, [x22, _OV7610_REG_ID_HIGH@GOTPAGEOFF]
Lloh4:
	adrp	x23, _OV7610_REG_ID_LOW@GOTPAGE
Lloh5:
	ldr	x23, [x23, _OV7610_REG_ID_LOW@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_i2c_r
	cmp	x0, #127
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_i2c_r
	cmp	x0, #162
	b.eq	LBB0_8
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	mov	w1, #18
	mov	w2, #128
	bl	_i2c_w
	mov	w0, #150
	bl	_msleep
	mov	x0, x19
	mov	w1, #0
	bl	_i2c_r
	tbnz	x0, #63, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_2
LBB0_6:
	mov	w0, #-1
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh6:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_gspca_dbg
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_i2c_detect_tries,4,2           ; @i2c_detect_tries
	.comm	_OV7610_REG_ID_HIGH,4,2         ; @OV7610_REG_ID_HIGH
	.comm	_OV7610_REG_ID_LOW,4,2          ; @OV7610_REG_ID_LOW
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C synced in %d attempt(s)\n"

	.no_dead_strip	_init_ov_sensor
.subsections_via_symbols
