	.file	"extr_ovcamchip_core.c_init_camchip.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_camchip, @function
init_camchip:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	edx, 128
	mov	esi, 18
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	ov_write@PLT
	mov	edi, 150
	call	msleep@PLT
	mov	eax, DWORD PTR I2C_DETECT_RETRIES[rip]
	test	eax, eax
	jle	.L2
	xor	ebp, ebp
	lea	r13, 6[rsp]
	lea	r12, 7[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, 128
	mov	esi, 18
	mov	rdi, rbx
	add	ebp, 1
	call	ov_write@PLT
	mov	edi, 150
	call	msleep@PLT
	xor	esi, esi
	mov	rdx, r12
	mov	rdi, rbx
	call	ov_read@PLT
	cmp	ebp, DWORD PTR I2C_DETECT_RETRIES[rip]
	jge	.L2
.L5:
	mov	esi, DWORD PTR GENERIC_REG_ID_HIGH[rip]
	mov	rdx, r13
	mov	rdi, rbx
	call	ov_read@PLT
	test	rax, rax
	js	.L3
	mov	esi, DWORD PTR GENERIC_REG_ID_LOW[rip]
	mov	rdx, r12
	mov	rdi, rbx
	call	ov_read@PLT
	test	rax, rax
	js	.L3
	cmp	BYTE PTR 6[rsp], 127
	jne	.L3
	cmp	BYTE PTR 7[rsp], -94
	jne	.L3
	lea	edx, 1[rbp]
	lea	rsi, .LC0[rip]
	mov	edi, 1
	call	PDEBUG@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L10:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	init_camchip, .-init_camchip
	.comm	I2C_DETECT_RETRIES,4,4
	.comm	GENERIC_REG_ID_LOW,4,4
	.comm	GENERIC_REG_ID_HIGH,4,4
	.comm	EIO,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_ovcamchip_core.c_init_camchip.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"I2C synced in %d attempt(s)\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_camchip, %function
init_camchip:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L11
	sub	sp, sp, #8
	mov	r2, #128
	mov	r1, #18
	ldr	r6, .L11+4
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r4, r0
	bl	ov_write
	mov	r0, #150
	bl	msleep
	ldr	r3, [r6]
	cmp	r3, #0
	ble	.L2
	mov	r5, #0
	ldr	r7, .L11+8
	ldr	r8, .L11+12
	b	.L5
.L3:
	mov	r2, #128
	mov	r1, #18
	mov	r0, r4
	bl	ov_write
	mov	r0, #150
	bl	msleep
	mov	r1, #0
	mov	r0, r4
	add	r2, sp, #3
	bl	ov_read
	ldr	r3, [r6]
	add	r5, r5, #1
	cmp	r5, r3
	bge	.L2
.L5:
	mov	r0, r4
	ldr	r1, [r7]
	add	r2, sp, #2
	bl	ov_read
	cmp	r0, #0
	blt	.L3
	mov	r0, r4
	ldr	r1, [r8]
	add	r2, sp, #3
	bl	ov_read
	cmp	r0, #0
	blt	.L3
	ldrb	r3, [sp, #2]	@ zero_extendqisi2
	cmp	r3, #127
	bne	.L3
	ldrb	r3, [sp, #3]	@ zero_extendqisi2
	cmp	r3, #162
	bne	.L3
	mov	r0, #1
	ldr	r1, .L11+16
	add	r2, r5, #1
	bl	PDEBUG
	mov	r0, #0
	b	.L1
.L2:
	ldr	r3, .L11+20
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC1
	.word	I2C_DETECT_RETRIES
	.word	GENERIC_REG_ID_HIGH
	.word	GENERIC_REG_ID_LOW
	.word	.LC0
	.word	EIO
	.size	init_camchip, .-init_camchip
	.comm	I2C_DETECT_RETRIES,4,4
	.comm	GENERIC_REG_ID_LOW,4,4
	.comm	GENERIC_REG_ID_HIGH,4,4
	.comm	EIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
