	.file	"extr_ov9650.c_ov965x_initialize_controls.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ov965x_initialize_controls, @function
ov965x_initialize_controls:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	esi, 16
	lea	r13, 8[rdi]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	lea	rbp, 112[rdi]
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	rdi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	v4l2_ctrl_handler_init@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, DWORD PTR V4L2_CID_AUTO_WHITE_BALANCE[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	push	1
	.cfi_def_cfa_offset 64
	mov	r9d, 1
	mov	r8d, 1
	lea	rsi, ov965x_ctrl_ops[rip]
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_BLUE_BALANCE[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	QWORD PTR 32[rbx], rax
	mov	r9d, 1
	mov	r8d, 255
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 128
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_RED_BALANCE[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	QWORD PTR 104[rbx], rax
	mov	r9d, 1
	mov	r8d, 255
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 128
	call	v4l2_ctrl_new_std@PLT
	mov	r9d, DWORD PTR V4L2_EXPOSURE_AUTO[rip]
	xor	r8d, r8d
	mov	rdi, rbp
	mov	ecx, DWORD PTR V4L2_EXPOSURE_MANUAL[rip]
	mov	QWORD PTR 96[rbx], rax
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	edx, DWORD PTR V4L2_CID_EXPOSURE_AUTO[rip]
	call	v4l2_ctrl_new_std_menu@PLT
	mov	edx, DWORD PTR V4L2_CID_EXPOSURE_ABSOLUTE[rip]
	mov	r9d, 1
	mov	rdi, rbp
	mov	QWORD PTR 16[rbx], rax
	mov	r8d, 1500
	mov	ecx, 2
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 500
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_AUTOGAIN[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	QWORD PTR 40[rbx], rax
	mov	r9d, 1
	mov	r8d, 1
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 1
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_GAIN[rip]
	mov	r9d, 1
	mov	rdi, rbp
	mov	QWORD PTR 24[rbx], rax
	mov	r8d, 1984
	mov	ecx, 16
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 1024
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_SATURATION[rip]
	mov	r9d, 1
	mov	rdi, rbp
	mov	QWORD PTR 48[rbx], rax
	mov	r8d, 2
	mov	ecx, -2
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 0
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_BRIGHTNESS[rip]
	mov	r9d, 1
	mov	rdi, rbp
	mov	QWORD PTR 88[rbx], rax
	mov	r8d, 3
	mov	ecx, -3
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 0
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_SHARPNESS[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	QWORD PTR 80[rbx], rax
	mov	r9d, 1
	mov	r8d, 32
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 6
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_HFLIP[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	QWORD PTR 72[rbx], rax
	mov	r9d, 1
	mov	r8d, 1
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 0
	call	v4l2_ctrl_new_std@PLT
	mov	edx, DWORD PTR V4L2_CID_VFLIP[rip]
	xor	ecx, ecx
	mov	rdi, rbp
	mov	QWORD PTR 8[rbx], rax
	mov	r9d, 1
	mov	r8d, 1
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], 0
	call	v4l2_ctrl_new_std@PLT
	mov	r9d, DWORD PTR V4L2_CID_POWER_LINE_FREQUENCY_50HZ[rip]
	mov	rdi, rbp
	mov	ecx, DWORD PTR V4L2_CID_POWER_LINE_FREQUENCY_60HZ[rip]
	mov	QWORD PTR 64[rbx], rax
	mov	edx, DWORD PTR V4L2_CID_POWER_LINE_FREQUENCY[rip]
	mov	r8d, -8
	lea	rsi, ov965x_ctrl_ops[rip]
	call	v4l2_ctrl_new_std_menu@PLT
	mov	r12d, DWORD PTR test_pattern_menu[rip]
	mov	QWORD PTR 56[rbx], rax
	mov	edi, r12d
	call	ARRAY_SIZE@PLT
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdi, rbp
	mov	edx, DWORD PTR V4L2_CID_TEST_PATTERN[rip]
	lea	rcx, -1[rax]
	lea	rsi, ov965x_ctrl_ops[rip]
	mov	DWORD PTR [rsp], r12d
	call	v4l2_ctrl_new_std_menu_items@PLT
	mov	r12d, DWORD PTR 112[rbx]
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	test	r12d, r12d
	jne	.L6
	mov	rax, QWORD PTR 48[rbx]
	mov	edx, DWORD PTR V4L2_CTRL_FLAG_VOLATILE[rip]
	lea	rsi, 32[rbx]
	xor	ecx, ecx
	mov	edi, 3
	or	DWORD PTR [rax], edx
	mov	rax, QWORD PTR 40[rbx]
	mov	edx, DWORD PTR V4L2_CTRL_FLAG_VOLATILE[rip]
	or	DWORD PTR [rax], edx
	xor	edx, edx
	call	v4l2_ctrl_auto_cluster@PLT
	lea	rsi, 24[rbx]
	mov	ecx, 1
	xor	edx, edx
	mov	edi, 2
	call	v4l2_ctrl_auto_cluster@PLT
	lea	rsi, 16[rbx]
	mov	ecx, 1
	mov	edx, 1
	mov	edi, 2
	call	v4l2_ctrl_auto_cluster@PLT
	mov	rsi, r13
	mov	edi, 2
	call	v4l2_ctrl_cluster@PLT
	mov	QWORD PTR [rbx], rbp
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L6:
	.cfi_restore_state
	mov	rdi, rbp
	call	v4l2_ctrl_handler_free@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.cfi_endproc
.LFE0:
	.size	ov965x_initialize_controls, .-ov965x_initialize_controls
	.comm	test_pattern_menu,4,4
	.comm	ov965x_ctrl_ops,4,4
	.comm	V4L2_EXPOSURE_MANUAL,4,4
	.comm	V4L2_EXPOSURE_AUTO,4,4
	.comm	V4L2_CTRL_FLAG_VOLATILE,4,4
	.comm	V4L2_CID_VFLIP,4,4
	.comm	V4L2_CID_TEST_PATTERN,4,4
	.comm	V4L2_CID_SHARPNESS,4,4
	.comm	V4L2_CID_SATURATION,4,4
	.comm	V4L2_CID_RED_BALANCE,4,4
	.comm	V4L2_CID_POWER_LINE_FREQUENCY_60HZ,4,4
	.comm	V4L2_CID_POWER_LINE_FREQUENCY_50HZ,4,4
	.comm	V4L2_CID_POWER_LINE_FREQUENCY,4,4
	.comm	V4L2_CID_HFLIP,4,4
	.comm	V4L2_CID_GAIN,4,4
	.comm	V4L2_CID_EXPOSURE_AUTO,4,4
	.comm	V4L2_CID_EXPOSURE_ABSOLUTE,4,4
	.comm	V4L2_CID_BRIGHTNESS,4,4
	.comm	V4L2_CID_BLUE_BALANCE,4,4
	.comm	V4L2_CID_AUTO_WHITE_BALANCE,4,4
	.comm	V4L2_CID_AUTOGAIN,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_ov9650.c_ov965x_initialize_controls.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ov965x_initialize_controls, %function
ov965x_initialize_controls:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	r8, r0, #56
	mov	r4, r0
	mov	r1, #16
	mov	r0, r8
	sub	sp, sp, #28
	bl	v4l2_ctrl_handler_init
	subs	r6, r0, #0
	blt	.L1
	mov	r5, #1
	ldr	r3, .L7
	str	r5, [sp, #8]
	str	r5, [sp, #4]
	str	r5, [sp]
	ldr	r2, [r3]
	ldr	r1, .L7+4
	mov	r3, #0
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	mov	r7, #128
	mov	r6, #255
	ldr	r3, .L7+8
	str	r5, [sp, #4]
	str	r0, [r4, #16]
	str	r7, [sp, #8]
	str	r6, [sp]
	ldr	r2, [r3]
	ldr	r1, .L7+4
	mov	r3, #0
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	stmib	sp, {r5, r7}
	ldr	r3, .L7+12
	str	r6, [sp]
	ldr	r2, [r3]
	ldr	r1, .L7+4
	mov	r3, #0
	str	r0, [r4, #52]
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	mov	r6, #0
	ldr	r2, .L7+16
	ldr	r3, .L7+20
	ldr	r1, [r2]
	ldr	r2, .L7+24
	str	r0, [r4, #48]
	str	r1, [sp, #4]
	str	r6, [sp]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L7+4
	mov	r0, r8
	bl	v4l2_ctrl_new_std_menu
	mov	r1, #500
	ldr	r3, .L7+28
	ldr	r2, .L7+32
	str	r5, [sp, #4]
	str	r0, [r4, #8]
	str	r1, [sp, #8]
	ldr	r2, [r2]
	ldr	r1, .L7+4
	str	r3, [sp]
	mov	r0, r8
	mov	r3, #2
	bl	v4l2_ctrl_new_std
	ldr	r2, .L7+36
	str	r5, [sp, #8]
	str	r5, [sp, #4]
	str	r5, [sp]
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, .L7+4
	str	r0, [r4, #20]
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	mov	r1, #1024
	mov	r2, #1984
	ldr	r3, .L7+40
	str	r5, [sp, #4]
	str	r0, [r4, #12]
	str	r1, [sp, #8]
	str	r2, [sp]
	ldr	r2, [r3]
	ldr	r1, .L7+4
	mov	r3, #16
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	mov	r7, #2
	stmib	sp, {r5, r6}
	ldr	r3, .L7+44
	str	r0, [r4, #24]
	str	r7, [sp]
	ldr	r2, [r3]
	ldr	r1, .L7+4
	mvn	r3, #1
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	mov	r10, #3
	stmib	sp, {r5, r6}
	ldr	r3, .L7+48
	str	r0, [r4, #44]
	str	r10, [sp]
	ldr	r2, [r3]
	ldr	r1, .L7+4
	mvn	r3, #2
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	mov	ip, #6
	mov	r1, #32
	ldr	r2, .L7+52
	str	r5, [sp, #4]
	str	r0, [r4, #40]
	str	ip, [sp, #8]
	str	r1, [sp]
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, .L7+4
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	stmib	sp, {r5, r6}
	ldr	r2, .L7+56
	str	r5, [sp]
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, .L7+4
	str	r0, [r4, #36]
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	stmib	sp, {r5, r6}
	ldr	r2, .L7+60
	str	r5, [sp]
	mov	r3, r6
	ldr	r2, [r2]
	ldr	r1, .L7+4
	str	r0, [r4, #4]
	mov	r0, r8
	bl	v4l2_ctrl_new_std
	mvn	r1, #7
	ldr	r2, .L7+64
	str	r0, [r4, #32]
	ldr	ip, [r2]
	ldr	r3, .L7+68
	stm	sp, {r1, ip}
	ldr	r2, .L7+72
	ldr	r1, .L7+4
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r0, r8
	bl	v4l2_ctrl_new_std_menu
	ldr	r3, .L7+76
	ldr	fp, .L7+80
	ldr	r2, [r3]
	str	r0, [r4, #28]
	ldr	r0, [fp]
	str	r2, [sp, #20]
	bl	ARRAY_SIZE
	ldr	r3, [fp]
	str	r6, [sp, #4]
	str	r3, [sp, #8]
	str	r6, [sp]
	sub	r3, r0, #1
	ldr	r2, [sp, #20]
	mov	r0, r8
	ldr	r1, .L7+4
	bl	v4l2_ctrl_new_std_menu_items
	ldr	r6, [r4, #56]
	cmp	r6, #0
	bne	.L6
	ldr	r0, [r4, #24]
	ldr	r1, .L7+84
	ldr	r3, [r0]
	ldr	ip, [r1]
	ldr	r2, [r4, #20]
	orr	r3, r3, ip
	str	r3, [r0]
	ldr	r1, [r1]
	ldr	r3, [r2]
	mov	r0, r10
	orr	r3, r3, r1
	str	r3, [r2]
	add	r1, r4, #16
	mov	r3, r6
	mov	r2, r6
	bl	v4l2_ctrl_auto_cluster
	add	r9, r4, #4
	mov	r3, r5
	mov	r2, r6
	add	r1, r4, #12
	mov	r0, r7
	bl	v4l2_ctrl_auto_cluster
	mov	r3, r5
	mov	r2, r5
	add	r1, r9, #4
	mov	r0, r7
	bl	v4l2_ctrl_auto_cluster
	mov	r1, r9
	mov	r0, r7
	bl	v4l2_ctrl_cluster
	str	r8, [r4]
.L1:
	mov	r0, r6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	mov	r0, r8
	bl	v4l2_ctrl_handler_free
	mov	r0, r6
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	.align	2
.L7:
	.word	V4L2_CID_AUTO_WHITE_BALANCE
	.word	ov965x_ctrl_ops
	.word	V4L2_CID_BLUE_BALANCE
	.word	V4L2_CID_RED_BALANCE
	.word	V4L2_EXPOSURE_AUTO
	.word	V4L2_EXPOSURE_MANUAL
	.word	V4L2_CID_EXPOSURE_AUTO
	.word	1500
	.word	V4L2_CID_EXPOSURE_ABSOLUTE
	.word	V4L2_CID_AUTOGAIN
	.word	V4L2_CID_GAIN
	.word	V4L2_CID_SATURATION
	.word	V4L2_CID_BRIGHTNESS
	.word	V4L2_CID_SHARPNESS
	.word	V4L2_CID_HFLIP
	.word	V4L2_CID_VFLIP
	.word	V4L2_CID_POWER_LINE_FREQUENCY_50HZ
	.word	V4L2_CID_POWER_LINE_FREQUENCY_60HZ
	.word	V4L2_CID_POWER_LINE_FREQUENCY
	.word	V4L2_CID_TEST_PATTERN
	.word	test_pattern_menu
	.word	V4L2_CTRL_FLAG_VOLATILE
	.size	ov965x_initialize_controls, .-ov965x_initialize_controls
	.comm	test_pattern_menu,4,4
	.comm	ov965x_ctrl_ops,4,4
	.comm	V4L2_EXPOSURE_MANUAL,4,4
	.comm	V4L2_EXPOSURE_AUTO,4,4
	.comm	V4L2_CTRL_FLAG_VOLATILE,4,4
	.comm	V4L2_CID_VFLIP,4,4
	.comm	V4L2_CID_TEST_PATTERN,4,4
	.comm	V4L2_CID_SHARPNESS,4,4
	.comm	V4L2_CID_SATURATION,4,4
	.comm	V4L2_CID_RED_BALANCE,4,4
	.comm	V4L2_CID_POWER_LINE_FREQUENCY_60HZ,4,4
	.comm	V4L2_CID_POWER_LINE_FREQUENCY_50HZ,4,4
	.comm	V4L2_CID_POWER_LINE_FREQUENCY,4,4
	.comm	V4L2_CID_HFLIP,4,4
	.comm	V4L2_CID_GAIN,4,4
	.comm	V4L2_CID_EXPOSURE_AUTO,4,4
	.comm	V4L2_CID_EXPOSURE_ABSOLUTE,4,4
	.comm	V4L2_CID_BRIGHTNESS,4,4
	.comm	V4L2_CID_BLUE_BALANCE,4,4
	.comm	V4L2_CID_AUTO_WHITE_BALANCE,4,4
	.comm	V4L2_CID_AUTOGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
