	.file	"193892934.c"
	.intel_syntax noprefix
	.text
	.globl	CPIA_COMMAND_ReadVPRegs
	.bss
	.align 4
	.type	CPIA_COMMAND_ReadVPRegs, @object
	.size	CPIA_COMMAND_ReadVPRegs, 4
CPIA_COMMAND_ReadVPRegs:
	.zero	4
	.globl	DARK_TIME
	.align 4
	.type	DARK_TIME, @object
	.size	DARK_TIME, 4
DARK_TIME:
	.zero	4
	.globl	D_CONF
	.align 4
	.type	D_CONF, @object
	.size	D_CONF, 4
D_CONF:
	.zero	4
	.globl	EXPOSURE_DARK
	.align 8
	.type	EXPOSURE_DARK, @object
	.size	EXPOSURE_DARK, 8
EXPOSURE_DARK:
	.zero	8
	.globl	EXPOSURE_LIGHT
	.align 8
	.type	EXPOSURE_LIGHT, @object
	.size	EXPOSURE_LIGHT, 8
EXPOSURE_LIGHT:
	.zero	8
	.globl	EXPOSURE_NORMAL
	.align 8
	.type	EXPOSURE_NORMAL, @object
	.size	EXPOSURE_NORMAL, 8
EXPOSURE_NORMAL:
	.zero	8
	.globl	EXPOSURE_VERY_DARK
	.align 8
	.type	EXPOSURE_VERY_DARK, @object
	.size	EXPOSURE_VERY_DARK, 8
EXPOSURE_VERY_DARK:
	.zero	8
	.globl	EXPOSURE_VERY_LIGHT
	.align 8
	.type	EXPOSURE_VERY_LIGHT, @object
	.size	EXPOSURE_VERY_LIGHT, 8
EXPOSURE_VERY_LIGHT:
	.zero	8
	.globl	EXP_ACC_DARK
	.align 4
	.type	EXP_ACC_DARK, @object
	.size	EXP_ACC_DARK, 4
EXP_ACC_DARK:
	.zero	4
	.globl	EXP_ACC_LIGHT
	.align 4
	.type	EXP_ACC_LIGHT, @object
	.size	EXP_ACC_LIGHT, 4
EXP_ACC_LIGHT:
	.zero	4
	.globl	HIGH_COMP_102
	.align 4
	.type	HIGH_COMP_102, @object
	.size	HIGH_COMP_102, 4
HIGH_COMP_102:
	.zero	4
	.globl	LIGHT_TIME
	.align 4
	.type	LIGHT_TIME, @object
	.size	LIGHT_TIME, 4
LIGHT_TIME:
	.zero	4
	.globl	LOW_EXP
	.align 4
	.type	LOW_EXP, @object
	.size	LOW_EXP, 4
LOW_EXP:
	.zero	4
	.globl	MAX_COMP
	.align 4
	.type	MAX_COMP, @object
	.size	MAX_COMP, 4
MAX_COMP:
	.zero	4
	.globl	MAX_EXP
	.align 4
	.type	MAX_EXP, @object
	.size	MAX_EXP, 4
MAX_EXP:
	.zero	4
	.globl	MAX_EXP_102
	.align 4
	.type	MAX_EXP_102, @object
	.size	MAX_EXP_102, 4
MAX_EXP_102:
	.zero	4
	.globl	TC
	.align 4
	.type	TC, @object
	.size	TC, 4
TC:
	.zero	4
	.globl	VERY_LOW_EXP
	.align 4
	.type	VERY_LOW_EXP, @object
	.size	VERY_LOW_EXP, 4
VERY_LOW_EXP:
	.zero	4
	.globl	flicker_jumps
	.align 8
	.type	flicker_jumps, @object
	.size	flicker_jumps, 8
flicker_jumps:
	.zero	8
	.section	.rodata
	.align 8
.LC0:
	.string	"ReadVPRegs(30,4,9,8) - failed: %d"
	.align 8
.LC1:
	.string	"Automatically decreasing sensor_fps"
	.align 8
.LC2:
	.string	"Automatically increasing sensor_fps"
	.text
	.type	monitor_exposure, @function
