	.file	"extr_v4l2-common.c_v4l2_find_nearest_format.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	v4l2_find_nearest_format
	.type	v4l2_find_nearest_format, @function
v4l2_find_nearest_format:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rbp, QWORD PTR UINT_MAX[rip]
	mov	QWORD PTR [rsp], rsi
	test	rdi, rdi
	je	.L6
	mov	eax, DWORD PTR [rdi]
	mov	r12, QWORD PTR 8[rdi]
	mov	rbx, rdi
	test	eax, eax
	jle	.L6
	mov	QWORD PTR 8[rsp], 0
	mov	r13, rdx
	xor	r14d, r14d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	add	r14d, 1
	add	r12, 16
	cmp	DWORD PTR [rbx], r14d
	jle	.L1
.L4:
	mov	rdi, QWORD PTR 8[r12]
	sub	rdi, QWORD PTR [rsp]
	call	abs@PLT
	mov	rdi, QWORD PTR [r12]
	mov	r15, rax
	sub	rdi, r13
	call	abs@PLT
	add	rax, r15
	cmp	rax, rbp
	jge	.L3
	mov	QWORD PTR 8[rsp], r12
	mov	rbp, rax
.L3:
	test	rax, rax
	jne	.L13
.L1:
	mov	rax, QWORD PTR 8[rsp]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	QWORD PTR 8[rsp], 0
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	v4l2_find_nearest_format, .-v4l2_find_nearest_format
	.comm	UINT_MAX,8,8
	.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_v4l2-common.c_v4l2_find_nearest_format.c"
	.text
	.align	2
	.global	v4l2_find_nearest_format
	.syntax unified
	.arm
	.fpu softvfp
	.type	v4l2_find_nearest_format, %function
v4l2_find_nearest_format:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L14
	cmp	r0, #0
	push	{r4, r5, r6, r7, lr}
	ldr	r5, [r3]
	popeq	{r4, r5, r6, r7, pc}
	ldr	r7, [r0]
	ldr	r6, [r0, #4]
	cmp	r7, #0
	mov	r0, #0
	pople	{r4, r5, r6, r7, pc}
	mov	r4, r6
	mov	lr, r0
.L4:
	ldr	r3, [r4, #4]
	ldr	ip, [r6, lr, lsl #3]
	sub	r3, r3, r1
	sub	ip, ip, r2
	cmp	r3, #0
	rsblt	r3, r3, #0
	cmp	ip, #0
	rsblt	ip, ip, #0
	add	r3, r3, ip
	cmp	r3, r5
	movlt	r0, r4
	movlt	r5, r3
	cmp	r3, #0
	add	lr, lr, #1
	popeq	{r4, r5, r6, r7, pc}
	cmp	lr, r7
	add	r4, r4, #8
	bne	.L4
	pop	{r4, r5, r6, r7, pc}
.L15:
	.align	2
.L14:
	.word	UINT_MAX
	.size	v4l2_find_nearest_format, .-v4l2_find_nearest_format
	.comm	UINT_MAX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
