	.file	"891610.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"tcgetattr"
.LC1:
	.string	"tcsetattr"
	.text
	.globl	set_interface_attribs
	.type	set_interface_attribs, @function
set_interface_attribs:
.LFB0:
	.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	DWORD PTR -84[rbp], edi
	mov	DWORD PTR -88[rbp], esi
	mov	DWORD PTR -92[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -80[rbp]
	mov	edx, 60
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	test	eax, eax
	je	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L5
.L2:
	mov	edx, DWORD PTR -88[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetospeed@PLT
	mov	edx, DWORD PTR -88[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetispeed@PLT
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 48
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	and	eax, -2
	mov	DWORD PTR -80[rbp], eax
	mov	DWORD PTR -68[rbp], 0
	mov	DWORD PTR -76[rbp], 0
	mov	BYTE PTR -57[rbp], 0
	mov	BYTE PTR -58[rbp], 5
	mov	eax, DWORD PTR -80[rbp]
	and	ah, -29
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 2176
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	ah, -4
	mov	DWORD PTR -72[rbp], eax
	mov	edx, DWORD PTR -72[rbp]
	mov	eax, DWORD PTR -92[rbp]
	or	eax, edx
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, -65
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, 2147483647
	mov	DWORD PTR -72[rbp], eax
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	test	eax, eax
	je	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L5
.L4:
	mov	eax, 0
.L5:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	set_interface_attribs, .-set_interface_attribs
	.section	.rodata
.LC2:
	.string	"tggetattr"
	.align 8
.LC3:
	.string	"error %d setting term attributes\n"
	.text
	.globl	set_blocking
	.type	set_blocking, @function
set_blocking:
.LFB1:
	.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	DWORD PTR -84[rbp], edi
	mov	DWORD PTR -88[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -80[rbp]
	mov	edx, 60
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	test	eax, eax
	je	.L8
	lea	rdi, .LC2[rip]
	call	perror@PLT
	jmp	.L7
.L8:
	cmp	DWORD PTR -88[rbp], 0
	setne	al
	mov	BYTE PTR -57[rbp], al
	mov	BYTE PTR -58[rbp], 10
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	test	eax, eax
	je	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	set_blocking, .-set_blocking
	.type	kbhit, @function
kbhit:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 104 "the_stack_data/891610.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -168[rbp], edx
	mov	DWORD PTR -164[rbp], eax
	mov	rax, QWORD PTR -144[rbp]
	or	rax, 1
	mov	QWORD PTR -144[rbp], rax
	lea	rdx, -160[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 1
	call	select@PLT
	mov	rax, QWORD PTR -144[rbp]
	and	eax, 1
	test	rax, rax
	setne	al
	movzx	eax, al
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	kbhit, .-kbhit
	.type	nonblock, @function
nonblock:
.LFB3:
	.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	DWORD PTR -84[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -80[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	tcgetattr@PLT
	cmp	DWORD PTR -84[rbp], 1
	jne	.L16
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -3
	mov	DWORD PTR -68[rbp], eax
	mov	BYTE PTR -57[rbp], 1
	jmp	.L17
.L16:
	cmp	DWORD PTR -84[rbp], 0
	jne	.L17
	mov	eax, DWORD PTR -68[rbp]
	or	eax, 2
	mov	DWORD PTR -68[rbp], eax
.L17:
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	nonblock, .-nonblock
	.section	.rodata
.LC4:
	.string	"\033[1;1H\033[2J"
	.text
	.type	clear_screen, @function
clear_screen:
.LFB4:
	.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
	lea	rax, .LC4[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 12
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	clear_screen, .-clear_screen
	.section	.rodata
.LC5:
	.string	"\nInvalid Input"
.LC6:
	.string	" To select press [1/2/q]: "
	.text
	.type	option_selected, @function
option_selected:
.LFB5:
	.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
	mov	edi, 1
	call	nonblock
	jmp	.L21
.L24:
	mov	edi, 1
	call	usleep@PLT
	call	kbhit
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L21
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -5[rbp], al
	cmp	BYTE PTR -5[rbp], 49
	je	.L22
	cmp	BYTE PTR -5[rbp], 50
	je	.L22
	cmp	BYTE PTR -5[rbp], 113
	jne	.L23
.L22:
	mov	DWORD PTR -4[rbp], 1
	jmp	.L21
.L23:
	mov	DWORD PTR -4[rbp], 0
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L21:
	cmp	DWORD PTR -4[rbp], 0
	je	.L24
	mov	edi, 0
	call	nonblock
	mov	edi, 10
	call	putchar@PLT
	movzx	eax, BYTE PTR -5[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	option_selected, .-option_selected
	.section	.rodata
	.align 8
.LC7:
	.string	"**************FPGA FIRMWARE DEBUGGER*************"
.LC8:
	.string	"Chose your device"
.LC9:
	.string	"\n1-HDMI2USB"
.LC10:
	.string	"\n2-HDMI2ETHERNET"
.LC11:
	.string	"\nq-QUIT"
.LC12:
	.string	"\nTo select press [1/2/q]: "
	.text
	.globl	print_welcome
	.type	print_welcome, @function
print_welcome:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	clear_screen
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	call	option_selected
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_welcome, .-print_welcome
	.section	.rodata
.LC13:
	.string	"Portname of selected device: "
.LC14:
	.string	"%s"
.LC15:
	.string	"error %d opening %s: %s\n"
	.text
	.globl	open_port
	.type	open_port, @function
open_port:
.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, 56
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -48[rbp]
	mov	esi, 1052930
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	jns	.L29
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	lea	rdx, -48[rbp]
	mov	rcx, rbx
	mov	esi, eax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -52[rbp]
	jmp	.L31
.L29:
	mov	eax, DWORD PTR -52[rbp]
	mov	edx, 0
	mov	esi, 13
	mov	edi, eax
	call	set_interface_attribs
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, 0
	mov	edi, eax
	call	set_blocking
	mov	eax, DWORD PTR -52[rbp]
.L31:
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	open_port, .-open_port
	.section	.rodata
.LC16:
	.string	"\033[2J\033[1;1H"
.LC17:
	.string	"HDMI 0 is connected"
.LC18:
	.string	"HDMI 0 is not connected"
.LC19:
	.string	"HDMI 1 is connected"
.LC20:
	.string	"HDMI 1 is not connected"
.LC21:
	.string	"\n***CONNECT INPUT SOURCE***\n\n"
.LC22:
	.string	"Press ENTER to return\n"
.LC23:
	.string	"Output Format: "
.LC24:
	.string	"JPEG"
.LC25:
	.string	"RAW"
.LC26:
	.string	"Selected Source: "
.LC27:
	.string	"HDMI 0"
.LC28:
	.string	"HDMI 1"
.LC29:
	.string	"Test Pattern"
.LC30:
	.string	"Encoding Quality: "
.LC31:
	.string	"100%%\n"
.LC32:
	.string	"85%%\n"
.LC33:
	.string	"75%%\n"
.LC34:
	.string	"50%%\n"
.LC35:
	.string	"Input Resolution: %ux%u\n"
.LC36:
	.string	"Input Frame Rate: %hhu fps\n"
.LC37:
	.string	"Output Frame Rate: 0 fps"
	.align 8
.LC38:
	.string	"\n***START/RESTART USB STREAMING***\n"
.LC39:
	.string	"Press ENTER to return"
.LC40:
	.string	"\n"
.LC41:
	.string	"Output Frame Rate: %hhu fps\n"
.LC42:
	.string	"Frame Write Time: %hhu ms\n"
	.align 8
.LC43:
	.string	"Frame Processing Time: %hhu ms\n"
	.align 8
.LC44:
	.string	"No. of Frames Dropped: %hhu fps\n"
.LC47:
	.string	"Frame Size: %f Mbytes\n"
	.text
	.globl	parse_and_print
	.type	parse_and_print, @function
parse_and_print:
.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	QWORD PTR -24[rbp], rdi
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 6
	test	al, al
	je	.L34
	lea	rdi, .LC17[rip]
	call	puts@PLT
	jmp	.L35
.L34:
	lea	rdi, .LC18[rip]
	call	puts@PLT
.L35:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 5
	test	al, al
	je	.L36
	lea	rdi, .LC19[rip]
	call	puts@PLT
	jmp	.L37
.L36:
	lea	rdi, .LC20[rip]
	call	puts@PLT
.L37:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 6
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L38
	lea	rdi, .LC21[rip]
	call	puts@PLT
	lea	rdi, .LC22[rip]
	call	puts@PLT
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L33
.L38:
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 4
	movzx	eax, al
	and	eax, 1
	test	eax, eax
	je	.L40
	lea	rdi, .LC24[rip]
	call	puts@PLT
	jmp	.L41
.L40:
	lea	rdi, .LC25[rip]
	call	puts@PLT
.L41:
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 3
	movzx	eax, al
	and	eax, 1
	test	eax, eax
	jne	.L42
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 3
	movzx	eax, al
	and	eax, 1
	test	eax, eax
	jne	.L42
	lea	rdi, .LC27[rip]
	call	puts@PLT
	jmp	.L43
.L42:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 3
	movzx	eax, al
	and	eax, 1
	test	eax, eax
	jne	.L44
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	shr	al, 3
	movzx	eax, al
	and	eax, 1
	test	eax, eax
	je	.L44
	lea	rdi, .LC28[rip]
	call	puts@PLT
	jmp	.L43
.L44:
	lea	rdi, .LC29[rip]
	call	puts@PLT
.L43:
	lea	rdi, .LC30[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	and	eax, 3
	mov	BYTE PTR -13[rbp], al
	cmp	BYTE PTR -13[rbp], 0
	jne	.L45
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L46
.L45:
	cmp	BYTE PTR -13[rbp], 1
	jne	.L47
	lea	rdi, .LC32[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L46
.L47:
	cmp	BYTE PTR -13[rbp], 2
	jne	.L48
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L46
.L48:
	cmp	BYTE PTR -13[rbp], 3
	jne	.L46
	lea	rdi, .LC34[rip]
	mov	eax, 0
	call	printf@PLT
.L46:
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 2
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 3
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	or	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	DWORD PTR -8[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 4
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 5
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	or	eax, edx
	mov	DWORD PTR -8[rbp], eax
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC35[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 6
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC36[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 7
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L49
	lea	rdi, .LC37[rip]
	call	puts@PLT
	lea	rdi, .LC38[rip]
	call	puts@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC40[rip]
	call	puts@PLT
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L33
.L49:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 7
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC41[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 8
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC42[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 9
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC43[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 10
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC44[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 11
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 12
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	or	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 13
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	or	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	test	rax, rax
	js	.L50
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	jmp	.L51
.L50:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rdx
	addsd	xmm0, xmm0
.L51:
	movsd	xmm1, QWORD PTR .LC45[rip]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR .LC46[rip]
	divsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR .LC46[rip]
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	lea	rdi, .LC47[rip]
	mov	eax, 1
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC39[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	parse_and_print, .-parse_and_print
	.section	.rodata
.LC48:
	.string	"Chose Debugging Output Method"
.LC49:
	.string	"\n1- CDC"
.LC50:
	.string	"\n2- UART"
.LC51:
	.string	"\nq- Return"
.LC52:
	.string	"DS"
.LC53:
	.string	"read"
	.align 8
.LC54:
	.string	"Packets are on their way....feature coming soon"
.LC55:
	.string	"Thank You"
	.align 8
.LC56:
	.string	"TimVideos - World wide Leader in Live Event Streaming"
	.text
	.globl	main
	.type	main, @function
main:
.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, 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L71:
	call	print_welcome
	mov	BYTE PTR -139[rbp], al
	cmp	BYTE PTR -139[rbp], 49
	jne	.L53
	call	clear_screen
	lea	rdi, .LC48[rip]
	call	puts@PLT
	lea	rdi, .LC49[rip]
	call	puts@PLT
	lea	rdi, .LC50[rip]
	call	puts@PLT
	lea	rdi, .LC51[rip]
	call	puts@PLT
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	call	option_selected
	mov	BYTE PTR -138[rbp], al
	cmp	BYTE PTR -138[rbp], 113
	jne	.L54
	call	print_welcome
	jmp	.L55
.L54:
	call	open_port
	mov	DWORD PTR -132[rbp], eax
	cmp	DWORD PTR -132[rbp], 0
	jns	.L56
	mov	eax, 0
	jmp	.L57
.L56:
	mov	BYTE PTR -137[rbp], -86
	cmp	BYTE PTR -138[rbp], 49
	jne	.L58
	jmp	.L59
.L61:
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 2
	lea	rsi, .LC52[rip]
	mov	edi, eax
	call	write@PLT
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L60
	lea	rdi, .LC53[rip]
	call	perror@PLT
.L60:
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	parse_and_print
	mov	edi, 1
	call	sleep@PLT
.L59:
	call	kbhit
	test	eax, eax
	je	.L61
	call	getchar@PLT
	mov	eax, DWORD PTR -132[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L55
.L58:
	cmp	BYTE PTR -138[rbp], 50
	jne	.L55
	jmp	.L63
.L68:
	mov	DWORD PTR -136[rbp], 1
	jmp	.L64
.L65:
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L64
	lea	rdi, .LC53[rip]
	call	perror@PLT
.L64:
	movzx	eax, BYTE PTR -112[rbp]
	cmp	BYTE PTR -137[rbp], al
	jne	.L65
	jmp	.L66
.L67:
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -132[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	movzx	edx, BYTE PTR -112[rbp]
	mov	eax, DWORD PTR -136[rbp]
	cdqe
	mov	BYTE PTR -128[rbp+rax], dl
	add	DWORD PTR -136[rbp], 1
.L66:
	cmp	DWORD PTR -136[rbp], 13
	jle	.L67
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	parse_and_print
.L63:
	call	kbhit
	test	eax, eax
	je	.L68
	call	getchar@PLT
	mov	eax, DWORD PTR -132[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L55
.L53:
	cmp	BYTE PTR -139[rbp], 50
	jne	.L69
	call	clear_screen
	lea	rdi, .LC54[rip]
	call	puts@PLT
	lea	rdi, .LC39[rip]
	call	puts@PLT
	nop
.L70:
	call	kbhit
	test	eax, eax
	je	.L70
	call	getchar@PLT
	jmp	.L55
.L69:
	lea	rdi, .LC55[rip]
	call	puts@PLT
	lea	rdi, .LC56[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L57
.L55:
	call	getchar@PLT
	jmp	.L71
.L57:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L72
	call	__stack_chk_fail@PLT
.L72:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC45:
	.long	0
	.long	1075838976
	.align 8
.LC46:
	.long	0
	.long	1083179008
	.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	"891610.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"tcgetattr\000"
	.align	2
.LC1:
	.ascii	"tcsetattr\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	set_interface_attribs
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_interface_attribs, %function
set_interface_attribs:
	@ 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, #-72]
	str	r1, [fp, #-76]
	str	r2, [fp, #-80]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L7+4
	bl	perror
	mvn	r3, #0
	b	.L5
.L2:
	ldr	r2, [fp, #-76]
	sub	r3, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	cfsetospeed
	ldr	r2, [fp, #-76]
	sub	r3, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	cfsetispeed
	ldr	r3, [fp, #-60]
	orr	r3, r3, #48
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #1
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-64]
	mov	r3, #0
	strb	r3, [fp, #-45]
	mov	r3, #5
	strb	r3, [fp, #-46]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #7168
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-60]
	orr	r3, r3, #2176
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #768
	str	r3, [fp, #-60]
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-80]
	orr	r3, r2, r3
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #64
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-60]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L7+8
	bl	perror
	mvn	r3, #0
	b	.L5
.L4:
	mov	r3, #0
.L5:
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	set_interface_attribs, .-set_interface_attribs
	.section	.rodata
	.align	2
.LC3:
	.ascii	"tggetattr\000"
	.align	2
.LC4:
	.ascii	"error %d setting term attributes\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	set_blocking
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_blocking, %function
set_blocking:
	@ 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, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r0, .L14+4
	bl	perror
	b	.L9
.L10:
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	strb	r3, [fp, #-45]
	mov	r3, #10
	strb	r3, [fp, #-46]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L14+8
	bl	printf
.L9:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC5
	.word	.LC3
	.word	.LC4
	.size	set_blocking, .-set_blocking
	.section	.rodata
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kbhit, %function
kbhit:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
	sub	r3, fp, #136
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-152]
	b	.L17
.L18:
	ldr	r3, [fp, #-148]
	ldr	r2, [fp, #-152]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-152]
	add	r3, r3, #1
	str	r3, [fp, #-152]
.L17:
	ldr	r3, [fp, #-152]
	cmp	r3, #31
	bls	.L18
	ldr	r3, [fp, #-136]
	orr	r3, r3, #1
	str	r3, [fp, #-136]
	sub	r1, fp, #136
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r0, #1
	bl	select
	ldr	r3, [fp, #-136]
	and	r3, r3, #1
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC6
	.size	kbhit, .-kbhit
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nonblock, %function
nonblock:
	@ 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]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r1, r3
	mov	r0, #0
	bl	tcgetattr
	ldr	r3, [fp, #-72]
	cmp	r3, #1
	bne	.L24
	ldr	r3, [fp, #-56]
	bic	r3, r3, #2
	str	r3, [fp, #-56]
	mov	r3, #1
	strb	r3, [fp, #-45]
	b	.L25
.L24:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-56]
	orr	r3, r3, #2
	str	r3, [fp, #-56]
.L25:
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	nop
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC7
	.size	nonblock, .-nonblock
	.section	.rodata
	.align	2
.LC8:
	.ascii	"\033[1;1H\033[2J\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear_screen, %function
clear_screen:
	@ 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, .L30
	str	r3, [fp, #-8]
	mov	r2, #12
	ldr	r1, [fp, #-8]
	mov	r0, #1
	bl	write
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC8
	.size	clear_screen, .-clear_screen
	.section	.rodata
	.align	2
.LC9:
	.ascii	"\012Invalid Input\000"
	.align	2
.LC10:
	.ascii	" To select press [1/2/q]: \000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	option_selected, %function
option_selected:
	@ 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]
	mov	r0, #1
	bl	nonblock
	b	.L33
.L36:
	mov	r0, #1
	bl	usleep
	bl	kbhit
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L33
	ldr	r3, .L38
	ldr	r3, [r3]
	mov	r0, r3
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #49
	beq	.L34
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #50
	beq	.L34
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L35
.L34:
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L33
.L35:
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r0, .L38+4
	bl	puts
	ldr	r0, .L38+8
	bl	printf
	ldr	r3, .L38+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L33:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L36
	mov	r0, #0
	bl	nonblock
	mov	r0, #10
	bl	putchar
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L39:
	.align	2
.L38:
	.word	stdin
	.word	.LC9
	.word	.LC10
	.word	stdout
	.size	option_selected, .-option_selected
	.section	.rodata
	.align	2
.LC11:
	.ascii	"**************FPGA FIRMWARE DEBUGGER*************\000"
	.align	2
.LC12:
	.ascii	"Chose your device\000"
	.align	2
.LC13:
	.ascii	"\0121-HDMI2USB\000"
	.align	2
.LC14:
	.ascii	"\0122-HDMI2ETHERNET\000"
	.align	2
.LC15:
	.ascii	"\012q-QUIT\000"
	.align	2
.LC16:
	.ascii	"\012To select press [1/2/q]: \000"
	.text
	.align	2
	.global	print_welcome
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_welcome, %function
print_welcome:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	clear_screen
	ldr	r0, .L42
	bl	puts
	ldr	r0, .L42+4
	bl	puts
	ldr	r0, .L42+8
	bl	puts
	ldr	r0, .L42+12
	bl	puts
	ldr	r0, .L42+16
	bl	puts
	ldr	r0, .L42+20
	bl	printf
	ldr	r3, .L42+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	bl	option_selected
	mov	r3, r0
	mov	r0, r3
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	stdout
	.size	print_welcome, .-print_welcome
	.section	.rodata
	.align	2
.LC17:
	.ascii	"Portname of selected device: \000"
	.align	2
.LC18:
	.ascii	"%s\000"
	.align	2
.LC19:
	.ascii	"error %d opening %s: %s\012\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	open_port
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_port, %function
open_port:
	@ 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
	ldr	r3, .L49
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r0, #10
	bl	putchar
	ldr	r0, .L49+4
	bl	printf
	ldr	r3, .L49+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L49+12
	bl	__isoc99_scanf
	sub	r3, fp, #36
	ldr	r1, .L49+16
	mov	r0, r3
	bl	open
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bge	.L45
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	sub	r2, fp, #36
	mov	r1, r4
	ldr	r0, .L49+20
	bl	printf
	ldr	r3, [fp, #-40]
	b	.L47
.L45:
	mov	r2, #0
	mov	r1, #13
	ldr	r0, [fp, #-40]
	bl	set_interface_attribs
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	set_blocking
	ldr	r3, [fp, #-40]
.L47:
	ldr	r2, .L49
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L48
	bl	__stack_chk_fail
.L48:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC20
	.word	.LC17
	.word	stdout
	.word	.LC18
	.word	1052930
	.word	.LC19
	.size	open_port, .-open_port
	.section	.rodata
	.align	2
.LC21:
	.ascii	"\033[2J\033[1;1H\000"
	.align	2
.LC22:
	.ascii	"HDMI 0 is connected\000"
	.align	2
.LC23:
	.ascii	"HDMI 0 is not connected\000"
	.align	2
.LC24:
	.ascii	"HDMI 1 is connected\000"
	.align	2
.LC25:
	.ascii	"HDMI 1 is not connected\000"
	.align	2
.LC26:
	.ascii	"\012***CONNECT INPUT SOURCE***\012\012\000"
	.align	2
.LC27:
	.ascii	"Press ENTER to return\012\000"
	.align	2
.LC28:
	.ascii	"Output Format: \000"
	.align	2
.LC29:
	.ascii	"JPEG\000"
	.align	2
.LC30:
	.ascii	"RAW\000"
	.align	2
.LC31:
	.ascii	"Selected Source: \000"
	.align	2
.LC32:
	.ascii	"HDMI 0\000"
	.align	2
.LC33:
	.ascii	"HDMI 1\000"
	.align	2
.LC34:
	.ascii	"Test Pattern\000"
	.align	2
.LC35:
	.ascii	"Encoding Quality: \000"
	.align	2
.LC36:
	.ascii	"100%%\012\000"
	.align	2
.LC37:
	.ascii	"85%%\012\000"
	.align	2
.LC38:
	.ascii	"75%%\012\000"
	.align	2
.LC39:
	.ascii	"50%%\012\000"
	.align	2
.LC40:
	.ascii	"Input Resolution: %ux%u\012\000"
	.align	2
.LC41:
	.ascii	"Input Frame Rate: %hhu fps\012\000"
	.align	2
.LC42:
	.ascii	"Output Frame Rate: 0 fps\000"
	.align	2
.LC43:
	.ascii	"\012***START/RESTART USB STREAMING***\012\000"
	.align	2
.LC44:
	.ascii	"Press ENTER to return\000"
	.align	2
.LC45:
	.ascii	"\012\000"
	.align	2
.LC46:
	.ascii	"Output Frame Rate: %hhu fps\012\000"
	.align	2
.LC47:
	.ascii	"Frame Write Time: %hhu ms\012\000"
	.align	2
.LC48:
	.ascii	"Frame Processing Time: %hhu ms\012\000"
	.align	2
.LC49:
	.ascii	"No. of Frames Dropped: %hhu fps\012\000"
	.global	__aeabi_ui2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.align	2
.LC50:
	.ascii	"Frame Size: %f Mbytes\012\000"
	.text
	.align	2
	.global	parse_and_print
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_and_print, %function
parse_and_print:
	@ 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, #-24]
	ldr	r0, .L68
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #6
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L52
	ldr	r0, .L68+4
	bl	puts
	b	.L53
.L52:
	ldr	r0, .L68+8
	bl	puts
.L53:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #5
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L54
	ldr	r0, .L68+12
	bl	puts
	b	.L55
.L54:
	ldr	r0, .L68+16
	bl	puts
.L55:
	ldr	r3, [fp, #-24]
	add	r3, r3, #6
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L56
	ldr	r0, .L68+20
	bl	puts
	ldr	r0, .L68+24
	bl	puts
	ldr	r0, .L68
	bl	printf
	b	.L51
.L56:
	ldr	r0, .L68+28
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #4
	and	r3, r3, #255
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L58
	ldr	r0, .L68+32
	bl	puts
	b	.L59
.L58:
	ldr	r0, .L68+36
	bl	puts
.L59:
	ldr	r0, .L68+40
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #255
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L60
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #255
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L60
	ldr	r0, .L68+44
	bl	puts
	b	.L61
.L60:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #255
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L62
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsr	r3, r3, #3
	and	r3, r3, #255
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L62
	ldr	r0, .L68+48
	bl	puts
	b	.L61
.L62:
	ldr	r0, .L68+52
	bl	puts
.L61:
	ldr	r0, .L68+56
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	and	r3, r3, #3
	strb	r3, [fp, #-17]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L63
	ldr	r0, .L68+60
	bl	printf
	b	.L64
.L63:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #1
	bne	.L65
	ldr	r0, .L68+64
	bl	printf
	b	.L64
.L65:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #2
	bne	.L66
	ldr	r0, .L68+68
	bl	printf
	b	.L64
.L66:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L64
	ldr	r0, .L68+72
	bl	printf
.L64:
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	add	r3, r3, #2
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #8
	ldr	r2, [fp, #-24]
	add	r2, r2, #3
	ldrb	r2, [r2]	@ zero_extendqisi2
	orr	r3, r3, r2
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	add	r3, r3, #4
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #8
	ldr	r2, [fp, #-24]
	add	r2, r2, #5
	ldrb	r2, [r2]	@ zero_extendqisi2
	orr	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, .L68+76
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #6
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L68+80
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #7
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L67
	ldr	r0, .L68+84
	bl	puts
	ldr	r0, .L68+88
	bl	puts
	mov	r0, #10
	bl	putchar
	ldr	r0, .L68+92
	bl	printf
	ldr	r0, .L68+96
	bl	puts
	ldr	r0, .L68
	bl	printf
	b	.L51
.L67:
	ldr	r3, [fp, #-24]
	add	r3, r3, #7
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L68+100
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #8
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L68+104
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #9
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L68+108
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #10
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L68+112
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #11
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #8
	ldr	r2, [fp, #-24]
	add	r2, r2, #12
	ldrb	r2, [r2]	@ zero_extendqisi2
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #8
	ldr	r2, [fp, #-24]
	add	r2, r2, #13
	ldrb	r2, [r2]	@ zero_extendqisi2
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	__aeabi_ui2d
	mov	r2, #0
	ldr	r3, .L68+116
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L68+120
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L68+120
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L68+124
	bl	printf
	mov	r0, #10
	bl	putchar
	ldr	r0, .L68+92
	bl	printf
	ldr	r3, .L68+128
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L51:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.word	.LC42
	.word	.LC43
	.word	.LC44
	.word	.LC45
	.word	.LC46
	.word	.LC47
	.word	.LC48
	.word	.LC49
	.word	1075838976
	.word	1083179008
	.word	.LC50
	.word	stdout
	.size	parse_and_print, .-parse_and_print
	.section	.rodata
	.align	2
.LC51:
	.ascii	"Chose Debugging Output Method\000"
	.align	2
.LC52:
	.ascii	"\0121- CDC\000"
	.align	2
.LC53:
	.ascii	"\0122- UART\000"
	.align	2
.LC54:
	.ascii	"\012q- Return\000"
	.align	2
.LC55:
	.ascii	"DS\000"
	.align	2
.LC56:
	.ascii	"read\000"
	.align	2
.LC57:
	.ascii	"Packets are on their way....feature coming soon\000"
	.align	2
.LC58:
	.ascii	"Thank You\000"
	.align	2
.LC59:
	.ascii	"TimVideos - World wide Leader in Live Event Streami"
	.ascii	"ng\000"
	.align	2
.LC60:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	ldr	r3, .L91
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L89:
	bl	print_welcome
	mov	r3, r0
	strb	r3, [fp, #-135]
	ldrb	r3, [fp, #-135]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L71
	bl	clear_screen
	ldr	r0, .L91+4
	bl	puts
	ldr	r0, .L91+8
	bl	puts
	ldr	r0, .L91+12
	bl	puts
	ldr	r0, .L91+16
	bl	puts
	ldr	r0, .L91+20
	bl	printf
	ldr	r3, .L91+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	bl	option_selected
	mov	r3, r0
	strb	r3, [fp, #-134]
	ldrb	r3, [fp, #-134]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L72
	bl	print_welcome
	b	.L73
.L72:
	bl	open_port
	str	r0, [fp, #-128]
	ldr	r3, [fp, #-128]
	cmp	r3, #0
	bge	.L74
	mov	r3, #0
	b	.L75
.L74:
	mvn	r3, #85
	strb	r3, [fp, #-133]
	ldrb	r3, [fp, #-134]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L76
	b	.L77
.L79:
	mov	r2, #2
	ldr	r1, .L91+28
	ldr	r0, [fp, #-128]
	bl	write
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, r3
	ldr	r0, [fp, #-128]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L78
	ldr	r0, .L91+32
	bl	perror
.L78:
	sub	r3, fp, #108
	mov	r0, r3
	bl	parse_and_print
	mov	r0, #1
	bl	sleep
.L77:
	bl	kbhit
	mov	r3, r0
	cmp	r3, #0
	beq	.L79
	bl	getchar
	ldr	r0, [fp, #-128]
	bl	close
	b	.L73
.L76:
	ldrb	r3, [fp, #-134]	@ zero_extendqisi2
	cmp	r3, #50
	bne	.L73
	b	.L81
.L86:
	mov	r3, #1
	str	r3, [fp, #-132]
	b	.L82
.L83:
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, r3
	ldr	r0, [fp, #-128]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L82
	ldr	r0, .L91+32
	bl	perror
.L82:
	ldrb	r3, [fp, #-108]	@ zero_extendqisi2
	ldrb	r2, [fp, #-133]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L83
	b	.L84
.L85:
	sub	r3, fp, #108
	mov	r2, #10
	mov	r1, r3
	ldr	r0, [fp, #-128]
	bl	read
	ldrb	r1, [fp, #-108]	@ zero_extendqisi2
	sub	r2, fp, #124
	ldr	r3, [fp, #-132]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-132]
	add	r3, r3, #1
	str	r3, [fp, #-132]
.L84:
	ldr	r3, [fp, #-132]
	cmp	r3, #13
	ble	.L85
	sub	r3, fp, #124
	mov	r0, r3
	bl	parse_and_print
.L81:
	bl	kbhit
	mov	r3, r0
	cmp	r3, #0
	beq	.L86
	bl	getchar
	ldr	r0, [fp, #-128]
	bl	close
	b	.L73
.L71:
	ldrb	r3, [fp, #-135]	@ zero_extendqisi2
	cmp	r3, #50
	bne	.L87
	bl	clear_screen
	ldr	r0, .L91+36
	bl	puts
	ldr	r0, .L91+40
	bl	puts
	nop
.L88:
	bl	kbhit
	mov	r3, r0
	cmp	r3, #0
	beq	.L88
	bl	getchar
	b	.L73
.L87:
	ldr	r0, .L91+44
	bl	puts
	ldr	r0, .L91+48
	bl	puts
	mov	r3, #0
	b	.L75
.L73:
	bl	getchar
	b	.L89
.L75:
	ldr	r2, .L91
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L90
	bl	__stack_chk_fail
.L90:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L92:
	.align	2
.L91:
	.word	.LC60
	.word	.LC51
	.word	.LC52
	.word	.LC53
	.word	.LC54
	.word	.LC16
	.word	stdout
	.word	.LC55
	.word	.LC56
	.word	.LC57
	.word	.LC44
	.word	.LC58
	.word	.LC59
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