monitor_exposure:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -136[rbp]
	mov	QWORD PTR -56[rbp], rax
	mov	DWORD PTR -104[rbp], 0
	mov	DWORD PTR -100[rbp], 0
	mov	DWORD PTR -96[rbp], 0
	mov	eax, DWORD PTR CPIA_COMMAND_ReadVPRegs[rip]
	sar	eax, 8
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR CPIA_COMMAND_ReadVPRegs[rip]
	movzx	eax, al
	mov	DWORD PTR -44[rbp], eax
	mov	DWORD PTR -40[rbp], 30
	mov	DWORD PTR -36[rbp], 4
	mov	DWORD PTR -32[rbp], 9
	mov	DWORD PTR -28[rbp], 8
	mov	DWORD PTR -24[rbp], 8
	mov	DWORD PTR -20[rbp], 0
	lea	rdx, -48[rbp]
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	cpia_usb_transferCmd@PLT
	mov	DWORD PTR -92[rbp], eax
	cmp	DWORD PTR -92[rbp], 0
	je	.L2
	mov	eax, DWORD PTR -92[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	call	err@PLT
	jmp	.L1
.L2:
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -88[rbp], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -84[rbp], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -80[rbp], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR 12[rax]
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 72[rax]
	mov	eax, DWORD PTR TC[rip]
	add	eax, edx
	lea	edx, -50[rax]
	mov	eax, DWORD PTR EXP_ACC_LIGHT[rip]
	add	eax, edx
	mov	DWORD PTR -120[rbp], eax
	cmp	DWORD PTR -120[rbp], 255
	jle	.L4
	mov	DWORD PTR -120[rbp], 255
.L4:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 72[rax]
	mov	eax, DWORD PTR TC[rip]
	add	eax, edx
	sub	eax, 50
	mov	edx, DWORD PTR EXP_ACC_DARK[rip]
	sub	eax, edx
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], 0
	jns	.L5
	mov	DWORD PTR -116[rbp], 0
