	.file	"extr_et61x251_core.c_et61x251_request_buffers.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	et61x251_request_buffers, @function
et61x251_request_buffers:
.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
	mov	r13, rdi
	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, 8
	.cfi_def_cfa_offset 64
	cmp	QWORD PTR 16[rdi], 0
	mov	r15d, DWORD PTR 40[rdi]
	jne	.L2
	cmp	DWORD PTR IO_READ[rip], edx
	je	.L2
	mov	eax, DWORD PTR 24[rdi]
	imul	eax, DWORD PTR 28[rdi]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR 32[r13]
	imul	eax, DWORD PTR 36[r13]
.L13:
	imul	eax, r15d
	test	eax, eax
	lea	r15d, 7[rax]
	cmovs	eax, r15d
	sar	eax, 3
	cmp	QWORD PTR ET61X251_MAX_FRAMES[rip], rsi
	cmovle	rsi, QWORD PTR ET61X251_MAX_FRAMES[rip]
	movsx	r15, eax
	mov	QWORD PTR 0[r13], rsi
	mov	r12, rsi
	test	rsi, rsi
	jg	.L7
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rax, QWORD PTR 0[r13]
	lea	r12, -1[rax]
	mov	QWORD PTR 0[r13], r12
	test	r12, r12
	jle	.L1
.L7:
	mov	rdi, r15
	call	PAGE_ALIGN@PLT
	imul	rax, r12
	mov	rdi, rax
	call	vmalloc_32_user@PLT
	mov	r14, rax
	test	rax, rax
	je	.L15
	mov	r12, QWORD PTR 0[r13]
	test	r12, r12
	jle	.L1
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r15
	mov	rbx, rbp
	call	PAGE_ALIGN@PLT
	mov	rdx, QWORD PTR 8[r13]
	sal	rbx, 6
	mov	rdi, r15
	imul	rax, rbp
	add	rdx, rbx
	mov	QWORD PTR 48[rdx], rbp
	add	rax, r14
	mov	QWORD PTR 56[rdx], rax
	call	PAGE_ALIGN@PLT
	add	rbx, QWORD PTR 8[r13]
	mov	r12, QWORD PTR 0[r13]
	imul	rax, rbp
	add	rbp, 1
	mov	QWORD PTR [rbx], r15
	mov	QWORD PTR 24[rbx], 0
	mov	QWORD PTR 8[rbx], 0
	mov	QWORD PTR 40[rbx], rax
	mov	eax, DWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE[rip]
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR V4L2_FIELD_NONE[rip]
	mov	DWORD PTR 20[rbx], eax
	mov	eax, DWORD PTR V4L2_MEMORY_MMAP[rip]
	mov	DWORD PTR 16[rbx], eax
	cmp	r12, rbp
	jg	.L9
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
	.cfi_endproc
.LFE0:
	.size	et61x251_request_buffers, .-et61x251_request_buffers
	.comm	V4L2_MEMORY_MMAP,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,4,4
	.comm	IO_READ,4,4
	.comm	ET61X251_MAX_FRAMES,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_et61x251_core.c_et61x251_request_buffers.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	et61x251_request_buffers, %function
et61x251_request_buffers:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0, #8]
	mov	r6, r0
	cmp	r3, #0
	ldr	r3, [r0, #28]
	bne	.L2
	ldr	r0, .L16
	ldr	r0, [r0]
	cmp	r0, r2
	ldrne	r7, [r6, #12]
	ldrne	r2, [r6, #16]
	bne	.L13
.L2:
	ldr	r7, [r6, #20]
	ldr	r2, [r6, #24]
.L13:
	mul	r7, r2, r7
	mul	r7, r3, r7
	add	r3, r7, #7
	cmp	r7, #0
	movlt	r7, r3
	ldr	r3, .L16+4
	asr	r7, r7, #3
	ldr	r4, [r3]
	cmp	r1, r4
	movlt	r4, r1
	cmp	r4, #0
	str	r4, [r6]
	bgt	.L7
	b	.L1
.L15:
	sub	r4, r4, #1
	cmp	r4, #0
	str	r4, [r6]
	ble	.L1
.L7:
	mov	r0, r7
	bl	PAGE_ALIGN
	mul	r0, r4, r0
	bl	vmalloc_32_user
	subs	r8, r0, #0
	ldr	r4, [r6]
	beq	.L15
	cmp	r4, #0
	ble	.L1
	mov	r5, #0
	mov	r10, r5
	ldr	r9, .L16+8
.L9:
	mov	r0, r7
	bl	PAGE_ALIGN
	mla	r0, r5, r0, r8
	ldr	r3, [r6, #4]
	add	fp, r5, r5, lsl #3
	add	r3, r3, fp, lsl #2
	str	r0, [r3, #32]
	str	r5, [r3, #28]
	mov	r0, r7
	bl	PAGE_ALIGN
	ldm	r6, {r4, ip}
	mul	r0, r5, r0
	ldr	r2, .L16+12
	lsl	r3, fp, #2
	ldr	lr, [r2]
	ldr	r2, .L16+16
	add	r3, ip, r3
	str	r0, [r3, #24]
	add	r5, r5, #1
	ldr	r0, [r2]
	str	r7, [ip, fp, lsl #2]
	ldr	ip, [r9]
	cmp	r4, r5
	str	r10, [r3, #16]
	str	r10, [r3, #4]
	str	lr, [r3, #20]
	str	r0, [r3, #12]
	str	ip, [r3, #8]
	bgt	.L9
.L1:
	mov	r0, r4
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	IO_READ
	.word	ET61X251_MAX_FRAMES
	.word	V4L2_MEMORY_MMAP
	.word	V4L2_BUF_TYPE_VIDEO_CAPTURE
	.word	V4L2_FIELD_NONE
	.size	et61x251_request_buffers, .-et61x251_request_buffers
	.comm	V4L2_MEMORY_MMAP,4,4
	.comm	V4L2_FIELD_NONE,4,4
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,4,4
	.comm	IO_READ,4,4
	.comm	ET61X251_MAX_FRAMES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
