	.file	"24335.c"
	.intel_syntax noprefix
	.text
	.globl	user_buf
	.bss
	.align 8
	.type	user_buf, @object
	.size	user_buf, 8
user_buf:
	.zero	8
	.local	n_buffer
	.comm	n_buffer,4,4
	.local	vinfo
	.comm	vinfo,160,32
	.local	finfo
	.comm	finfo,80,32
	.local	lcd_buf_size
	.comm	lcd_buf_size,4,4
	.local	fb_buf
	.comm	fb_buf,8,8
	.section	.rodata
.LC0:
	.string	"/dev/video0"
.LC1:
	.string	"Fail to open"
.LC2:
	.string	"open cam success %d\n"
	.text
	.globl	open_camer_device
	.type	open_camer_device, @function
open_camer_device:
.LFB7:
	.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	esi, 2050
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	open_camer_device, .-open_camer_device
	.section	.rodata
.LC3:
	.string	"/dev/fb0"
.LC4:
	.string	"open lcd success %d\n"
	.text
	.globl	open_lcd_device
	.type	open_lcd_device, @function
open_lcd_device:
.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, 16
	mov	esi, 2050
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L5
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	open_lcd_device, .-open_lcd_device
	.section	.rodata
.LC5:
	.string	"Fail to mmap fb_buf"
.LC6:
	.string	"start VIDIOC_REQBUFS"
	.align 8
.LC7:
	.string	"Fail to ioctl 'VIDIOC_REQBUFS'"
.LC8:
	.string	"Out of memory\n"
	.align 8
.LC9:
	.string	"Fail to ioctl : VIDIOC_QUERYBUF"
.LC10:
	.string	"Fail to mmap\n"
.LC11:
	.string	"%d\n"
	.text
	.globl	init_mmap
	.type	init_mmap, @function
