	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function monitor_exposure
LCPI0_0:
	.long	30                              ## 0x1e
	.long	4                               ## 0x4
	.long	9                               ## 0x9
	.long	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_monitor_exposure:                      ## @monitor_exposure
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CPIA_COMMAND_ReadVPRegs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movzbl	%al, %ecx
	sarl	$8, %eax
	movl	%eax, -80(%rbp)
	movl	%ecx, -76(%rbp)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [30,4,9,8]
	movups	%xmm0, -72(%rbp)
	movq	$8, -56(%rbp)
	leaq	-80(%rbp), %rsi
	callq	_cpia_usb_transferCmd
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_66
## %bb.3:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	72(%r15), %eax
	movq	_TC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	addl	$-50, %ecx
	movq	_EXP_ACC_LIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ecx, %eax
	cmpl	$255, %eax
	movl	$255, %r13d
	cmovll	%eax, %r13d
	movq	(%r15), %rax
	movq	_EXP_ACC_DARK@GOTPCREL(%rip), %rdx
	subl	(%rdx), %ecx
	xorl	%ebx, %ebx
	testl	%ecx, %ecx
	cmovgl	%ecx, %ebx
	movl	(%rax), %edx
	movl	%ebx, %r14d
	shrl	%r14d
	movl	24(%r15), %r12d
	shll	$8, %r12d
	addl	28(%r15), %r12d
	cmpl	$0, 68(%r15)
	je	LBB0_10
## %bb.5:
	movq	_MAX_EXP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	jl	LBB0_12
## %bb.6:
	cmpl	%ebx, %edx
	jge	LBB0_12
## %bb.7:
	cmpl	%r14d, %edx
	jge	LBB0_26
## %bb.8:
	movq	_EXPOSURE_VERY_DARK@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_10:
	movl	%edx, -88(%rbp)                 ## 4-byte Spill
	movl	%r12d, -84(%rbp)                ## 4-byte Spill
	movl	4(%rax), %r12d
	movl	$1, %edi
	movl	$2, %esi
	callq	_FIRMWARE_VERSION
	testq	%rax, %rax
	jne	LBB0_16
## %bb.11:
	movq	_HIGH_COMP_102@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_12:
	movq	_LOW_EXP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	jle	LBB0_14
## %bb.13:
	cmpl	%r13d, %edx
	jle	LBB0_25
LBB0_14:
	movq	_VERY_LOW_EXP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	jle	LBB0_30
## %bb.15:
	movq	_EXPOSURE_LIGHT@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_16:
	movq	_MAX_COMP@GOTPCREL(%rip), %rax
LBB0_17:
	subl	$-128, %r12d
	cmpl	(%rax), %r12d
	movl	-88(%rbp), %ecx                 ## 4-byte Reload
	jl	LBB0_23
## %bb.18:
	cmpl	%ebx, %ecx
	jge	LBB0_23
## %bb.19:
	movq	(%r15), %rax
	cmpl	%r14d, %ecx
	movl	-84(%rbp), %r12d                ## 4-byte Reload
	jge	LBB0_29
## %bb.20:
	movq	_EXPOSURE_VERY_DARK@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_23:
	movq	_LOW_EXP@GOTPCREL(%rip), %rax
	movl	-84(%rbp), %r12d                ## 4-byte Reload
	cmpl	(%rax), %r12d
	jle	LBB0_27
## %bb.24:
	cmpl	%r13d, %ecx
	jg	LBB0_27
LBB0_25:
	movq	_EXPOSURE_NORMAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	jmp	LBB0_33
LBB0_26:
	movq	_EXPOSURE_DARK@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_27:
	movq	_VERY_LOW_EXP@GOTPCREL(%rip), %rcx
	movq	(%r15), %rax
	cmpl	(%rcx), %r12d
	jle	LBB0_31
## %bb.28:
	movq	_EXPOSURE_LIGHT@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_29:
	movq	_EXPOSURE_DARK@GOTPCREL(%rip), %rcx
	jmp	LBB0_21
