	.file	"extr_ov5670.c_ov5670_read_reg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ov5670_read_reg, @function
ov5670_read_reg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, edx
	sub	rsp, 104
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	call	v4l2_get_subdevdata@PLT
	mov	edi, ebp
	mov	QWORD PTR 8[rsp], 0
	mov	r13, rax
	call	cpu_to_be16@PLT
	mov	DWORD PTR 4[rsp], eax
	cmp	ebx, 4
	jbe	.L2
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	mov	rcx, QWORD PTR 88[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 104
	.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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR 4[r13]
	lea	rbp, 16[rsp]
	mov	DWORD PTR 48[rsp], ebx
	lea	rdx, 4[rsp]
	mov	rdi, rbp
	mov	QWORD PTR 24[rsp], rdx
	mov	DWORD PTR 40[rsp], eax
	mov	DWORD PTR 72[rsp], eax
	mov	rax, QWORD PTR I2C_M_RD[rip]
	mov	QWORD PTR 32[rsp], 0
	mov	QWORD PTR 64[rsp], rax
	mov	eax, 4
	sub	eax, ebx
	mov	DWORD PTR 16[rsp], 2
	lea	rax, 8[rsp+rax*4]
	mov	QWORD PTR 56[rsp], rax
	call	ARRAY_SIZE@PLT
	mov	edi, DWORD PTR 0[r13]
	mov	rsi, rbp
	mov	edx, eax
	call	i2c_transfer@PLT
	mov	rdi, rbp
	mov	ebx, eax
	call	ARRAY_SIZE@PLT
	cmp	eax, ebx
	je	.L4
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, QWORD PTR 8[rsp]
	call	be32_to_cpu@PLT
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	jmp	.L1
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ov5670_read_reg, .-ov5670_read_reg
	.comm	I2C_M_RD,8,8
	.comm	EIO,4,4
	.comm	EINVAL,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_ov5670.c_ov5670_read_reg.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ov5670_read_reg, %function
ov5670_read_reg:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r7, r3
	ldr	r3, .L9
	sub	sp, sp, #52
	mov	r6, r1
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	bl	v4l2_get_subdevdata
	mov	r4, #0
	mov	r2, r0
	mov	r0, r6
	str	r4, [sp, #4]
	mov	r6, r2
	bl	cpu_to_be16
	cmp	r5, #4
	str	r0, [sp, #8]
	bls	.L2
	ldr	r3, .L9+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	mov	r1, #2
	ldr	r3, .L9+8
	ldr	r2, [r6, #4]
	ldr	r3, [r3]
	ldr	r6, [r6]
	str	r3, [sp, #36]
	str	r2, [sp, #24]
	rsb	r3, r5, #4
	str	r2, [sp, #40]
	add	r2, sp, #4
	add	r3, r2, r3, lsl r1
	str	r3, [sp, #32]
	add	r0, sp, #12
	add	r3, sp, #8
	str	r3, [sp, #16]
	str	r5, [sp, #28]
	str	r1, [sp, #12]
	str	r4, [sp, #20]
	bl	ARRAY_SIZE
	add	r1, sp, #12
	mov	r2, r0
	mov	r0, r6
	bl	i2c_transfer
	mov	r5, r0
	add	r0, sp, #12
	bl	ARRAY_SIZE
	cmp	r0, r5
	ldrne	r3, .L9+12
	ldrne	r0, [r3]
	rsbne	r0, r0, #0
	bne	.L1
.L4:
	ldr	r0, [sp, #4]
	bl	be32_to_cpu
	mov	r3, r0
	mov	r0, r4
	str	r3, [r7]
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	EINVAL
	.word	I2C_M_RD
	.word	EIO
	.size	ov5670_read_reg, .-ov5670_read_reg
	.comm	I2C_M_RD,4,4
	.comm	EIO,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
