	.file	"extr_stk-webcam.c_stk_vidioc_reqbufs.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	stk_vidioc_reqbufs, @function
stk_vidioc_reqbufs:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	video_drvdata@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
	test	rax, rax
	je	.L1
	mov	rbx, rax
	mov	rax, QWORD PTR V4L2_MEMORY_MMAP[rip]
	cmp	QWORD PTR 0[r13], rax
	je	.L4
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbx
	call	is_streaming@PLT
	test	rax, rax
	jne	.L5
	mov	rax, QWORD PTR 8[rbx]
	test	rax, rax
	je	.L6
	cmp	rax, rbp
	je	.L6
.L5:
	mov	r12d, DWORD PTR EBUSY[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	rdi, rbx
	call	stk_free_buffers@PLT
	mov	r12d, DWORD PTR 8[r13]
	test	r12d, r12d
	je	.L18
	mov	QWORD PTR 8[rbx], rbp
	cmp	r12d, 2
	jle	.L19
	cmp	r12d, 5
	jle	.L9
	mov	DWORD PTR 8[r13], 5
	mov	r12d, 5
.L9:
	mov	esi, r12d
	mov	rdi, rbx
	xor	r12d, r12d
	call	stk_allocate_buffers@PLT
	mov	eax, DWORD PTR [rbx]
	mov	DWORD PTR 8[r13], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	DWORD PTR 8[r13], 3
	mov	r12d, 3
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edx, 73
	xor	esi, esi
	mov	rdi, rbx
	call	stk_camera_write_reg@PLT
	mov	rdi, rbx
	call	unset_initialised@PLT
	mov	QWORD PTR 8[rbx], 0
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	stk_vidioc_reqbufs, .-stk_vidioc_reqbufs
	.comm	V4L2_MEMORY_MMAP,8,8
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.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_stk-webcam.c_stk_vidioc_reqbufs.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stk_vidioc_reqbufs, %function
stk_vidioc_reqbufs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r2
	mov	r7, r0
	bl	video_drvdata
	subs	r5, r0, #0
	beq	.L12
	ldr	r3, .L14
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L4
	ldr	r3, .L14+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	bl	is_streaming
	subs	r4, r0, #0
	bne	.L5
	ldr	r3, [r5, #4]
	cmp	r3, #0
	cmpne	r3, r7
	bne	.L5
	mov	r0, r5
	bl	stk_free_buffers
	ldr	r1, [r6, #4]
	cmp	r1, #0
	beq	.L13
	cmp	r1, #2
	movle	r1, #3
	str	r7, [r5, #4]
	strle	r1, [r6, #4]
	ble	.L9
	cmp	r1, #5
	movgt	r3, #5
	movgt	r1, r3
	strgt	r3, [r6, #4]
.L9:
	mov	r0, r5
	bl	stk_allocate_buffers
	ldr	r3, [r5]
	str	r3, [r6, #4]
	b	.L1
.L5:
	ldr	r3, .L14+8
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, .L14+12
	ldr	r4, [r3]
	rsb	r4, r4, #0
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	mov	r2, #73
	mov	r1, r4
	mov	r0, r5
	bl	stk_camera_write_reg
	mov	r0, r5
	bl	unset_initialised
	str	r4, [r5, #4]
	b	.L1
.L15:
	.align	2
.L14:
	.word	V4L2_MEMORY_MMAP
	.word	EINVAL
	.word	EBUSY
	.word	ENODEV
	.size	stk_vidioc_reqbufs, .-stk_vidioc_reqbufs
	.comm	V4L2_MEMORY_MMAP,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
