	.file	"extr_gspca.c_read_alloc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"read alloc"
.LC1:
	.string	"read reqbuf err %d"
.LC2:
	.string	"read qbuf err: %d"
.LC3:
	.string	"read streamon err %d"
	.text
	.p2align 4
	.type	read_alloc, @function
read_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	lea	rsi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 64
	.cfi_def_cfa_offset 112
	mov	edi, DWORD PTR D_STREAM[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	PDEBUG@PLT
	cmp	QWORD PTR 0[rbp], 0
	jne	.L2
	lea	r12, 32[rsp]
	mov	edx, 24
	xor	esi, esi
	mov	rdi, r12
	call	memset@PLT
	mov	eax, DWORD PTR 8[rbp]
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r13
	mov	DWORD PTR 32[rsp], eax
	mov	rax, QWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE[rip]
	mov	QWORD PTR 48[rsp], rax
	mov	rax, QWORD PTR GSPCA_MEMORY_READ[rip]
	mov	QWORD PTR 40[rsp], rax
	call	vidioc_reqbufs@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L17
	mov	r14, rsp
	mov	edx, 24
	xor	esi, esi
	mov	rdi, r14
	call	memset@PLT
	mov	rdx, QWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE[rip]
	mov	rax, QWORD PTR GSPCA_MEMORY_READ[rip]
	mov	ecx, DWORD PTR 8[rbp]
	mov	QWORD PTR 16[rsp], rdx
	mov	QWORD PTR 8[rsp], rax
	test	ecx, ecx
	jg	.L7
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	add	r12d, 1
	cmp	DWORD PTR 8[rbp], r12d
	jle	.L18
.L7:
	mov	rdx, r14
	mov	rsi, rbp
	mov	rdi, r13
	mov	DWORD PTR 4[rsp], r12d
	call	vidioc_qbuf@PLT
	mov	ebx, eax
	test	eax, eax
	je	.L6
	mov	edi, DWORD PTR D_STREAM[rip]
	mov	edx, eax
	lea	rsi, .LC2[rip]
	xor	eax, eax
	mov	r12d, ebx
	call	PDEBUG@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 64
	.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
.L2:
	.cfi_restore_state
	mov	rdx, QWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE[rip]
.L8:
	mov	rsi, rbp
	mov	rdi, r13
	call	vidioc_streamon@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L1
	mov	edi, DWORD PTR D_STREAM[rip]
	mov	edx, eax
	lea	rsi, .LC3[rip]
	xor	eax, eax
	call	PDEBUG@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR D_STREAM[rip]
	mov	edx, eax
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	PDEBUG@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rax, QWORD PTR GSPCA_MEMORY_READ[rip]
	mov	rdx, QWORD PTR V4L2_BUF_TYPE_VIDEO_CAPTURE[rip]
.L5:
	mov	QWORD PTR 16[rbp], rax
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_alloc, .-read_alloc
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,8,8
	.comm	GSPCA_MEMORY_READ,8,8
	.comm	D_STREAM,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_gspca.c_read_alloc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"read alloc\000"
	.align	2
.LC1:
	.ascii	"read reqbuf err %d\000"
	.align	2
.LC2:
	.ascii	"read qbuf err: %d\000"
	.align	2
.LC3:
	.ascii	"read streamon err %d\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_alloc, %function
read_alloc:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r0
	ldr	r7, .L20
	ldr	r3, .L20+4
	sub	sp, sp, #44
	mov	r6, r1
	ldr	r0, [r7]
	ldr	r1, .L20+8
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	bl	PDEBUG
	ldr	r3, [r5]
	cmp	r3, #0
	bne	.L2
	ldr	r8, .L20+12
	ldr	r9, .L20+16
	ldr	r1, [r8]
	ldr	r0, [r9]
	ldr	ip, [r5, #4]
	str	r1, [sp, #32]
	str	r0, [sp, #28]
	mov	r1, r5
	mov	r0, r6
	add	r2, sp, #20
	str	r3, [sp, #24]
	str	ip, [sp, #20]
	bl	vidioc_reqbufs
	subs	r4, r0, #0
	bne	.L17
	ldr	r1, [r5, #4]
	ldr	r2, [r8]
	ldr	r3, [r9]
	cmp	r1, #0
	str	r4, [sp, #4]
	str	r2, [sp, #16]
	str	r3, [sp, #12]
	str	r4, [sp, #8]
	bgt	.L7
	b	.L5
.L6:
	ldr	r3, [r5, #4]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L18
.L7:
	add	r2, sp, #4
	mov	r1, r5
	mov	r0, r6
	str	r4, [sp, #8]
	bl	vidioc_qbuf
	subs	r2, r0, #0
	beq	.L6
	ldr	r0, [r7]
	ldr	r1, .L20+20
	mov	r4, r2
	bl	PDEBUG
.L1:
	ldr	r3, .L20+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r3, .L20+12
	ldr	r2, [r3]
.L8:
	mov	r1, r5
	mov	r0, r6
	bl	vidioc_streamon
	subs	r4, r0, #0
	beq	.L1
	mov	r2, r4
	ldr	r0, [r7]
	ldr	r1, .L20+24
	bl	PDEBUG
	b	.L1
.L17:
	mov	r2, r4
	ldr	r0, [r7]
	ldr	r1, .L20+28
	bl	PDEBUG
	b	.L1
.L18:
	ldr	r3, [r9]
	ldr	r2, [r8]
.L5:
	str	r3, [r5, #8]
	b	.L8
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	D_STREAM
	.word	.LC4
	.word	.LC0
	.word	V4L2_BUF_TYPE_VIDEO_CAPTURE
	.word	GSPCA_MEMORY_READ
	.word	.LC2
	.word	.LC3
	.word	.LC1
	.size	read_alloc, .-read_alloc
	.comm	V4L2_BUF_TYPE_VIDEO_CAPTURE,4,4
	.comm	GSPCA_MEMORY_READ,4,4
	.comm	D_STREAM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
