	.file	"extr_controls.c_ctrl_set_exposure.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ctrl_set_exposure, @function
ctrl_set_exposure:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	ecx, DWORD PTR [rdi]
	mov	r9, QWORD PTR MMAL_PARAMETER_SHUTTER_SPEED[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 32[rdi]
	mov	rdi, QWORD PTR COMP_CAMERA[rip]
	mov	DWORD PTR 4[rsp], 0
	mov	DWORD PTR [rsp], ecx
	mov	r12, QWORD PTR [rax+rdi*8]
	mov	rax, QWORD PTR [rdx]
	cmp	rax, r9
	je	.L13
	cmp	rax, QWORD PTR MMAL_PARAMETER_EXPOSURE_MODE[rip]
	je	.L14
	mov	rax, QWORD PTR V4L2_CID_EXPOSURE_AUTO_PRIORITY[rip]
	cmp	QWORD PTR 8[rdx], rax
	jne	.L3
	mov	eax, DWORD PTR [rsi]
	mov	DWORD PTR 12[rbp], eax
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR V4L2_SCENE_MODE_NONE[rip]
	xor	ebx, ebx
	cmp	QWORD PTR 16[rbp], rax
	je	.L15
.L7:
	mov	rdi, rbp
	call	set_framerate_params@PLT
	add	eax, ebx
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR [rsi]
	cmp	eax, 128
	je	.L5
	cmp	eax, 129
	je	.L17
.L6:
	mov	DWORD PTR 8[rbp], eax
	xor	ebx, ebx
	mov	rax, QWORD PTR V4L2_SCENE_MODE_NONE[rip]
	mov	DWORD PTR 0[rbp], ecx
	cmp	QWORD PTR 16[rbp], rax
	jne	.L7
.L15:
	mov	eax, DWORD PTR MMAL_PARAM_EXPOSUREMODE_OFF[rip]
	cmp	DWORD PTR [rsp], eax
	jne	.L8
	mov	eax, DWORD PTR 4[rbp]
	mov	DWORD PTR 4[rsp], eax
.L8:
	mov	edi, DWORD PTR 28[rbp]
	mov	rdx, r9
	lea	rcx, 4[rsp]
	mov	rsi, r12
	mov	r8d, 4
	call	vchiq_mmal_port_parameter_set@PLT
	mov	edi, DWORD PTR 28[rbp]
	mov	rcx, rsp
	mov	rsi, r12
	mov	rdx, QWORD PTR MMAL_PARAMETER_EXPOSURE_MODE[rip]
	mov	r8d, 4
	mov	ebx, eax
	call	vchiq_mmal_port_parameter_set@PLT
	mov	edx, DWORD PTR [rsp]
	add	ebx, eax
	mov	DWORD PTR 24[rbp], edx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L13:
	imul	eax, DWORD PTR [rsi], 100
	mov	DWORD PTR 4[rbp], eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L17:
	mov	ecx, DWORD PTR MMAL_PARAM_EXPOSUREMODE_AUTO[rip]
	mov	DWORD PTR [rsp], ecx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	ecx, DWORD PTR MMAL_PARAM_EXPOSUREMODE_OFF[rip]
	mov	DWORD PTR [rsp], ecx
	jmp	.L6
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ctrl_set_exposure, .-ctrl_set_exposure
	.comm	V4L2_SCENE_MODE_NONE,8,8
	.comm	V4L2_CID_EXPOSURE_AUTO_PRIORITY,8,8
	.comm	MMAL_PARAM_EXPOSUREMODE_OFF,4,4
	.comm	MMAL_PARAM_EXPOSUREMODE_AUTO,4,4
	.comm	MMAL_PARAMETER_SHUTTER_SPEED,8,8
	.comm	MMAL_PARAMETER_EXPOSURE_MODE,8,8
	.comm	COMP_CAMERA,8,8
	.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_controls.c_ctrl_set_exposure.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ctrl_set_exposure, %function
ctrl_set_exposure:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, r2
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r0, #0
	ldr	r2, .L17
	ldr	lr, .L17+4
	ldr	r5, [r3]
	ldr	r2, [r2]
	ldr	r6, .L17+8
	ldr	r7, [r4]
	ldr	ip, [r4, #28]
	ldr	lr, [lr]
	sub	sp, sp, #24
	cmp	r5, r2
	ldr	r6, [r6]
	str	r6, [sp, #20]
	mov	r6,#0
	ldr	r6, [ip, lr, lsl #2]
	str	r7, [sp, #12]
	str	r0, [sp, #16]
	beq	.L13
	ldr	r0, .L17+12
	ldr	r0, [r0]
	cmp	r5, r0
	beq	.L14
	ldr	ip, .L17+16
	ldr	r0, [r3, #4]
	ldr	r3, [ip]
	cmp	r0, r3
	ldreq	r3, [r1]
	streq	r3, [r4, #12]
.L3:
	ldr	r3, .L17+20
	ldr	r1, [r4, #16]
	ldr	r3, [r3]
	cmp	r1, r3
	movne	r5, #0
	bne	.L7
	mov	r7, #4
	ldr	r3, .L17+24
	ldr	r1, [sp, #12]
	ldr	r3, [r3]
	cmp	r1, r3
	ldreq	r3, [r4, #4]
	str	r7, [sp]
	streq	r3, [sp, #16]
	mov	r1, r6
	add	r3, sp, #16
	ldr	r0, [r4, #24]
	bl	vchiq_mmal_port_parameter_set
	ldr	r3, .L17+12
	str	r7, [sp]
	mov	r5, r0
	ldr	r2, [r3]
	mov	r1, r6
	add	r3, sp, #12
	ldr	r0, [r4, #24]
	bl	vchiq_mmal_port_parameter_set
	ldr	r3, [sp, #12]
	add	r5, r5, r0
	str	r3, [r4, #20]
.L7:
	mov	r0, r4
	bl	set_framerate_params
	ldr	r3, .L17+8
	add	r0, r5, r0
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r3, [r1]
	cmp	r3, #128
	beq	.L5
	cmp	r3, #129
	beq	.L16
.L6:
	str	r7, [r4]
	str	r3, [r4, #8]
	b	.L3
.L13:
	ldr	r3, [r1]
	add	r3, r3, r3, lsl #2
	add	r3, r3, r3, lsl #2
	lsl	r3, r3, #2
	str	r3, [r4, #4]
	b	.L3
.L16:
	ldr	r1, .L17+28
	ldr	r7, [r1]
	str	r7, [sp, #12]
	b	.L6
.L5:
	ldr	r1, .L17+24
	ldr	r7, [r1]
	str	r7, [sp, #12]
	b	.L6
.L15:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	MMAL_PARAMETER_SHUTTER_SPEED
	.word	COMP_CAMERA
	.word	.LC0
	.word	MMAL_PARAMETER_EXPOSURE_MODE
	.word	V4L2_CID_EXPOSURE_AUTO_PRIORITY
	.word	V4L2_SCENE_MODE_NONE
	.word	MMAL_PARAM_EXPOSUREMODE_OFF
	.word	MMAL_PARAM_EXPOSUREMODE_AUTO
	.size	ctrl_set_exposure, .-ctrl_set_exposure
	.comm	V4L2_SCENE_MODE_NONE,4,4
	.comm	V4L2_CID_EXPOSURE_AUTO_PRIORITY,4,4
	.comm	MMAL_PARAM_EXPOSUREMODE_OFF,4,4
	.comm	MMAL_PARAM_EXPOSUREMODE_AUTO,4,4
	.comm	MMAL_PARAMETER_SHUTTER_SPEED,4,4
	.comm	MMAL_PARAMETER_EXPOSURE_MODE,4,4
	.comm	COMP_CAMERA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