LBB0_30:
	movq	_EXPOSURE_VERY_LIGHT@GOTPCREL(%rip), %rcx
LBB0_9:
	movq	(%rcx), %rcx
	cmpq	%rax, %rcx
	jne	LBB0_32
LBB0_22:
	incl	8(%r15)
	jmp	LBB0_33
LBB0_31:
	movq	_EXPOSURE_VERY_LIGHT@GOTPCREL(%rip), %rcx
LBB0_21:
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	je	LBB0_22
LBB0_32:
	movq	%rcx, (%r15)
	movl	$1, 8(%r15)
LBB0_33:
	leaq	80(%r15), %rdi
	callq	_atomic_read
                                        ## kill: def $eax killed $eax def $rax
	leal	-31(%rax), %ecx
	cmpl	$-30, %ecx
	movl	$1, %ecx
	cmovael	%eax, %ecx
	movq	(%r15), %rax
	movq	_EXPOSURE_VERY_DARK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%bl
	movq	_EXPOSURE_DARK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%dl
	orb	%bl, %dl
	cmpl	$0, 68(%r15)
	je	LBB0_46
## %bb.34:
	testb	%dl, %dl
	je	LBB0_39
## %bb.35:
	movq	_DARK_TIME@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	%ecx, %edx
	cmpl	%edx, 8(%r15)
	jl	LBB0_39
## %bb.36:
	movl	48(%r15), %edx
	cmpl	$1, %edx
	jg	LBB0_39
## %bb.37:
	incl	%edx
	movl	%edx, 48(%r15)
	movq	32(%r15), %rax
	testq	%rax, %rax
	jle	LBB0_58
## %bb.38:
	decq	%rax
	movq	%rax, 32(%r15)
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_45
LBB0_39:
	movq	_EXPOSURE_VERY_LIGHT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_41
## %bb.40:
	movq	_EXPOSURE_LIGHT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_2
LBB0_41:
	movq	_LIGHT_TIME@GOTPCREL(%rip), %rax
	imull	(%rax), %ecx
	cmpl	%ecx, 8(%r15)
	jl	LBB0_2
## %bb.42:
	movl	48(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.43:
	decl	%eax
	movl	%eax, 48(%r15)
	movq	32(%r15), %rax
	movslq	40(%r15), %rcx
	decq	%rcx
	cmpq	%rcx, %rax
	jge	LBB0_57
## %bb.44:
	incq	%rax
	movq	%rax, 32(%r15)
	leaq	L_.str.2(%rip), %rdx
LBB0_45:
	movq	_EXPOSURE_NORMAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gspca_dbg
	movq	%r15, %rdi
	callq	_command_setexposure
	jmp	LBB0_60
LBB0_46:
	testb	%dl, %dl
	je	LBB0_51
## %bb.47:
	movq	_DARK_TIME@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	%ecx, %edx
	cmpl	%edx, 8(%r15)
	jl	LBB0_51
## %bb.48:
	movslq	48(%r15), %rdx
	cmpq	$1, %rdx
	jg	LBB0_51
## %bb.49:
	leaq	1(%rdx), %rax
	movl	%eax, 48(%r15)
	movq	_flicker_jumps@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r15), %rcx
	movq	56(%r15), %rsi
	movq	(%rax,%rcx,8), %rax
	movq	(%rax,%rsi,8), %rax
	movl	8(%rax,%rdx,8), %ecx
	movl	%ecx, 64(%r15)
	movl	%r12d, %esi
	shrl	$31, %esi
	addl	%r12d, %esi
	sarl	%esi
	movl	$-1, %eax
	leaq	L_.str.1(%rip), %rdx
	.p2align	4, 0x90
LBB0_50:                                ## =>This Inner Loop Header: Depth=1
	addl	%ecx, %eax
	cmpl	%esi, %eax
	jl	LBB0_50
	jmp	LBB0_65
