	.file	"1243230.c"
	.intel_syntax noprefix
	.text
	.local	dev_name
	.comm	dev_name,8,8
	.data
	.align 4
	.type	io, @object
	.size	io, 4
io:
	.long	1
	.align 4
	.type	fd, @object
	.size	fd, 4
fd:
	.long	-1
	.globl	buffers
	.bss
	.align 8
	.type	buffers, @object
	.size	buffers, 8
buffers:
	.zero	8
	.local	n_buffers
	.comm	n_buffers,4,4
	.local	out_buf
	.comm	out_buf,4,4
	.local	force_format
	.comm	force_format,4,4
	.data
	.align 4
	.type	frame_count, @object
	.size	frame_count, 4
frame_count:
	.long	100
	.section	.rodata
.LC0:
	.string	"%s error %d, %s\n"
	.text
	.type	errno_exit, @function
errno_exit:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -24[rbp]
	mov	r8, rbx
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	errno_exit, .-errno_exit
	.type	xioctl, @function
xioctl:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	QWORD PTR -32[rbp], rdx
.L4:
	mov	eax, DWORD PTR -24[rbp]
	movsx	rcx, eax
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L4
.L3:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	xioctl, .-xioctl
	.type	process_image, @function
process_image:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	eax, DWORD PTR out_buf[rip]
	test	eax, eax
	je	.L7
	mov	rdx, QWORD PTR stdout[rip]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rsi, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fwrite@PLT
.L7:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 46
	call	fputc@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	process_image, .-process_image
	.section	.rodata
.LC1:
	.string	"read"
.LC2:
	.string	"VIDIOC_DQBUF"
.LC3:
	.string	"the_stack_data/1243230.c"
.LC4:
	.string	"buf.index < n_buffers"
.LC5:
	.string	"VIDIOC_QBUF"
.LC6:
	.string	"i < n_buffers"
	.text
	.type	read_frame, @function
read_frame:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR io[rip]
	cmp	eax, 2
	je	.L9
	cmp	eax, 2
	ja	.L10
	test	eax, eax
	je	.L11
	cmp	eax, 1
	je	.L12
	jmp	.L10
