	.file	"extr_s5k3e2fx.c_s5k3e2fx_set_fps.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	s5k3e2fx_set_fps, @function
s5k3e2fx_set_fps:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	mov	eax, DWORD PTR [rdi]
	mov	rdx, QWORD PTR s5k3e2fx_ctrl[rip]
	mov	rsi, QWORD PTR S_RES_PREVIEW[rip]
	mov	DWORD PTR [rdx], eax
	mov	rdx, QWORD PTR s5k3e2fx_reg_pat[rip]
	mov	ecx, DWORD PTR [rdx+rsi*8]
	add	ecx, DWORD PTR 4[rdx+rsi*8]
	imul	eax, ecx
	mov	esi, DWORD PTR REG_FRAME_LENGTH_LINES_MSB[rip]
	test	eax, eax
	lea	edx, 1023[rax]
	cmovns	edx, eax
	mov	rax, QWORD PTR s5k3e2fx_client[rip]
	sar	edx, 18
	mov	edi, DWORD PTR [rax]
	movzx	edx, dl
	call	s5k3e2fx_i2c_write_b@PLT
	test	rax, rax
	js	.L1
	mov	rax, QWORD PTR s5k3e2fx_reg_pat[rip]
	mov	rcx, QWORD PTR S_RES_PREVIEW[rip]
	mov	esi, DWORD PTR REG_FRAME_LENGTH_LINES_LSB[rip]
	mov	edx, DWORD PTR [rax+rcx*8]
	add	edx, DWORD PTR 4[rax+rcx*8]
	mov	rax, QWORD PTR s5k3e2fx_ctrl[rip]
	imul	edx, DWORD PTR [rax]
	mov	eax, edx
	lea	edx, 1023[rdx]
	test	eax, eax
	cmovns	edx, eax
	mov	rax, QWORD PTR s5k3e2fx_client[rip]
	sar	edx, 10
	mov	edi, DWORD PTR [rax]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	and	edx, 65280
	jmp	s5k3e2fx_i2c_write_b@PLT
.L2:
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	s5k3e2fx_set_fps, .-s5k3e2fx_set_fps
	.comm	s5k3e2fx_reg_pat,8,8
	.comm	s5k3e2fx_ctrl,8,8
	.comm	s5k3e2fx_client,8,8
	.comm	S_RES_PREVIEW,8,8
	.comm	REG_FRAME_LENGTH_LINES_MSB,4,4
	.comm	REG_FRAME_LENGTH_LINES_LSB,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_s5k3e2fx.c_s5k3e2fx_set_fps.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	s5k3e2fx_set_fps, %function
s5k3e2fx_set_fps:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L5
	ldr	r7, .L5+4
	ldr	r3, [r6]
	ldr	ip, [r7]
	ldr	r1, [r0]
	add	r2, r3, ip, lsl #3
	ldr	r0, [r2, #4]
	ldr	r2, [r3, ip, lsl #3]
	ldr	r5, .L5+8
	add	r2, r2, r0
	mul	r2, r1, r2
	add	r3, r2, #1020
	cmp	r2, #0
	add	r3, r3, #3
	movlt	r2, r3
	ldr	r4, .L5+12
	ldr	r3, [r5]
	ldr	r0, .L5+16
	str	r1, [r3]
	ldr	r3, [r4]
	asr	r2, r2, #18
	ldr	r1, [r0]
	and	r2, r2, #255
	ldr	r0, [r3]
	bl	s5k3e2fx_i2c_write_b
	cmp	r0, #0
	poplt	{r4, r5, r6, r7, r8, pc}
	ldr	r1, [r7]
	ldr	r3, [r6]
	ldr	ip, [r5]
	add	r2, r3, r1, lsl #3
	ldr	r0, [r2, #4]
	ldr	r2, [r3, r1, lsl #3]
	ldr	r3, [ip]
	add	r2, r2, r0
	mul	r2, r3, r2
	add	r3, r2, #1020
	add	r3, r3, #3
	cmp	r2, #0
	movlt	r2, r3
	ldr	r1, [r4]
	ldr	r3, .L5+20
	asr	r2, r2, #10
	ldr	r0, [r1]
	and	r2, r2, #65280
	ldr	r1, [r3]
	pop	{r4, r5, r6, r7, r8, lr}
	b	s5k3e2fx_i2c_write_b
.L6:
	.align	2
.L5:
	.word	s5k3e2fx_reg_pat
	.word	S_RES_PREVIEW
	.word	s5k3e2fx_ctrl
	.word	s5k3e2fx_client
	.word	REG_FRAME_LENGTH_LINES_MSB
	.word	REG_FRAME_LENGTH_LINES_LSB
.L2:
	.size	s5k3e2fx_set_fps, .-s5k3e2fx_set_fps
	.comm	s5k3e2fx_reg_pat,4,4
	.comm	s5k3e2fx_ctrl,4,4
	.comm	s5k3e2fx_client,4,4
	.comm	S_RES_PREVIEW,4,4
	.comm	REG_FRAME_LENGTH_LINES_MSB,4,4
	.comm	REG_FRAME_LENGTH_LINES_LSB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