LBB0_51:
	movq	_EXPOSURE_VERY_LIGHT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_53
## %bb.52:
	movq	_EXPOSURE_LIGHT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_2
LBB0_53:
	movq	_LIGHT_TIME@GOTPCREL(%rip), %rax
	imull	(%rax), %ecx
	cmpl	%ecx, 8(%r15)
	jl	LBB0_2
## %bb.54:
	cmpl	$0, 48(%r15)
	jle	LBB0_2
## %bb.55:
	movl	$1, %edi
	movl	$2, %esi
	callq	_FIRMWARE_VERSION
	testq	%rax, %rax
	jne	LBB0_61
## %bb.56:
	movq	_MAX_EXP@GOTPCREL(%rip), %rax
	jmp	LBB0_62
LBB0_57:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_59
LBB0_58:
	leaq	L_.str.1(%rip), %rdx
LBB0_59:
	movq	_EXPOSURE_NORMAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gspca_dbg
LBB0_60:
	movq	%r15, %rdi
	callq	_command_setsensorfps
	jmp	LBB0_2
LBB0_61:
	movq	_MAX_EXP_102@GOTPCREL(%rip), %rax
LBB0_62:
	movl	(%rax), %ecx
	movslq	48(%r15), %rax
	leaq	-1(%rax), %rdx
	movl	%edx, 48(%r15)
	movq	_flicker_jumps@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	16(%r15), %rsi
	movq	56(%r15), %rdi
	movq	(%rdx,%rsi,8), %rdx
	movq	(%rdx,%rdi,8), %rdx
	movl	-8(%rdx,%rax,8), %esi
	movl	%esi, 64(%r15)
	addl	%r12d, %r12d
	leal	(%rsi,%rsi), %edi
	movl	$-1, %ebx
	leaq	L_.str.2(%rip), %rdx
	.p2align	4, 0x90
LBB0_63:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rsi,%rbx), %eax
	cmpl	%r12d, %eax
	jge	LBB0_65
## %bb.64:                              ##   in Loop: Header=BB0_63 Depth=1
	addl	%edi, %ebx
	cmpl	%ecx, %ebx
	movl	%eax, %ebx
	jl	LBB0_63
LBB0_65:
	movzbl	%al, %ecx
	movl	%ecx, 28(%r15)
	sarl	$8, %eax
	movl	%eax, 24(%r15)
	movq	_EXPOSURE_NORMAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	_D_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_gspca_dbg
	movq	%r15, %rdi
	callq	_command_setexposure
	movq	%r15, %rdi
	callq	_command_setsensorfps
	movq	%r15, %rdi
	callq	_command_setflickerctrl
	jmp	LBB0_2
LBB0_66:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CPIA_COMMAND_ReadVPRegs,4,2    ## @CPIA_COMMAND_ReadVPRegs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ReadVPRegs(30,4,9,8) - failed: %d\n"

	.comm	_TC,4,2                         ## @TC
	.comm	_EXP_ACC_LIGHT,4,2              ## @EXP_ACC_LIGHT
	.comm	_EXP_ACC_DARK,4,2               ## @EXP_ACC_DARK
	.comm	_MAX_COMP,4,2                   ## @MAX_COMP
	.comm	_HIGH_COMP_102,4,2              ## @HIGH_COMP_102
	.comm	_EXPOSURE_VERY_DARK,8,3         ## @EXPOSURE_VERY_DARK
	.comm	_EXPOSURE_DARK,8,3              ## @EXPOSURE_DARK
	.comm	_LOW_EXP,4,2                    ## @LOW_EXP
	.comm	_VERY_LOW_EXP,4,2               ## @VERY_LOW_EXP
	.comm	_EXPOSURE_VERY_LIGHT,8,3        ## @EXPOSURE_VERY_LIGHT
	.comm	_EXPOSURE_LIGHT,8,3             ## @EXPOSURE_LIGHT
	.comm	_EXPOSURE_NORMAL,8,3            ## @EXPOSURE_NORMAL
	.comm	_MAX_EXP,4,2                    ## @MAX_EXP
	.comm	_DARK_TIME,4,2                  ## @DARK_TIME
	.comm	_flicker_jumps,8,3              ## @flicker_jumps
	.comm	_D_CONF,4,2                     ## @D_CONF
