	.file	"extr_cpia.c_monitor_exposure.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ReadVPRegs(30,4,9,8) - failed, retval=%d\n"
	.align 8
.LC1:
	.string	"Automatically decreasing sensor_fps\n"
	.align 8
.LC2:
	.string	"Automatically increasing sensor_fps\n"
	.text
	.p2align 4
	.type	monitor_exposure, @function
monitor_exposure:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 104
	.cfi_def_cfa_offset 160
	mov	edi, DWORD PTR 88[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 88[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR CPIA_COMMAND_ReadVPRegs[rip]
	lea	rsi, 16[rsp]
	mov	QWORD PTR 40[rsp], 8
	mov	edx, eax
	and	eax, 255
	mov	DWORD PTR 20[rsp], eax
	sar	edx, 8
	movabs	rax, 17179869214
	mov	QWORD PTR 24[rsp], rax
	movabs	rax, 34359738377
	mov	QWORD PTR 32[rsp], rax
	mov	rax, QWORD PTR 96[rbx]
	mov	DWORD PTR 16[rsp], edx
	lea	rdx, 48[rsp]
	call	[QWORD PTR [rax]]
	mov	r13d, eax
	test	eax, eax
	jne	.L70
	lea	r14, 24[rbx]
	mov	ebp, DWORD PTR 48[rsp]
	mov	r12d, DWORD PTR 52[rsp]
	mov	r15d, 255
	mov	rdi, r14
	call	mutex_lock@PLT
	mov	eax, DWORD PTR TC[rip]
	mov	edx, DWORD PTR EXP_ACC_LIGHT[rip]
	add	eax, DWORD PTR 80[rbx]
	mov	edi, DWORD PTR 76[rbx]
	sub	eax, 50
	add	edx, eax
	cmp	edx, 255
	cmovle	r15d, edx
	sub	eax, DWORD PTR EXP_ACC_DARK[rip]
	cmovs	eax, r13d
	mov	r13d, DWORD PTR 32[rbx]
	mov	r8d, eax
	sal	r13d, 8
	add	r13d, DWORD PTR 36[rbx]
	sar	r8d
	cmp	ebp, eax
	setl	dl
	test	edi, edi
	je	.L71
	cmp	DWORD PTR MAX_EXP[rip], r13d
	mov	rcx, QWORD PTR EXPOSURE_VERY_DARK[rip]
	jg	.L17
	test	dl, dl
	jne	.L72
.L17:
	cmp	DWORD PTR LOW_EXP[rip], r13d
	jge	.L50
	cmp	ebp, r15d
	jle	.L22
.L50:
	cmp	DWORD PTR VERY_LOW_EXP[rip], r13d
	mov	rdx, QWORD PTR [rbx]
	jge	.L73
	mov	rax, QWORD PTR EXPOSURE_LIGHT[rip]
	cmp	rax, rdx
	je	.L68
.L27:
	mov	QWORD PTR [rbx], rax
	mov	rdx, rax
	mov	DWORD PTR 8[rbx], 1
.L26:
	mov	eax, DWORD PTR 12[rbx]
	lea	esi, -1[rax]
	cmp	esi, 30
	mov	esi, 1
	cmovnb	eax, esi
.L29:
	cmp	rdx, rcx
	je	.L41
	cmp	QWORD PTR EXPOSURE_DARK[rip], rdx
	je	.L41
.L42:
	cmp	QWORD PTR EXPOSURE_VERY_LIGHT[rip], rdx
	je	.L44
	cmp	QWORD PTR EXPOSURE_LIGHT[rip], rdx
	je	.L44
	.p2align 4,,10
	.p2align 3
.L34:
	mov	rdi, r14
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L71:
	mov	esi, 2
	mov	edi, 1
	mov	DWORD PTR 12[rsp], r8d
	mov	BYTE PTR 11[rsp], dl
	call	FIRMWARE_VERSION@PLT
	mov	rcx, QWORD PTR EXPOSURE_VERY_DARK[rip]
	test	rax, rax
	mov	eax, DWORD PTR MAX_COMP[rip]
	cmove	eax, DWORD PTR HIGH_COMP_102[rip]
	sub	r12d, -128
	cmp	eax, r12d
	jg	.L7
	movzx	edx, BYTE PTR 11[rsp]
	test	dl, dl
	je	.L7
	mov	r8d, DWORD PTR 12[rsp]
	mov	rdx, QWORD PTR [rbx]
	cmp	ebp, r8d
	jge	.L8
	cmp	rdx, rcx
	je	.L65
	mov	QWORD PTR [rbx], rcx
	mov	rdx, rcx
	mov	DWORD PTR 8[rbx], 1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L70:
	mov	esi, eax
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	LOG@PLT
.L1:
	mov	rax, QWORD PTR 88[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L74
	add	rsp, 104
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L73:
	.cfi_restore_state
	mov	rax, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	cmp	rax, rdx
	jne	.L27
.L68:
	add	DWORD PTR 8[rbx], 1
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L72:
	mov	rdx, QWORD PTR [rbx]
	cmp	ebp, r8d
	jge	.L18
	cmp	rcx, rdx
	je	.L68
	mov	QWORD PTR [rbx], rcx
	mov	rdx, rcx
	mov	DWORD PTR 8[rbx], 1
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdx, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	QWORD PTR [rbx], rdx
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L7:
	cmp	DWORD PTR LOW_EXP[rip], r13d
	jge	.L49
	cmp	ebp, r15d
	jle	.L12
.L49:
	cmp	DWORD PTR VERY_LOW_EXP[rip], r13d
	mov	rdx, QWORD PTR [rbx]
	jl	.L14
	mov	rax, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	cmp	rax, rdx
	je	.L65
.L16:
	mov	QWORD PTR [rbx], rax
	mov	rdx, rax
	mov	DWORD PTR 8[rbx], 1
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rax, QWORD PTR EXPOSURE_LIGHT[rip]
	cmp	rax, rdx
	jne	.L16
.L65:
	add	DWORD PTR 8[rbx], 1
.L10:
	mov	eax, DWORD PTR 12[rbx]
	lea	esi, -1[rax]
	cmp	esi, 30
	mov	esi, 1
	cmovnb	eax, esi
	mov	esi, DWORD PTR 76[rbx]
	test	esi, esi
	jne	.L29
	cmp	rdx, rcx
	je	.L30
	cmp	QWORD PTR EXPOSURE_DARK[rip], rdx
	je	.L30
.L31:
	cmp	QWORD PTR EXPOSURE_VERY_LIGHT[rip], rdx
	je	.L35
	cmp	QWORD PTR EXPOSURE_LIGHT[rip], rdx
	jne	.L34
.L35:
	imul	eax, DWORD PTR LIGHT_TIME[rip]
	cmp	DWORD PTR 8[rbx], eax
	jl	.L34
	mov	eax, DWORD PTR 56[rbx]
	test	eax, eax
	jle	.L34
	mov	esi, 2
	mov	edi, 1
	call	FIRMWARE_VERSION@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR 64[rbx]
	test	rax, rax
	mov	eax, DWORD PTR 56[rbx]
	mov	ecx, DWORD PTR MAX_EXP_102[rip]
	mov	r8d, DWORD PTR 28[rbx]
	cmove	ecx, DWORD PTR MAX_EXP[rip]
	add	r13d, r13d
	lea	edx, -1[rax]
	mov	rax, QWORD PTR flicker_jumps[rip]
	mov	DWORD PTR 56[rbx], edx
	movsx	rdx, edx
	mov	rax, QWORD PTR [rax+rdi*8]
	mov	edi, DWORD PTR COMMAND_SETSENSORFPS[rip]
	or	edi, DWORD PTR COMMAND_SETFLICKERCTRL[rip]
	mov	rax, QWORD PTR [rax+rsi*8]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	DWORD PTR 72[rbx], eax
	mov	esi, eax
	sub	eax, 1
	jmp	.L40
	.p2align 4,,10
	.p2align 3
.L75:
	lea	edx, [rsi+rax]
	cmp	edx, ecx
	jge	.L39
	mov	eax, edx
.L40:
	cmp	r13d, eax
	jg	.L75
.L39:
	movzx	edx, al
	sar	eax, 8
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR COMMAND_SETEXPOSURE[rip]
	mov	DWORD PTR 36[rbx], edx
	or	eax, edi
	or	eax, r8d
	mov	DWORD PTR 28[rbx], eax
	jmp	.L45
	.p2align 4,,10
	.p2align 3
.L30:
	mov	ecx, DWORD PTR DARK_TIME[rip]
	imul	ecx, eax
	cmp	DWORD PTR 8[rbx], ecx
	jl	.L31
	mov	ecx, DWORD PTR 56[rbx]
	cmp	ecx, 2
	jg	.L31
	mov	rsi, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR flicker_jumps[rip]
	add	ecx, 1
	mov	rdx, QWORD PTR 64[rbx]
	mov	edi, DWORD PTR 28[rbx]
	mov	DWORD PTR 56[rbx], ecx
	movsx	rcx, ecx
	mov	rax, QWORD PTR [rax+rsi*8]
	mov	esi, DWORD PTR COMMAND_SETSENSORFPS[rip]
	or	esi, DWORD PTR COMMAND_SETFLICKERCTRL[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	edx, r13d
	shr	edx, 31
	mov	rax, QWORD PTR [rax+rcx*8]
	add	r13d, edx
	sar	r13d
	mov	DWORD PTR 72[rbx], eax
	mov	ecx, eax
	sub	eax, 1
	cmp	eax, r13d
	jge	.L32
	.p2align 4,,10
	.p2align 3
.L33:
	add	eax, ecx
	cmp	eax, r13d
	jl	.L33
.L32:
	movzx	edx, al
	sar	eax, 8
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR COMMAND_SETEXPOSURE[rip]
	mov	DWORD PTR 36[rbx], edx
	or	eax, esi
	or	eax, edi
	jmp	.L66
	.p2align 4,,10
	.p2align 3
.L41:
	mov	ecx, DWORD PTR DARK_TIME[rip]
	imul	ecx, eax
	cmp	DWORD PTR 8[rbx], ecx
	jl	.L42
	mov	ecx, DWORD PTR 56[rbx]
	cmp	ecx, 2
	jg	.L42
	mov	rdx, QWORD PTR 40[rbx]
	mov	eax, DWORD PTR 28[rbx]
	add	ecx, 1
	or	eax, DWORD PTR COMMAND_SETSENSORFPS[rip]
	mov	DWORD PTR 56[rbx], ecx
	mov	DWORD PTR 28[rbx], eax
	test	rdx, rdx
	jle	.L43
	sub	rdx, 1
	or	eax, DWORD PTR COMMAND_SETEXPOSURE[rip]
	mov	QWORD PTR 40[rbx], rdx
.L66:
	mov	DWORD PTR 28[rbx], eax
.L43:
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	lea	rdi, .LC1[rip]
	mov	QWORD PTR [rbx], rax
	xor	eax, eax
	call	LOG@PLT
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L44:
	imul	eax, DWORD PTR LIGHT_TIME[rip]
	cmp	DWORD PTR 8[rbx], eax
	jl	.L34
	mov	eax, DWORD PTR 56[rbx]
	test	eax, eax
	jle	.L34
	sub	eax, 1
	mov	rcx, QWORD PTR 40[rbx]
	mov	edx, DWORD PTR 28[rbx]
	mov	DWORD PTR 56[rbx], eax
	mov	eax, DWORD PTR 48[rbx]
	or	edx, DWORD PTR COMMAND_SETSENSORFPS[rip]
	sub	eax, 1
	mov	DWORD PTR 28[rbx], edx
	cdqe
	cmp	rcx, rax
	jge	.L45
	add	rcx, 1
	or	edx, DWORD PTR COMMAND_SETEXPOSURE[rip]
	mov	QWORD PTR 40[rbx], rcx
	mov	DWORD PTR 28[rbx], edx
.L45:
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	lea	rdi, .LC2[rip]
	mov	QWORD PTR [rbx], rax
	xor	eax, eax
	call	LOG@PLT
	jmp	.L34
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rax, QWORD PTR EXPOSURE_DARK[rip]
	cmp	rax, rdx
	jne	.L27
	jmp	.L68
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR EXPOSURE_DARK[rip]
	cmp	rax, rdx
	jne	.L16
	jmp	.L65
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdx, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	QWORD PTR [rbx], rdx
	jmp	.L10
.L74:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	monitor_exposure, .-monitor_exposure
	.comm	flicker_jumps,8,8
	.comm	VERY_LOW_EXP,4,4
	.comm	TC,4,4
	.comm	MAX_EXP_102,4,4
	.comm	MAX_EXP,4,4
	.comm	MAX_COMP,4,4
	.comm	LOW_EXP,4,4
	.comm	LIGHT_TIME,4,4
	.comm	HIGH_COMP_102,4,4
	.comm	EXP_ACC_LIGHT,4,4
	.comm	EXP_ACC_DARK,4,4
	.comm	EXPOSURE_VERY_LIGHT,8,8
	.comm	EXPOSURE_VERY_DARK,8,8
	.comm	EXPOSURE_NORMAL,8,8
	.comm	EXPOSURE_LIGHT,8,8
	.comm	EXPOSURE_DARK,8,8
	.comm	DARK_TIME,4,4
	.comm	CPIA_COMMAND_ReadVPRegs,4,4
	.comm	COMMAND_SETSENSORFPS,4,4
	.comm	COMMAND_SETFLICKERCTRL,4,4
	.comm	COMMAND_SETEXPOSURE,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_cpia.c_monitor_exposure.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ReadVPRegs(30,4,9,8) - failed, retval=%d\012\000"
	.align	2
.LC1:
	.ascii	"Automatically decreasing sensor_fps\012\000"
	.align	2
.LC2:
	.ascii	"Automatically increasing sensor_fps\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	monitor_exposure, %function
monitor_exposure:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #8
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	ip, #9
	mov	lr, #4
	mov	r4, r0
	mov	r1, #0
	mov	r6, #30
	ldr	r3, .L59
	ldr	r0, [r0, #64]
	ldr	r3, [r3]
	sub	sp, sp, #76
	ldr	r5, [r0]
	asr	r0, r3, r2
	and	r3, r3, #255
	stmib	sp, {r0, r3}
	ldr	r3, .L59+4
	str	r2, [sp, #24]
	str	r2, [sp, #28]
	str	r1, [sp, #32]
	str	r6, [sp, #12]
	str	lr, [sp, #16]
	str	ip, [sp, #20]
	add	r1, sp, lr
	ldr	r0, [r4, #60]
	add	r2, sp, #36
	ldr	r3, [r3]
	str	r3, [sp, #68]
	mov	r3,#0
	blx	r5
	subs	r1, r0, #0
	bne	.L53
	add	r7, r4, #16
	mov	r0, r7
	ldr	r8, [sp, #36]
	ldr	r6, [sp, #40]
	bl	mutex_lock
	ldr	r2, .L59+8
	ldr	r3, [r4, #56]
	ldr	r0, [r2]
	ldr	r1, .L59+12
	ldr	r2, .L59+16
	ldr	r1, [r1]
	add	r3, r3, r0
	ldr	r2, [r2]
	sub	r3, r3, #50
	add	r2, r3, r2
	sub	r3, r3, r1
	cmp	r2, #255
	bic	r3, r3, r3, asr #31
	ldr	r0, [r4, #52]
	movlt	r9, r2
	movge	r9, #255
	ldr	r1, [r4, #24]
	cmp	r8, r3
	ldr	r10, [r4, #28]
	movge	fp, #0
	movlt	fp, #1
	cmp	r0, #0
	asr	r5, r3, #1
	add	r10, r10, r1, lsl #8
	beq	.L54
	ldr	r2, .L59+20
	ldr	r3, .L59+24
	ldr	r6, [r2]
	ldr	r1, [r3]
	cmp	r6, r10
	movgt	fp, #0
	andle	fp, fp, #1
	cmp	fp, #0
	bne	.L55
	ldr	r3, .L59+28
	ldr	r3, [r3]
	cmp	r8, r9
	cmple	r3, r10
	blt	.L21
	ldr	r2, .L59+32
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r2, r10
	bge	.L56
	ldr	r2, .L59+36
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L51
.L25:
	mov	r0, #1
	mov	r3, r2
	str	r2, [r4]
	str	r0, [r4, #4]
.L24:
	ldr	r2, [r4, #8]
	sub	r0, r2, #1
	cmp	r0, #30
	movcs	r2, #1
.L27:
	cmp	r3, r1
	beq	.L39
	ldr	r1, .L59+40
	ldr	r1, [r1]
	cmp	r1, r3
	beq	.L39
.L40:
	ldr	r1, .L59+44
	ldr	r1, [r1]
	cmp	r1, r3
	beq	.L42
	ldr	r1, .L59+36
	ldr	r1, [r1]
	cmp	r1, r3
	beq	.L42
.L32:
	mov	r0, r7
	bl	mutex_unlock
	b	.L1
.L54:
	mov	r1, #2
	mov	r0, #1
	bl	FIRMWARE_VERSION
	cmp	r0, #0
	ldrne	r3, .L59+48
	ldreq	r3, .L59+52
	add	r6, r6, #128
	ldr	r3, [r3]
	cmp	r3, r6
	movgt	r6, #0
	andle	r6, fp, #1
	ldr	r3, .L59+24
	cmp	r6, #0
	ldr	r1, [r3]
	beq	.L7
	cmp	r8, r5
	ldr	r3, [r4]
	bge	.L8
	cmp	r3, r1
	beq	.L49
	mov	r3, #1
	stm	r4, {r1, r3}
	mov	r3, r1
	b	.L10
.L53:
	ldr	r0, .L59+56
	bl	LOG
.L1:
	ldr	r3, .L59+4
	ldr	r2, [r3]
	ldr	r3, [sp, #68]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L57
	add	sp, sp, #76
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L56:
	ldr	r2, .L59+44
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L25
.L51:
	ldr	r2, [r4, #4]
	add	r2, r2, #1
	str	r2, [r4, #4]
	b	.L24
.L7:
	ldr	r3, .L59+28
	ldr	r3, [r3]
	cmp	r8, r9
	cmple	r3, r10
	blt	.L12
	ldr	r2, .L59+32
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r2, r10
	blt	.L13
	ldr	r2, .L59+44
	ldr	r2, [r2]
	cmp	r2, r3
	beq	.L49
.L15:
	mov	r0, #1
	mov	r3, r2
	str	r2, [r4]
	str	r0, [r4, #4]
	b	.L10
.L13:
	ldr	r2, .L59+36
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L15
.L49:
	ldr	r2, [r4, #4]
	add	r2, r2, #1
	str	r2, [r4, #4]
.L10:
	ldr	r2, [r4, #8]
	ldr	r0, [r4, #52]
	sub	ip, r2, #1
	cmp	ip, #30
	movcs	r2, #1
	cmp	r0, #0
	bne	.L27
	cmp	r3, r1
	beq	.L28
	ldr	r1, .L59+40
	ldr	r1, [r1]
	cmp	r1, r3
	beq	.L28
.L29:
	ldr	r1, .L59+44
	ldr	r1, [r1]
	cmp	r1, r3
	beq	.L33
	ldr	r1, .L59+36
	ldr	r1, [r1]
	cmp	r1, r3
	bne	.L32
.L33:
	ldr	r3, .L59+60
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mul	r2, r3, r2
	cmp	r1, r2
	blt	.L32
	ldr	r3, [r4, #40]
	cmp	r3, #0
	ble	.L32
	mov	r1, #2
	mov	r0, #1
	bl	FIRMWARE_VERSION
	cmp	r0, #0
	ldrne	r3, .L59+64
	ldreq	r3, .L59+20
	ldr	r2, [r4, #12]
	ldr	r0, [r3]
	ldr	r3, .L59+68
	ldr	r1, [r4, #44]
	ldr	r3, [r3]
	ldr	ip, .L59+72
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [r4, #40]
	ldr	r1, [r2, r1, lsl #2]
	ldr	r2, .L59+76
	sub	r3, r3, #1
	ldr	r1, [r1, r3, lsl #2]
	ldr	r2, [r2]
	ldr	ip, [ip]
	str	r3, [r4, #40]
	ldr	lr, [r4, #20]
	lsl	r10, r10, #1
	str	r1, [r4, #48]
	sub	r3, r1, #1
	orr	ip, r2, ip
	b	.L38
.L58:
	add	r2, r1, r3
	cmp	r2, r0
	bge	.L37
	mov	r3, r2
.L38:
	cmp	r10, r3
	bgt	.L58
.L37:
	ldr	r2, .L59+80
	ldr	r1, .L59+84
	ldr	r2, [r2]
	ldr	r0, [r1]
	orr	r2, ip, r2
	and	r1, r3, #255
	orr	r2, r2, lr
	asr	r3, r3, #8
	str	r0, [r4]
	str	r2, [r4, #20]
	str	r1, [r4, #28]
	str	r3, [r4, #24]
	ldr	r0, .L59+88
	bl	LOG
	b	.L32
.L28:
	ldr	r1, .L59+92
	ldr	r0, [r4, #4]
	ldr	r1, [r1]
	mul	r1, r2, r1
	cmp	r0, r1
	blt	.L29
	ldr	r1, [r4, #40]
	cmp	r1, #2
	bgt	.L29
	ldr	r3, .L59+68
	ldr	r0, [r4, #12]
	ldr	r3, [r3]
	ldr	r2, [r4, #44]
	ldr	r3, [r3, r0, lsl #2]
	add	r1, r1, #1
	ldr	r3, [r3, r2, lsl #2]
	ldr	r0, .L59+76
	ldr	r2, [r3, r1, lsl #2]
	ldr	r3, .L59+72
	add	r10, r10, r10, lsr #31
	ldr	ip, [r3]
	ldr	r0, [r0]
	sub	r3, r2, #1
	cmp	r3, r10, asr #1
	str	r1, [r4, #40]
	str	r2, [r4, #48]
	orr	r1, r0, ip
	asr	r10, r10, #1
	ldr	ip, [r4, #20]
	bge	.L30
.L31:
	add	r3, r3, r2
	cmp	r3, r10
	blt	.L31
.L30:
	ldr	r2, .L59+80
	ldr	r0, .L59+84
	ldr	r2, [r2]
	ldr	r0, [r0]
	orr	r2, r1, r2
	orr	r2, r2, ip
	and	r1, r3, #255
	asr	r3, r3, #8
	str	r0, [r4]
	str	r2, [r4, #20]
	str	r1, [r4, #28]
	str	r3, [r4, #24]
	ldr	r0, .L59+96
	bl	LOG
	b	.L32
.L39:
	ldr	r1, .L59+92
	ldr	r0, [r4, #4]
	ldr	r1, [r1]
	mul	r1, r2, r1
	cmp	r0, r1
	blt	.L40
	ldr	r1, [r4, #40]
	cmp	r1, #2
	bgt	.L40
	ldr	r2, .L59+76
	ldr	r3, [r4, #20]
	ldr	r0, [r2]
	ldr	r2, [r4, #32]
	add	r1, r1, #1
	orr	r3, r3, r0
	cmp	r2, #0
	str	r1, [r4, #40]
	str	r3, [r4, #20]
	ble	.L41
	ldr	r1, .L59+80
	sub	r2, r2, #1
	ldr	r1, [r1]
	str	r2, [r4, #32]
	orr	r3, r1, r3
	str	r3, [r4, #20]
.L41:
	ldr	r3, .L59+84
	ldr	r0, .L59+96
	ldr	r3, [r3]
	str	r3, [r4]
	bl	LOG
	b	.L32
.L42:
	ldr	r3, .L59+60
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	mul	r2, r3, r2
	cmp	r1, r2
	blt	.L32
	ldr	r3, [r4, #40]
	cmp	r3, #0
	ble	.L32
	ldr	r2, .L59+76
	ldr	r1, [r4, #36]
	ldr	r0, [r2]
	ldr	r2, [r4, #20]
	sub	r1, r1, #1
	orr	r2, r2, r0
	ldr	r0, [r4, #32]
	sub	r3, r3, #1
	cmp	r0, r1
	str	r3, [r4, #40]
	str	r2, [r4, #20]
	bge	.L43
	ldr	r3, .L59+80
	add	r0, r0, #1
	ldr	r3, [r3]
	str	r0, [r4, #32]
	orr	r2, r3, r2
	str	r2, [r4, #20]
.L43:
	ldr	r3, .L59+84
	ldr	r0, .L59+88
	ldr	r3, [r3]
	str	r3, [r4]
	bl	LOG
	b	.L32
.L55:
	cmp	r8, r5
	ldr	r3, [r4]
	bge	.L17
	cmp	r1, r3
	beq	.L51
	mov	r3, #1
	stm	r4, {r1, r3}
	mov	r3, r1
	b	.L24
.L21:
	ldr	r3, .L59+84
	ldr	r3, [r3]
	str	r3, [r4]
	b	.L24
.L17:
	ldr	r2, .L59+40
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L25
	b	.L51
.L8:
	ldr	r2, .L59+40
	ldr	r2, [r2]
	cmp	r2, r3
	bne	.L15
	b	.L49
.L12:
	ldr	r3, .L59+84
	ldr	r3, [r3]
	str	r3, [r4]
	b	.L10
.L57:
	bl	__stack_chk_fail
.L60:
	.align	2
.L59:
	.word	CPIA_COMMAND_ReadVPRegs
	.word	.LC3
	.word	TC
	.word	EXP_ACC_DARK
	.word	EXP_ACC_LIGHT
	.word	MAX_EXP
	.word	EXPOSURE_VERY_DARK
	.word	LOW_EXP
	.word	VERY_LOW_EXP
	.word	EXPOSURE_LIGHT
	.word	EXPOSURE_DARK
	.word	EXPOSURE_VERY_LIGHT
	.word	MAX_COMP
	.word	HIGH_COMP_102
	.word	.LC0
	.word	LIGHT_TIME
	.word	MAX_EXP_102
	.word	flicker_jumps
	.word	COMMAND_SETFLICKERCTRL
	.word	COMMAND_SETSENSORFPS
	.word	COMMAND_SETEXPOSURE
	.word	EXPOSURE_NORMAL
	.word	.LC2
	.word	DARK_TIME
	.word	.LC1
	.size	monitor_exposure, .-monitor_exposure
	.comm	flicker_jumps,4,4
	.comm	VERY_LOW_EXP,4,4
	.comm	TC,4,4
	.comm	MAX_EXP_102,4,4
	.comm	MAX_EXP,4,4
	.comm	MAX_COMP,4,4
	.comm	LOW_EXP,4,4
	.comm	LIGHT_TIME,4,4
	.comm	HIGH_COMP_102,4,4
	.comm	EXP_ACC_LIGHT,4,4
	.comm	EXP_ACC_DARK,4,4
	.comm	EXPOSURE_VERY_LIGHT,4,4
	.comm	EXPOSURE_VERY_DARK,4,4
	.comm	EXPOSURE_NORMAL,4,4
	.comm	EXPOSURE_LIGHT,4,4
	.comm	EXPOSURE_DARK,4,4
	.comm	DARK_TIME,4,4
	.comm	CPIA_COMMAND_ReadVPRegs,4,4
	.comm	COMMAND_SETSENSORFPS,4,4
	.comm	COMMAND_SETFLICKERCTRL,4,4
	.comm	COMMAND_SETEXPOSURE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
