	.file	"extr_ov519.c_init_ov_sensor.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"I2C synced in %d attempt(s)"
	.text
	.p2align 4
	.type	init_ov_sensor, @function
init_ov_sensor:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	ov51x_set_slave_ids@PLT
	mov	edx, 128
	mov	esi, 18
	mov	rdi, rbx
	call	i2c_w@PLT
	mov	edi, 150
	call	msleep@PLT
	mov	eax, DWORD PTR i2c_detect_tries[rip]
	test	eax, eax
	jle	.L2
	xor	r12d, r12d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	esi, 18
	mov	edx, 128
	mov	rdi, rbx
	call	i2c_w@PLT
	mov	edi, 150
	call	msleep@PLT
	xor	esi, esi
	mov	rdi, rbx
	call	i2c_r@PLT
	test	rax, rax
	js	.L2
	add	r12d, 1
	cmp	DWORD PTR i2c_detect_tries[rip], r12d
	jle	.L2
.L5:
	mov	esi, DWORD PTR OV7610_REG_ID_HIGH[rip]
	mov	rdi, rbx
	call	i2c_r@PLT
	cmp	rax, 127
	jne	.L3
	mov	esi, DWORD PTR OV7610_REG_ID_LOW[rip]
	mov	rdi, rbx
	call	i2c_r@PLT
	cmp	rax, 162
	jne	.L3
	mov	edi, DWORD PTR D_PROBE[rip]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	call	PDEBUG@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	eax, -1
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	init_ov_sensor, .-init_ov_sensor
	.comm	i2c_detect_tries,4,4
	.comm	OV7610_REG_ID_LOW,4,4
	.comm	OV7610_REG_ID_HIGH,4,4
	.comm	D_PROBE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ov519.c_init_ov_sensor.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"I2C synced in %d attempt(s)\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_ov_sensor, %function
init_ov_sensor:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r6, .L9
	bl	ov51x_set_slave_ids
	mov	r2, #128
	mov	r1, #18
	mov	r0, r4
	bl	i2c_w
	mov	r0, #150
	bl	msleep
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L2
	mov	r5, #0
	ldr	r7, .L9+4
	ldr	r8, .L9+8
	b	.L5
.L3:
	mov	r2, #128
	mov	r1, #18
	mov	r0, r4
	bl	i2c_w
	mov	r0, #150
	bl	msleep
	mov	r1, #0
	mov	r0, r4
	bl	i2c_r
	cmp	r0, #0
	add	r5, r5, #1
	blt	.L2
	ldr	r3, [r6]
	cmp	r3, r5
	ble	.L2
.L5:
	mov	r0, r4
	ldr	r1, [r7]
	bl	i2c_r
	cmp	r0, #127
	bne	.L3
	mov	r0, r4
	ldr	r1, [r8]
	bl	i2c_r
	cmp	r0, #162
	bne	.L3
	ldr	r3, .L9+12
	mov	r2, r5
	ldr	r0, [r3]
	ldr	r1, .L9+16
	bl	PDEBUG
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	.align	2
.L9:
	.word	i2c_detect_tries
	.word	OV7610_REG_ID_HIGH
	.word	OV7610_REG_ID_LOW
	.word	D_PROBE
	.word	.LC0
	.size	init_ov_sensor, .-init_ov_sensor
	.comm	i2c_detect_tries,4,4
	.comm	OV7610_REG_ID_LOW,4,4
	.comm	OV7610_REG_ID_HIGH,4,4
	.comm	D_PROBE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