L_.str.1:                               ## @.str.1
	.asciz	"Automatically decreasing sensor_fps\n"

	.comm	_LIGHT_TIME,4,2                 ## @LIGHT_TIME
	.comm	_MAX_EXP_102,4,2                ## @MAX_EXP_102
L_.str.2:                               ## @.str.2
	.asciz	"Automatically increasing sensor_fps\n"

	.no_dead_strip	_monitor_exposure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function monitor_exposure
lCPI0_0:
	.long	30                              ; 0x1e
	.long	4                               ; 0x4
	.long	9                               ; 0x9
	.long	8                               ; 0x8
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	8                               ; 0x8
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_monitor_exposure:                      ; @monitor_exposure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _CPIA_COMMAND_ReadVPRegs@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CPIA_COMMAND_ReadVPRegs@GOTPAGEOFF]
	str	x8, [sp, #40]
Lloh5:
	ldr	w8, [x9]
	asr	w9, w8, #8
	and	w8, w8, #0xff
	stp	w9, w8, [sp, #8]
Lloh6:
	adrp	x8, lCPI0_0@PAGE
Lloh7:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [sp, #16]
Lloh8:
	adrp	x8, lCPI0_1@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #32]
	add	x1, sp, #8
	bl	_cpia_usb_transferCmd
	cbz	w0, LBB0_4
; %bb.1:
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_2:
	ldr	x8, [sp, #40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_66
; %bb.3:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
	ldr	x8, [x19]
	ldr	w23, [x8]
Lloh15:
	adrp	x9, _TC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TC@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	ldp	w11, w10, [x19, #68]
	add	w9, w10, w9
	sub	w9, w9, #50
Lloh18:
	adrp	x10, _EXP_ACC_LIGHT@GOTPAGE
Lloh19:
	ldr	x10, [x10, _EXP_ACC_LIGHT@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	add	w10, w9, w10
	mov	w12, #255
	cmp	w10, #255
	csel	w24, w10, w12, lt
Lloh21:
	adrp	x10, _EXP_ACC_DARK@GOTPAGE
Lloh22:
	ldr	x10, [x10, _EXP_ACC_DARK@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	sub	w9, w9, w10
	cmp	w9, #0
	csel	w26, w9, wzr, gt
	lsr	w25, w26, #1
	ldp	w9, w10, [x19, #24]
	add	w20, w10, w9, lsl #8
Lloh24:
	adrp	x22, _EXPOSURE_VERY_DARK@GOTPAGE
Lloh25:
	ldr	x22, [x22, _EXPOSURE_VERY_DARK@GOTPAGEOFF]
Lloh26:
	adrp	x21, _EXPOSURE_DARK@GOTPAGE
Lloh27:
	ldr	x21, [x21, _EXPOSURE_DARK@GOTPAGEOFF]
	cbz	w11, LBB0_10
; %bb.5:
Lloh28:
	adrp	x9, _MAX_EXP@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MAX_EXP@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w20, w9
	b.lt	LBB0_14
; %bb.6:
	cmp	w23, w26
	b.ge	LBB0_14
; %bb.7:
	cmp	w23, w25
	b.ge	LBB0_21
; %bb.8:
	ldr	x9, [x22]
	cmp	x9, x8
	b.eq	LBB0_27
LBB0_9:
	str	x9, [x19]
	mov	w8, #1
	b	LBB0_28
LBB0_10:
	ldr	w27, [x8, #4]
	mov	w0, #1
	mov	w1, #2
	bl	_FIRMWARE_VERSION
Lloh31:
	adrp	x8, _MAX_COMP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MAX_COMP@GOTPAGEOFF]
Lloh33:
	adrp	x9, _HIGH_COMP_102@GOTPAGE
Lloh34:
	ldr	x9, [x9, _HIGH_COMP_102@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	add	w9, w27, #128
	cmp	w9, w8
	b.lt	LBB0_18
; %bb.11:
	cmp	w23, w26
	b.ge	LBB0_18
; %bb.12:
	ldr	x8, [x19]
	cmp	w23, w25
	b.ge	LBB0_24
; %bb.13:
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_9
	b	LBB0_27
LBB0_14:
Lloh35:
	adrp	x9, _LOW_EXP@GOTPAGE
Lloh36:
	ldr	x9, [x9, _LOW_EXP@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	cmp	w20, w9
	b.le	LBB0_16
; %bb.15:
	cmp	w23, w24
	b.le	LBB0_20
LBB0_16:
Lloh38:
	adrp	x9, _VERY_LOW_EXP@GOTPAGE
Lloh39:
	ldr	x9, [x9, _VERY_LOW_EXP@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	cmp	w20, w9
	b.le	LBB0_25
; %bb.17:
Lloh41:
	adrp	x9, _EXPOSURE_LIGHT@GOTPAGE
Lloh42:
	ldr	x9, [x9, _EXPOSURE_LIGHT@GOTPAGEOFF]
	b	LBB0_26
LBB0_18:
Lloh43:
	adrp	x8, _LOW_EXP@GOTPAGE
Lloh44:
	ldr	x8, [x8, _LOW_EXP@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	cmp	w20, w8
	b.le	LBB0_22
; %bb.19:
	cmp	w23, w24
	b.gt	LBB0_22
LBB0_20:
Lloh46:
	adrp	x8, _EXPOSURE_NORMAL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EXPOSURE_NORMAL@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_29
LBB0_21:
	ldr	x9, [x21]
	cmp	x9, x8
	b.eq	LBB0_27
	b	LBB0_9
LBB0_22:
Lloh49:
	adrp	x8, _VERY_LOW_EXP@GOTPAGE
Lloh50:
	ldr	x8, [x8, _VERY_LOW_EXP@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x8]
	ldr	x8, [x19]
	cmp	w20, w9
	b.le	LBB0_57
; %bb.23:
Lloh52:
	adrp	x9, _EXPOSURE_LIGHT@GOTPAGE
Lloh53:
	ldr	x9, [x9, _EXPOSURE_LIGHT@GOTPAGEOFF]
	b	LBB0_58
LBB0_24:
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_9
	b	LBB0_27
LBB0_25:
Lloh54:
	adrp	x9, _EXPOSURE_VERY_LIGHT@GOTPAGE
Lloh55:
	ldr	x9, [x9, _EXPOSURE_VERY_LIGHT@GOTPAGEOFF]
LBB0_26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
LBB0_27:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
LBB0_28:
	str	w8, [x19, #8]
LBB0_29:
	add	x0, x19, #80
	bl	_atomic_read
	sub	w8, w0, #31
	cmn	w8, #30
	csinc	w8, w0, wzr, hs
	ldr	w11, [x19, #68]
	ldr	x9, [x19]
	ldr	x10, [x22]
	cmp	x9, x10
	ldr	x10, [x21]
	ccmp	x9, x10, #4, ne
	cset	w10, eq
	cbz	w11, LBB0_42
; %bb.30:
	cbz	w10, LBB0_35
; %bb.31:
	ldr	w10, [x19, #8]
Lloh56:
	adrp	x11, _DARK_TIME@GOTPAGE
Lloh57:
	ldr	x11, [x11, _DARK_TIME@GOTPAGEOFF]
Lloh58:
	ldr	w11, [x11]
	mul	w11, w11, w8
	cmp	w10, w11
	b.lt	LBB0_35
; %bb.32:
	ldr	w10, [x19, #48]
	cmp	w10, #1
	b.gt	LBB0_35
; %bb.33:
	add	w8, w10, #1
	str	w8, [x19, #48]
	ldr	x8, [x19, #32]
	subs	x8, x8, #1
	b.lt	LBB0_63
; %bb.34:
	str	x8, [x19, #32]
Lloh59:
	adrp	x2, l_.str.1@PAGE
Lloh60:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_41
LBB0_35:
Lloh61:
	adrp	x10, _EXPOSURE_VERY_LIGHT@GOTPAGE
Lloh62:
	ldr	x10, [x10, _EXPOSURE_VERY_LIGHT@GOTPAGEOFF]
Lloh63:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_37
; %bb.36:
Lloh64:
	adrp	x10, _EXPOSURE_LIGHT@GOTPAGE
Lloh65:
	ldr	x10, [x10, _EXPOSURE_LIGHT@GOTPAGEOFF]
Lloh66:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
LBB0_37:
	ldr	w9, [x19, #8]
Lloh67:
	adrp	x10, _LIGHT_TIME@GOTPAGE
Lloh68:
	ldr	x10, [x10, _LIGHT_TIME@GOTPAGEOFF]
Lloh69:
	ldr	w10, [x10]
	mul	w8, w10, w8
	cmp	w9, w8
	b.lt	LBB0_2
; %bb.38:
	ldr	w8, [x19, #48]
	subs	w8, w8, #1
	b.lt	LBB0_2
; %bb.39:
	str	w8, [x19, #48]
	ldr	x8, [x19, #32]
	ldrsw	x9, [x19, #40]
	sub	x9, x9, #1
	cmp	x8, x9
	b.ge	LBB0_59
; %bb.40:
	add	x8, x8, #1
	str	x8, [x19, #32]
Lloh70:
	adrp	x2, l_.str.2@PAGE
Lloh71:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_41:
Lloh72:
	adrp	x8, _EXPOSURE_NORMAL@GOTPAGE
Lloh73:
	ldr	x8, [x8, _EXPOSURE_NORMAL@GOTPAGEOFF]
Lloh74:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh75:
	adrp	x8, _D_CONF@GOTPAGE
Lloh76:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh77:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gspca_dbg
	mov	x0, x19
	bl	_command_setexposure
	b	LBB0_65
LBB0_42:
	cbz	w10, LBB0_50
; %bb.43:
	ldr	w10, [x19, #8]
Lloh78:
	adrp	x11, _DARK_TIME@GOTPAGE
Lloh79:
	ldr	x11, [x11, _DARK_TIME@GOTPAGEOFF]
Lloh80:
	ldr	w11, [x11]
	mul	w11, w11, w8
	cmp	w10, w11
	b.lt	LBB0_50
; %bb.44:
	ldr	w10, [x19, #48]
	cmp	w10, #1
	b.gt	LBB0_50
; %bb.45:
	add	w11, w10, #1
Lloh81:
	adrp	x8, _flicker_jumps@GOTPAGE
Lloh82:
	ldr	x8, [x8, _flicker_jumps@GOTPAGEOFF]
Lloh83:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x9, [x19, #56]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8, w11, sxtw #3]
	cmp	w20, #0
	cinc	w9, w20, lt
	subs	w10, w8, #1
	asr	w9, w9, #1
	csinc	w12, w8, wzr, hi
	cmp	w9, w10
	csel	w13, w9, w10, gt
	add	w13, w13, #1
	cmp	w13, w8
	cinc	w14, w8, ne
	sub	w14, w13, w14
	cmp	w13, w8
	str	w11, [x19, #48]
	str	w8, [x19, #64]
	udiv	w11, w14, w12
	cinc	w11, w11, ne
	add	w12, w11, #1
	mov	x11, x10
	cmp	w12, #4
	b.lo	LBB0_60
; %bb.46:
	mov	w14, #0
	and	w13, w12, #0xfffffffc
	madd	w11, w13, w8, w10
LBB0_47:                                ; =>This Inner Loop Header: Depth=1
	add	w14, w14, #4
	cmp	w14, w13
	b.ne	LBB0_47
; %bb.48:
	cmp	w12, w13
	b.ne	LBB0_60
; %bb.49:
	sub	w9, w13, #1
	mul	w8, w9, w8
	add	w10, w10, w8
Lloh84:
	adrp	x2, l_.str.1@PAGE
Lloh85:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_62
LBB0_50:
Lloh86:
	adrp	x10, _EXPOSURE_VERY_LIGHT@GOTPAGE
Lloh87:
	ldr	x10, [x10, _EXPOSURE_VERY_LIGHT@GOTPAGEOFF]
Lloh88:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_52
; %bb.51:
Lloh89:
	adrp	x10, _EXPOSURE_LIGHT@GOTPAGE
Lloh90:
	ldr	x10, [x10, _EXPOSURE_LIGHT@GOTPAGEOFF]
Lloh91:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
LBB0_52:
	ldr	w9, [x19, #8]
Lloh92:
	adrp	x10, _LIGHT_TIME@GOTPAGE
Lloh93:
	ldr	x10, [x10, _LIGHT_TIME@GOTPAGEOFF]
Lloh94:
	ldr	w10, [x10]
	mul	w8, w10, w8
	cmp	w9, w8
	b.lt	LBB0_2
; %bb.53:
	ldr	w8, [x19, #48]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.54:
	mov	w0, #1
	mov	w1, #2
	bl	_FIRMWARE_VERSION
Lloh95:
	adrp	x8, _MAX_EXP_102@GOTPAGE
Lloh96:
	ldr	x8, [x8, _MAX_EXP_102@GOTPAGEOFF]
Lloh97:
	adrp	x9, _MAX_EXP@GOTPAGE
Lloh98:
	ldr	x9, [x9, _MAX_EXP@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	ldrsw	x9, [x19, #48]
	sub	x9, x9, #1
	str	w9, [x19, #48]
Lloh99:
	adrp	x10, _flicker_jumps@GOTPAGE
Lloh100:
	ldr	x10, [x10, _flicker_jumps@GOTPAGEOFF]
Lloh101:
	ldr	x10, [x10]
	ldr	x11, [x19, #16]
	ldr	x10, [x10, x11, lsl #3]
	ldr	x11, [x19, #56]
	ldr	x10, [x10, x11, lsl #3]
	ldr	x9, [x10, x9, lsl #3]
	str	w9, [x19, #64]
	lsl	w11, w20, #1
	lsl	w12, w9, #1
	mov	w13, #-1
Lloh102:
	adrp	x2, l_.str.2@PAGE
Lloh103:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_55:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w9, w13
	cmp	w10, w11
	b.ge	LBB0_62
; %bb.56:                               ;   in Loop: Header=BB0_55 Depth=1
	add	w13, w12, w13
	cmp	w13, w8
	mov	x13, x10
	b.lt	LBB0_55
	b	LBB0_62
LBB0_57:
Lloh104:
	adrp	x9, _EXPOSURE_VERY_LIGHT@GOTPAGE
Lloh105:
	ldr	x9, [x9, _EXPOSURE_VERY_LIGHT@GOTPAGEOFF]
LBB0_58:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
	b	LBB0_27
LBB0_59:
Lloh106:
	adrp	x2, l_.str.2@PAGE
Lloh107:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_64
LBB0_60:
	sub	w10, w11, w8
Lloh108:
	adrp	x2, l_.str.1@PAGE
Lloh109:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_61:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w10, w8
	cmp	w10, w9
	b.lt	LBB0_61
LBB0_62:
	and	w8, w10, #0xff
	asr	w9, w10, #8
Lloh110:
	adrp	x10, _EXPOSURE_NORMAL@GOTPAGE
Lloh111:
	ldr	x10, [x10, _EXPOSURE_NORMAL@GOTPAGEOFF]
	stp	w9, w8, [x19, #24]
Lloh112:
	ldr	x8, [x10]
	str	x8, [x19]
Lloh113:
	adrp	x8, _D_CONF@GOTPAGE
Lloh114:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh115:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gspca_dbg
	mov	x0, x19
	bl	_command_setexposure
	mov	x0, x19
	bl	_command_setsensorfps
	mov	x0, x19
	bl	_command_setflickerctrl
	b	LBB0_2
LBB0_63:
Lloh116:
	adrp	x2, l_.str.1@PAGE
Lloh117:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_64:
Lloh118:
	adrp	x8, _EXPOSURE_NORMAL@GOTPAGE
Lloh119:
	ldr	x8, [x8, _EXPOSURE_NORMAL@GOTPAGEOFF]
Lloh120:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh121:
	adrp	x8, _D_CONF@GOTPAGE
Lloh122:
	ldr	x8, [x8, _D_CONF@GOTPAGEOFF]
Lloh123:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gspca_dbg
LBB0_65:
	mov	x0, x19
	bl	_command_setsensorfps
	b	LBB0_2
LBB0_66:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpAdrp	Lloh6, Lloh8
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpAdd	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpAdd	Lloh102, Lloh103
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpLdrGot	Lloh97, Lloh98
	.loh AdrpLdrGot	Lloh95, Lloh96
	.loh AdrpLdrGot	Lloh104, Lloh105
	.loh AdrpAdd	Lloh106, Lloh107
	.loh AdrpAdd	Lloh108, Lloh109
	.loh AdrpLdrGotLdr	Lloh113, Lloh114, Lloh115
	.loh AdrpLdrGotLdr	Lloh110, Lloh111, Lloh112
	.loh AdrpAdd	Lloh116, Lloh117
	.loh AdrpLdrGotLdr	Lloh121, Lloh122, Lloh123
	.loh AdrpLdrGotLdr	Lloh118, Lloh119, Lloh120
	.cfi_endproc
                                        ; -- End function
	.comm	_CPIA_COMMAND_ReadVPRegs,4,2    ; @CPIA_COMMAND_ReadVPRegs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ReadVPRegs(30,4,9,8) - failed: %d\n"

	.comm	_TC,4,2                         ; @TC
	.comm	_EXP_ACC_LIGHT,4,2              ; @EXP_ACC_LIGHT
	.comm	_EXP_ACC_DARK,4,2               ; @EXP_ACC_DARK
	.comm	_MAX_COMP,4,2                   ; @MAX_COMP
	.comm	_HIGH_COMP_102,4,2              ; @HIGH_COMP_102
	.comm	_EXPOSURE_VERY_DARK,8,3         ; @EXPOSURE_VERY_DARK
	.comm	_EXPOSURE_DARK,8,3              ; @EXPOSURE_DARK
	.comm	_LOW_EXP,4,2                    ; @LOW_EXP
	.comm	_VERY_LOW_EXP,4,2               ; @VERY_LOW_EXP
	.comm	_EXPOSURE_VERY_LIGHT,8,3        ; @EXPOSURE_VERY_LIGHT
	.comm	_EXPOSURE_LIGHT,8,3             ; @EXPOSURE_LIGHT
	.comm	_EXPOSURE_NORMAL,8,3            ; @EXPOSURE_NORMAL
	.comm	_MAX_EXP,4,2                    ; @MAX_EXP
	.comm	_DARK_TIME,4,2                  ; @DARK_TIME
	.comm	_flicker_jumps,8,3              ; @flicker_jumps
	.comm	_D_CONF,4,2                     ; @D_CONF
l_.str.1:                               ; @.str.1
	.asciz	"Automatically decreasing sensor_fps\n"

	.comm	_LIGHT_TIME,4,2                 ; @LIGHT_TIME
	.comm	_MAX_EXP_102,4,2                ; @MAX_EXP_102
l_.str.2:                               ; @.str.2
	.asciz	"Automatically increasing sensor_fps\n"

	.no_dead_strip	_monitor_exposure
.subsections_via_symbols
