	.file	"extr_cpia2_v4l.c_find_earliest_filled_buffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	find_earliest_filled_buffer, @function
find_earliest_filled_buffer:
.LFB0:
	.cfi_startproc
	endbr64
	mov	ecx, DWORD PTR [rdi]
	test	ecx, ecx
	jle	.L5
	mov	r9, QWORD PTR 8[rdi]
	mov	rsi, QWORD PTR FRAME_READY[rip]
	mov	r8d, -1
	xor	eax, eax
	lea	rdx, 8[r9]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	add	eax, 1
	add	rdx, 16
	cmp	eax, ecx
	je	.L1
.L4:
	cmp	QWORD PTR -8[rdx], rsi
	jne	.L3
	cmp	r8d, -1
	je	.L6
	movsx	rdi, r8d
	sal	rdi, 4
	mov	rdi, QWORD PTR 8[r9+rdi]
	cmp	QWORD PTR [rdx], rdi
	cmovl	r8d, eax
	add	eax, 1
	add	rdx, 16
	cmp	eax, ecx
	jne	.L4
.L1:
	mov	eax, r8d
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r8d, eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r8d, -1
	mov	eax, r8d
	ret
	.cfi_endproc
.LFE0:
	.size	find_earliest_filled_buffer, .-find_earliest_filled_buffer
	.comm	FRAME_READY,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_cpia2_v4l.c_find_earliest_filled_buffer.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_earliest_filled_buffer, %function
find_earliest_filled_buffer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, [r0]
	cmp	ip, #0
	ble	.L5
	mov	r2, r0
	push	{r4, r5, lr}
	ldr	r1, [r2, #4]
	ldr	lr, .L14
	mvn	r0, #0
	mov	r3, #0
	ldr	lr, [lr]
	add	r5, r1, #4
	b	.L4
.L3:
	add	r3, r3, #1
	cmp	r3, ip
	popeq	{r4, r5, pc}
.L4:
	ldr	r2, [r1, r3, lsl #3]
	cmp	r2, lr
	bne	.L3
	cmn	r0, #1
	add	r2, r1, r0, lsl #3
	moveq	r0, r3
	beq	.L3
	ldr	r2, [r2, #4]
	ldr	r4, [r5, r3, lsl #3]
	cmp	r4, r2
	movlt	r0, r3
	b	.L3
.L5:
	mvn	r0, #0
	bx	lr
.L15:
	.align	2
.L14:
	.word	FRAME_READY
	.size	find_earliest_filled_buffer, .-find_earliest_filled_buffer
	.comm	FRAME_READY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