init_mmap:
.LFB9:
	.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	DWORD PTR -164[rbp], edi
	mov	DWORD PTR -168[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -156[rbp], 0
	mov	eax, DWORD PTR lcd_buf_size[rip]
	cdqe
	mov	edx, DWORD PTR -164[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR fb_buf[rip], rax
	mov	rax, QWORD PTR fb_buf[rip]
	test	rax, rax
	jne	.L8
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	lea	rax, -144[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	DWORD PTR 16[rax], 0
	mov	DWORD PTR -144[rbp], 4
	mov	DWORD PTR -140[rbp], 1
	mov	DWORD PTR -136[rbp], 1
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -168[rbp]
	mov	esi, 3222558216
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L9
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	eax, DWORD PTR -144[rbp]
	mov	DWORD PTR n_buffer[rip], eax
	mov	eax, DWORD PTR -144[rbp]
	mov	eax, eax
	mov	esi, 16
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR user_buf[rip], rax
	mov	rax, QWORD PTR user_buf[rip]
	test	rax, rax
	jne	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	DWORD PTR -156[rbp], 0
	jmp	.L11
.L14:
	lea	rax, -112[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 11
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	DWORD PTR -108[rbp], 1
	mov	DWORD PTR -52[rbp], 1
	mov	eax, DWORD PTR -156[rbp]
	mov	DWORD PTR -112[rbp], eax
	lea	rdx, -112[rbp]
	mov	eax, DWORD PTR -168[rbp]
	mov	esi, 3227014665
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L12
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	edx, DWORD PTR -40[rbp]
	mov	rcx, QWORD PTR user_buf[rip]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, rcx
	mov	DWORD PTR 8[rax], edx
	mov	eax, DWORD PTR -48[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	mov	rdx, QWORD PTR user_buf[rip]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	lea	rbx, [rdx+rax]
	mov	eax, DWORD PTR -168[rbp]
	mov	r9, rcx
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR [rbx], rax
	mov	rdx, QWORD PTR user_buf[rip]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	cmp	rax, -1
	jne	.L13
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -156[rbp]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	add	DWORD PTR -156[rbp], 1
.L11:
	mov	edx, DWORD PTR -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cmp	edx, eax
	ja	.L14
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	init_mmap, .-init_mmap
	.section	.rodata
	.align 8
.LC12:
	.string	"Fail to ioctl:FBIOGET_FSCREENINFO\n"
	.align 8
.LC13:
	.string	"Fail to ioctl:FBIOGET_VSCREENINFO\n"
	.align 8
.LC14:
	.string	"vinfo.xres:%d, vinfo.yres:%d, vinfo.bits_per_pixel:%d, lcd_buf_size:%d, finfo.line_length:%d\n"
	.align 8
.LC15:
	.string	"{pixelformat = %c%c%c%c},description = '%s'\n"
.LC16:
	.string	"FAIL to ioctl VIDIOC_QUERYCAP"
	.align 8
.LC17:
	.string	"The Current device is not a video capture device"
	.align 8
.LC18:
	.string	"The Current device does not support streaming i/o"
.LC19:
	.string	"Can't set the fmt"
.LC20:
	.string	"Fail to ioctl\n"
.LC21:
	.string	"VIDIOC_S_FMT successfully"
	.align 8
.LC22:
	.string	"FimcV4l2 start: error %d, VIDIOC_S_PARM"
	.text
	.globl	init_device
	.type	init_device, @function
init_device:
.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, 640
	mov	DWORD PTR -628[rbp], edi
	mov	DWORD PTR -632[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -628[rbp]
	lea	rdx, finfo[rip]
	mov	esi, 17922
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L18
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	eax, DWORD PTR -628[rbp]
	lea	rdx, vinfo[rip]
	mov	esi, 17920
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L19
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	edx, DWORD PTR vinfo[rip]
	mov	eax, DWORD PTR vinfo[rip+4]
	imul	edx, eax
	mov	eax, DWORD PTR vinfo[rip+24]
	imul	eax, edx
	shr	eax, 3
	mov	DWORD PTR lcd_buf_size[rip], eax
	mov	edi, DWORD PTR finfo[rip+48]
	mov	esi, DWORD PTR lcd_buf_size[rip]
	mov	ecx, DWORD PTR vinfo[rip+24]
	mov	edx, DWORD PTR vinfo[rip+4]
	mov	eax, DWORD PTR vinfo[rip]
	mov	r9d, edi
	mov	r8d, esi
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -608[rbp]
	mov	edx, 64
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -608[rbp], 0
	mov	DWORD PTR -604[rbp], 1
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -608[rbp]
	add	eax, 1
	mov	DWORD PTR -608[rbp], eax
	mov	eax, DWORD PTR -564[rbp]
	shr	eax, 24
	mov	edi, eax
	mov	eax, DWORD PTR -564[rbp]
	shr	eax, 16
	movzx	ecx, al
	mov	eax, DWORD PTR -564[rbp]
	shr	eax, 8
	movzx	edx, al
	mov	eax, DWORD PTR -564[rbp]
	movzx	eax, al
	lea	rsi, -608[rbp]
	add	rsi, 12
	mov	r9, rsi
	mov	r8d, edi
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
.L20:
	lea	rdx, -608[rbp]
	mov	eax, DWORD PTR -632[rbp]
	mov	esi, 3225441794
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -624[rbp], eax
	cmp	DWORD PTR -624[rbp], 0
	je	.L21
	lea	rdx, -544[rbp]
	mov	eax, DWORD PTR -632[rbp]
	mov	esi, 2154321408
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -624[rbp], eax
	cmp	DWORD PTR -624[rbp], 0
	jns	.L22
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	mov	eax, DWORD PTR -460[rbp]
	and	eax, 1
	test	eax, eax
	jne	.L23
	lea	rdi, .LC17[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	eax, DWORD PTR -460[rbp]
	and	eax, 67108864
	test	eax, eax
	jne	.L24
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	lea	rax, -224[rbp]
	mov	edx, 208
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -224[rbp], 1
	mov	DWORD PTR -216[rbp], 320
	mov	DWORD PTR -212[rbp], 240
	mov	DWORD PTR -208[rbp], 1448695129
	mov	DWORD PTR -204[rbp], 4
	lea	rdx, -224[rbp]
	mov	eax, DWORD PTR -632[rbp]
	mov	esi, 3234878981
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L25
	lea	rdi, .LC19[rip]
	call	puts@PLT
	lea	rdi, .LC20[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L25:
	lea	rdi, .LC21[rip]
	call	puts@PLT
	mov	edx, DWORD PTR -632[rbp]
	mov	eax, DWORD PTR -628[rbp]
	mov	esi, edx
	mov	edi, eax
	call	init_mmap
	lea	rax, -432[rbp]
	mov	edx, 204
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -432[rbp], 1
	mov	DWORD PTR -424[rbp], 0
	mov	DWORD PTR -420[rbp], 1
	mov	DWORD PTR -416[rbp], 10
	lea	rdx, -432[rbp]
	mov	eax, DWORD PTR -632[rbp]
	mov	esi, 3234616854
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -620[rbp], eax
	cmp	DWORD PTR -620[rbp], 0
	jns	.L26
	mov	eax, DWORD PTR -620[rbp]
	mov	esi, eax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	printf@PLT
.L26:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	init_device, .-init_device
	.section	.rodata
.LC23:
	.string	"Fail to ioctl 'VIDIOC_QBUF'"
.LC24:
	.string	"i = %d.\n"
	.align 8
.LC25:
	.string	"Fail to ioctl 'VIDIOC_STREAMON'"
	.text
	.globl	start_capturing
	.type	start_capturing, @function
start_capturing:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -100[rbp], 0
	jmp	.L30
.L32:
	lea	rax, -96[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 11
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	DWORD PTR -92[rbp], 1
	mov	DWORD PTR -36[rbp], 1
	mov	eax, DWORD PTR -100[rbp]
	mov	DWORD PTR -96[rbp], eax
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, 3227014671
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L31
	lea	rdi, .LC23[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L31:
	add	DWORD PTR -100[rbp], 1
.L30:
	mov	eax, DWORD PTR n_buffer[rip]
	cmp	DWORD PTR -100[rbp], eax
	jb	.L32
	mov	DWORD PTR -104[rbp], 1
	lea	rdx, -104[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, 1074026002
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L33
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, eax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC25[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L33:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	start_capturing, .-start_capturing
	.globl	clip
	.type	clip, @function
clip:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	DWORD PTR -12[rbp], edx
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -12[rbp]
	jg	.L37
	mov	eax, DWORD PTR -8[rbp]
	cmp	DWORD PTR -4[rbp], eax
	cmovge	eax, DWORD PTR -4[rbp]
	jmp	.L39
.L37:
	mov	eax, DWORD PTR -12[rbp]
.L39:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	clip, .-clip
	.globl	process_image
	.type	process_image, @function
process_image:
.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, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	DWORD PTR -92[rbp], esi
	mov	rax, QWORD PTR -88[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	DWORD PTR -56[rbp], 320
	mov	DWORD PTR -52[rbp], 240
	mov	DWORD PTR -48[rbp], 640
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -64[rbp], 0
	jmp	.L41
.L44:
	mov	DWORD PTR -60[rbp], 0
	mov	DWORD PTR -68[rbp], 0
	jmp	.L42
.L43:
	mov	edx, DWORD PTR vinfo[rip+16]
	mov	eax, DWORD PTR -68[rbp]
	add	edx, eax
	mov	eax, DWORD PTR vinfo[rip+24]
	shr	eax, 3
	mov	ecx, edx
	imul	ecx, eax
	mov	edx, DWORD PTR vinfo[rip+20]
	mov	eax, DWORD PTR -64[rbp]
	add	edx, eax
	mov	eax, DWORD PTR finfo[rip+48]
	imul	eax, edx
	add	eax, ecx
	mov	eax, eax
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -60[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -44[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, -128
	mov	DWORD PTR -40[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	cdqe
	lea	rdx, 3[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, -128
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	imul	edx, eax, 298
	mov	eax, DWORD PTR -32[rbp]
	imul	eax, eax, 409
	add	eax, edx
	sub	eax, -128
	sar	eax, 8
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	imul	edx, eax, 298
	mov	eax, DWORD PTR -40[rbp]
	imul	eax, eax, -100
	add	edx, eax
	mov	eax, DWORD PTR -32[rbp]
	imul	eax, eax, -208
	add	eax, edx
	sub	eax, -128
	sar	eax, 8
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -44[rbp]
	imul	edx, eax, 298
	mov	eax, DWORD PTR -40[rbp]
	imul	eax, eax, 516
	add	eax, edx
	sub	eax, -128
	sar	eax, 8
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 255
	mov	esi, 0
	mov	edi, eax
	call	clip
	mov	edx, eax
	mov	rcx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 255
	mov	esi, 0
	mov	edi, eax
	call	clip
	mov	edx, eax
	mov	rcx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 255
	mov	esi, 0
	mov	edi, eax
	call	clip
	mov	edx, eax
	mov	rcx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 2
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	mov	rdx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 3
	add	rax, rdx
	mov	BYTE PTR [rax], -1
	mov	eax, DWORD PTR -36[rbp]
	imul	edx, eax, 298
	mov	eax, DWORD PTR -32[rbp]
	imul	eax, eax, 409
	add	eax, edx
	sub	eax, -128
	sar	eax, 8
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	imul	edx, eax, 298
	mov	eax, DWORD PTR -40[rbp]
	imul	eax, eax, -100
	add	edx, eax
	mov	eax, DWORD PTR -32[rbp]
	imul	eax, eax, -208
	add	eax, edx
	sub	eax, -128
	sar	eax, 8
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	imul	edx, eax, 298
	mov	eax, DWORD PTR -40[rbp]
	imul	eax, eax, 516
	add	eax, edx
	sub	eax, -128
	sar	eax, 8
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 255
	mov	esi, 0
	mov	edi, eax
	call	clip
	mov	edx, eax
	mov	rcx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, 255
	mov	esi, 0
	mov	edi, eax
	call	clip
	mov	edx, eax
	mov	rcx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 5
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 255
	mov	esi, 0
	mov	edi, eax
	call	clip
	mov	edx, eax
	mov	rcx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 6
	add	rax, rcx
	mov	BYTE PTR [rax], dl
	mov	rdx, QWORD PTR fb_buf[rip]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 7
	add	rax, rdx
	mov	BYTE PTR [rax], -1
	add	DWORD PTR -60[rbp], 4
	add	DWORD PTR -68[rbp], 2
.L42:
	mov	eax, DWORD PTR -56[rbp]
	add	eax, eax
	cmp	DWORD PTR -60[rbp], eax
	jl	.L43
	mov	eax, DWORD PTR -48[rbp]
	cdqe
	add	QWORD PTR -16[rbp], rax
	add	DWORD PTR -64[rbp], 1
.L41:
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L44
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	process_image, .-process_image
	.section	.rodata
.LC26:
	.string	"Fail to ioctl 'VIDIOC_DQBUF'"
.LC27:
	.string	"the_stack_data/24335.c"
.LC28:
	.string	"buf.index < n_buffer"
	.text
	.globl	read_frame
	.type	read_frame, @function
read_frame:
.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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -96[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 11
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	DWORD PTR -92[rbp], 1
	mov	DWORD PTR -36[rbp], 1
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 3227014673
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L47
	lea	rdi, .LC26[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L47:
	mov	eax, DWORD PTR -96[rbp]
	mov	edx, DWORD PTR n_buffer[rip]
	cmp	eax, edx
	jb	.L48
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 364
	lea	rsi, .LC27[rip]
	lea	rdi, .LC28[rip]
	call	__assert_fail@PLT
.L48:
	mov	rax, QWORD PTR user_buf[rip]
	mov	edx, DWORD PTR -96[rbp]
	mov	edx, edx
	sal	rdx, 4
	add	rax, rdx
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR user_buf[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
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 3227014671
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L49
	lea	rdi, .LC23[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L49:
	mov	eax, 1
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L51
	call	__stack_chk_fail@PLT
.L51:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	read_frame, .-read_frame
	.section	.rodata
.LC29:
	.string	"Fail to select"
.LC30:
	.string	"select Timeout\n"
	.text
	.globl	mainloop
	.type	mainloop, @function
mainloop:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	DWORD PTR -196[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -192[rbp], 1
	jmp	.L53
.L59:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 393 "the_stack_data/24335.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -188[rbp], edx
	mov	DWORD PTR -184[rbp], eax
	mov	eax, DWORD PTR -196[rbp]
	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 -196[rbp]
	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], 5
	mov	QWORD PTR -152[rbp], 0
	mov	eax, DWORD PTR -196[rbp]
	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 -180[rbp], eax
	cmp	DWORD PTR -180[rbp], -1
	jne	.L54
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L62
	lea	rdi, .LC29[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L54:
	cmp	DWORD PTR -180[rbp], 0
	jne	.L57
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 15
	mov	esi, 1
	lea	rdi, .LC30[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L57:
	call	clock@PLT
	mov	QWORD PTR -176[rbp], rax
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	read_frame
	test	eax, eax
	je	.L59
	call	clock@PLT
	mov	QWORD PTR -168[rbp], rax
	jmp	.L53
.L62:
	nop
	jmp	.L59
.L53:
	mov	eax, DWORD PTR -192[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -192[rbp], edx
	test	eax, eax
	jg	.L59
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L61
	call	__stack_chk_fail@PLT
.L61:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	mainloop, .-mainloop
	.section	.rodata
	.align 8
.LC31:
	.string	"Fail to ioctl 'VIDIOC_STREAMOFF'"
	.text
	.globl	stop_capturing
	.type	stop_capturing, @function
stop_capturing:
.LFB16:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 1
	lea	rdx, -12[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 1074026003
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L67
	lea	rdi, .LC31[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L67:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L66
	call	__stack_chk_fail@PLT
.L66:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	stop_capturing, .-stop_capturing
	.section	.rodata
	.align 8
.LC32:
	.string	" Error: framebuffer device munmap() failed.\n"
	.text
	.globl	uninit_camer_device
	.type	uninit_camer_device, @function
uninit_camer_device:
.LFB17:
	.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	DWORD PTR -4[rbp], 0
	jmp	.L69
.L71:
	mov	rdx, QWORD PTR user_buf[rip]
	mov	eax, DWORD PTR -4[rbp]
	sal	rax, 4
	add	rax, rdx
	mov	eax, DWORD PTR 8[rax]
	movsx	rdx, eax
	mov	rcx, QWORD PTR user_buf[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	.L70
	mov	edi, 1
	call	exit@PLT
.L70:
	add	DWORD PTR -4[rbp], 1
.L69:
	mov	eax, DWORD PTR n_buffer[rip]
	cmp	DWORD PTR -4[rbp], eax
	jb	.L71
	mov	eax, DWORD PTR lcd_buf_size[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR fb_buf[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L72
	lea	rdi, .LC32[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L72:
	mov	rax, QWORD PTR user_buf[rip]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	uninit_camer_device, .-uninit_camer_device
	.section	.rodata
.LC33:
	.string	"Fail to close lcd_fd"
.LC34:
	.string	"Fail to close cam_fd"
	.text
	.globl	close_camer_device
	.type	close_camer_device, @function
close_camer_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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	cmp	eax, -1
	jne	.L75
	lea	rdi, .LC33[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L75:
	mov	eax, DWORD PTR -8[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	cmp	eax, -1
	jne	.L78
	lea	rdi, .LC34[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L78:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	close_camer_device, .-close_camer_device
	.globl	main
	.type	main, @function
main:
.LFB19:
	.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, 0
	call	open_lcd_device
	mov	DWORD PTR -8[rbp], eax
	mov	eax, 0
	call	open_camer_device
	mov	DWORD PTR -4[rbp], eax
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	init_device
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	start_capturing
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	mainloop
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	stop_capturing
	mov	eax, 0
	call	uninit_camer_device
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, edx
	mov	edi, eax
	call	close_camer_device
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.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	"24335.c"
	.text
	.comm	user_buf,4,4
	.local	n_buffer
	.comm	n_buffer,4,4
	.local	vinfo
	.comm	vinfo,160,4
	.local	finfo
	.comm	finfo,68,4
	.local	lcd_buf_size
	.comm	lcd_buf_size,4,4
	.local	fb_buf
	.comm	fb_buf,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/video0\000"
	.align	2
.LC1:
	.ascii	"Fail to open\000"
	.align	2
.LC2:
	.ascii	"open cam success %d\012\000"
	.text
	.align	2
	.global	open_camer_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_camer_device, %function
open_camer_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	r1, .L4
	ldr	r0, .L4+4
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L4+8
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r1, [fp, #-8]
	ldr	r0, .L4+12
	bl	printf
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	2050
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	open_camer_device, .-open_camer_device
	.section	.rodata
	.align	2
.LC3:
	.ascii	"/dev/fb0\000"
	.align	2
.LC4:
	.ascii	"open lcd success %d\012\000"
	.text
	.align	2
	.global	open_lcd_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_lcd_device, %function
open_lcd_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	r1, .L9
	ldr	r0, .L9+4
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L9+8
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	ldr	r1, [fp, #-8]
	ldr	r0, .L9+12
	bl	printf
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	2050
	.word	.LC3
	.word	.LC1
	.word	.LC4
	.size	open_lcd_device, .-open_lcd_device
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Fail to mmap fb_buf\000"
	.align	2
.LC6:
	.ascii	"start VIDIOC_REQBUFS\000"
	.align	2
.LC7:
	.ascii	"Fail to ioctl 'VIDIOC_REQBUFS'\000"
	.align	2
.LC8:
	.ascii	"Out of memory\012\000"
	.align	2
.LC9:
	.ascii	"Fail to ioctl : VIDIOC_QUERYBUF\000"
	.align	2
.LC10:
	.ascii	"Fail to mmap\012\000"
	.align	2
.LC11:
	.ascii	"%d\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_mmap
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_mmap, %function
init_mmap:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #124
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-116]
	ldr	r3, .L21+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-120]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L21+8
	str	r3, [r2]
	ldr	r3, .L21+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L21+12
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	sub	r3, fp, #104
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	str	r3, [r2, #16]
	mov	r3, #4
	str	r3, [fp, #-104]
	mov	r3, #1
	str	r3, [fp, #-100]
	mov	r3, #1
	str	r3, [fp, #-96]
	ldr	r0, .L21+16
	bl	puts
	sub	r3, fp, #104
	mov	r2, r3
	ldr	r1, .L21+20
	ldr	r0, [fp, #-124]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L21+24
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-104]
	mov	r2, r3
	ldr	r3, .L21+28
	str	r2, [r3]
	ldr	r3, [fp, #-104]
	mov	r1, #8
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L21+32
	str	r2, [r3]
	ldr	r3, .L21+32
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L14
	ldr	r3, .L21+36
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L21+40
	bl	fwrite
	mov	r0, #1
	bl	exit
.L14:
	mov	r3, #0
	str	r3, [fp, #-116]
	b	.L15
.L18:
	sub	r3, fp, #84
	mov	r0, r3
	mov	r3, #68
	mov	r2, r3
	mov	r1, #0
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-80]
	mov	r3, #1
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-116]
	str	r3, [fp, #-84]
	sub	r3, fp, #84
	mov	r2, r3
	ldr	r1, .L21+44
	ldr	r0, [fp, #-124]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r0, .L21+48
	bl	perror
	mov	r0, #1
	bl	exit
.L16:
	ldr	r1, [fp, #-28]
	ldr	r3, .L21+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, r1
	str	r2, [r3, #4]
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-32]
	mov	r0, r3
	ldr	r3, .L21+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #3
	add	r4, r2, r3
	str	r0, [sp, #4]
	ldr	r3, [fp, #-124]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L21+32
	ldr	r2, [r3]
	ldr	r3, [fp, #-116]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L17
	ldr	r0, .L21+52
	bl	perror
	ldr	r1, [fp, #-116]
	ldr	r0, .L21+56
	bl	printf
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, [fp, #-116]
	add	r3, r3, #1
	str	r3, [fp, #-116]
.L15:
	ldr	r2, [fp, #-104]
	ldr	r3, [fp, #-116]
	cmp	r2, r3
	bhi	.L18
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC12
	.word	lcd_buf_size
	.word	fb_buf
	.word	.LC5
	.word	.LC6
	.word	-1072409080
	.word	.LC7
	.word	n_buffer
	.word	user_buf
	.word	stderr
	.word	.LC8
	.word	-1069263351
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	init_mmap, .-init_mmap
	.section	.rodata
	.align	2
.LC13:
	.ascii	"Fail to ioctl:FBIOGET_FSCREENINFO\012\000"
	.align	2
.LC14:
	.ascii	"Fail to ioctl:FBIOGET_VSCREENINFO\012\000"
	.align	2
.LC15:
	.ascii	"vinfo.xres:%d, vinfo.yres:%d, vinfo.bits_per_pixel:"
	.ascii	"%d, lcd_buf_size:%d, finfo.line_length:%d\012\000"
	.align	2
.LC16:
	.ascii	"{pixelformat = %c%c%c%c},description = '%s'\012\000"
	.align	2
.LC17:
	.ascii	"FAIL to ioctl VIDIOC_QUERYCAP\000"
	.align	2
.LC18:
	.ascii	"The Current device is not a video capture device\000"
	.align	2
.LC19:
	.ascii	"The Current device does not support streaming i/o\000"
	.align	2
.LC20:
	.ascii	"Can't set the fmt\000"
	.align	2
.LC21:
	.ascii	"Fail to ioctl\012\000"
	.align	2
.LC22:
	.ascii	"VIDIOC_S_FMT successfully\000"
	.align	2
.LC23:
	.ascii	"FimcV4l2 start: error %d, VIDIOC_S_PARM\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_device, %function
init_device:
	@ args = 0, pretend = 0, frame = 608
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #616
	str	r0, [fp, #-608]
	str	r1, [fp, #-612]
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L35+4
	ldr	r1, .L35+8
	ldr	r0, [fp, #-608]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L24
	ldr	r0, .L35+12
	bl	perror
	mov	r0, #1
	bl	exit
.L24:
	ldr	r2, .L35+16
	mov	r1, #17920
	ldr	r0, [fp, #-608]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L25
	ldr	r0, .L35+20
	bl	perror
	mov	r0, #1
	bl	exit
.L25:
	ldr	r3, .L35+16
	ldr	r3, [r3]
	ldr	r2, .L35+16
	ldr	r2, [r2, #4]
	mul	r3, r2, r3
	ldr	r2, .L35+16
	ldr	r2, [r2, #24]
	mul	r3, r2, r3
	lsr	r3, r3, #3
	mov	r2, r3
	ldr	r3, .L35+24
	str	r2, [r3]
	ldr	r3, .L35+16
	ldr	r1, [r3]
	ldr	r3, .L35+16
	ldr	r0, [r3, #4]
	ldr	r3, .L35+16
	ldr	ip, [r3, #24]
	ldr	r3, .L35+24
	ldr	r3, [r3]
	ldr	r2, .L35+4
	ldr	r2, [r2, #44]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L35+28
	bl	printf
	sub	r3, fp, #584
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-584]
	mov	r3, #1
	str	r3, [fp, #-580]
	b	.L26
.L27:
	ldr	r3, [fp, #-584]
	add	r3, r3, #1
	str	r3, [fp, #-584]
	ldr	r3, [fp, #-540]
	and	r1, r3, #255
	ldr	r3, [fp, #-540]
	lsr	r3, r3, #8
	and	r0, r3, #255
	ldr	r3, [fp, #-540]
	lsr	r3, r3, #16
	and	ip, r3, #255
	ldr	r3, [fp, #-540]
	lsr	r3, r3, #24
	sub	r2, fp, #584
	add	r2, r2, #12
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L35+32
	bl	printf
.L26:
	sub	r3, fp, #584
	mov	r2, r3
	ldr	r1, .L35+36
	ldr	r0, [fp, #-612]
	bl	ioctl
	str	r0, [fp, #-600]
	ldr	r3, [fp, #-600]
	cmp	r3, #0
	beq	.L27
	sub	r3, fp, #520
	mov	r2, r3
	ldr	r1, .L35+40
	ldr	r0, [fp, #-612]
	bl	ioctl
	str	r0, [fp, #-600]
	ldr	r3, [fp, #-600]
	cmp	r3, #0
	bge	.L28
	ldr	r0, .L35+44
	bl	perror
	mov	r0, #1
	bl	exit
.L28:
	ldr	r3, [fp, #-436]
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L29
	ldr	r0, .L35+48
	bl	puts
	mov	r0, #1
	bl	exit
.L29:
	ldr	r3, [fp, #-436]
	and	r3, r3, #67108864
	cmp	r3, #0
	bne	.L30
	ldr	r0, .L35+52
	bl	puts
	mov	r0, #1
	bl	exit
.L30:
	sub	r3, fp, #416
	mov	r2, #204
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-416]
	mov	r3, #320
	str	r3, [fp, #-412]
	mov	r3, #240
	str	r3, [fp, #-408]
	ldr	r3, .L35+56
	str	r3, [fp, #-404]
	mov	r3, #4
	str	r3, [fp, #-400]
	sub	r3, fp, #416
	mov	r2, r3
	ldr	r1, .L35+60
	ldr	r0, [fp, #-612]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L31
	ldr	r0, .L35+64
	bl	puts
	ldr	r0, .L35+68
	bl	perror
	mov	r0, #1
	bl	exit
.L31:
	ldr	r0, .L35+72
	bl	puts
	ldr	r1, [fp, #-612]
	ldr	r0, [fp, #-608]
	bl	init_mmap
	sub	r3, fp, #212
	mov	r2, #204
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-212]
	mov	r3, #0
	str	r3, [fp, #-204]
	mov	r3, #1
	str	r3, [fp, #-200]
	mov	r3, #10
	str	r3, [fp, #-196]
	sub	r3, fp, #212
	mov	r2, r3
	ldr	r1, .L35+76
	ldr	r0, [fp, #-612]
	bl	ioctl
	str	r0, [fp, #-596]
	ldr	r3, [fp, #-596]
	cmp	r3, #0
	bge	.L32
	ldr	r1, [fp, #-596]
	ldr	r0, .L35+80
	bl	printf
.L32:
	mov	r3, #0
	ldr	r2, .L35
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC24
	.word	finfo
	.word	17922
	.word	.LC13
	.word	vinfo
	.word	.LC14
	.word	lcd_buf_size
	.word	.LC15
	.word	.LC16
	.word	-1069525502
	.word	-2140645888
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	1448695129
	.word	-1060350459
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	-1060350442
	.word	.LC23
	.size	init_device, .-init_device
	.section	.rodata
	.align	2
.LC25:
	.ascii	"Fail to ioctl 'VIDIOC_QBUF'\000"
	.align	2
.LC26:
	.ascii	"i = %d.\012\000"
	.align	2
.LC27:
	.ascii	"Fail to ioctl 'VIDIOC_STREAMON'\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	start_capturing
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_capturing, %function
start_capturing:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L38
.L40:
	sub	r3, fp, #76
	mov	r0, r3
	mov	r3, #68
	mov	r2, r3
	mov	r1, #0
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-72]
	mov	r3, #1
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-80]
	str	r3, [fp, #-76]
	sub	r3, fp, #76
	mov	r2, r3
	ldr	r1, .L44+4
	ldr	r0, [fp, #-88]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L39
	ldr	r0, .L44+8
	bl	perror
	mov	r0, #1
	bl	exit
.L39:
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L38:
	ldr	r3, .L44+12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-80]
	cmp	r3, r2
	bcc	.L40
	mov	r3, #1
	str	r3, [fp, #-84]
	sub	r3, fp, #84
	mov	r2, r3
	ldr	r1, .L44+16
	ldr	r0, [fp, #-88]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L41
	ldr	r1, [fp, #-80]
	ldr	r0, .L44+20
	bl	printf
	ldr	r0, .L44+24
	bl	perror
	mov	r0, #1
	bl	exit
.L41:
	mov	r3, #0
	ldr	r2, .L44
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC28
	.word	-1069263345
	.word	.LC25
	.word	n_buffer
	.word	1074026002
	.word	.LC26
	.word	.LC27
	.size	start_capturing, .-start_capturing
	.align	2
	.global	clip
	.syntax unified
	.arm
	.fpu softvfp
	.type	clip, %function
clip:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bgt	.L47
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	b	.L49
.L47:
	ldr	r3, [fp, #-16]
.L49:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	clip, .-clip
	.align	2
	.global	process_image
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_image, %function
process_image:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, [fp, #-72]
	str	r3, [fp, #-64]
	mov	r3, #320
	str	r3, [fp, #-48]
	mov	r3, #240
	str	r3, [fp, #-44]
	mov	r3, #640
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-56]
	b	.L51
.L54:
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-60]
	b	.L52
.L53:
	ldr	r3, .L56
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-60]
	add	r3, r2, r3
	ldr	r2, .L56
	ldr	r2, [r2, #24]
	lsr	r2, r2, #3
	mul	r2, r3, r2
	ldr	r3, .L56
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-56]
	add	r3, r1, r3
	ldr	r1, .L56+4
	ldr	r1, [r1, #44]
	mul	r3, r1, r3
	add	r3, r2, r3
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-52]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-52]
	add	r3, r3, #1
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #128
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-52]
	add	r3, r3, #2
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-52]
	add	r3, r3, #3
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #128
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r1, r3, #5
	add	r3, r3, r1
	add	r1, r3, r2
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r0, r3, #4
	add	r3, r3, r0
	lsl	r3, r3, #3
	add	r3, r3, r2
	add	r3, r1, r3
	add	r3, r3, #128
	asr	r3, r3, #8
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r1, r3, #5
	add	r3, r3, r1
	add	r2, r3, r2
	ldr	r3, [fp, #-28]
	mvn	r1, #99
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	mvn	r1, #207
	mul	r3, r1, r3
	add	r3, r2, r3
	add	r3, r3, #128
	asr	r3, r3, #8
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-32]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r1, r3, #5
	add	r3, r3, r1
	add	r1, r3, r2
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #7
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #128
	asr	r3, r3, #8
	str	r3, [fp, #-8]
	mov	r2, #255
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	clip
	mov	r1, r0
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	mov	r2, #255
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	clip
	mov	r1, r0
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	mov	r2, #255
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	clip
	mov	r1, r0
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #2
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #3
	add	r3, r2, r3
	mvn	r2, #0
	strb	r2, [r3]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r1, r3, #5
	add	r3, r3, r1
	add	r1, r3, r2
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r0, r3, #4
	add	r3, r3, r0
	lsl	r3, r3, #3
	add	r3, r3, r2
	add	r3, r1, r3
	add	r3, r3, #128
	asr	r3, r3, #8
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r1, r3, #5
	add	r3, r3, r1
	add	r2, r3, r2
	ldr	r3, [fp, #-28]
	mvn	r1, #99
	mul	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	mvn	r1, #207
	mul	r3, r1, r3
	add	r3, r2, r3
	add	r3, r3, #128
	asr	r3, r3, #8
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	lsl	r1, r3, #5
	add	r3, r3, r1
	add	r1, r3, r2
	ldr	r2, [fp, #-28]
	mov	r3, r2
	lsl	r3, r3, #7
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #128
	asr	r3, r3, #8
	str	r3, [fp, #-8]
	mov	r2, #255
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	clip
	mov	r1, r0
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	mov	r2, #255
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	clip
	mov	r1, r0
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #5
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	mov	r2, #255
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	clip
	mov	r1, r0
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #6
	add	r3, r2, r3
	and	r2, r1, #255
	strb	r2, [r3]
	ldr	r3, .L56+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r3, #7
	add	r3, r2, r3
	mvn	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-60]
	add	r3, r3, #2
	str	r3, [fp, #-60]
.L52:
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #1
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	blt	.L53
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-64]
	add	r3, r2, r3
	str	r3, [fp, #-64]
	ldr	r3, [fp, #-56]
	add	r3, r3, #1
	str	r3, [fp, #-56]
.L51:
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	blt	.L54
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L57:
	.align	2
.L56:
	.word	vinfo
	.word	finfo
	.word	fb_buf
	.size	process_image, .-process_image
	.section	.rodata
	.align	2
.LC29:
	.ascii	"Fail to ioctl 'VIDIOC_DQBUF'\000"
	.align	2
.LC30:
	.ascii	"the_stack_data/24335.c\000"
	.align	2
.LC31:
	.ascii	"buf.index < n_buffer\000"
	.align	2
.LC32:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_frame
	.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
	str	r0, [fp, #-80]
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #76
	mov	r0, r3
	mov	r3, #68
	mov	r2, r3
	mov	r1, #0
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-72]
	mov	r3, #1
	str	r3, [fp, #-28]
	sub	r3, fp, #76
	mov	r2, r3
	ldr	r1, .L64+4
	ldr	r0, [fp, #-80]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L59
	ldr	r0, .L64+8
	bl	perror
	mov	r0, #1
	bl	exit
.L59:
	ldr	r3, [fp, #-76]
	ldr	r2, .L64+12
	ldr	r2, [r2]
	cmp	r3, r2
	bcc	.L60
	ldr	r3, .L64+16
	mov	r2, #364
	ldr	r1, .L64+20
	ldr	r0, .L64+24
	bl	__assert_fail
.L60:
	ldr	r3, .L64+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, .L64+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	bl	process_image
	sub	r3, fp, #76
	mov	r2, r3
	ldr	r1, .L64+32
	ldr	r0, [fp, #-80]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L61
	ldr	r0, .L64+36
	bl	perror
	mov	r0, #1
	bl	exit
.L61:
	mov	r3, #1
	ldr	r2, .L64
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L63
	bl	__stack_chk_fail
.L63:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC32
	.word	-1069263343
	.word	.LC29
	.word	n_buffer
	.word	__PRETTY_FUNCTION__.7028
	.word	.LC30
	.word	.LC31
	.word	user_buf
	.word	-1069263345
	.word	.LC25
	.size	read_frame, .-read_frame
	.section	.rodata
	.align	2
.LC33:
	.ascii	"Fail to select\000"
	.align	2
.LC34:
	.ascii	"select Timeout\012\000"
	.align	2
.LC35:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mainloop
	.syntax unified
	.arm
	.fpu softvfp
	.type	mainloop, %function
mainloop:
	@ args = 0, pretend = 0, frame = 176
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #184
	str	r0, [fp, #-176]
	ldr	r3, .L79
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-168]
	b	.L67
.L75:
	sub	r3, fp, #136
	str	r3, [fp, #-160]
	mov	r3, #0
	str	r3, [fp, #-164]
	b	.L68
.L69:
	ldr	r3, [fp, #-160]
	ldr	r2, [fp, #-164]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-164]
	add	r3, r3, #1
	str	r3, [fp, #-164]
.L68:
	ldr	r3, [fp, #-164]
	cmp	r3, #31
	bls	.L69
	ldr	r3, [fp, #-176]
	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, [fp, #-176]
	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, #5
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-176]
	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, #-156]
	ldr	r3, [fp, #-156]
	cmn	r3, #1
	bne	.L70
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L78
	ldr	r0, .L79+4
	bl	perror
	mov	r0, #1
	bl	exit
.L70:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L73
	ldr	r3, .L79+8
	ldr	r3, [r3]
	mov	r2, #15
	mov	r1, #1
	ldr	r0, .L79+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L73:
	bl	clock
	str	r0, [fp, #-152]
	ldr	r0, [fp, #-176]
	bl	read_frame
	mov	r3, r0
	cmp	r3, #0
	beq	.L75
	bl	clock
	str	r0, [fp, #-148]
	b	.L67
.L78:
	nop
	b	.L75
.L67:
	ldr	r3, [fp, #-168]
	add	r2, r3, #1
	str	r2, [fp, #-168]
	cmp	r3, #0
	bgt	.L75
	mov	r3, #0
	ldr	r2, .L79
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L77
	bl	__stack_chk_fail
.L77:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L80:
	.align	2
.L79:
	.word	.LC35
	.word	.LC33
	.word	stderr
	.word	.LC34
	.size	mainloop, .-mainloop
	.section	.rodata
	.align	2
.LC36:
	.ascii	"Fail to ioctl 'VIDIOC_STREAMOFF'\000"
	.align	2
.LC37:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	stop_capturing
	.syntax unified
	.arm
	.fpu softvfp
	.type	stop_capturing, %function
stop_capturing:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L86
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-12]
	sub	r3, fp, #12
	mov	r2, r3
	ldr	r1, .L86+4
	ldr	r0, [fp, #-16]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L85
	ldr	r0, .L86+8
	bl	perror
	mov	r0, #1
	bl	exit
.L85:
	nop
	ldr	r3, .L86
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L84
	bl	__stack_chk_fail
.L84:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L87:
	.align	2
.L86:
	.word	.LC37
	.word	1074026003
	.word	.LC36
	.size	stop_capturing, .-stop_capturing
	.section	.rodata
	.align	2
.LC38:
	.ascii	" Error: framebuffer device munmap() failed.\012\000"
	.text
	.align	2
	.global	uninit_camer_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	uninit_camer_device, %function
uninit_camer_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
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L89
.L91:
	ldr	r3, .L94
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, .L94
	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	.L90
	mov	r0, #1
	bl	exit
.L90:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L89:
	ldr	r3, .L94+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	bcc	.L91
	ldr	r3, .L94+8
	ldr	r3, [r3]
	ldr	r2, .L94+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L92
	ldr	r0, .L94+16
	bl	perror
	mov	r0, #1
	bl	exit
.L92:
	ldr	r3, .L94
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L95:
	.align	2
.L94:
	.word	user_buf
	.word	n_buffer
	.word	fb_buf
	.word	lcd_buf_size
	.word	.LC38
	.size	uninit_camer_device, .-uninit_camer_device
	.section	.rodata
	.align	2
.LC39:
	.ascii	"Fail to close lcd_fd\000"
	.align	2
.LC40:
	.ascii	"Fail to close cam_fd\000"
	.text
	.align	2
	.global	close_camer_device
	.syntax unified
	.arm
	.fpu softvfp
	.type	close_camer_device, %function
close_camer_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
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L97
	ldr	r0, .L101
	bl	perror
	mov	r0, #1
	bl	exit
.L97:
	ldr	r0, [fp, #-12]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L100
	ldr	r0, .L101+4
	bl	perror
	mov	r0, #1
	bl	exit
.L100:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L102:
	.align	2
.L101:
	.word	.LC39
	.word	.LC40
	.size	close_camer_device, .-close_camer_device
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	open_lcd_device
	str	r0, [fp, #-12]
	bl	open_camer_device
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	init_device
	ldr	r0, [fp, #-8]
	bl	start_capturing
	ldr	r0, [fp, #-8]
	bl	mainloop
	ldr	r0, [fp, #-8]
	bl	stop_capturing
	bl	uninit_camer_device
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	close_camer_device
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.7028, %object
	.size	__PRETTY_FUNCTION__.7028, 11
__PRETTY_FUNCTION__.7028:
	.ascii	"read_frame\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