.L11:
	mov	rax, QWORD PTR buffers[rip]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR buffers[rip]
	mov	rcx, QWORD PTR [rax]
	mov	eax, DWORD PTR fd[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, -1
	jne	.L13
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	jne	.L14
	mov	eax, 0
	jmp	.L28
.L14:
	lea	rdi, .LC1[rip]
	call	errno_exit
.L13:
	mov	rax, QWORD PTR buffers[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, eax
	mov	rax, QWORD PTR buffers[rip]
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	process_image
	jmp	.L10
.L12:
	lea	rax, -96[rbp]
	mov	edx, 88
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -92[rbp], 1
	mov	DWORD PTR -36[rbp], 1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -96[rbp]
	mov	esi, -1067952623
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L16
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	jne	.L17
	mov	eax, 0
	jmp	.L28
.L17:
	lea	rdi, .LC2[rip]
	call	errno_exit
.L16:
	mov	edx, DWORD PTR -96[rbp]
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	edx, eax
	jb	.L18
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 127
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	__assert_fail@PLT
.L18:
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR buffers[rip]
	mov	ecx, DWORD PTR -96[rbp]
	mov	ecx, ecx
	sal	rcx, 4
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	esi, edx
	mov	rdi, rax
	call	process_image
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -96[rbp]
	mov	esi, -1067952625
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L30
	lea	rdi, .LC5[rip]
	call	errno_exit
	jmp	.L30
.L9:
	lea	rax, -96[rbp]
	mov	edx, 88
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -92[rbp], 1
	mov	DWORD PTR -36[rbp], 2
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -96[rbp]
	mov	esi, -1067952623
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L20
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	jne	.L21
	mov	eax, 0
	jmp	.L28
.L21:
	lea	rdi, .LC2[rip]
	call	errno_exit
.L20:
	mov	DWORD PTR -100[rbp], 0
	jmp	.L22
.L25:
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR buffers[rip]
	mov	edx, DWORD PTR -100[rbp]
	sal	rdx, 4
	add	rdx, rcx
	mov	rdx, QWORD PTR [rdx]
	cmp	rax, rdx
	jne	.L23
	mov	eax, DWORD PTR -24[rbp]
	mov	ecx, eax
	mov	rdx, QWORD PTR buffers[rip]
	mov	eax, DWORD PTR -100[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	cmp	rcx, rax
	je	.L31
.L23:
	add	DWORD PTR -100[rbp], 1
.L22:
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	DWORD PTR -100[rbp], eax
	jb	.L25
	jmp	.L24
.L31:
	nop
.L24:
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	DWORD PTR -100[rbp], eax
	jb	.L26
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 161
	lea	rsi, .LC3[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L26:
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	process_image
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -96[rbp]
	mov	esi, -1067952625
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L32
	lea	rdi, .LC5[rip]
	call	errno_exit
	jmp	.L32
.L30:
	nop
	jmp	.L10
.L32:
	nop
.L10:
	mov	eax, 1
.L28:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	read_frame, .-read_frame
	.section	.rodata
.LC7:
	.string	"select"
.LC8:
	.string	"select timeout\n"
	.text
	.type	mainloop, @function
mainloop:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -176[rbp], 0
	mov	eax, DWORD PTR frame_count[rip]
	test	eax, eax
	jne	.L34
	mov	DWORD PTR -176[rbp], 1
.L34:
	mov	eax, DWORD PTR frame_count[rip]
	mov	DWORD PTR -180[rbp], eax
	jmp	.L35
.L41:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 187 "the_stack_data/1243230.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -172[rbp], edx
	mov	DWORD PTR -168[rbp], eax
	mov	eax, DWORD PTR fd[rip]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR fd[rip]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
	mov	QWORD PTR -160[rbp], 2
	mov	QWORD PTR -152[rbp], 0
	mov	eax, DWORD PTR fd[rip]
	lea	edi, 1[rax]
	lea	rdx, -160[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], -1
	jne	.L36
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L44
	lea	rdi, .LC7[rip]
	call	errno_exit
.L36:
	cmp	DWORD PTR -164[rbp], 0
	jne	.L39
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L39:
	call	read_frame
	test	eax, eax
	je	.L41
	jmp	.L35
.L44:
	nop
	jmp	.L41
.L35:
	mov	eax, DWORD PTR -180[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -180[rbp], edx
	test	eax, eax
	jne	.L41
	cmp	DWORD PTR -176[rbp], 0
	jne	.L41
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L43
	call	__stack_chk_fail@PLT
.L43:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	mainloop, .-mainloop
	.section	.rodata
.LC9:
	.string	"VIDIOC_STREAMOFF"
	.text
	.type	stop_capturing, @function
stop_capturing:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR io[rip]
	test	eax, eax
	je	.L51
	sub	eax, 1
	cmp	eax, 1
	ja	.L52
	mov	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -12[rbp]
	mov	esi, 1074026003
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L53
	lea	rdi, .LC9[rip]
	call	errno_exit
	jmp	.L53
.L51:
	nop
	jmp	.L52
.L53:
	nop
.L52:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	stop_capturing, .-stop_capturing
	.section	.rodata
.LC10:
	.string	"VIDIOC_STREAMON"
	.text
	.type	start_capturing, @function
start_capturing:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR io[rip]
	cmp	eax, 2
	je	.L55
	cmp	eax, 2
	ja	.L68
	test	eax, eax
	je	.L69
	cmp	eax, 1
	je	.L58
	jmp	.L68
.L58:
	mov	DWORD PTR -100[rbp], 0
	jmp	.L59
.L61:
	lea	rax, -96[rbp]
	mov	edx, 88
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -92[rbp], 1
	mov	DWORD PTR -36[rbp], 1
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -96[rbp]
	mov	esi, -1067952625
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L60
	lea	rdi, .LC5[rip]
	call	errno_exit
.L60:
	add	DWORD PTR -100[rbp], 1
.L59:
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	DWORD PTR -100[rbp], eax
	jb	.L61
	mov	DWORD PTR -104[rbp], 1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -104[rbp]
	mov	esi, 1074026002
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L70
	lea	rdi, .LC10[rip]
	call	errno_exit
	jmp	.L70
.L55:
	mov	DWORD PTR -100[rbp], 0
	jmp	.L63
.L65:
	lea	rax, -96[rbp]
	mov	edx, 88
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -92[rbp], 1
	mov	DWORD PTR -36[rbp], 2
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -96[rbp], eax
	mov	rdx, QWORD PTR buffers[rip]
	mov	eax, DWORD PTR -100[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -32[rbp], rax
	mov	rdx, QWORD PTR buffers[rip]
	mov	eax, DWORD PTR -100[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -96[rbp]
	mov	esi, -1067952625
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L64
	lea	rdi, .LC5[rip]
	call	errno_exit
.L64:
	add	DWORD PTR -100[rbp], 1
.L63:
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	DWORD PTR -100[rbp], eax
	jb	.L65
	mov	DWORD PTR -104[rbp], 1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -104[rbp]
	mov	esi, 1074026002
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L71
	lea	rdi, .LC10[rip]
	call	errno_exit
	jmp	.L71
.L69:
	nop
	jmp	.L68
.L70:
	nop
	jmp	.L68
.L71:
	nop
.L68:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L67
	call	__stack_chk_fail@PLT
.L67:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	start_capturing, .-start_capturing
	.section	.rodata
.LC11:
	.string	"munmap"
	.text
	.type	uninit_device, @function
uninit_device:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, DWORD PTR io[rip]
	cmp	eax, 2
	je	.L73
	cmp	eax, 2
	ja	.L74
	test	eax, eax
	je	.L75
	cmp	eax, 1
	je	.L76
	jmp	.L74
.L75:
	mov	rax, QWORD PTR buffers[rip]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	jmp	.L74
.L76:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L77
.L79:
	mov	rdx, QWORD PTR buffers[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	rdx, QWORD PTR 8[rax]
	mov	rcx, QWORD PTR buffers[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 4
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L78
	lea	rdi, .LC11[rip]
	call	errno_exit
.L78:
	add	DWORD PTR -4[rbp], 1
.L77:
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	DWORD PTR -4[rbp], eax
	jb	.L79
	jmp	.L74
.L73:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L80
.L81:
	mov	rdx, QWORD PTR buffers[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -4[rbp], 1
.L80:
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	DWORD PTR -4[rbp], eax
	jb	.L81
	nop
.L74:
	mov	rax, QWORD PTR buffers[rip]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	uninit_device, .-uninit_device
	.section	.rodata
.LC12:
	.string	"Out of memory\n"
	.text
	.type	init_read, @function
init_read:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	mov	esi, 16
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR buffers[rip], rax
	mov	rax, QWORD PTR buffers[rip]
	test	rax, rax
	jne	.L83
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L83:
	mov	rax, QWORD PTR buffers[rip]
	mov	edx, DWORD PTR -20[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	eax, DWORD PTR -20[rbp]
	mov	rbx, QWORD PTR buffers[rip]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR buffers[rip]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L85
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L85:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	init_read, .-init_read
	.section	.rodata
	.align 8
.LC13:
	.string	"%s does not support memory mapping\n"
.LC14:
	.string	"VIDIOC_REQBUFS"
	.align 8
.LC15:
	.string	"Insufficient buffer memory on %s\n"
.LC16:
	.string	"VIDIOC_QUERYBUF"
.LC17:
	.string	"mmap"
	.text
	.type	init_mmap, @function
init_mmap:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 136
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	edx, 20
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -144[rbp], 4
	mov	DWORD PTR -140[rbp], 1
	mov	DWORD PTR -136[rbp], 1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -144[rbp]
	mov	esi, -1072409080
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L87
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 22
	jne	.L88
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L88:
	lea	rdi, .LC14[rip]
	call	errno_exit
.L87:
	mov	eax, DWORD PTR -144[rbp]
	cmp	eax, 1
	ja	.L89
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L89:
	mov	eax, DWORD PTR -144[rbp]
	mov	eax, eax
	mov	esi, 16
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR buffers[rip], rax
	mov	rax, QWORD PTR buffers[rip]
	test	rax, rax
	jne	.L90
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L90:
	mov	DWORD PTR n_buffers[rip], 0
	jmp	.L91
.L94:
	lea	rax, -112[rbp]
	mov	edx, 88
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -108[rbp], 1
	mov	DWORD PTR -52[rbp], 1
	mov	eax, DWORD PTR n_buffers[rip]
	mov	DWORD PTR -112[rbp], eax
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -112[rbp]
	mov	esi, -1067952631
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L92
	lea	rdi, .LC16[rip]
	call	errno_exit
.L92:
	mov	edx, DWORD PTR -40[rbp]
	mov	rax, QWORD PTR buffers[rip]
	mov	ecx, DWORD PTR n_buffers[rip]
	mov	ecx, ecx
	sal	rcx, 4
	add	rax, rcx
	mov	edx, edx
	mov	QWORD PTR 8[rax], rdx
	mov	eax, DWORD PTR -48[rbp]
	mov	edi, eax
	mov	eax, DWORD PTR fd[rip]
	mov	edx, DWORD PTR -40[rbp]
	mov	esi, edx
	mov	rdx, QWORD PTR buffers[rip]
	mov	ecx, DWORD PTR n_buffers[rip]
	mov	ecx, ecx
	sal	rcx, 4
	lea	rbx, [rdx+rcx]
	mov	r9, rdi
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR buffers[rip]
	mov	edx, DWORD PTR n_buffers[rip]
	mov	edx, edx
	sal	rdx, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	cmp	rax, -1
	jne	.L93
	lea	rdi, .LC17[rip]
	call	errno_exit
.L93:
	mov	eax, DWORD PTR n_buffers[rip]
	add	eax, 1
	mov	DWORD PTR n_buffers[rip], eax
.L91:
	mov	edx, DWORD PTR -144[rbp]
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	edx, eax
	ja	.L94
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L95
	call	__stack_chk_fail@PLT
.L95:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	init_mmap, .-init_mmap
	.section	.rodata
	.align 8
.LC18:
	.string	"%s does not support user pointer i/o\n"
	.text
	.type	init_userp, @function
init_userp:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -24
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, -48[rbp]
	mov	edx, 20
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -48[rbp], 4
	mov	DWORD PTR -44[rbp], 1
	mov	DWORD PTR -40[rbp], 2
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -48[rbp]
	mov	esi, -1072409080
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L97
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 22
	jne	.L98
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L98:
	lea	rdi, .LC14[rip]
	call	errno_exit
.L97:
	mov	esi, 16
	mov	edi, 4
	call	calloc@PLT
	mov	QWORD PTR buffers[rip], rax
	mov	rax, QWORD PTR buffers[rip]
	test	rax, rax
	jne	.L99
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L99:
	mov	DWORD PTR n_buffers[rip], 0
	jmp	.L100
.L102:
	mov	rax, QWORD PTR buffers[rip]
	mov	edx, DWORD PTR n_buffers[rip]
	mov	edx, edx
	sal	rdx, 4
	add	rdx, rax
	mov	eax, DWORD PTR -52[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	eax, DWORD PTR -52[rbp]
	mov	rdx, QWORD PTR buffers[rip]
	mov	ecx, DWORD PTR n_buffers[rip]
	mov	ecx, ecx
	sal	rcx, 4
	lea	rbx, [rdx+rcx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR buffers[rip]
	mov	edx, DWORD PTR n_buffers[rip]
	mov	edx, edx
	sal	rdx, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L101
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L101:
	mov	eax, DWORD PTR n_buffers[rip]
	add	eax, 1
	mov	DWORD PTR n_buffers[rip], eax
.L100:
	mov	eax, DWORD PTR n_buffers[rip]
	cmp	eax, 3
	jbe	.L102
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L103
	call	__stack_chk_fail@PLT
.L103:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	init_userp, .-init_userp
	.section	.rodata
.LC19:
	.string	"%s is no V4L2 device\n"
.LC20:
	.string	"VIDIOC_QUERYCAP"
	.align 8
.LC21:
	.string	"%s is no video capture device\n"
.LC22:
	.string	"%s does not support read i/o\n"
	.align 8
.LC23:
	.string	"%s does not support streaming i/o\n"
.LC24:
	.string	"Force Format %d\n"
.LC25:
	.string	"VIDIOC_S_FMT"
.LC26:
	.string	"VIDIOC_G_FMT"
	.text
	.type	init_device, @function
init_device:
.LFB18:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 432
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -336[rbp]
	mov	esi, -2140645888
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L105
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 22
	jne	.L106
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L106:
	lea	rdi, .LC20[rip]
	call	errno_exit
.L105:
	mov	eax, DWORD PTR -252[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L107
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L107:
	mov	eax, DWORD PTR io[rip]
	test	eax, eax
	je	.L108
	sub	eax, 1
	cmp	eax, 1
	ja	.L109
	jmp	.L127
.L108:
	mov	eax, DWORD PTR -252[rbp]
	and	eax, 16777216
	test	eax, eax
	jne	.L128
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L127:
	mov	eax, DWORD PTR -252[rbp]
	and	eax, 67108864
	test	eax, eax
	jne	.L129
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L128:
	nop
	jmp	.L109
.L129:
	nop
.L109:
	lea	rax, -384[rbp]
	mov	edx, 44
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -384[rbp], 1
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -384[rbp]
	mov	esi, -1070836166
	mov	edi, eax
	call	xioctl
	test	eax, eax
	jne	.L113
	mov	DWORD PTR -416[rbp], 1
	mov	rax, QWORD PTR -364[rbp]
	mov	rdx, QWORD PTR -356[rbp]
	mov	QWORD PTR -412[rbp], rax
	mov	QWORD PTR -404[rbp], rdx
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -416[rbp]
	mov	esi, 1075074620
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L130
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 22
	jmp	.L113
.L130:
	nop
.L113:
	lea	rax, -224[rbp]
	mov	edx, 208
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -224[rbp], 1
	mov	edx, DWORD PTR force_format[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR force_format[rip]
	test	eax, eax
	je	.L116
	mov	eax, DWORD PTR force_format[rip]
	cmp	eax, 2
	jne	.L117
	mov	DWORD PTR -216[rbp], 1920
	mov	DWORD PTR -212[rbp], 1080
	mov	DWORD PTR -208[rbp], 875967048
	mov	DWORD PTR -204[rbp], 4
	jmp	.L118
.L117:
	mov	eax, DWORD PTR force_format[rip]
	cmp	eax, 1
	jne	.L118
	mov	DWORD PTR -216[rbp], 640
	mov	DWORD PTR -212[rbp], 480
	mov	DWORD PTR -208[rbp], 1448695129
	mov	DWORD PTR -204[rbp], 4
.L118:
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -224[rbp]
	mov	esi, -1060088315
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L119
	lea	rdi, .LC25[rip]
	call	errno_exit
	jmp	.L119
.L116:
	mov	eax, DWORD PTR fd[rip]
	lea	rdx, -224[rbp]
	mov	esi, -1060088316
	mov	edi, eax
	call	xioctl
	cmp	eax, -1
	jne	.L119
	lea	rdi, .LC26[rip]
	call	errno_exit
.L119:
	mov	eax, DWORD PTR -216[rbp]
	add	eax, eax
	mov	DWORD PTR -420[rbp], eax
	mov	eax, DWORD PTR -200[rbp]
	cmp	DWORD PTR -420[rbp], eax
	jbe	.L120
	mov	eax, DWORD PTR -420[rbp]
	mov	DWORD PTR -200[rbp], eax
.L120:
	mov	edx, DWORD PTR -200[rbp]
	mov	eax, DWORD PTR -212[rbp]
	imul	eax, edx
	mov	DWORD PTR -420[rbp], eax
	mov	eax, DWORD PTR -196[rbp]
	cmp	DWORD PTR -420[rbp], eax
	jbe	.L121
	mov	eax, DWORD PTR -420[rbp]
	mov	DWORD PTR -196[rbp], eax
.L121:
	mov	eax, DWORD PTR io[rip]
	cmp	eax, 2
	je	.L122
	cmp	eax, 2
	ja	.L131
	test	eax, eax
	je	.L124
	cmp	eax, 1
	je	.L125
	jmp	.L131
.L124:
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	init_read
	jmp	.L123
.L125:
	call	init_mmap
	jmp	.L123
.L122:
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	init_userp
	nop
.L123:
.L131:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L126
	call	__stack_chk_fail@PLT
.L126:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	init_device, .-init_device
	.section	.rodata
.LC27:
	.string	"close"
	.text
	.type	close_device, @function
close_device:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR fd[rip]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L133
	lea	rdi, .LC27[rip]
	call	errno_exit
.L133:
	mov	DWORD PTR fd[rip], -1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	close_device, .-close_device
	.section	.rodata
.LC28:
	.string	"Cannot identify '%s': %d, %s\n"
.LC29:
	.string	"%s is no device\n"
.LC30:
	.string	"Cannot open '%s': %d, %s\n"
	.text
	.type	open_device, @function
open_device:
.LFB20:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 168
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR dev_name[rip]
	lea	rdx, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	cmp	eax, -1
	jne	.L135
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rbx
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L135:
	mov	eax, DWORD PTR -152[rbp]
	and	eax, 61440
	cmp	eax, 8192
	je	.L136
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC29[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L136:
	mov	rax, QWORD PTR dev_name[rip]
	mov	edx, 0
	mov	esi, 2050
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
	mov	eax, DWORD PTR fd[rip]
	cmp	eax, -1
	jne	.L139
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	ecx, DWORD PTR [rax]
	mov	rdx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, rbx
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L139:
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L138
	call	__stack_chk_fail@PLT
.L138:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	open_device, .-open_device
	.section	.rodata
	.align 8
.LC31:
	.ascii	"Usage: %s [options]\n\nVersion 1.3\nOptions:\n-d | --device "
	.ascii	"name   Video device name [%s]\n-h | --help          Print th"
	.ascii	"is message\n-m | --mmap          Use memory mapped buffers ["
	.ascii	"default]\n-r | --read          Use read() calls\n-u | --user"
	.ascii	"p         Use application allocated buffers\n-o | --output  "
	.ascii	"      Outputs stream to stdout\n-f | --format        Force f"
	.ascii	"ormat to 640x480 YUYV\n"
	.string	"-F | --formatH264    Force format to 1920x1080 H264\n-c | --count         Number of frames to grab [%i] - use 0 for infinite\n\nExample usage: capture -F -o -c 300 > output.raw\nCaptures 300 frames of H264 at 1920x1080 - use raw2mpg4 script to convert to mpg4\n"
	.text
	.type	usage, @function
usage:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	DWORD PTR -12[rbp], esi
	mov	QWORD PTR -24[rbp], rdx
	mov	esi, DWORD PTR frame_count[rip]
	mov	rcx, QWORD PTR dev_name[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, esi
	lea	rsi, .LC31[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	usage, .-usage
	.section	.rodata
	.align 8
	.type	short_options, @object
	.size	short_options, 12
short_options:
	.string	"d:hmruofFc:"
.LC32:
	.string	"device"
.LC33:
	.string	"help"
.LC34:
	.string	"userp"
.LC35:
	.string	"output"
.LC36:
	.string	"format"
.LC37:
	.string	"formatH264"
.LC38:
	.string	"count"
	.section	.data.rel.ro.local,"aw"
	.align 32
	.type	long_options, @object
	.size	long_options, 320
long_options:
	.quad	.LC32
	.long	1
	.zero	4
	.quad	0
	.long	100
	.zero	4
	.quad	.LC33
	.long	0
	.zero	4
	.quad	0
	.long	104
	.zero	4
	.quad	.LC17
	.long	0
	.zero	4
	.quad	0
	.long	109
	.zero	4
	.quad	.LC1
	.long	0
	.zero	4
	.quad	0
	.long	114
	.zero	4
	.quad	.LC34
	.long	0
	.zero	4
	.quad	0
	.long	117
	.zero	4
	.quad	.LC35
	.long	0
	.zero	4
	.quad	0
	.long	111
	.zero	4
	.quad	.LC36
	.long	0
	.zero	4
	.quad	0
	.long	102
	.zero	4
	.quad	.LC37
	.long	0
	.zero	4
	.quad	0
	.long	70
	.zero	4
	.quad	.LC38
	.long	1
	.zero	4
	.quad	0
	.long	99
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.section	.rodata
.LC39:
	.string	"/dev/video0"
	.text
	.globl	main
	.type	main, @function
main:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, .LC39[rip]
	mov	QWORD PTR dev_name[rip], rax
.L158:
	lea	rdx, -16[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r8, rdx
	lea	rcx, long_options[rip]
	lea	rdx, short_options[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L142
	call	open_device
	call	init_device
	call	start_capturing
	call	mainloop
	call	stop_capturing
	call	uninit_device
	call	close_device
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L159
	jmp	.L160
.L142:
	cmp	DWORD PTR -12[rbp], 0
	je	.L161
	cmp	DWORD PTR -12[rbp], 0
	js	.L145
	cmp	DWORD PTR -12[rbp], 117
	jg	.L145
	cmp	DWORD PTR -12[rbp], 70
	jl	.L145
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, 70
	cmp	eax, 47
	ja	.L145
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L147[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L147[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L147:
	.long	.L155-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L154-.L147
	.long	.L153-.L147
	.long	.L145-.L147
	.long	.L152-.L147
	.long	.L145-.L147
	.long	.L151-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L150-.L147
	.long	.L145-.L147
	.long	.L149-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L148-.L147
	.long	.L145-.L147
	.long	.L145-.L147
	.long	.L146-.L147
	.text
.L153:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR dev_name[rip], rax
	jmp	.L156
.L151:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdx, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	usage
	mov	edi, 0
	call	exit@PLT
.L150:
	mov	DWORD PTR io[rip], 1
	jmp	.L156
.L148:
	mov	DWORD PTR io[rip], 0
	jmp	.L156
.L146:
	mov	DWORD PTR io[rip], 2
	jmp	.L156
.L149:
	mov	eax, DWORD PTR out_buf[rip]
	add	eax, 1
	mov	DWORD PTR out_buf[rip], eax
	jmp	.L156
.L152:
	mov	DWORD PTR force_format[rip], 1
	jmp	.L156
.L155:
	mov	DWORD PTR force_format[rip], 2
	jmp	.L156
.L154:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR frame_count[rip], eax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L162
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	errno_exit
	jmp	.L162
.L145:
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -32[rbp]
	mov	ecx, DWORD PTR -20[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	usage
	mov	edi, 1
	call	exit@PLT
.L161:
	nop
	jmp	.L158
.L162:
	nop
.L156:
	jmp	.L158
.L160:
	call	__stack_chk_fail@PLT
.L159:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	main, .-main
	.section	.rodata
	.align 8
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 11
__PRETTY_FUNCTION__.0:
	.string	"read_frame"
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"1243230.c"
	.text
	.local	dev_name
	.comm	dev_name,4,4
	.data
	.align	2
	.type	io, %object
	.size	io, 4
io:
	.word	1
	.align	2
	.type	fd, %object
	.size	fd, 4
fd:
	.word	-1
	.comm	buffers,4,4
	.local	n_buffers
	.comm	n_buffers,4,4
	.local	out_buf
	.comm	out_buf,4,4
	.local	force_format
	.comm	force_format,4,4
	.align	2
	.type	frame_count, %object
	.size	frame_count, 4
frame_count:
	.word	100
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s error %d, %s\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	errno_exit, %function
errno_exit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L2
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r5
	ldr	r2, [fp, #-16]
	ldr	r1, .L2+4
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	.align	2
.L2:
	.word	stderr
	.word	.LC0
	.size	errno_exit, .-errno_exit
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xioctl, %function
xioctl:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
.L6:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	ioctl
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L5
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L6
.L5:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	xioctl, .-xioctl
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_image, %function
process_image:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, .L10
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L9
	ldr	r1, [fp, #-12]
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r0, [fp, #-8]
	bl	fwrite
.L9:
	ldr	r3, .L10+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, .L10+8
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #46
	bl	fputc
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	out_buf
	.word	stdout
	.word	stderr
	.size	process_image, .-process_image
	.section	.rodata
	.align	2
.LC1:
	.ascii	"read\000"
	.align	2
.LC2:
	.ascii	"VIDIOC_DQBUF\000"
	.align	2
.LC3:
	.ascii	"the_stack_data/1243230.c\000"
	.align	2
.LC4:
	.ascii	"buf.index < n_buffers\000"
	.align	2
.LC5:
	.ascii	"VIDIOC_QBUF\000"
	.align	2
.LC6:
	.ascii	"i < n_buffers\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_frame, %function
read_frame:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L37+4
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L13
	cmp	r3, #2
	bhi	.L14
	cmp	r3, #0
	beq	.L15
	cmp	r3, #1
	beq	.L16
	b	.L14
.L15:
	ldr	r3, .L37+8
	ldr	r0, [r3]
	ldr	r3, .L37+12
	ldr	r3, [r3]
	ldr	r1, [r3]
	ldr	r3, .L37+12
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r2, r3
	bl	read
	mov	r3, r0
	cmn	r3, #1
	bne	.L17
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L18
	mov	r3, #0
	b	.L32
.L18:
	ldr	r0, .L37+16
	bl	errno_exit
.L17:
	ldr	r3, .L37+12
	ldr	r3, [r3]
	ldr	r2, [r3]
	ldr	r3, .L37+12
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	mov	r1, r3
	mov	r0, r2
	bl	process_image
	b	.L14
.L16:
	sub	r3, fp, #76
	mov	r2, #68
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-72]
	mov	r3, #1
	str	r3, [fp, #-28]
	ldr	r3, .L37+8
	ldr	r3, [r3]
	sub	r2, fp, #76
	ldr	r1, .L37+20
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L20
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L21
	mov	r3, #0
	b	.L32
.L21:
	ldr	r0, .L37+24
	bl	errno_exit
.L20:
	ldr	r2, [fp, #-76]
	ldr	r3, .L37+28
	ldr	r3, [r3]
	cmp	r2, r3
	bcc	.L22
	ldr	r3, .L37+32
	mov	r2, #127
	ldr	r1, .L37+36
	ldr	r0, .L37+40
	bl	__assert_fail
.L22:
	ldr	r3, .L37+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-68]
	mov	r1, r2
	mov	r0, r3
	bl	process_image
	ldr	r3, .L37+8
	ldr	r3, [r3]
	sub	r2, fp, #76
	ldr	r1, .L37+44
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L34
	ldr	r0, .L37+48
	bl	errno_exit
	b	.L34
.L13:
	sub	r3, fp, #76
	mov	r2, #68
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-72]
	mov	r3, #2
	str	r3, [fp, #-28]
	ldr	r3, .L37+8
	ldr	r3, [r3]
	sub	r2, fp, #76
	ldr	r1, .L37+20
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L24
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L25
	mov	r3, #0
	b	.L32
.L25:
	ldr	r0, .L37+24
	bl	errno_exit
.L24:
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L26
.L29:
	ldr	r3, [fp, #-24]
	ldr	r2, .L37+12
	ldr	r1, [r2]
	ldr	r2, [fp, #-80]
	lsl	r2, r2, #3
	add	r2, r1, r2
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L27
	ldr	r2, [fp, #-20]
	ldr	r3, .L37+12
	ldr	r1, [r3]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #3
	add	r3, r1, r3
	ldr	r3, [r3, #4]
	cmp	r2, r3
	beq	.L35
.L27:
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L26:
	ldr	r3, .L37+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	bcc	.L29
	b	.L28
.L35:
	nop
.L28:
	ldr	r3, .L37+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	bcc	.L30
	ldr	r3, .L37+32
	mov	r2, #161
	ldr	r1, .L37+36
	ldr	r0, .L37+52
	bl	__assert_fail
.L30:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	ldr	r3, [fp, #-68]
	mov	r1, r3
	mov	r0, r2
	bl	process_image
	ldr	r3, .L37+8
	ldr	r3, [r3]
	sub	r2, fp, #76
	ldr	r1, .L37+44
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L36
	ldr	r0, .L37+48
	bl	errno_exit
	b	.L36
.L34:
	nop
	b	.L14
.L36:
	nop
.L14:
	mov	r3, #1
.L32:
	ldr	r2, .L37
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC7
	.word	io
	.word	fd
	.word	buffers
	.word	.LC1
	.word	-1069263343
	.word	.LC2
	.word	n_buffers
	.word	__PRETTY_FUNCTION__.7380
	.word	.LC3
	.word	.LC4
	.word	-1069263345
	.word	.LC5
	.word	.LC6
	.size	read_frame, .-read_frame
	.section	.rodata
	.align	2
.LC8:
	.ascii	"select\000"
	.align	2
.LC9:
	.ascii	"select timeout\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mainloop, %function
mainloop:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	ldr	r3, .L53
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-160]
	ldr	r3, .L53+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L40
	mov	r3, #1
	str	r3, [fp, #-160]
.L40:
	ldr	r3, .L53+4
	ldr	r3, [r3]
	str	r3, [fp, #-164]
	b	.L41
.L49:
	sub	r3, fp, #136
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L42
.L43:
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-156]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L42:
	ldr	r3, [fp, #-156]
	cmp	r3, #31
	bls	.L43
	ldr	r3, .L53+8
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-132]
	ldr	r3, .L53+8
	ldr	r3, [r3]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-132]
	mov	r3, #2
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r3, .L53+8
	ldr	r3, [r3]
	add	r0, r3, #1
	sub	r1, fp, #136
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmn	r3, #1
	bne	.L44
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L52
	ldr	r0, .L53+12
	bl	errno_exit
.L44:
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L47
	ldr	r3, .L53+16
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L53+20
	bl	fwrite
	mov	r0, #1
	bl	exit
.L47:
	bl	read_frame
	mov	r3, r0
	cmp	r3, #0
	beq	.L49
	b	.L41
.L52:
	nop
	b	.L49
.L41:
	ldr	r3, [fp, #-164]
	sub	r2, r3, #1
	str	r2, [fp, #-164]
	cmp	r3, #0
	bne	.L49
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bne	.L49
	nop
	ldr	r3, .L53
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L51
	bl	__stack_chk_fail
.L51:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	.LC10
	.word	frame_count
	.word	fd
	.word	.LC8
	.word	stderr
	.word	.LC9
	.size	mainloop, .-mainloop
	.section	.rodata
	.align	2
.LC11:
	.ascii	"VIDIOC_STREAMOFF\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stop_capturing, %function
stop_capturing:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L64+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L61
	sub	r3, r3, #1
	cmp	r3, #1
	bhi	.L62
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, .L64+8
	ldr	r3, [r3]
	sub	r2, fp, #12
	ldr	r1, .L64+12
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L63
	ldr	r0, .L64+16
	bl	errno_exit
	b	.L63
.L61:
	nop
	b	.L62
.L63:
	nop
.L62:
	nop
	ldr	r3, .L64
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L60
	bl	__stack_chk_fail
.L60:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC12
	.word	io
	.word	fd
	.word	1074026003
	.word	.LC11
	.size	stop_capturing, .-stop_capturing
	.section	.rodata
	.align	2
.LC13:
	.ascii	"VIDIOC_STREAMON\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_capturing, %function
start_capturing:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	ldr	r3, .L84
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L84+4
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L67
	cmp	r3, #2
	bhi	.L80
	cmp	r3, #0
	beq	.L81
	cmp	r3, #1
	beq	.L70
	b	.L80
.L70:
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L71
.L73:
	sub	r3, fp, #76
	mov	r2, #68
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-72]
	mov	r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-80]
	str	r3, [fp, #-76]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r2, fp, #76
	ldr	r1, .L84+12
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L72
	ldr	r0, .L84+16
	bl	errno_exit
.L72:
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L71:
	ldr	r3, .L84+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	bcc	.L73
	mov	r3, #1
	str	r3, [fp, #-84]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r2, fp, #84
	ldr	r1, .L84+24
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L82
	ldr	r0, .L84+28
	bl	errno_exit
	b	.L82
.L67:
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L75
.L77:
	sub	r3, fp, #76
	mov	r2, #68
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-72]
	mov	r3, #2
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-80]
	str	r3, [fp, #-76]
	ldr	r3, .L84+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	ldr	r3, .L84+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-20]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r2, fp, #76
	ldr	r1, .L84+12
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L76
	ldr	r0, .L84+16
	bl	errno_exit
.L76:
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L75:
	ldr	r3, .L84+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	bcc	.L77
	mov	r3, #1
	str	r3, [fp, #-84]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	sub	r2, fp, #84
	ldr	r1, .L84+24
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L83
	ldr	r0, .L84+28
	bl	errno_exit
	b	.L83
.L81:
	nop
	b	.L80
.L82:
	nop
	b	.L80
.L83:
	nop
.L80:
	nop
	ldr	r3, .L84
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L79
	bl	__stack_chk_fail
.L79:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L85:
	.align	2
.L84:
	.word	.LC14
	.word	io
	.word	fd
	.word	-1069263345
	.word	.LC5
	.word	n_buffers
	.word	1074026002
	.word	.LC13
	.word	buffers
	.size	start_capturing, .-start_capturing
	.section	.rodata
	.align	2
.LC15:
	.ascii	"munmap\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	uninit_device, %function
uninit_device:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L96
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L87
	cmp	r3, #2
	bhi	.L88
	cmp	r3, #0
	beq	.L89
	cmp	r3, #1
	beq	.L90
	b	.L88
.L89:
	ldr	r3, .L96+4
	ldr	r3, [r3]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	b	.L88
.L90:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L91
.L93:
	ldr	r3, .L96+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, .L96+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L92
	ldr	r0, .L96+8
	bl	errno_exit
.L92:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L91:
	ldr	r3, .L96+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L93
	b	.L88
.L87:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L94
.L95:
	ldr	r3, .L96+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L94:
	ldr	r3, .L96+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L95
	nop
.L88:
	ldr	r3, .L96+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L97:
	.align	2
.L96:
	.word	io
	.word	buffers
	.word	.LC15
	.word	n_buffers
	.size	uninit_device, .-uninit_device
	.section	.rodata
	.align	2
.LC16:
	.ascii	"Out of memory\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_read, %function
init_read:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	mov	r1, #8
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L102
	str	r2, [r3]
	ldr	r3, .L102
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L99
	ldr	r3, .L102+4
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L102+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L99:
	ldr	r3, .L102
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, .L102
	ldr	r4, [r3]
	ldr	r0, [fp, #-16]
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L102
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L101
	ldr	r3, .L102+4
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L102+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L101:
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L103:
	.align	2
.L102:
	.word	buffers
	.word	stderr
	.word	.LC16
	.size	init_read, .-init_read
	.section	.rodata
	.align	2
.LC17:
	.ascii	"%s does not support memory mapping\012\000"
	.align	2
.LC18:
	.ascii	"VIDIOC_REQBUFS\000"
	.align	2
.LC19:
	.ascii	"Insufficient buffer memory on %s\012\000"
	.align	2
.LC20:
	.ascii	"VIDIOC_QUERYBUF\000"
	.align	2
.LC21:
	.ascii	"mmap\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_mmap, %function
init_mmap:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #108
	ldr	r3, .L114
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #104
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #4
	str	r3, [fp, #-104]
	mov	r3, #1
	str	r3, [fp, #-100]
	mov	r3, #1
	str	r3, [fp, #-96]
	ldr	r3, .L114+4
	ldr	r3, [r3]
	sub	r2, fp, #104
	ldr	r1, .L114+8
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L105
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #22
	bne	.L106
	ldr	r3, .L114+12
	ldr	r3, [r3]
	ldr	r2, .L114+16
	ldr	r2, [r2]
	ldr	r1, .L114+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L106:
	ldr	r0, .L114+24
	bl	errno_exit
.L105:
	ldr	r3, [fp, #-104]
	cmp	r3, #1
	bhi	.L107
	ldr	r3, .L114+12
	ldr	r3, [r3]
	ldr	r2, .L114+16
	ldr	r2, [r2]
	ldr	r1, .L114+28
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L107:
	ldr	r3, [fp, #-104]
	mov	r1, #8
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L114+32
	str	r2, [r3]
	ldr	r3, .L114+32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L108
	ldr	r3, .L114+12
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L114+36
	bl	fwrite
	mov	r0, #1
	bl	exit
.L108:
	ldr	r3, .L114+40
	mov	r2, #0
	str	r2, [r3]
	b	.L109
.L112:
	sub	r3, fp, #84
	mov	r2, #68
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-80]
	mov	r3, #1
	str	r3, [fp, #-36]
	ldr	r3, .L114+40
	ldr	r3, [r3]
	str	r3, [fp, #-84]
	ldr	r3, .L114+4
	ldr	r3, [r3]
	sub	r2, fp, #84
	ldr	r1, .L114+44
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L110
	ldr	r0, .L114+48
	bl	errno_exit
.L110:
	ldr	r3, .L114+32
	ldr	r2, [r3]
	ldr	r3, .L114+40
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-28]
	str	r2, [r3, #4]
	ldr	r0, [fp, #-28]
	ldr	r3, .L114+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-32]
	mov	ip, r2
	ldr	r2, .L114+32
	ldr	r1, [r2]
	ldr	r2, .L114+40
	ldr	r2, [r2]
	lsl	r2, r2, #3
	add	r4, r1, r2
	str	ip, [sp, #4]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, r0
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L114+32
	ldr	r2, [r3]
	ldr	r3, .L114+40
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L111
	ldr	r0, .L114+52
	bl	errno_exit
.L111:
	ldr	r3, .L114+40
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L114+40
	str	r3, [r2]
.L109:
	ldr	r2, [fp, #-104]
	ldr	r3, .L114+40
	ldr	r3, [r3]
	cmp	r2, r3
	bhi	.L112
	nop
	ldr	r3, .L114
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L113
	bl	__stack_chk_fail
.L113:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L115:
	.align	2
.L114:
	.word	.LC22
	.word	fd
	.word	-1072409080
	.word	stderr
	.word	dev_name
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	buffers
	.word	.LC16
	.word	n_buffers
	.word	-1069263351
	.word	.LC20
	.word	.LC21
	.size	init_mmap, .-init_mmap
	.section	.rodata
	.align	2
.LC23:
	.ascii	"%s does not support user pointer i/o\012\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_userp, %function
init_userp:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	str	r0, [fp, #-40]
	ldr	r3, .L124
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #36
	mov	r2, #20
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #4
	str	r3, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #2
	str	r3, [fp, #-28]
	ldr	r3, .L124+4
	ldr	r3, [r3]
	sub	r2, fp, #36
	ldr	r1, .L124+8
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L117
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #22
	bne	.L118
	ldr	r3, .L124+12
	ldr	r3, [r3]
	ldr	r2, .L124+16
	ldr	r2, [r2]
	ldr	r1, .L124+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L118:
	ldr	r0, .L124+24
	bl	errno_exit
.L117:
	mov	r1, #8
	mov	r0, #4
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L124+28
	str	r2, [r3]
	ldr	r3, .L124+28
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L119
	ldr	r3, .L124+12
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L124+32
	bl	fwrite
	mov	r0, #1
	bl	exit
.L119:
	ldr	r3, .L124+36
	mov	r2, #0
	str	r2, [r3]
	b	.L120
.L122:
	ldr	r3, .L124+28
	ldr	r2, [r3]
	ldr	r3, .L124+36
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-40]
	str	r2, [r3, #4]
	ldr	r3, .L124+28
	ldr	r2, [r3]
	ldr	r3, .L124+36
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r4, r2, r3
	ldr	r0, [fp, #-40]
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L124+28
	ldr	r2, [r3]
	ldr	r3, .L124+36
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L121
	ldr	r3, .L124+12
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L124+32
	bl	fwrite
	mov	r0, #1
	bl	exit
.L121:
	ldr	r3, .L124+36
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L124+36
	str	r3, [r2]
.L120:
	ldr	r3, .L124+36
	ldr	r3, [r3]
	cmp	r3, #3
	bls	.L122
	nop
	ldr	r3, .L124
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L123
	bl	__stack_chk_fail
.L123:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L125:
	.align	2
.L124:
	.word	.LC24
	.word	fd
	.word	-1072409080
	.word	stderr
	.word	dev_name
	.word	.LC23
	.word	.LC18
	.word	buffers
	.word	.LC16
	.word	n_buffers
	.size	init_userp, .-init_userp
	.section	.rodata
	.align	2
.LC25:
	.ascii	"%s is no V4L2 device\012\000"
	.align	2
.LC26:
	.ascii	"VIDIOC_QUERYCAP\000"
	.align	2
.LC27:
	.ascii	"%s is no video capture device\012\000"
	.align	2
.LC28:
	.ascii	"%s does not support read i/o\012\000"
	.align	2
.LC29:
	.ascii	"%s does not support streaming i/o\012\000"
	.align	2
.LC30:
	.ascii	"Force Format %d\012\000"
	.align	2
.LC31:
	.ascii	"VIDIOC_S_FMT\000"
	.align	2
.LC32:
	.ascii	"VIDIOC_G_FMT\000"
	.align	2
.LC33:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_device, %function
init_device:
	@ args = 0, pretend = 0, frame = 384
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #384
	ldr	r3, .L154
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L154+4
	ldr	r3, [r3]
	sub	r2, fp, #316
	ldr	r1, .L154+8
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L127
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #22
	bne	.L128
	ldr	r3, .L154+12
	ldr	r3, [r3]
	ldr	r2, .L154+16
	ldr	r2, [r2]
	ldr	r1, .L154+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L128:
	ldr	r0, .L154+24
	bl	errno_exit
.L127:
	ldr	r3, [fp, #-232]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L129
	ldr	r3, .L154+12
	ldr	r3, [r3]
	ldr	r2, .L154+16
	ldr	r2, [r2]
	ldr	r1, .L154+28
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L129:
	ldr	r3, .L154+32
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L130
	sub	r3, r3, #1
	cmp	r3, #1
	bhi	.L131
	b	.L149
.L130:
	ldr	r3, [fp, #-232]
	and	r3, r3, #16777216
	cmp	r3, #0
	bne	.L150
	ldr	r3, .L154+12
	ldr	r3, [r3]
	ldr	r2, .L154+16
	ldr	r2, [r2]
	ldr	r1, .L154+36
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L149:
	ldr	r3, [fp, #-232]
	and	r3, r3, #67108864
	cmp	r3, #0
	bne	.L151
	ldr	r3, .L154+12
	ldr	r3, [r3]
	ldr	r2, .L154+16
	ldr	r2, [r2]
	ldr	r1, .L154+40
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L150:
	nop
	b	.L131
.L151:
	nop
.L131:
	sub	r3, fp, #360
	mov	r2, #44
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-360]
	ldr	r3, .L154+4
	ldr	r3, [r3]
	sub	r2, fp, #360
	ldr	r1, .L154+44
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmp	r3, #0
	bne	.L135
	mov	r3, #1
	str	r3, [fp, #-380]
	sub	ip, fp, #376
	sub	r3, fp, #340
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, .L154+4
	ldr	r3, [r3]
	sub	r2, fp, #380
	ldr	r1, .L154+48
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L152
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #22
	b	.L135
.L152:
	nop
.L135:
	sub	r3, fp, #212
	mov	r2, #204
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-212]
	ldr	r3, .L154+12
	ldr	r3, [r3]
	ldr	r2, .L154+52
	ldr	r2, [r2]
	ldr	r1, .L154+56
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L154+52
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L138
	ldr	r3, .L154+52
	ldr	r3, [r3]
	cmp	r3, #2
	bne	.L139
	mov	r3, #1920
	str	r3, [fp, #-208]
	ldr	r3, .L154+60
	str	r3, [fp, #-204]
	ldr	r3, .L154+64
	str	r3, [fp, #-200]
	mov	r3, #4
	str	r3, [fp, #-196]
	b	.L140
.L139:
	ldr	r3, .L154+52
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L140
	mov	r3, #640
	str	r3, [fp, #-208]
	mov	r3, #480
	str	r3, [fp, #-204]
	ldr	r3, .L154+68
	str	r3, [fp, #-200]
	mov	r3, #4
	str	r3, [fp, #-196]
.L140:
	ldr	r3, .L154+4
	ldr	r3, [r3]
	sub	r2, fp, #212
	ldr	r1, .L154+72
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L141
	ldr	r0, .L154+76
	bl	errno_exit
	b	.L141
.L138:
	ldr	r3, .L154+4
	ldr	r3, [r3]
	sub	r2, fp, #212
	ldr	r1, .L154+80
	mov	r0, r3
	bl	xioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L141
	ldr	r0, .L154+84
	bl	errno_exit
.L141:
	ldr	r3, [fp, #-208]
	lsl	r3, r3, #1
	str	r3, [fp, #-384]
	ldr	r3, [fp, #-192]
	ldr	r2, [fp, #-384]
	cmp	r2, r3
	bls	.L142
	ldr	r3, [fp, #-384]
	str	r3, [fp, #-192]
.L142:
	ldr	r3, [fp, #-192]
	ldr	r2, [fp, #-204]
	mul	r3, r2, r3
	str	r3, [fp, #-384]
	ldr	r3, [fp, #-188]
	ldr	r2, [fp, #-384]
	cmp	r2, r3
	bls	.L143
	ldr	r3, [fp, #-384]
	str	r3, [fp, #-188]
.L143:
	ldr	r3, .L154+32
	ldr	r3, [r3]
	cmp	r3, #2
	beq	.L144
	cmp	r3, #2
	bhi	.L153
	cmp	r3, #0
	beq	.L146
	cmp	r3, #1
	beq	.L147
	b	.L153
.L146:
	ldr	r3, [fp, #-188]
	mov	r0, r3
	bl	init_read
	b	.L145
.L147:
	bl	init_mmap
	b	.L145
.L144:
	ldr	r3, [fp, #-188]
	mov	r0, r3
	bl	init_userp
	nop
.L145:
.L153:
	nop
	ldr	r3, .L154
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L148
	bl	__stack_chk_fail
.L148:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L155:
	.align	2
.L154:
	.word	.LC33
	.word	fd
	.word	-2140645888
	.word	stderr
	.word	dev_name
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	io
	.word	.LC28
	.word	.LC29
	.word	-1070836166
	.word	1075074620
	.word	force_format
	.word	.LC30
	.word	1080
	.word	875967048
	.word	1448695129
	.word	-1060350459
	.word	.LC31
	.word	-1060350460
	.word	.LC32
	.size	init_device, .-init_device
	.section	.rodata
	.align	2
.LC34:
	.ascii	"close\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_device, %function
close_device:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L158
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L157
	ldr	r0, .L158+4
	bl	errno_exit
.L157:
	ldr	r3, .L158
	mvn	r2, #0
	str	r2, [r3]
	nop
	pop	{fp, pc}
.L159:
	.align	2
.L158:
	.word	fd
	.word	.LC34
	.size	close_device, .-close_device
	.section	.rodata
	.align	2
.LC35:
	.ascii	"Cannot identify '%s': %d, %s\012\000"
	.align	2
.LC36:
	.ascii	"%s is no device\012\000"
	.align	2
.LC37:
	.ascii	"Cannot open '%s': %d, %s\012\000"
	.align	2
.LC38:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_device, %function
open_device:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #108
	ldr	r3, .L166
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, .L166+4
	ldr	r3, [r3]
	sub	r2, fp, #116
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	bne	.L161
	ldr	r3, .L166+8
	ldr	r4, [r3]
	ldr	r3, .L166+4
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r6, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L166+12
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L161:
	ldr	r3, [fp, #-100]
	and	r3, r3, #61440
	cmp	r3, #8192
	beq	.L162
	ldr	r3, .L166+8
	ldr	r3, [r3]
	ldr	r2, .L166+4
	ldr	r2, [r2]
	ldr	r1, .L166+16
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L162:
	ldr	r3, .L166+4
	ldr	r3, [r3]
	mov	r2, #0
	ldr	r1, .L166+20
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L166+24
	str	r3, [r2]
	ldr	r3, .L166+24
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L165
	ldr	r3, .L166+8
	ldr	r4, [r3]
	ldr	r3, .L166+4
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r6, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L166+28
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L165:
	nop
	ldr	r3, .L166
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L164
	bl	__stack_chk_fail
.L164:
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L167:
	.align	2
.L166:
	.word	.LC38
	.word	dev_name
	.word	stderr
	.word	.LC35
	.word	.LC36
	.word	2050
	.word	fd
	.word	.LC37
	.size	open_device, .-open_device
	.section	.rodata
	.align	2
.LC39:
	.ascii	"Usage: %s [options]\012\012Version 1.3\012Options:\012"
	.ascii	"-d | --device name   Video device name [%s]\012-h |"
	.ascii	" --help          Print this message\012-m | --mmap "
	.ascii	"         Use memory mapped buffers [default]\012-r "
	.ascii	"| --read          Use read() calls\012-u | --userp "
	.ascii	"        Use application allocated buffers\012-o | -"
	.ascii	"-output        Outputs stream to stdout\012-f | --f"
	.ascii	"ormat        Force format to 640x480 YUYV\012-F | -"
	.ascii	"-formatH264    Force format to 1920x1080 H264\012-c"
	.ascii	" | --count         Number of frames to grab [%i] - "
	.ascii	"use 0 for infinite\012\012Example usage: capture -F"
	.ascii	" -o -c 300 > output.raw\012Captures 300 frames of H"
	.ascii	"264 at 1920x1080 - use raw2mpg4 script to convert t"
	.ascii	"o mpg4\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, .L169
	ldr	r1, [r3]
	ldr	r3, .L169+4
	ldr	r3, [r3]
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L169+8
	ldr	r0, [fp, #-8]
	bl	fprintf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L170:
	.align	2
.L169:
	.word	dev_name
	.word	frame_count
	.word	.LC39
	.size	usage, .-usage
	.section	.rodata
	.align	2
	.type	short_options, %object
	.size	short_options, 12
short_options:
	.ascii	"d:hmruofFc:\000"
	.align	2
.LC40:
	.ascii	"device\000"
	.align	2
.LC41:
	.ascii	"help\000"
	.align	2
.LC42:
	.ascii	"userp\000"
	.align	2
.LC43:
	.ascii	"output\000"
	.align	2
.LC44:
	.ascii	"format\000"
	.align	2
.LC45:
	.ascii	"formatH264\000"
	.align	2
.LC46:
	.ascii	"count\000"
	.align	2
	.type	long_options, %object
	.size	long_options, 160
long_options:
	.word	.LC40
	.word	1
	.word	0
	.word	100
	.word	.LC41
	.word	0
	.word	0
	.word	104
	.word	.LC21
	.word	0
	.word	0
	.word	109
	.word	.LC1
	.word	0
	.word	0
	.word	114
	.word	.LC42
	.word	0
	.word	0
	.word	117
	.word	.LC43
	.word	0
	.word	0
	.word	111
	.word	.LC44
	.word	0
	.word	0
	.word	102
	.word	.LC45
	.word	0
	.word	0
	.word	70
	.word	.LC46
	.word	1
	.word	0
	.word	99
	.word	0
	.word	0
	.word	0
	.word	0
	.align	2
.LC47:
	.ascii	"/dev/video0\000"
	.align	2
.LC48:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L193
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L193+4
	ldr	r2, .L193+8
	str	r2, [r3]
.L188:
	sub	r3, fp, #16
	str	r3, [sp]
	ldr	r3, .L193+12
	ldr	r2, .L193+16
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	getopt_long
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L172
	bl	open_device
	bl	init_device
	bl	start_capturing
	bl	mainloop
	bl	stop_capturing
	bl	uninit_device
	bl	close_device
	ldr	r3, .L193+20
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r3, #0
	ldr	r2, .L193
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L189
	b	.L190
.L172:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L191
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L175
	ldr	r3, [fp, #-12]
	cmp	r3, #117
	bgt	.L175
	ldr	r3, [fp, #-12]
	cmp	r3, #70
	blt	.L175
	ldr	r3, [fp, #-12]
	sub	r3, r3, #70
	cmp	r3, #47
	ldrls	pc, [pc, r3, asl #2]
	b	.L175
.L177:
	.word	.L185
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L184
	.word	.L183
	.word	.L175
	.word	.L182
	.word	.L175
	.word	.L181
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L175
	.word	.L180
	.word	.L175
	.word	.L179
	.word	.L175
	.word	.L175
	.word	.L178
	.word	.L175
	.word	.L175
	.word	.L176
.L183:
	ldr	r3, .L193+24
	ldr	r3, [r3]
	ldr	r2, .L193+4
	str	r3, [r2]
	b	.L186
.L181:
	ldr	r3, .L193+28
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	usage
	mov	r0, #0
	bl	exit
.L180:
	ldr	r3, .L193+32
	mov	r2, #1
	str	r2, [r3]
	b	.L186
.L178:
	ldr	r3, .L193+32
	mov	r2, #0
	str	r2, [r3]
	b	.L186
.L176:
	ldr	r3, .L193+32
	mov	r2, #2
	str	r2, [r3]
	b	.L186
.L179:
	ldr	r3, .L193+36
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L193+36
	str	r3, [r2]
	b	.L186
.L182:
	ldr	r3, .L193+40
	mov	r2, #1
	str	r2, [r3]
	b	.L186
.L185:
	ldr	r3, .L193+40
	mov	r2, #2
	str	r2, [r3]
	b	.L186
.L184:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L193+24
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	ldr	r2, .L193+44
	str	r3, [r2]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L192
	ldr	r3, .L193+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	errno_exit
	b	.L192
.L175:
	ldr	r3, .L193+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	usage
	mov	r0, #1
	bl	exit
.L191:
	nop
	b	.L188
.L192:
	nop
.L186:
	b	.L188
.L190:
	bl	__stack_chk_fail
.L189:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L194:
	.align	2
.L193:
	.word	.LC48
	.word	dev_name
	.word	.LC47
	.word	long_options
	.word	short_options
	.word	stderr
	.word	optarg
	.word	stdout
	.word	io
	.word	out_buf
	.word	force_format
	.word	frame_count
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.7380, %object
	.size	__PRETTY_FUNCTION__.7380, 11
__PRETTY_FUNCTION__.7380:
	.ascii	"read_frame\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
