	.file	"extr_topro.c_set_resolution.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_resolution, @function
set_resolution:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	esi, DWORD PTR TP6800_R21_ENDP_1_CTL[rip]
	mov	rbp, rdi
	xor	edx, edx
	call	reg_w@PLT
	cmp	DWORD PTR 0[rbp], 320
	je	.L7
	mov	esi, DWORD PTR TP6800_R3F_FRAME_RATE[rip]
	mov	edx, 5
	mov	rdi, rbp
	call	reg_w@PLT
	mov	edi, 100
	call	msleep@PLT
	mov	esi, DWORD PTR CX0342_AUTO_ADC_CALIB[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	i2c_w@PLT
	mov	edi, 100
	call	msleep@PLT
	mov	esi, DWORD PTR TP6800_R21_ENDP_1_CTL[rip]
	mov	edx, 3
	mov	rdi, rbp
	call	reg_w@PLT
	mov	esi, DWORD PTR TP6800_R78_FORMAT[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	reg_w@PLT
	mov	esi, DWORD PTR TP6800_R5D_DEMOSAIC_CFG[rip]
	mov	edx, 9
	mov	rdi, rbp
	call	reg_w@PLT
	mov	esi, DWORD PTR CX0342_EXPO_LINE_L[rip]
	mov	edx, 207
	mov	rdi, rbp
	call	i2c_w@PLT
	mov	esi, DWORD PTR CX0342_EXPO_LINE_H[rip]
	xor	edx, edx
	mov	rdi, rbp
	call	i2c_w@PLT
.L3:
	mov	esi, DWORD PTR CX0342_SYS_CTRL_0[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	i2c_w@PLT
	mov	rax, QWORD PTR color_gain[rip]
	mov	edi, DWORD PTR [rax]
	call	ARRAY_SIZE@PLT
	mov	rdx, QWORD PTR SENSOR_CX0342[rip]
	mov	esi, 3
	mov	rdi, rbp
	mov	ecx, eax
	mov	rax, QWORD PTR color_gain[rip]
	mov	edx, DWORD PTR [rax+rdx*4]
	call	bulk_w@PLT
	mov	edi, DWORD PTR 12[rbp]
	call	v4l2_ctrl_g_ctrl@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	setgamma@PLT
	mov	rax, QWORD PTR SENSOR_SOI763A[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L8
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, DWORD PTR TP6800_R3F_FRAME_RATE[rip]
	mov	edx, 6
	mov	rdi, rbp
	call	reg_w@PLT
	mov	edi, 100
	call	msleep@PLT
	mov	esi, DWORD PTR CX0342_AUTO_ADC_CALIB[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	i2c_w@PLT
	mov	edi, 100
	call	msleep@PLT
	mov	esi, DWORD PTR TP6800_R21_ENDP_1_CTL[rip]
	mov	rdi, rbp
	mov	edx, 3
	call	reg_w@PLT
	mov	esi, DWORD PTR TP6800_R78_FORMAT[rip]
	mov	rdi, rbp
	mov	edx, 1
	call	reg_w@PLT
	mov	esi, DWORD PTR TP6800_R5D_DEMOSAIC_CFG[rip]
	mov	rdi, rbp
	mov	edx, 13
	call	reg_w@PLT
	mov	esi, DWORD PTR CX0342_EXPO_LINE_L[rip]
	mov	rdi, rbp
	mov	edx, 55
	call	i2c_w@PLT
	mov	esi, DWORD PTR CX0342_EXPO_LINE_H[rip]
	mov	edx, 1
	mov	rdi, rbp
	call	i2c_w@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, DWORD PTR 8[rbp]
	call	v4l2_ctrl_g_ctrl@PLT
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 8
	mov	esi, eax
	jmp	setquality@PLT
	.cfi_endproc
.LFE0:
	.size	set_resolution, .-set_resolution
	.comm	color_gain,8,8
	.comm	TP6800_R78_FORMAT,4,4
	.comm	TP6800_R5D_DEMOSAIC_CFG,4,4
	.comm	TP6800_R3F_FRAME_RATE,4,4
	.comm	TP6800_R21_ENDP_1_CTL,4,4
	.comm	SENSOR_SOI763A,8,8
	.comm	SENSOR_CX0342,8,8
	.comm	CX0342_SYS_CTRL_0,4,4
	.comm	CX0342_EXPO_LINE_L,4,4
	.comm	CX0342_EXPO_LINE_H,4,4
	.comm	CX0342_AUTO_ADC_CALIB,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_topro.c_set_resolution.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_resolution, %function
set_resolution:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r5, .L8
	mov	r2, #0
	ldr	r1, [r5]
	bl	reg_w
	ldr	r3, [r4]
	cmp	r3, #320
	ldr	r3, .L8+4
	beq	.L7
	ldr	r1, [r3]
	mov	r2, #5
	mov	r0, r4
	bl	reg_w
	mov	r0, #100
	bl	msleep
	ldr	r3, .L8+8
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r4
	bl	i2c_w
	mov	r0, #100
	bl	msleep
	mov	r2, #3
	ldr	r1, [r5]
	mov	r0, r4
	bl	reg_w
	ldr	r3, .L8+12
	mov	r2, #0
	ldr	r1, [r3]
	mov	r0, r4
	bl	reg_w
	ldr	r3, .L8+16
	mov	r2, #9
	ldr	r1, [r3]
	mov	r0, r4
	bl	reg_w
	ldr	r3, .L8+20
	mov	r2, #207
	ldr	r1, [r3]
	mov	r0, r4
	bl	i2c_w
	ldr	r3, .L8+24
	mov	r2, #0
	mov	r0, r4
	ldr	r1, [r3]
	bl	i2c_w
.L3:
	ldr	r3, .L8+28
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r4
	bl	i2c_w
	ldr	r3, .L8+32
	ldr	r2, .L8+36
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r0, [r3]
	ldr	r5, [r3, r2, lsl #2]
	bl	ARRAY_SIZE
	mov	r2, r5
	mov	r3, r0
	mov	r1, #3
	mov	r0, r4
	bl	bulk_w
	ldr	r0, [r4, #8]
	bl	v4l2_ctrl_g_ctrl
	mov	r1, r0
	mov	r0, r4
	bl	setgamma
	ldr	r3, .L8+40
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	popne	{r4, r5, r6, pc}
	ldr	r0, [r4, #4]
	bl	v4l2_ctrl_g_ctrl
	mov	r1, r0
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	setquality
.L7:
	ldr	r1, [r3]
	mov	r2, #6
	mov	r0, r4
	bl	reg_w
	mov	r0, #100
	bl	msleep
	ldr	r3, .L8+8
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r4
	bl	i2c_w
	mov	r0, #100
	bl	msleep
	ldr	r1, [r5]
	mov	r2, #3
	mov	r0, r4
	bl	reg_w
	ldr	r3, .L8+12
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r4
	bl	reg_w
	ldr	r3, .L8+16
	mov	r2, #13
	ldr	r1, [r3]
	mov	r0, r4
	bl	reg_w
	ldr	r3, .L8+20
	mov	r2, #55
	ldr	r1, [r3]
	mov	r0, r4
	bl	i2c_w
	ldr	r3, .L8+24
	mov	r2, #1
	mov	r0, r4
	ldr	r1, [r3]
	bl	i2c_w
	b	.L3
.L9:
	.align	2
.L8:
	.word	TP6800_R21_ENDP_1_CTL
	.word	TP6800_R3F_FRAME_RATE
	.word	CX0342_AUTO_ADC_CALIB
	.word	TP6800_R78_FORMAT
	.word	TP6800_R5D_DEMOSAIC_CFG
	.word	CX0342_EXPO_LINE_L
	.word	CX0342_EXPO_LINE_H
	.word	CX0342_SYS_CTRL_0
	.word	color_gain
	.word	SENSOR_CX0342
	.word	SENSOR_SOI763A
	.size	set_resolution, .-set_resolution
	.comm	color_gain,4,4
	.comm	TP6800_R78_FORMAT,4,4
	.comm	TP6800_R5D_DEMOSAIC_CFG,4,4
	.comm	TP6800_R3F_FRAME_RATE,4,4
	.comm	TP6800_R21_ENDP_1_CTL,4,4
	.comm	SENSOR_SOI763A,4,4
	.comm	SENSOR_CX0342,4,4
	.comm	CX0342_SYS_CTRL_0,4,4
	.comm	CX0342_EXPO_LINE_L,4,4
	.comm	CX0342_EXPO_LINE_H,4,4
	.comm	CX0342_AUTO_ADC_CALIB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
