	.file	"extr_spca561.c_setexposure.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	setexposure, @function
setexposure:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	sub	rsp, 32
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	r14, rsp
	movabs	rax, 1932735283200
	mov	QWORD PTR [rsp], rax
	movabs	rax, 2684354560550
	mov	QWORD PTR 8[rsp], rax
	mov	eax, DWORD PTR EXPOSURE_MAX[rip]
	mov	DWORD PTR 16[rsp], eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L5:
	add	rbx, 1
	cmp	DWORD PTR [r14+rbx*4], ebp
	jge	.L12
.L2:
	mov	rdi, r14
	mov	r12d, ebx
	call	ARRAY_SIZE@PLT
	sub	eax, 1
	cmp	eax, ebx
	jg	.L5
	xor	edx, edx
	xor	r12d, r12d
.L4:
	mov	rax, QWORD PTR 0[r13]
	mov	esi, 33545
	mov	rdi, r13
	mov	DWORD PTR 4[rax], edx
	mov	edx, 2
	mov	DWORD PTR [rax], r12d
	call	reg_w_buf@PLT
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 32
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	movsx	rax, r12d
	sub	ebp, DWORD PTR [rsp+rax*4]
	test	r12d, r12d
	lea	eax, 300[rbp]
	cmovne	ebp, eax
	sal	r12d, 11
	or	r12d, ebp
	mov	edx, r12d
	sar	edx, 8
	jmp	.L4
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	setexposure, .-setexposure
	.comm	EXPOSURE_MAX,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_spca561.c_setexposure.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	setexposure, %function
setexposure:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, #0
	ldr	r3, .L15
	mov	r6, r1
	ldr	r3, [r3]
	ldr	r1, .L15+4
	sub	sp, sp, #28
	ldr	r1, [r1]
	str	r1, [sp, #20]
	mov	r1,#0
	ldr	ip, .L15+8
	ldr	r2, .L15+12
	str	r3, [sp, #16]
	ldr	r3, .L15+16
	mov	r7, r0
	stm	sp, {r4, ip}
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	add	r5, sp, #4
	b	.L2
.L5:
	ldr	r3, [r5], #4
	add	r2, r4, #1
	cmp	r3, r6
	bge	.L13
	mov	r4, r2
.L2:
	mov	r0, sp
	bl	ARRAY_SIZE
	sub	r0, r0, #1
	cmp	r0, r4
	bgt	.L5
	mov	r2, #0
	mov	r4, r2
.L4:
	ldr	r3, [r7]
	mov	r0, r7
	str	r2, [r3, #4]
	str	r4, [r3]
	mov	r2, #2
	ldr	r1, .L15+20
	bl	reg_w_buf
	ldr	r3, .L15+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	add	r3, sp, #24
	add	r3, r3, r4, lsl #2
	ldr	r3, [r3, #-24]
	cmp	r4, #0
	sub	r6, r6, r3
	addne	r6, r6, #300
	orr	r4, r6, r4, lsl #11
	asr	r2, r4, #8
	b	.L4
.L14:
	bl	__stack_chk_fail
.L16:
	.align	2
.L15:
	.word	EXPOSURE_MAX
	.word	.LC0
	.word	450
	.word	550
	.word	625
	.word	33545
	.size	setexposure, .-setexposure
	.comm	EXPOSURE_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
