	.file	"extr_ov2659.c_ov2659_set_fmt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ov2659_set_fmt\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"failed to set link_frequency rate (%d)\n"
	.text
	.p2align 4
	.type	ov2659_set_fmt, @function
ov2659_set_fmt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	v4l2_get_subdevdata@PLT
	mov	rdi, QWORD PTR ov2659_formats[rip]
	mov	rbp, rax
	call	ARRAY_SIZE@PLT
	mov	rdi, r12
	mov	QWORD PTR [rsp], 0
	mov	ebx, eax
	call	to_ov2659@PLT
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	mov	r13, rax
	call	dev_dbg@PLT
	mov	rsi, rsp
	lea	rdi, 8[r14]
	call	__ov2659_try_frame_size@PLT
	mov	rdx, QWORD PTR ov2659_formats[rip]
	movsx	rax, ebx
	sal	rax, 4
	add	rax, rdx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rcx, QWORD PTR -16[rax]
	sub	rax, 16
	cmp	rcx, QWORD PTR 8[r14]
	je	.L3
.L2:
	sub	ebx, 1
	jns	.L4
	mov	rax, QWORD PTR [rdx]
	xor	ebx, ebx
	mov	QWORD PTR 8[r14], rax
.L3:
	mov	eax, DWORD PTR V4L2_COLORSPACE_SRGB[rip]
	mov	rdi, r13
	mov	DWORD PTR 20[r14], eax
	mov	eax, DWORD PTR V4L2_FIELD_NONE[rip]
	mov	DWORD PTR 16[r14], eax
	call	mutex_lock@PLT
	mov	rax, QWORD PTR V4L2_SUBDEV_FORMAT_TRY[rip]
	cmp	QWORD PTR [r14], rax
	je	.L11
	cmp	QWORD PTR 48[r13], 0
	jne	.L15
	movsx	rbx, ebx
	mov	rax, QWORD PTR [rsp]
	movdqu	xmm0, XMMWORD PTR 8[r14]
	sal	rbx, 4
	add	rbx, QWORD PTR ov2659_formats[rip]
	mov	edx, DWORD PTR 8[rbx]
	mov	QWORD PTR 40[r13], rax
	movups	XMMWORD PTR 16[r13], xmm0
	mov	rax, QWORD PTR 16[r13]
	cmp	rax, QWORD PTR MEDIA_BUS_FMT_SBGGR8_1X8[rip]
	mov	DWORD PTR 32[r13], edx
	mov	rdx, QWORD PTR 8[r13]
	mov	esi, DWORD PTR [rdx]
	je	.L9
	mov	eax, esi
	shr	eax, 31
	add	esi, eax
	sar	esi
.L9:
	mov	edi, DWORD PTR 4[r13]
	call	v4l2_ctrl_s_ctrl_int64@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L16
.L6:
	mov	rdi, r13
	call	mutex_unlock@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	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
.L11:
	.cfi_restore_state
	xor	r12d, r12d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	edx, eax
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	call	dev_warn@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, r13
	call	mutex_unlock@PLT
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ov2659_set_fmt, .-ov2659_set_fmt
	.comm	ov2659_formats,8,8
	.comm	V4L2_SUBDEV_FORMAT_TRY,8,8
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_COLORSPACE_SRGB,4,4
	.comm	MEDIA_BUS_FMT_SBGGR8_1X8,8,8
	.comm	EBUSY,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_ov2659.c_ov2659_set_fmt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ov2659_set_fmt\012\000"
	.align	2
.LC1:
	.ascii	"failed to set link_frequency rate (%d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ov2659_set_fmt, %function
ov2659_set_fmt:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L18
	sub	sp, sp, #12
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r7, r0
	bl	v4l2_get_subdevdata
	ldr	r8, .L18+4
	mov	r6, r0
	ldr	r0, [r8]
	bl	ARRAY_SIZE
	mov	r3, #0
	mov	r4, r0
	mov	r0, r7
	str	r3, [sp]
	bl	to_ov2659
	add	r7, r5, #4
	ldr	r1, .L18+8
	mov	r9, r0
	mov	r0, r6
	bl	dev_dbg
	mov	r0, r7
	mov	r1, sp
	bl	__ov2659_try_frame_size
	ldr	r2, [r8]
	b	.L2
.L4:
	ldr	r1, [r2, r4, lsl #3]
	ldr	r3, [r5, #4]
	cmp	r1, r3
	beq	.L3
.L2:
	subs	r4, r4, #1
	bpl	.L4
	mov	r4, #0
	ldr	r3, [r2]
	str	r3, [r5, #4]
.L3:
	ldr	r2, .L18+12
	ldr	r3, .L18+16
	ldr	r2, [r2]
	ldr	r3, [r3]
	str	r2, [r5, #12]
	str	r3, [r5, #8]
	mov	r0, r9
	bl	mutex_lock
	ldr	r3, .L18+20
	ldr	r2, [r5]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L11
	ldr	r3, [r9, #32]
	cmp	r3, #0
	bne	.L15
	ldr	r2, [sp]
	add	r3, r9, #12
	str	r2, [r9, #28]
	ldm	r7, {r0, r1, r2}
	stm	r3, {r0, r1, r2}
	ldr	r3, [r8]
	ldr	r2, .L18+24
	add	r4, r3, r4, lsl #3
	ldr	r1, [r2]
	ldr	r3, [r9, #8]
	cmp	r0, r1
	ldr	r1, [r3]
	ldr	r2, [r4, #4]
	addne	r1, r1, r1, lsr #31
	asrne	r1, r1, #1
	ldr	r0, [r9, #4]
	str	r2, [r9, #24]
	bl	v4l2_ctrl_s_ctrl_int64
	subs	r4, r0, #0
	blt	.L16
.L6:
	mov	r0, r9
	bl	mutex_unlock
.L1:
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L11:
	mov	r4, #0
	b	.L6
.L16:
	mov	r0, r6
	mov	r2, r4
	ldr	r1, .L18+28
	bl	dev_warn
	b	.L6
.L15:
	mov	r0, r9
	bl	mutex_unlock
	ldr	r3, .L18+32
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	.LC2
	.word	ov2659_formats
	.word	.LC0
	.word	V4L2_COLORSPACE_SRGB
	.word	V4L2_FIELD_NONE
	.word	V4L2_SUBDEV_FORMAT_TRY
	.word	MEDIA_BUS_FMT_SBGGR8_1X8
	.word	.LC1
	.word	EBUSY
	.size	ov2659_set_fmt, .-ov2659_set_fmt
	.comm	ov2659_formats,4,4
	.comm	V4L2_SUBDEV_FORMAT_TRY,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_COLORSPACE_SRGB,4,4
	.comm	MEDIA_BUS_FMT_SBGGR8_1X8,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