.L5:
	mov	eax, DWORD PTR -116[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -72[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 24[rax]
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 28[rax]
	add	eax, edx
	mov	DWORD PTR -68[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 68[rax]
	test	eax, eax
	jne	.L6
	mov	esi, 2
	mov	edi, 1
	call	FIRMWARE_VERSION@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR MAX_COMP[rip]
	jmp	.L8
.L7:
	mov	eax, DWORD PTR HIGH_COMP_102[rip]
.L8:
	mov	DWORD PTR -64[rbp], eax
	sub	DWORD PTR -84[rbp], -128
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -64[rbp]
	jl	.L9
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jge	.L9
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -72[rbp]
	jge	.L10
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_DARK[rip]
	cmp	rdx, rax
	jne	.L11
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L11:
	mov	rdx, QWORD PTR EXPOSURE_VERY_DARK[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L10:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_DARK[rip]
	cmp	rdx, rax
	jne	.L13
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L13:
	mov	rdx, QWORD PTR EXPOSURE_DARK[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L9:
	mov	eax, DWORD PTR LOW_EXP[rip]
	cmp	DWORD PTR -68[rbp], eax
	jle	.L15
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -120[rbp]
	jle	.L16
.L15:
	mov	eax, DWORD PTR VERY_LOW_EXP[rip]
	cmp	DWORD PTR -68[rbp], eax
	jg	.L17
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	cmp	rdx, rax
	jne	.L18
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L18:
	mov	rdx, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L17:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_LIGHT[rip]
	cmp	rdx, rax
	jne	.L20
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L20:
	mov	rdx, QWORD PTR EXPOSURE_LIGHT[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L16:
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	jmp	.L21
.L6:
	mov	eax, DWORD PTR MAX_EXP[rip]
	cmp	DWORD PTR -68[rbp], eax
	jl	.L22
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -116[rbp]
	jge	.L22
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -72[rbp]
	jge	.L23
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_DARK[rip]
	cmp	rdx, rax
	jne	.L24
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L24:
	mov	rdx, QWORD PTR EXPOSURE_VERY_DARK[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L23:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_DARK[rip]
	cmp	rdx, rax
	jne	.L26
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L26:
	mov	rdx, QWORD PTR EXPOSURE_DARK[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L22:
	mov	eax, DWORD PTR LOW_EXP[rip]
	cmp	DWORD PTR -68[rbp], eax
	jle	.L27
	mov	eax, DWORD PTR -88[rbp]
	cmp	eax, DWORD PTR -120[rbp]
	jle	.L28
.L27:
	mov	eax, DWORD PTR VERY_LOW_EXP[rip]
	cmp	DWORD PTR -68[rbp], eax
	jg	.L29
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	cmp	rdx, rax
	jne	.L30
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L30:
	mov	rdx, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L29:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_LIGHT[rip]
	cmp	rdx, rax
	jne	.L32
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L21
.L32:
	mov	rdx, QWORD PTR EXPOSURE_LIGHT[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 8[rax], 1
	jmp	.L21
.L28:
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
.L21:
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 80
	mov	rdi, rax
	call	atomic_read@PLT
	mov	DWORD PTR -108[rbp], eax
	cmp	DWORD PTR -108[rbp], 30
	jg	.L33
	cmp	DWORD PTR -108[rbp], 0
	jg	.L34
.L33:
	mov	DWORD PTR -108[rbp], 1
.L34:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 68[rax]
	test	eax, eax
	jne	.L35
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_DARK[rip]
	cmp	rdx, rax
	je	.L36
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_DARK[rip]
	cmp	rdx, rax
	jne	.L37
.L36:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR DARK_TIME[rip]
	imul	eax, DWORD PTR -108[rbp]
	cmp	edx, eax
	jl	.L37
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	cmp	eax, 2
	jg	.L37
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 48[rax], edx
	mov	DWORD PTR -104[rbp], 1
	mov	rdx, QWORD PTR flicker_jumps[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 56[rax]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 64[rax], edx
	mov	DWORD PTR -96[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 64[rax]
	sub	eax, 1
	mov	DWORD PTR -112[rbp], eax
	jmp	.L38
.L39:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 64[rax]
	add	DWORD PTR -112[rbp], eax
.L38:
	mov	eax, DWORD PTR -68[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	cmp	DWORD PTR -112[rbp], eax
	jl	.L39
	mov	eax, DWORD PTR -112[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 28[rax], edx
	mov	eax, DWORD PTR -112[rbp]
	sar	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	DWORD PTR -100[rbp], 1
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR D_CONF[rip]
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	PDEBUG@PLT
	jmp	.L47
.L37:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	cmp	rdx, rax
	je	.L41
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_LIGHT[rip]
	cmp	rdx, rax
	jne	.L47
.L41:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR LIGHT_TIME[rip]
	imul	eax, DWORD PTR -108[rbp]
	cmp	edx, eax
	jl	.L47
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	test	eax, eax
	jle	.L47
	mov	esi, 2
	mov	edi, 1
	call	FIRMWARE_VERSION@PLT
	test	rax, rax
	je	.L42
	mov	eax, DWORD PTR MAX_EXP_102[rip]
	jmp	.L43
.L42:
	mov	eax, DWORD PTR MAX_EXP[rip]
.L43:
	mov	DWORD PTR -60[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 48[rax], edx
	mov	DWORD PTR -104[rbp], 1
	mov	rdx, QWORD PTR flicker_jumps[rip]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 56[rax]
	sal	rax, 3
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 64[rax], edx
	mov	DWORD PTR -96[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 64[rax]
	sub	eax, 1
	mov	DWORD PTR -112[rbp], eax
	jmp	.L44
.L46:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 64[rax]
	add	DWORD PTR -112[rbp], eax
.L44:
	mov	eax, DWORD PTR -68[rbp]
	add	eax, eax
	cmp	DWORD PTR -112[rbp], eax
	jge	.L45
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 64[rax]
	mov	eax, DWORD PTR -112[rbp]
	add	eax, edx
	cmp	DWORD PTR -60[rbp], eax
	jg	.L46
.L45:
	mov	eax, DWORD PTR -112[rbp]
	movzx	edx, al
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 28[rax], edx
	mov	eax, DWORD PTR -112[rbp]
	sar	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 24[rax], edx
	mov	DWORD PTR -100[rbp], 1
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR D_CONF[rip]
	lea	rsi, .LC2[rip]
	mov	edi, eax
	call	PDEBUG@PLT
	jmp	.L47
.L35:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_DARK[rip]
	cmp	rdx, rax
	je	.L48
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_DARK[rip]
	cmp	rdx, rax
	jne	.L49
.L48:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR DARK_TIME[rip]
	imul	eax, DWORD PTR -108[rbp]
	cmp	edx, eax
	jl	.L49
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	cmp	eax, 2
	jg	.L49
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 48[rax], edx
	mov	DWORD PTR -104[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 32[rax]
	test	rax, rax
	jle	.L50
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 32[rax]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 32[rax], rdx
	mov	DWORD PTR -100[rbp], 1
.L50:
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR D_CONF[rip]
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	PDEBUG@PLT
	jmp	.L47
.L49:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_VERY_LIGHT[rip]
	cmp	rdx, rax
	je	.L51
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR EXPOSURE_LIGHT[rip]
	cmp	rdx, rax
	jne	.L47
.L51:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR LIGHT_TIME[rip]
	imul	eax, DWORD PTR -108[rbp]
	cmp	edx, eax
	jl	.L47
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	test	eax, eax
	jle	.L47
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 48[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 48[rax], edx
	mov	DWORD PTR -104[rbp], 1
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 40[rax]
	sub	eax, 1
	cdqe
	cmp	rdx, rax
	jge	.L52
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 32[rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 32[rax], rdx
	mov	DWORD PTR -100[rbp], 1
.L52:
	mov	rax, QWORD PTR EXPOSURE_NORMAL[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR D_CONF[rip]
	lea	rsi, .LC2[rip]
	mov	edi, eax
	call	PDEBUG@PLT
.L47:
	cmp	DWORD PTR -100[rbp], 0
	je	.L53
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	command_setexposure@PLT
.L53:
	cmp	DWORD PTR -104[rbp], 0
	je	.L54
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	command_setsensorfps@PLT
.L54:
	cmp	DWORD PTR -96[rbp], 0
	je	.L1
	mov	rax, QWORD PTR -136[rbp]
	mov	rdi, rax
	call	command_setflickerctrl@PLT
.L1:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L56
	call	__stack_chk_fail@PLT
.L56:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	monitor_exposure, .-monitor_exposure
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"193892934.c"
	.text
	.comm	CPIA_COMMAND_ReadVPRegs,4,4
	.comm	DARK_TIME,4,4
	.comm	D_CONF,4,4
	.comm	EXPOSURE_DARK,4,4
	.comm	EXPOSURE_LIGHT,4,4
	.comm	EXPOSURE_NORMAL,4,4
	.comm	EXPOSURE_VERY_DARK,4,4
	.comm	EXPOSURE_VERY_LIGHT,4,4
	.comm	EXP_ACC_DARK,4,4
	.comm	EXP_ACC_LIGHT,4,4
	.comm	HIGH_COMP_102,4,4
	.comm	LIGHT_TIME,4,4
	.comm	LOW_EXP,4,4
	.comm	MAX_COMP,4,4
	.comm	MAX_EXP,4,4
	.comm	MAX_EXP_102,4,4
	.comm	TC,4,4
	.comm	VERY_LOW_EXP,4,4
	.comm	flicker_jumps,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ReadVPRegs(30,4,9,8) - failed: %d\000"
	.align	2
.LC1:
	.ascii	"Automatically decreasing sensor_fps\000"
	.align	2
.LC2:
	.ascii	"Automatically increasing sensor_fps\000"
	.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 = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	ldr	r3, .L57
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-112]
	str	r3, [fp, #-80]
	mov	r3, #0
	str	r3, [fp, #-92]
	mov	r3, #0
	str	r3, [fp, #-88]
	mov	r3, #0
	str	r3, [fp, #-84]
	ldr	r3, .L57+4
	ldr	r3, [r3]
	asr	r3, r3, #8
	str	r3, [fp, #-40]
	ldr	r3, .L57+4
	ldr	r3, [r3]
	and	r3, r3, #255
	str	r3, [fp, #-36]
	mov	r3, #30
	str	r3, [fp, #-32]
	mov	r3, #4
	str	r3, [fp, #-28]
	mov	r3, #9
	str	r3, [fp, #-24]
	mov	r3, #8
	str	r3, [fp, #-20]
	mov	r3, #8
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	cpia_usb_transferCmd
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	beq	.L2
	ldr	r1, [fp, #-76]
	ldr	r0, .L57+8
	bl	err
	b	.L1
.L2:
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #44]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r3, r2, r3
	sub	r2, r3, #50
	ldr	r3, .L57+16
	ldr	r3, [r3]
	add	r3, r2, r3
	str	r3, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #255
	ble	.L4
	mov	r3, #255
	str	r3, [fp, #-108]
.L4:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #44]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r3, r2, r3
	sub	r2, r3, #50
	ldr	r3, .L57+20
	ldr	r3, [r3]
	sub	r3, r2, r3
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bge	.L5
	mov	r3, #0
	str	r3, [fp, #-104]
.L5:
	ldr	r3, [fp, #-104]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #12]
	lsl	r2, r3, #8
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #16]
	add	r3, r2, r3
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	bne	.L6
	mov	r1, #2
	mov	r0, #1
	bl	FIRMWARE_VERSION
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L57+24
	ldr	r3, [r3]
	b	.L8
.L7:
	ldr	r3, .L57+28
	ldr	r3, [r3]
.L8:
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-68]
	add	r3, r3, #128
	str	r3, [fp, #-68]
	ldr	r2, [fp, #-68]
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	blt	.L9
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-104]
	cmp	r2, r3
	bge	.L9
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	bge	.L10
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+32
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L11
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L11:
	ldr	r3, .L57+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L10:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+36
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L13
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L13:
	ldr	r3, .L57+36
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L9:
	ldr	r3, .L57+40
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	ble	.L15
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-108]
	cmp	r2, r3
	ble	.L16
.L15:
	ldr	r3, .L57+44
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	bgt	.L17
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+48
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L18
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L18:
	ldr	r3, .L57+48
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L17:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+52
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L20
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L20:
	ldr	r3, .L57+52
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L16:
	ldr	r3, .L57+56
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	b	.L21
.L6:
	ldr	r3, .L57+60
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	blt	.L22
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-104]
	cmp	r2, r3
	bge	.L22
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-56]
	cmp	r2, r3
	bge	.L23
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+32
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L24
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L24:
	ldr	r3, .L57+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L23:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+36
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L26
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L26:
	ldr	r3, .L57+36
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L22:
	ldr	r3, .L57+40
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	ble	.L27
	ldr	r2, [fp, #-72]
	ldr	r3, [fp, #-108]
	cmp	r2, r3
	ble	.L28
.L27:
	ldr	r3, .L57+44
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	bgt	.L29
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+48
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L30
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L30:
	ldr	r3, .L57+48
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L29:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+52
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L32
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #4]
	b	.L21
.L32:
	ldr	r3, .L57+52
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, [fp, #-80]
	mov	r2, #1
	str	r2, [r3, #4]
	b	.L21
.L28:
	ldr	r3, .L57+56
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3]
.L21:
	ldr	r3, [fp, #-80]
	add	r3, r3, #48
	mov	r0, r3
	bl	atomic_read
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #30
	bgt	.L33
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bgt	.L34
.L33:
	mov	r3, #1
	str	r3, [fp, #-96]
.L34:
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	bne	.L35
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+32
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L36
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+36
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L37
.L36:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #4]
	ldr	r3, .L57+64
	ldr	r3, [r3]
	ldr	r1, [fp, #-96]
	mul	r3, r1, r3
	cmp	r2, r3
	blt	.L37
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	cmp	r3, #2
	bgt	.L37
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #28]
	mov	r3, #1
	str	r3, [fp, #-92]
	ldr	r3, .L57+68
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3, #36]
	mov	r3, #1
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #36]
	sub	r3, r3, #1
	str	r3, [fp, #-100]
	b	.L38
.L39:
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #36]
	ldr	r2, [fp, #-100]
	add	r3, r2, r3
	str	r3, [fp, #-100]
.L38:
	ldr	r3, [fp, #-52]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-100]
	cmp	r3, r2
	blt	.L39
	ldr	r3, [fp, #-100]
	and	r2, r3, #255
	ldr	r3, [fp, #-80]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-100]
	asr	r2, r3, #8
	ldr	r3, [fp, #-80]
	str	r2, [r3, #12]
	mov	r3, #1
	str	r3, [fp, #-88]
	ldr	r3, .L57+56
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, .L57+72
	ldr	r3, [r3]
	ldr	r1, .L57+76
	mov	r0, r3
	bl	PDEBUG
	b	.L47
.L37:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+48
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L41
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+52
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L47
.L41:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #4]
	ldr	r3, .L57+80
	ldr	r3, [r3]
	ldr	r1, [fp, #-96]
	mul	r3, r1, r3
	cmp	r2, r3
	blt	.L47
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	ble	.L47
	mov	r1, #2
	mov	r0, #1
	bl	FIRMWARE_VERSION
	mov	r3, r0
	cmp	r3, #0
	beq	.L42
	ldr	r3, .L57+84
	ldr	r3, [r3]
	b	.L43
.L42:
	ldr	r3, .L57+60
	ldr	r3, [r3]
.L43:
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	sub	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #28]
	mov	r3, #1
	str	r3, [fp, #-92]
	ldr	r3, .L57+68
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #32]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3, #36]
	mov	r3, #1
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #36]
	sub	r3, r3, #1
	str	r3, [fp, #-100]
	b	.L44
.L46:
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #36]
	ldr	r2, [fp, #-100]
	add	r3, r2, r3
	str	r3, [fp, #-100]
.L44:
	ldr	r3, [fp, #-52]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-100]
	cmp	r2, r3
	bge	.L45
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #36]
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	ldr	r2, [fp, #-44]
	cmp	r2, r3
	bgt	.L46
.L45:
	ldr	r3, [fp, #-100]
	and	r2, r3, #255
	ldr	r3, [fp, #-80]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-100]
	asr	r2, r3, #8
	ldr	r3, [fp, #-80]
	str	r2, [r3, #12]
	mov	r3, #1
	str	r3, [fp, #-88]
	ldr	r3, .L57+56
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, .L57+72
	ldr	r3, [r3]
	ldr	r1, .L57+88
	mov	r0, r3
	bl	PDEBUG
	b	.L47
.L35:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+32
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L48
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+36
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L49
.L48:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #4]
	ldr	r3, .L57+64
	ldr	r3, [r3]
	ldr	r1, [fp, #-96]
	mul	r3, r1, r3
	cmp	r2, r3
	blt	.L49
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	cmp	r3, #2
	bgt	.L49
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #28]
	mov	r3, #1
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	ble	.L50
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #20]
	sub	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #20]
	mov	r3, #1
	str	r3, [fp, #-88]
.L50:
	ldr	r3, .L57+56
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, .L57+72
	ldr	r3, [r3]
	ldr	r1, .L57+76
	mov	r0, r3
	bl	PDEBUG
	b	.L47
.L49:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+48
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L51
	ldr	r3, [fp, #-80]
	ldr	r2, [r3]
	ldr	r3, .L57+52
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L47
.L51:
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #4]
	ldr	r3, .L57+80
	ldr	r3, [r3]
	ldr	r1, [fp, #-96]
	mul	r3, r1, r3
	cmp	r2, r3
	blt	.L47
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	ble	.L47
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #28]
	sub	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #28]
	mov	r3, #1
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-80]
	ldr	r2, [r3, #20]
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #24]
	sub	r3, r3, #1
	cmp	r2, r3
	bge	.L52
	ldr	r3, [fp, #-80]
	ldr	r3, [r3, #20]
	add	r2, r3, #1
	ldr	r3, [fp, #-80]
	str	r2, [r3, #20]
	mov	r3, #1
	str	r3, [fp, #-88]
.L52:
	ldr	r3, .L57+56
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	str	r2, [r3]
	ldr	r3, .L57+72
	ldr	r3, [r3]
	ldr	r1, .L57+88
	mov	r0, r3
	bl	PDEBUG
.L47:
	ldr	r3, [fp, #-88]
	cmp	r3, #0
	beq	.L53
	ldr	r0, [fp, #-112]
	bl	command_setexposure
.L53:
	ldr	r3, [fp, #-92]
	cmp	r3, #0
	beq	.L54
	ldr	r0, [fp, #-112]
	bl	command_setsensorfps
.L54:
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	beq	.L1
	ldr	r0, [fp, #-112]
	bl	command_setflickerctrl
.L1:
	ldr	r3, .L57
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L56
	bl	__stack_chk_fail
.L56:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L58:
	.align	2
.L57:
	.word	.LC3
	.word	CPIA_COMMAND_ReadVPRegs
	.word	.LC0
	.word	TC
	.word	EXP_ACC_LIGHT
	.word	EXP_ACC_DARK
	.word	MAX_COMP
	.word	HIGH_COMP_102
	.word	EXPOSURE_VERY_DARK
	.word	EXPOSURE_DARK
	.word	LOW_EXP
	.word	VERY_LOW_EXP
	.word	EXPOSURE_VERY_LIGHT
	.word	EXPOSURE_LIGHT
	.word	EXPOSURE_NORMAL
	.word	MAX_EXP
	.word	DARK_TIME
	.word	flicker_jumps
	.word	D_CONF
	.word	.LC1
	.word	LIGHT_TIME
	.word	MAX_EXP_102
	.word	.LC2
	.size	monitor_exposure, .-monitor_exposure
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
