	.file	"305305.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%i bytes: "
.LC1:
	.string	"%02x "
	.text
	.type	dump_data, @function
dump_data:
.LFB6:
	.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
	mov	DWORD PTR -28[rbp], esi
	mov	eax, DWORD PTR -28[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L2:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L3
	mov	edi, 10
	call	putchar@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dump_data, .-dump_data
	.type	dump_data_ascii, @function
dump_data_ascii:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -4[rbp], 1
.L5:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L6
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	dump_data_ascii, .-dump_data_ascii
	.section	.rodata
.LC2:
	.string	"TIOCGSERIAL failed"
	.align 8
.LC3:
	.string	"Cannot set speed to %d, closest is %d\n"
	.align 8
.LC4:
	.string	"closest baud = %i, base = %i, divisor = %i\n"
.LC5:
	.string	"TIOCSSERIAL failed"
	.text
	.type	set_baud_divisor, @function
set_baud_divisor:
.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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	DWORD PTR -104[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 21534
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L8
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -64[rbp]
	and	eax, -4145
	or	eax, 48
	mov	DWORD PTR -64[rbp], eax
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	ecx, eax
	shr	ecx, 31
	add	eax, ecx
	sar	eax
	add	eax, edx
	cdq
	idiv	DWORD PTR -104[rbp]
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	mov	esi, DWORD PTR -56[rbp]
	cdq
	idiv	esi
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -104[rbp]
	imul	eax, eax, 98
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cmp	DWORD PTR -84[rbp], eax
	jl	.L9
	mov	eax, DWORD PTR -104[rbp]
	imul	eax, eax, 102
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 5
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	cmp	DWORD PTR -84[rbp], eax
	jle	.L10
.L9:
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -84[rbp]
	mov	edx, DWORD PTR -104[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	ecx, DWORD PTR -56[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 21535
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L13
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	set_baud_divisor, .-set_baud_divisor
	.type	get_baud, @function
get_baud:
.LFB9:
	.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
	cmp	DWORD PTR -4[rbp], 4000000
	je	.L15
	cmp	DWORD PTR -4[rbp], 4000000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 3500000
	je	.L17
	cmp	DWORD PTR -4[rbp], 3500000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 3000000
	je	.L18
	cmp	DWORD PTR -4[rbp], 3000000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 2500000
	je	.L19
	cmp	DWORD PTR -4[rbp], 2500000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 2000000
	je	.L20
	cmp	DWORD PTR -4[rbp], 2000000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 1500000
	je	.L21
	cmp	DWORD PTR -4[rbp], 1500000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 1152000
	je	.L22
	cmp	DWORD PTR -4[rbp], 1152000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 1000000
	je	.L23
	cmp	DWORD PTR -4[rbp], 1000000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 921600
	je	.L24
	cmp	DWORD PTR -4[rbp], 921600
	jg	.L16
	cmp	DWORD PTR -4[rbp], 576000
	je	.L25
	cmp	DWORD PTR -4[rbp], 576000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 500000
	je	.L26
	cmp	DWORD PTR -4[rbp], 500000
	jg	.L16
	cmp	DWORD PTR -4[rbp], 460800
	je	.L27
	cmp	DWORD PTR -4[rbp], 460800
	jg	.L16
	cmp	DWORD PTR -4[rbp], 230400
	je	.L28
	cmp	DWORD PTR -4[rbp], 230400
	jg	.L16
	cmp	DWORD PTR -4[rbp], 115200
	je	.L29
	cmp	DWORD PTR -4[rbp], 115200
	jg	.L16
	cmp	DWORD PTR -4[rbp], 57600
	je	.L30
	cmp	DWORD PTR -4[rbp], 57600
	jg	.L16
	cmp	DWORD PTR -4[rbp], 38400
	je	.L31
	cmp	DWORD PTR -4[rbp], 38400
	jg	.L16
	cmp	DWORD PTR -4[rbp], 9600
	je	.L32
	cmp	DWORD PTR -4[rbp], 19200
	je	.L33
	jmp	.L16
.L32:
	mov	eax, 13
	jmp	.L34
.L33:
	mov	eax, 14
	jmp	.L34
.L31:
	mov	eax, 15
	jmp	.L34
.L30:
	mov	eax, 4097
	jmp	.L34
.L29:
	mov	eax, 4098
	jmp	.L34
.L28:
	mov	eax, 4099
	jmp	.L34
.L27:
	mov	eax, 4100
	jmp	.L34
.L26:
	mov	eax, 4101
	jmp	.L34
.L25:
	mov	eax, 4102
	jmp	.L34
.L24:
	mov	eax, 4103
	jmp	.L34
.L23:
	mov	eax, 4104
	jmp	.L34
.L22:
	mov	eax, 4105
	jmp	.L34
.L21:
	mov	eax, 4106
	jmp	.L34
.L20:
	mov	eax, 4107
	jmp	.L34
.L19:
	mov	eax, 4108
	jmp	.L34
.L18:
	mov	eax, 4109
	jmp	.L34
.L17:
	mov	eax, 4110
	jmp	.L34
.L15:
	mov	eax, 4111
	jmp	.L34
.L16:
	mov	eax, -1
.L34:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	get_baud, .-get_baud
	.section	.rodata
	.align 8
.LC6:
	.ascii	"Usage: linux-serial-test [OPTION]\n\n  -h, --help\n  -b, --b"
	.ascii	"aud        Baud rate, 115200, etc (115200 is default)\n  -p,"
	.ascii	" --port        Port (/dev/ttyS0, etc) (must be specified)\n "
	.ascii	" -d, --divisor     UART Baud rate divisor (can be used to se"
	.ascii	"t custom baud rates)\n  -R, --rx_dump     Dump Rx data (asci"
	.ascii	"i, raw)\n  -T, --detailed_tx Detailed Tx data\n  -s, --stats"
	.ascii	"       Dump serial port stats every 5s\n  -S, --stop-on-err "
	.ascii	"Stop program if we encounter an error\n  -y, --single-byte S"
	.ascii	"end specified byte to the serial port\n  -z, --second-byte S"
	.ascii	"end another specified byte to the serial port\n  -c, --rts-c"
	.ascii	"ts     Enable RTS/CTS flow control\n  -B, --2-stop-bit  Use "
	.ascii	"two stop bits per character\n  -P, --parity      Use parity "
	.ascii	"bit (odd, even, mark, space)\n  -e, --dump-err    Display er"
	.ascii	"rors\n  -r, --no-rx       Don't receive data (can be used to"
	.ascii	" test flow control)\n                    when serial driver "
	.ascii	"buffer is full\n  -t, --no-tx       Don't transmit data\n  -"
	.ascii	"l, --rx-delay    Delay between reading data (ms) (can be use"
	.ascii	"d to test flow control)\n  -a, --tx-delay    Delay between w"
	.ascii	"riting data (ms)\n  -w, --tx-bytes    Number of bytes for ea"
	.ascii	"ch write (default is to repeatedly write 1024 bytes\n       "
	.ascii	"             until no more are accepted)\n  -q, --rs485     "
	.ascii	"  Enable RS485 direction control on port, and set delay\n   "
	.ascii	"                 from when TX is finished and RS485 driver e"
	.ascii	"nable is\n                    de-asserted. Delay is specifie"
	.ascii	"d in bit times.\n  -o, --tx-time     Number of seconds to tr"
	.ascii	"ansmit for"
	.string	" (defaults to 0, meaning no limit)\n  -i, --rx-time     Number of seconds to receive for (defaults to 0, meaning no limit)\n  -A, --ascii       Output bytes range from 32 to 126 (default is 0 to 255)\nexample: serial_test -e -b 921600 -p /dev/ttyS2 -c -l 250\n"
	.text
	.type	display_help, @function
display_help:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC6[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	display_help, .-display_help
	.section	.rodata
.LC7:
	.string	"ascii"
.LC8:
	.string	"mark"
.LC9:
	.string	"odd"
.LC10:
	.string	"space"
	.text
	.type	process_options, @function
process_options:
.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, 64
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L69:
	mov	DWORD PTR -24[rbp], 0
	mov	rdx, QWORD PTR short_options.1[rip]
	lea	rcx, -24[rbp]
	mov	rsi, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8, rcx
	lea	rcx, long_options.0[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	je	.L72
	cmp	DWORD PTR -20[rbp], 122
	ja	.L69
	mov	eax, DWORD PTR -20[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L40[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L40[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L40:
	.long	.L51-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L62-.L40
	.long	.L61-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L60-.L40
	.long	.L69-.L40
	.long	.L59-.L40
	.long	.L58-.L40
	.long	.L57-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L56-.L40
	.long	.L55-.L40
	.long	.L54-.L40
	.long	.L53-.L40
	.long	.L52-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L51-.L40
	.long	.L50-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L49-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L48-.L40
	.long	.L47-.L40
	.long	.L46-.L40
	.long	.L45-.L40
	.long	.L44-.L40
	.long	.L43-.L40
	.long	.L69-.L40
	.long	.L69-.L40
	.long	.L42-.L40
	.long	.L69-.L40
	.long	.L41-.L40
	.long	.L39-.L40
	.text
.L51:
	call	display_help
	mov	edi, 0
	call	exit@PLT
.L55:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L38
.L47:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strdup@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 8[rax], rdx
	jmp	.L38
.L53:
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	DWORD PTR 16[rdx], eax
	jmp	.L38
.L59:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 20[rax], 1
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	sete	al
	movzx	edx, al
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 24[rax], edx
	jmp	.L38
.L57:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 28[rax], 1
	jmp	.L38
.L44:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 32[rax], 1
	jmp	.L38
.L58:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 36[rax], 1
	jmp	.L38
.L41:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 40[rax], edx
	jmp	.L38
.L39:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 44[rax], edx
	jmp	.L38
.L54:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 48[rax], 1
	jmp	.L38
.L61:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 52[rax], 1
	jmp	.L38
.L60:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 56[rax], 1
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L63
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L64
.L63:
	mov	edx, 1
	jmp	.L65
.L64:
	mov	edx, 0
.L65:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 60[rax], edx
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L66
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L67
.L66:
	mov	edx, 1
	jmp	.L68
.L67:
	mov	edx, 0
.L68:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 64[rax], edx
	jmp	.L38
.L52:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 68[rax], 1
	jmp	.L38
.L45:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 72[rax], 1
	jmp	.L38
.L43:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 76[rax], 1
	jmp	.L38
.L49:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 80[rax], edx
	jmp	.L38
.L56:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 84[rax], edx
	jmp	.L38
.L42:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 88[rax], edx
	jmp	.L38
.L46:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 92[rax], edx
	jmp	.L38
.L48:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 96[rax], edx
	jmp	.L38
.L50:
	mov	rax, QWORD PTR optarg[rip]
	lea	rcx, -16[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 100[rax], edx
	jmp	.L38
.L62:
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 104[rax], 1
	nop
.L38:
	jmp	.L69
.L72:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L70
	call	__stack_chk_fail@PLT
.L70:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	process_options, .-process_options
	.section	.rodata
	.align 8
.LC11:
	.string	"%s: count for this session: rx=%lld, tx=%lld, rx err=%lld\n"
	.align 8
.LC12:
	.string	"%s: TIOCGICOUNT: ret=%i, rx=%i, tx=%i, frame = %i, overrun = %i, parity = %i, brk = %i, buf_overrun = %i\n"
	.text
	.type	dump_serial_port_stats, @function
dump_serial_port_stats:
.LFB12:
	.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	QWORD PTR -120[rbp], rdi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -120[rbp]
	mov	rsi, QWORD PTR 40[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -120[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	rdx, -96[rbp]
	mov	esi, 21597
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], -1
	je	.L76
	mov	r9d, DWORD PTR -56[rbp]
	mov	r8d, DWORD PTR -60[rbp]
	mov	edi, DWORD PTR -64[rbp]
	mov	esi, DWORD PTR -68[rbp]
	mov	r11d, DWORD PTR -72[rbp]
	mov	r10d, DWORD PTR -76[rbp]
	mov	ecx, DWORD PTR -80[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR -100[rbp]
	push	r9
	push	r8
	push	rdi
	push	rsi
	mov	r9d, r11d
	mov	r8d, r10d
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 32
.L76:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L75
	call	__stack_chk_fail@PLT
.L75:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	dump_serial_port_stats, .-dump_serial_port_stats
	.type	next_count_value, @function
next_count_value:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	DWORD PTR -8[rbp], esi
	mov	BYTE PTR -4[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	add	eax, 1
	mov	BYTE PTR -4[rbp], al
	cmp	DWORD PTR -8[rbp], 0
	je	.L78
	cmp	BYTE PTR -4[rbp], 127
	jne	.L78
	mov	BYTE PTR -4[rbp], 32
.L78:
	movzx	eax, BYTE PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	next_count_value, .-next_count_value
	.section	.rodata
	.align 8
.LC13:
	.string	"Error, count: %lld, expected %02x, got %02x\n"
	.text
	.type	process_read_data, @function
process_read_data:
.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, 1072
	mov	QWORD PTR -1064[rbp], rdi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1064[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	rcx, -1040[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	jle	.L90
	mov	rax, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR 20[rax]
	test	eax, eax
	je	.L82
	mov	rax, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR 24[rax]
	test	eax, eax
	je	.L83
	mov	edx, DWORD PTR -1044[rbp]
	lea	rax, -1040[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	dump_data_ascii
	jmp	.L82
.L83:
	mov	edx, DWORD PTR -1044[rbp]
	lea	rax, -1040[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	dump_data
.L82:
	mov	DWORD PTR -1048[rbp], 0
	jmp	.L84
.L88:
	mov	eax, DWORD PTR -1048[rbp]
	cdqe
	movzx	edx, BYTE PTR -1040[rbp+rax]
	mov	rax, QWORD PTR -1064[rbp]
	movzx	eax, BYTE PTR 1[rax]
	cmp	dl, al
	je	.L85
	mov	rax, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR 68[rax]
	test	eax, eax
	je	.L86
	mov	eax, DWORD PTR -1048[rbp]
	cdqe
	movzx	eax, BYTE PTR -1040[rbp+rax]
	movzx	edx, al
	mov	rax, QWORD PTR -1064[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	mov	rcx, QWORD PTR -1064[rbp]
	mov	rsi, QWORD PTR 32[rcx]
	mov	ecx, DWORD PTR -1048[rbp]
	movsx	rcx, ecx
	add	rsi, rcx
	mov	ecx, edx
	mov	edx, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
.L86:
	mov	rax, QWORD PTR -1064[rbp]
	mov	rax, QWORD PTR 40[rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -1064[rbp]
	mov	QWORD PTR 40[rax], rdx
	mov	rax, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR 36[rax]
	test	eax, eax
	je	.L87
	mov	rdx, QWORD PTR -1072[rbp]
	mov	rax, QWORD PTR -1064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	dump_serial_port_stats
	mov	edi, 1
	call	exit@PLT
.L87:
	mov	eax, DWORD PTR -1048[rbp]
	cdqe
	movzx	edx, BYTE PTR -1040[rbp+rax]
	mov	rax, QWORD PTR -1064[rbp]
	mov	BYTE PTR 1[rax], dl
.L85:
	mov	rax, QWORD PTR -1072[rbp]
	mov	edx, DWORD PTR 104[rax]
	mov	rax, QWORD PTR -1064[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	next_count_value
	mov	rdx, QWORD PTR -1064[rbp]
	mov	BYTE PTR 1[rdx], al
	add	DWORD PTR -1048[rbp], 1
.L84:
	mov	eax, DWORD PTR -1048[rbp]
	cmp	eax, DWORD PTR -1044[rbp]
	jl	.L88
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdx, QWORD PTR 32[rax]
	mov	eax, DWORD PTR -1044[rbp]
	cdqe
	add	rdx, rax
	mov	rax, QWORD PTR -1064[rbp]
	mov	QWORD PTR 32[rax], rdx
.L90:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L89
	call	__stack_chk_fail@PLT
.L89:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	process_read_data, .-process_read_data
	.section	.rodata
.LC14:
	.string	"write failed - errno=%d (%s)\n"
.LC15:
	.string	"wrote %zd bytes\n"
	.text
	.type	process_write_data, @function
process_write_data:
.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, 56
	.cfi_offset 3, -24
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -40[rbp], 0
	mov	DWORD PTR -48[rbp], 10
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR 88[rax]
	test	eax, eax
	sete	al
	movzx	eax, al
	mov	DWORD PTR -44[rbp], eax
.L99:
	mov	QWORD PTR -32[rbp], 0
	jmp	.L92
.L93:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, DWORD PTR 104[rax]
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	next_count_value
	mov	rdx, QWORD PTR -56[rbp]
	mov	BYTE PTR [rdx], al
	add	QWORD PTR -32[rbp], 1
.L92:
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	QWORD PTR -32[rbp], rax
	jl	.L93
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jns	.L94
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	je	.L95
	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]
	mov	rdx, rbx
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
.L95:
	mov	QWORD PTR -24[rbp], 0
	jmp	.L96
.L94:
	sub	DWORD PTR -48[rbp], 1
.L96:
	mov	rax, QWORD PTR -24[rbp]
	add	QWORD PTR -40[rbp], rax
	cmp	DWORD PTR -48[rbp], 0
	je	.L97
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	QWORD PTR -24[rbp], rax
	jge	.L98
.L97:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	BYTE PTR [rax], dl
	mov	DWORD PTR -44[rbp], 0
.L98:
	cmp	DWORD PTR -44[rbp], 0
	jne	.L99
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR 28[rax]
	test	eax, eax
	je	.L101
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
.L101:
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	process_write_data, .-process_write_data
	.section	.rodata
.LC16:
	.string	"Error opening serial port"
.LC17:
	.string	"Error getting RS-485 mode"
.LC18:
	.string	"Error setting RS-485 mode"
.LC19:
	.string	"Error setting RS-232 mode"
	.text
	.type	setup_serial_port, @function
setup_serial_port:
.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, 144
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	QWORD PTR -136[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	eax, -1
	jne	.L103
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	esi, 2050
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	rdx, QWORD PTR -128[rbp]
	mov	DWORD PTR 4[rdx], eax
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jns	.L103
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	rax, QWORD PTR -136[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	edi, 1
	call	exit@PLT
.L103:
	lea	rax, -80[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR 16[rax], 0
	mov	QWORD PTR 24[rax], 0
	mov	QWORD PTR 32[rax], 0
	mov	QWORD PTR 40[rax], 0
	mov	QWORD PTR 48[rax], 0
	mov	DWORD PTR 56[rax], 0
	mov	eax, DWORD PTR -116[rbp]
	or	eax, 2224
	mov	DWORD PTR -72[rbp], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 48[rax]
	test	eax, eax
	je	.L104
	mov	eax, DWORD PTR -72[rbp]
	or	eax, -2147483648
	mov	DWORD PTR -72[rbp], eax
.L104:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 52[rax]
	test	eax, eax
	je	.L105
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 64
	mov	DWORD PTR -72[rbp], eax
.L105:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 56[rax]
	test	eax, eax
	je	.L106
	mov	eax, DWORD PTR -72[rbp]
	or	ah, 1
	mov	DWORD PTR -72[rbp], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 60[rax]
	test	eax, eax
	je	.L107
	mov	eax, DWORD PTR -72[rbp]
	or	ah, 2
	mov	DWORD PTR -72[rbp], eax
.L107:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 64[rax]
	test	eax, eax
	je	.L106
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 1073741824
	mov	DWORD PTR -72[rbp], eax
.L106:
	mov	DWORD PTR -80[rbp], 0
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -68[rbp], 0
	mov	BYTE PTR -57[rbp], -128
	mov	BYTE PTR -58[rbp], 5
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, 2
	mov	edi, eax
	call	tcflush@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	rdx, -80[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	lea	rax, -112[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, 21550
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L108
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 92[rax]
	test	eax, eax
	js	.L112
	lea	rdi, .LC17[rip]
	call	perror@PLT
	jmp	.L112
.L108:
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 92[rax]
	test	eax, eax
	js	.L110
	mov	eax, DWORD PTR -112[rbp]
	or	eax, 7
	mov	DWORD PTR -112[rbp], eax
	mov	rax, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR 92[rax]
	mov	DWORD PTR -104[rbp], eax
	mov	DWORD PTR -108[rbp], 0
	lea	rax, -112[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, 21551
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L112
	lea	rdi, .LC18[rip]
	call	perror@PLT
	jmp	.L112
.L110:
	mov	eax, DWORD PTR -112[rbp]
	and	eax, -8
	mov	DWORD PTR -112[rbp], eax
	mov	DWORD PTR -104[rbp], 0
	mov	DWORD PTR -108[rbp], 0
	lea	rax, -112[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -128[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, 21551
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L112
	lea	rdi, .LC19[rip]
	call	perror@PLT
.L112:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L111
	call	__stack_chk_fail@PLT
.L111:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	setup_serial_port, .-setup_serial_port
	.type	diff_ms, @function
diff_ms:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	test	rax, rax
	jns	.L114
	mov	rax, QWORD PTR -16[rbp]
	sub	rax, 1
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1000000000
	mov	QWORD PTR -8[rbp], rax
.L114:
	mov	rax, QWORD PTR -16[rbp]
	imul	esi, eax, 1000
	mov	rcx, QWORD PTR -8[rbp]
	movabs	rdx, 4835703278458516699
	mov	rax, rcx
	imul	rdx
	mov	rax, rdx
	sar	rax, 18
	sar	rcx, 63
	mov	rdx, rcx
	sub	rax, rdx
	add	eax, esi
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	diff_ms, .-diff_ms
	.section	.rodata
.LC20:
	.string	"Linux serial test app"
	.align 8
.LC21:
	.string	"ERROR: Port argument required\n"
	.align 8
.LC22:
	.string	"NOTE: non standard baud rate, trying custom divisor"
.LC23:
	.string	"write()"
	.align 8
.LC24:
	.string	"ERROR: write() returned %d, not %d\n"
	.align 8
.LC25:
	.string	"ERROR: Memory allocation failed\n"
.LC26:
	.string	"poll()"
.LC27:
	.string	"No data received for %.1fs."
.LC28:
	.string	" "
.LC29:
	.string	""
	.align 8
.LC30:
	.string	"%sNo data transmitted for %.1fs."
.LC31:
	.string	"Stopped transmitting."
.LC32:
	.string	"Stopped receiving."
.LC33:
	.string	"Exiting..."
	.text
	.globl	main
	.type	main, @function
main:
.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, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC20[rip]
	call	puts@PLT
	lea	rdx, -128[rbp]
	mov	eax, 0
	mov	ecx, 14
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -88[rbp], -1
	mov	DWORD PTR -84[rbp], -1
	mov	DWORD PTR -36[rbp], -1
	mov	QWORD PTR -176[rbp], 0
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	DWORD PTR -172[rbp], -1
	lea	rdx, -128[rbp]
	mov	rcx, QWORD PTR -336[rbp]
	mov	eax, DWORD PTR -324[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	process_options
	mov	rax, QWORD PTR -120[rbp]
	test	rax, rax
	jne	.L117
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 30
	mov	esi, 1
	lea	rdi, .LC21[rip]
	call	fwrite@PLT
	call	display_help
	mov	eax, 1
	jmp	.L158
.L117:
	mov	DWORD PTR -320[rbp], 4098
	mov	eax, DWORD PTR -128[rbp]
	test	eax, eax
	je	.L119
	mov	eax, DWORD PTR -128[rbp]
	mov	edi, eax
	call	get_baud
	mov	DWORD PTR -320[rbp], eax
.L119:
	cmp	DWORD PTR -320[rbp], 0
	jg	.L120
	lea	rdi, .LC22[rip]
	call	puts@PLT
	mov	DWORD PTR -320[rbp], 15
	lea	rdx, -128[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rax
	mov	edi, 15
	call	setup_serial_port
	mov	edx, DWORD PTR -128[rbp]
	mov	eax, DWORD PTR -172[rbp]
	mov	esi, edx
	mov	edi, eax
	call	set_baud_divisor
	jmp	.L121
.L120:
	lea	rdx, -128[rbp]
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -320[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	setup_serial_port
.L121:
	mov	eax, DWORD PTR -88[rbp]
	test	eax, eax
	js	.L122
	mov	DWORD PTR -316[rbp], 1
	mov	eax, DWORD PTR -88[rbp]
	mov	BYTE PTR -10[rbp], al
	mov	eax, DWORD PTR -84[rbp]
	test	eax, eax
	js	.L123
	mov	eax, DWORD PTR -84[rbp]
	mov	BYTE PTR -9[rbp], al
	add	DWORD PTR -316[rbp], 1
.L123:
	mov	eax, DWORD PTR -316[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -172[rbp]
	lea	rcx, -10[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], 0
	jns	.L124
	lea	rdi, .LC23[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L158
.L124:
	mov	eax, DWORD PTR -300[rbp]
	cmp	eax, DWORD PTR -316[rbp]
	je	.L126
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -316[rbp]
	mov	edx, DWORD PTR -300[rbp]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L158
.L126:
	mov	eax, 0
	jmp	.L158
.L122:
	mov	eax, DWORD PTR -40[rbp]
	test	eax, eax
	je	.L127
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	jmp	.L128
.L127:
	mov	eax, 1024
.L128:
	mov	QWORD PTR -160[rbp], rax
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	rax, QWORD PTR -168[rbp]
	test	rax, rax
	jne	.L129
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 32
	mov	esi, 1
	lea	rdi, .LC25[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L158
.L129:
	mov	eax, DWORD PTR -24[rbp]
	test	eax, eax
	je	.L130
	mov	BYTE PTR -176[rbp], 32
	movzx	eax, BYTE PTR -176[rbp]
	mov	BYTE PTR -175[rbp], al
.L130:
	lea	rax, -280[rbp]
	mov	edx, 8
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -172[rbp]
	mov	DWORD PTR -280[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	test	eax, eax
	jne	.L131
	movzx	eax, WORD PTR -276[rbp]
	or	eax, 1
	mov	WORD PTR -276[rbp], ax
	jmp	.L132
.L131:
	movzx	eax, WORD PTR -276[rbp]
	and	eax, -2
	mov	WORD PTR -276[rbp], ax
.L132:
	mov	eax, DWORD PTR -52[rbp]
	test	eax, eax
	jne	.L133
	movzx	eax, WORD PTR -276[rbp]
	or	eax, 4
	mov	WORD PTR -276[rbp], ax
	jmp	.L134
.L133:
	movzx	eax, WORD PTR -276[rbp]
	and	eax, -5
	mov	WORD PTR -276[rbp], ax
.L134:
	lea	rax, -272[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	clock_gettime@PLT
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -256[rbp], rax
	mov	QWORD PTR -248[rbp], rdx
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -240[rbp], rax
	mov	QWORD PTR -232[rbp], rdx
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -224[rbp], rax
	mov	QWORD PTR -216[rbp], rdx
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -208[rbp], rax
	mov	QWORD PTR -200[rbp], rdx
	jmp	.L135
.L154:
	lea	rax, -280[rbp]
	mov	edx, 1000
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	DWORD PTR -308[rbp], eax
	lea	rax, -192[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	clock_gettime@PLT
	cmp	DWORD PTR -308[rbp], -1
	jne	.L136
	lea	rdi, .LC26[rip]
	call	perror@PLT
	jmp	.L137
.L136:
	cmp	DWORD PTR -308[rbp], 0
	je	.L137
	movzx	eax, WORD PTR -274[rbp]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L138
	mov	eax, DWORD PTR -48[rbp]
	test	eax, eax
	je	.L139
	lea	rdx, -224[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	diff_ms
	mov	edx, DWORD PTR -48[rbp]
	cmp	eax, edx
	jle	.L138
	lea	rdx, -128[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	process_read_data
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -224[rbp], rax
	mov	QWORD PTR -216[rbp], rdx
	jmp	.L138
.L139:
	lea	rdx, -128[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	process_read_data
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -224[rbp], rax
	mov	QWORD PTR -216[rbp], rdx
.L138:
	movzx	eax, WORD PTR -274[rbp]
	cwde
	and	eax, 4
	test	eax, eax
	je	.L137
	mov	eax, DWORD PTR -44[rbp]
	test	eax, eax
	je	.L140
	lea	rdx, -208[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	diff_ms
	mov	edx, DWORD PTR -44[rbp]
	cmp	eax, edx
	jle	.L137
	lea	rdx, -128[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	process_write_data
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -208[rbp], rax
	mov	QWORD PTR -200[rbp], rdx
	jmp	.L137
.L140:
	lea	rdx, -128[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	process_write_data
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -208[rbp], rax
	mov	QWORD PTR -200[rbp], rdx
.L137:
	lea	rdx, -240[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	diff_ms
	cmp	eax, 1000
	jle	.L141
	mov	eax, DWORD PTR -56[rbp]
	test	eax, eax
	jne	.L142
	lea	rdx, -224[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	diff_ms
	cmp	eax, 2000
	jle	.L142
	mov	eax, 1
	jmp	.L143
.L142:
	mov	eax, 0
.L143:
	mov	DWORD PTR -312[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	test	eax, eax
	jne	.L144
	lea	rdx, -208[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	diff_ms
	cmp	eax, 2000
	jle	.L144
	mov	eax, 1
	jmp	.L145
.L144:
	mov	eax, 0
.L145:
	mov	DWORD PTR -304[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	test	eax, eax
	je	.L146
	mov	rax, QWORD PTR -152[rbp]
	test	rax, rax
	je	.L146
	mov	rdx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -144[rbp]
	cmp	rdx, rax
	jne	.L146
	mov	DWORD PTR -312[rbp], 0
.L146:
	cmp	DWORD PTR -312[rbp], 0
	jne	.L147
	cmp	DWORD PTR -304[rbp], 0
	je	.L141
.L147:
	cmp	DWORD PTR -312[rbp], 0
	je	.L148
	lea	rdx, -224[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	diff_ms
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, eax
	movq	rax, xmm1
	movq	xmm0, rax
	lea	rdi, .LC27[rip]
	mov	eax, 1
	call	printf@PLT
	lea	rax, .LC28[rip]
	mov	QWORD PTR -296[rbp], rax
	jmp	.L149
.L148:
	lea	rax, .LC29[rip]
	mov	QWORD PTR -296[rbp], rax
.L149:
	cmp	DWORD PTR -304[rbp], 0
	je	.L150
	lea	rdx, -208[rbp]
	lea	rax, -192[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	diff_ms
	movsx	rdx, eax
	imul	rdx, rdx, 274877907
	shr	rdx, 32
	sar	edx, 6
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, eax
	movq	rdx, xmm2
	mov	rax, QWORD PTR -296[rbp]
	movq	xmm0, rdx
	mov	rsi, rax
	lea	rdi, .LC30[rip]
	mov	eax, 1
	call	printf@PLT
.L150:
	mov	edi, 10
	call	putchar@PLT
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -240[rbp], rax
	mov	QWORD PTR -232[rbp], rdx
.L141:
	mov	eax, DWORD PTR -96[rbp]
	test	eax, eax
	je	.L151
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -256[rbp]
	sub	rax, rdx
	cmp	rax, 5
	jle	.L151
	lea	rdx, -128[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	dump_serial_port_stats
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -256[rbp], rax
	mov	QWORD PTR -248[rbp], rdx
.L151:
	mov	eax, DWORD PTR -32[rbp]
	test	eax, eax
	je	.L152
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -272[rbp]
	sub	rax, rdx
	mov	edx, DWORD PTR -32[rbp]
	mov	edx, edx
	cmp	rax, rdx
	jl	.L152
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -52[rbp], 1
	movzx	eax, WORD PTR -276[rbp]
	and	eax, -5
	mov	WORD PTR -276[rbp], ax
	lea	rdi, .LC31[rip]
	call	puts@PLT
.L152:
	mov	eax, DWORD PTR -28[rbp]
	test	eax, eax
	je	.L135
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -272[rbp]
	sub	rax, rdx
	mov	edx, DWORD PTR -28[rbp]
	mov	edx, edx
	cmp	rax, rdx
	jl	.L135
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -56[rbp], 1
	movzx	eax, WORD PTR -276[rbp]
	and	eax, -2
	mov	WORD PTR -276[rbp], ax
	lea	rdi, .LC32[rip]
	call	puts@PLT
.L135:
	mov	eax, DWORD PTR -56[rbp]
	test	eax, eax
	je	.L154
	mov	eax, DWORD PTR -52[rbp]
	test	eax, eax
	je	.L154
	lea	rdi, .LC33[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -80[rbp]
	test	eax, eax
	je	.L155
	mov	DWORD PTR -80[rbp], 0
	lea	rdx, -128[rbp]
	lea	rcx, -176[rbp]
	mov	eax, DWORD PTR -320[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	setup_serial_port
.L155:
	mov	eax, DWORD PTR -172[rbp]
	mov	edi, eax
	call	tcdrain@PLT
	lea	rdx, -128[rbp]
	lea	rax, -176[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	dump_serial_port_stats
	mov	eax, DWORD PTR -172[rbp]
	mov	esi, 2
	mov	edi, eax
	call	tcflush@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR -172[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -172[rbp], -1
	mov	rax, QWORD PTR -152[rbp]
	mov	rdx, QWORD PTR -144[rbp]
	sub	rax, rdx
	cqo
	xor	rax, rdx
	sub	rax, rdx
	mov	rdx, QWORD PTR -136[rbp]
	add	rax, rdx
	mov	QWORD PTR -288[rbp], rax
	cmp	QWORD PTR -288[rbp], 125
	jg	.L156
	mov	rax, QWORD PTR -288[rbp]
	jmp	.L158
.L156:
	mov	eax, 125
.L158:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L159
	call	__stack_chk_fail@PLT
.L159:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC34:
	.string	"hb:p:d:R:TsSy:z:cBertq:l:a:w:o:i:P:A"
	.section	.data.rel.local,"aw"
	.align 8
	.type	short_options.1, @object
	.size	short_options.1, 8
short_options.1:
	.quad	.LC34
	.section	.rodata
.LC35:
	.string	"help"
.LC36:
	.string	"baud"
.LC37:
	.string	"port"
.LC38:
	.string	"divisor"
.LC39:
	.string	"rx_dump"
.LC40:
	.string	"detailed_tx"
.LC41:
	.string	"stats"
.LC42:
	.string	"stop-on-err"
.LC43:
	.string	"single-byte"
.LC44:
	.string	"second-byte"
.LC45:
	.string	"rts-cts"
.LC46:
	.string	"2-stop-bit"
.LC47:
	.string	"parity"
.LC48:
	.string	"dump-err"
.LC49:
	.string	"no-rx"
.LC50:
	.string	"no-tx"
.LC51:
	.string	"rx-delay"
.LC52:
	.string	"tx-delay"
.LC53:
	.string	"tx-bytes"
.LC54:
	.string	"rs485"
.LC55:
	.string	"tx-time"
.LC56:
	.string	"rx-time"
	.section	.data.rel.ro.local,"aw"
	.align 32
	.type	long_options.0, @object
	.size	long_options.0, 768
long_options.0:
	.quad	.LC35
	.long	0
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.quad	.LC36
	.long	1
	.zero	4
	.quad	0
	.long	98
	.zero	4
	.quad	.LC37
	.long	1
	.zero	4
	.quad	0
	.long	112
	.zero	4
	.quad	.LC38
	.long	1
	.zero	4
	.quad	0
	.long	100
	.zero	4
	.quad	.LC39
	.long	1
	.zero	4
	.quad	0
	.long	82
	.zero	4
	.quad	.LC40
	.long	0
	.zero	4
	.quad	0
	.long	84
	.zero	4
	.quad	.LC41
	.long	0
	.zero	4
	.quad	0
	.long	115
	.zero	4
	.quad	.LC42
	.long	0
	.zero	4
	.quad	0
	.long	83
	.zero	4
	.quad	.LC43
	.long	0
	.zero	4
	.quad	0
	.long	121
	.zero	4
	.quad	.LC44
	.long	0
	.zero	4
	.quad	0
	.long	122
	.zero	4
	.quad	.LC45
	.long	0
	.zero	4
	.quad	0
	.long	99
	.zero	4
	.quad	.LC46
	.long	0
	.zero	4
	.quad	0
	.long	66
	.zero	4
	.quad	.LC47
	.long	1
	.zero	4
	.quad	0
	.long	80
	.zero	4
	.quad	.LC48
	.long	0
	.zero	4
	.quad	0
	.long	101
	.zero	4
	.quad	.LC49
	.long	0
	.zero	4
	.quad	0
	.long	114
	.zero	4
	.quad	.LC50
	.long	0
	.zero	4
	.quad	0
	.long	116
	.zero	4
	.quad	.LC51
	.long	1
	.zero	4
	.quad	0
	.long	108
	.zero	4
	.quad	.LC52
	.long	1
	.zero	4
	.quad	0
	.long	97
	.zero	4
	.quad	.LC53
	.long	1
	.zero	4
	.quad	0
	.long	119
	.zero	4
	.quad	.LC54
	.long	1
	.zero	4
	.quad	0
	.long	113
	.zero	4
	.quad	.LC55
	.long	1
	.zero	4
	.quad	0
	.long	111
	.zero	4
	.quad	.LC56
	.long	1
	.zero	4
	.quad	0
	.long	105
	.zero	4
	.quad	.LC7
	.long	0
	.zero	4
	.quad	0
	.long	65
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.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	"305305.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%i bytes: \000"
	.align	2
.LC1:
	.ascii	"%02x \000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_data, %function
dump_data:
	@ 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]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, .L4
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L3:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L4+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L3
	mov	r0, #10
	bl	putchar
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.size	dump_data, .-dump_data
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_data_ascii, %function
dump_data_ascii:
	@ 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]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L8
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	dump_data_ascii, .-dump_data_ascii
	.section	.rodata
	.align	2
.LC2:
	.ascii	"TIOCGSERIAL failed\000"
	.global	__aeabi_idiv
	.align	2
.LC3:
	.ascii	"Cannot set speed to %d, closest is %d\012\000"
	.align	2
.LC4:
	.ascii	"closest baud = %i, base = %i, divisor = %i\012\000"
	.align	2
.LC5:
	.ascii	"TIOCSSERIAL failed\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_baud_divisor, %function
set_baud_divisor:
	@ 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]
	str	r1, [fp, #-84]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r2, r3
	ldr	r1, .L16+4
	ldr	r0, [fp, #-80]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L16+8
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-52]
	bic	r3, r3, #4096
	bic	r3, r3, #48
	orr	r3, r3, #48
	str	r3, [fp, #-52]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-84]
	lsr	r1, r3, #31
	add	r3, r1, r3
	asr	r3, r3, #1
	add	r3, r2, r3
	ldr	r1, [fp, #-84]
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-44]
	mov	r1, r2
	mov	r0, r3
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-72]
	ldr	r2, [fp, #-84]
	mov	r3, r2
	lsl	r3, r3, #3
	sub	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #1
	mov	r2, r3
	mov	r3, r2
	ldr	r2, .L16+12
	smull	r1, r2, r3, r2
	asr	r2, r2, #5
	asr	r3, r3, #31
	sub	r3, r2, r3
	ldr	r2, [fp, #-72]
	cmp	r2, r3
	blt	.L11
	ldr	r2, [fp, #-84]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #4
	add	r3, r3, r2
	lsl	r3, r3, #1
	ldr	r2, .L16+12
	smull	r1, r2, r3, r2
	asr	r2, r2, #5
	asr	r3, r3, #31
	sub	r3, r2, r3
	ldr	r2, [fp, #-72]
	cmp	r2, r3
	ble	.L12
.L11:
	ldr	r3, .L16+16
	ldr	r0, [r3]
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-84]
	ldr	r1, .L16+20
	bl	fprintf
	mov	r0, #1
	bl	exit
.L12:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-44]
	ldr	r1, [fp, #-72]
	ldr	r0, .L16+24
	bl	printf
	sub	r3, fp, #68
	mov	r2, r3
	ldr	r1, .L16+28
	ldr	r0, [fp, #-80]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L15
	ldr	r0, .L16+32
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	nop
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC6
	.word	21534
	.word	.LC2
	.word	1374389535
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	21535
	.word	.LC5
	.size	set_baud_divisor, .-set_baud_divisor
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_baud, %function
get_baud:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L39
	cmp	r3, r2
	beq	.L19
	ldr	r3, [fp, #-8]
	ldr	r2, .L39
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+4
	cmp	r3, r2
	beq	.L21
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+4
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+8
	cmp	r3, r2
	beq	.L22
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+8
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+12
	cmp	r3, r2
	beq	.L23
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+12
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+16
	cmp	r3, r2
	beq	.L24
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+16
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+20
	cmp	r3, r2
	beq	.L25
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+20
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+24
	cmp	r3, r2
	beq	.L26
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+24
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+28
	cmp	r3, r2
	beq	.L27
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+28
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	cmp	r3, #921600
	beq	.L28
	ldr	r3, [fp, #-8]
	cmp	r3, #921600
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+32
	cmp	r3, r2
	beq	.L29
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+32
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+36
	cmp	r3, r2
	beq	.L30
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+36
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+40
	cmp	r3, r2
	beq	.L31
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+40
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	cmp	r3, #230400
	beq	.L32
	ldr	r3, [fp, #-8]
	cmp	r3, #230400
	bgt	.L20
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+44
	cmp	r3, r2
	beq	.L33
	ldr	r3, [fp, #-8]
	ldr	r2, .L39+44
	cmp	r3, r2
	bgt	.L20
	ldr	r3, [fp, #-8]
	cmp	r3, #57600
	beq	.L34
	ldr	r3, [fp, #-8]
	cmp	r3, #57600
	bgt	.L20
	ldr	r3, [fp, #-8]
	cmp	r3, #38400
	beq	.L35
	ldr	r3, [fp, #-8]
	cmp	r3, #38400
	bgt	.L20
	ldr	r3, [fp, #-8]
	cmp	r3, #9600
	beq	.L36
	ldr	r3, [fp, #-8]
	cmp	r3, #19200
	beq	.L37
	b	.L20
.L36:
	mov	r3, #13
	b	.L38
.L37:
	mov	r3, #14
	b	.L38
.L35:
	mov	r3, #15
	b	.L38
.L34:
	ldr	r3, .L39+48
	b	.L38
.L33:
	ldr	r3, .L39+52
	b	.L38
.L32:
	ldr	r3, .L39+56
	b	.L38
.L31:
	ldr	r3, .L39+60
	b	.L38
.L30:
	ldr	r3, .L39+64
	b	.L38
.L29:
	ldr	r3, .L39+68
	b	.L38
.L28:
	ldr	r3, .L39+72
	b	.L38
.L27:
	ldr	r3, .L39+76
	b	.L38
.L26:
	ldr	r3, .L39+80
	b	.L38
.L25:
	ldr	r3, .L39+84
	b	.L38
.L24:
	ldr	r3, .L39+88
	b	.L38
.L23:
	ldr	r3, .L39+92
	b	.L38
.L22:
	ldr	r3, .L39+96
	b	.L38
.L21:
	ldr	r3, .L39+100
	b	.L38
.L19:
	ldr	r3, .L39+104
	b	.L38
.L20:
	mvn	r3, #0
.L38:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L40:
	.align	2
.L39:
	.word	4000000
	.word	3500000
	.word	3000000
	.word	2500000
	.word	2000000
	.word	1500000
	.word	1152000
	.word	1000000
	.word	576000
	.word	500000
	.word	460800
	.word	115200
	.word	4097
	.word	4098
	.word	4099
	.word	4100
	.word	4101
	.word	4102
	.word	4103
	.word	4104
	.word	4105
	.word	4106
	.word	4107
	.word	4108
	.word	4109
	.word	4110
	.word	4111
	.size	get_baud, .-get_baud
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Usage: linux-serial-test [OPTION]\012\012  -h, --he"
	.ascii	"lp\012  -b, --baud        Baud rate, 115200, etc (1"
	.ascii	"15200 is default)\012  -p, --port        Port (/dev"
	.ascii	"/ttyS0, etc) (must be specified)\012  -d, --divisor"
	.ascii	"     UART Baud rate divisor (can be used to set cus"
	.ascii	"tom baud rates)\012  -R, --rx_dump     Dump Rx data"
	.ascii	" (ascii, raw)\012  -T, --detailed_tx Detailed Tx da"
	.ascii	"ta\012  -s, --stats       Dump serial port stats ev"
	.ascii	"ery 5s\012  -S, --stop-on-err Stop program if we en"
	.ascii	"counter an error\012  -y, --single-byte Send specif"
	.ascii	"ied byte to the serial port\012  -z, --second-byte "
	.ascii	"Send another specified byte to the serial port\012 "
	.ascii	" -c, --rts-cts     Enable RTS/CTS flow control\012 "
	.ascii	" -B, --2-stop-bit  Use two stop bits per character\012"
	.ascii	"  -P, --parity      Use parity bit (odd, even, mark"
	.ascii	", space)\012  -e, --dump-err    Display errors\012 "
	.ascii	" -r, --no-rx       Don't receive data (can be used "
	.ascii	"to test flow control)\012                    when s"
	.ascii	"erial driver buffer is full\012  -t, --no-tx       "
	.ascii	"Don't transmit data\012  -l, --rx-delay    Delay be"
	.ascii	"tween reading data (ms) (can be used to test flow c"
	.ascii	"ontrol)\012  -a, --tx-delay    Delay between writin"
	.ascii	"g data (ms)\012  -w, --tx-bytes    Number of bytes "
	.ascii	"for each write (default is to repeatedly write 1024"
	.ascii	" bytes\012                    until no more are acc"
	.ascii	"epted)\012  -q, --rs485       Enable RS485 directio"
	.ascii	"n control on port, and set delay\012               "
	.ascii	"     from when TX is finished and RS485 driver enab"
	.ascii	"le is\012                    de-asserted. Delay is "
	.ascii	"specified in bit times.\012  -o, --tx-time     Numb"
	.ascii	"er of seconds to transmit for (defaults to 0, meani"
	.ascii	"ng no limit)\012  -i, --rx-time     Number of secon"
	.ascii	"ds to receive for (defaults to 0, meaning no limit)"
	.ascii	"\012  -A, --ascii       Output bytes range from 32 "
	.ascii	"to 126 (default is 0 to 255)\012example: serial_tes"
	.ascii	"t -e -b 921600 -p /dev/ttyS2 -c -l 250\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	display_help, %function
display_help:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L42
	bl	puts
	nop
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC7
	.size	display_help, .-display_help
	.section	.rodata
	.align	2
.LC8:
	.ascii	"ascii\000"
	.align	2
.LC9:
	.ascii	"mark\000"
	.align	2
.LC10:
	.ascii	"odd\000"
	.align	2
.LC11:
	.ascii	"space\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_options, %function
process_options:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, .L81
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L77:
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, .L81+4
	ldr	r2, [r3]
	sub	r3, fp, #20
	str	r3, [sp]
	ldr	r3, .L81+8
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	getopt_long
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L80
	ldr	r3, [fp, #-12]
	cmp	r3, #122
	ldrls	pc, [pc, r3, asl #2]
	b	.L77
.L48:
	.word	.L59
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L70
	.word	.L69
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L68
	.word	.L77
	.word	.L67
	.word	.L66
	.word	.L65
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L77
	.word	.L64
	.word	.L63
	.word	.L62
	.word	.L61
	.word	.L60
	.word	.L77
	.word	.L77
	.word	.L59
	.word	.L58
	.word	.L77
	.word	.L77
	.word	.L57
	.word	.L77
	.word	.L77
	.word	.L56
	.word	.L55
	.word	.L54
	.word	.L53
	.word	.L52
	.word	.L51
	.word	.L77
	.word	.L77
	.word	.L50
	.word	.L77
	.word	.L49
	.word	.L47
.L59:
	bl	display_help
	mov	r0, #0
	bl	exit
.L63:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3]
	b	.L46
.L55:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	strdup
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #4]
	b	.L46
.L61:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	b	.L46
.L67:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #12]
	ldr	r3, .L81+12
	ldr	r3, [r3]
	ldr	r1, .L81+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #16]
	b	.L46
.L65:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #20]
	b	.L46
.L52:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #24]
	b	.L46
.L66:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #28]
	b	.L46
.L49:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #32]
	b	.L46
.L47:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #36]
	b	.L46
.L62:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #40]
	b	.L46
.L69:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #44]
	b	.L46
.L68:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #48]
	ldr	r3, .L81+12
	ldr	r3, [r3]
	ldr	r1, .L81+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L71
	ldr	r3, .L81+12
	ldr	r3, [r3]
	ldr	r1, .L81+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L72
.L71:
	mov	r2, #1
	b	.L73
.L72:
	mov	r2, #0
.L73:
	ldr	r3, [fp, #-32]
	str	r2, [r3, #52]
	ldr	r3, .L81+12
	ldr	r3, [r3]
	ldr	r1, .L81+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L74
	ldr	r3, .L81+12
	ldr	r3, [r3]
	ldr	r1, .L81+28
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L75
.L74:
	mov	r2, #1
	b	.L76
.L75:
	mov	r2, #0
.L76:
	ldr	r3, [fp, #-32]
	str	r2, [r3, #56]
	b	.L46
.L60:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #60]
	b	.L46
.L53:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #64]
	b	.L46
.L51:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #68]
	b	.L46
.L57:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #72]
	b	.L46
.L64:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #76]
	b	.L46
.L50:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #80]
	b	.L46
.L54:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r2, r0
	ldr	r3, [fp, #-32]
	str	r2, [r3, #84]
	b	.L46
.L56:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #88]
	b	.L46
.L58:
	ldr	r3, .L81+12
	ldr	r3, [r3]
	sub	r1, fp, #16
	mov	r2, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #92]
	b	.L46
.L70:
	ldr	r3, [fp, #-32]
	mov	r2, #1
	str	r2, [r3, #96]
	nop
.L46:
	b	.L77
.L80:
	nop
	ldr	r3, .L81
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L78
	bl	__stack_chk_fail
.L78:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L82:
	.align	2
.L81:
	.word	.LC12
	.word	short_options.6439
	.word	long_options.6440
	.word	optarg
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	process_options, .-process_options
	.section	.rodata
	.align	2
.LC13:
	.ascii	"%s: count for this session: rx=%lld, tx=%lld, rx er"
	.ascii	"r=%lld\012\000"
	.align	2
.LC14:
	.ascii	"%s: TIOCGICOUNT: ret=%i, rx=%i, tx=%i, frame = %i, "
	.ascii	"overrun = %i, parity = %i, brk = %i, buf_overrun = "
	.ascii	"%i\012\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dump_serial_port_stats, %function
dump_serial_port_stats:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #120
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	ldr	r3, .L87
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-108]
	ldr	ip, [r3, #4]
	ldr	r3, [fp, #-104]
	add	r5, r3, #24
	ldmia	r5, {r4-r5}
	ldr	r3, [fp, #-104]
	add	r3, r3, #16
	ldmia	r3, {r2-r3}
	ldr	r1, [fp, #-104]
	add	r1, r1, #32
	ldmia	r1, {r0-r1}
	str	r0, [sp, #8]
	str	r1, [sp, #12]
	stm	sp, {r2-r3}
	mov	r2, r4
	mov	r3, r5
	mov	r1, ip
	ldr	r0, .L87+4
	bl	printf
	sub	r3, fp, #96
	mov	r2, #80
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-104]
	ldr	r3, [r3, #4]
	sub	r2, fp, #96
	ldr	r1, .L87+8
	mov	r0, r3
	bl	ioctl
	str	r0, [fp, #-100]
	ldr	r3, [fp, #-100]
	cmn	r3, #1
	beq	.L86
	ldr	r3, [fp, #-108]
	ldr	r4, [r3, #4]
	ldr	r5, [fp, #-80]
	ldr	r3, [fp, #-76]
	ldr	r2, [fp, #-72]
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-64]
	ldr	ip, [fp, #-60]
	ldr	lr, [fp, #-56]
	str	lr, [sp, #20]
	str	ip, [sp, #16]
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, r5
	ldr	r2, [fp, #-100]
	mov	r1, r4
	ldr	r0, .L87+12
	bl	printf
.L86:
	nop
	ldr	r3, .L87
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L85
	bl	__stack_chk_fail
.L85:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L88:
	.align	2
.L87:
	.word	.LC15
	.word	.LC13
	.word	21597
	.word	.LC14
	.size	dump_serial_port_stats, .-dump_serial_port_stats
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	next_count_value, %function
next_count_value:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	str	r1, [fp, #-12]
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L90
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #127
	bne	.L90
	mov	r3, #32
	strb	r3, [fp, #-5]
.L90:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	next_count_value, .-next_count_value
	.section	.rodata
	.align	2
.LC16:
	.ascii	"Error, count: %lld, expected %02x, got %02x\012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_read_data, %function
process_read_data:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #1056
	str	r0, [fp, #-1072]
	str	r1, [fp, #-1076]
	ldr	r3, .L103
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r3, [fp, #-1072]
	ldr	r0, [r3, #4]
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	bl	read
	str	r0, [fp, #-1060]
	ldr	r3, [fp, #-1060]
	cmp	r3, #0
	ble	.L102
	ldr	r3, [fp, #-1076]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	beq	.L94
	ldr	r3, [fp, #-1076]
	ldr	r3, [r3, #16]
	cmp	r3, #0
	beq	.L95
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [fp, #-1060]
	mov	r0, r3
	bl	dump_data_ascii
	b	.L94
.L95:
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [fp, #-1060]
	mov	r0, r3
	bl	dump_data
.L94:
	mov	r3, #0
	str	r3, [fp, #-1064]
	b	.L96
.L100:
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1064]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-1072]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L97
	ldr	r3, [fp, #-1076]
	ldr	r3, [r3, #60]
	cmp	r3, #0
	beq	.L98
	ldr	r3, [fp, #-1072]
	add	r1, r3, #24
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-1064]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r8, r0, r2
	adc	r9, r1, r3
	ldr	r3, [fp, #-1072]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	r1, r3
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1064]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [sp, #4]
	str	r1, [sp]
	mov	r2, r8
	mov	r3, r9
	ldr	r0, .L103+4
	bl	printf
.L98:
	ldr	r3, [fp, #-1072]
	add	r3, r3, #32
	ldmia	r3, {r2-r3}
	adds	r6, r2, #1
	adc	r7, r3, #0
	ldr	r3, [fp, #-1072]
	str	r6, [r3, #32]
	str	r7, [r3, #36]
	ldr	r3, [fp, #-1076]
	ldr	r3, [r3, #28]
	cmp	r3, #0
	beq	.L99
	ldr	r1, [fp, #-1076]
	ldr	r0, [fp, #-1072]
	bl	dump_serial_port_stats
	mov	r0, #1
	bl	exit
.L99:
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1064]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-1072]
	strb	r2, [r3, #1]
.L97:
	ldr	r3, [fp, #-1072]
	ldrb	r2, [r3, #1]	@ zero_extendqisi2
	ldr	r3, [fp, #-1076]
	ldr	r3, [r3, #96]
	mov	r1, r3
	mov	r0, r2
	bl	next_count_value
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-1072]
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-1064]
	add	r3, r3, #1
	str	r3, [fp, #-1064]
.L96:
	ldr	r2, [fp, #-1064]
	ldr	r3, [fp, #-1060]
	cmp	r2, r3
	blt	.L100
	ldr	r3, [fp, #-1072]
	add	r1, r3, #24
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-1060]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, [fp, #-1072]
	str	r4, [r3, #24]
	str	r5, [r3, #28]
.L102:
	nop
	ldr	r3, .L103
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L101
	bl	__stack_chk_fail
.L101:
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L104:
	.align	2
.L103:
	.word	.LC17
	.word	.LC16
	.size	process_read_data, .-process_read_data
	.section	.rodata
	.align	2
.LC18:
	.ascii	"write failed - errno=%d (%s)\012\000"
	.align	2
.LC19:
	.ascii	"wrote %zd bytes\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process_write_data, %function
process_write_data:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #36
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #10
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #80]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	str	r3, [fp, #-32]
.L113:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L106
.L107:
	ldr	r3, [fp, #-48]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldr	r2, [fp, #-48]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-48]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #96]
	mov	r1, r3
	mov	r0, r2
	bl	next_count_value
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-48]
	strb	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L106:
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	blt	.L107
	ldr	r3, [fp, #-48]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-48]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	write
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L108
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	beq	.L109
	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
	mov	r2, r3
	mov	r1, r6
	ldr	r0, .L116
	bl	printf
.L109:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L110
.L108:
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-36]
.L110:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L111
	ldr	r3, [fp, #-48]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bge	.L112
.L111:
	ldr	r3, [fp, #-48]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-48]
	strb	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-32]
.L112:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L113
	ldr	r3, [fp, #-48]
	add	r1, r3, #16
	ldmia	r1, {r0-r1}
	ldr	r3, [fp, #-40]
	mov	r2, r3
	asr	r3, r2, #31
	adds	r4, r0, r2
	adc	r5, r1, r3
	ldr	r3, [fp, #-48]
	str	r4, [r3, #16]
	str	r5, [r3, #20]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	beq	.L115
	ldr	r1, [fp, #-40]
	ldr	r0, .L116+4
	bl	printf
.L115:
	nop
	sub	sp, fp, #16
	@ sp needed
	pop	{r4, r5, r6, fp, pc}
.L117:
	.align	2
.L116:
	.word	.LC18
	.word	.LC19
	.size	process_write_data, .-process_write_data
	.section	.rodata
	.align	2
.LC20:
	.ascii	"Error opening serial port\000"
	.align	2
.LC21:
	.ascii	"Error getting RS-485 mode\000"
	.align	2
.LC22:
	.ascii	"Error setting RS-485 mode\000"
	.align	2
.LC23:
	.ascii	"Error setting RS-232 mode\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_serial_port, %function
setup_serial_port:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-104]
	str	r1, [fp, #-108]
	str	r2, [fp, #-112]
	ldr	r3, .L129
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	bne	.L119
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #4]
	ldr	r1, .L129+4
	mov	r0, r3
	bl	open
	mov	r2, r0
	ldr	r3, [fp, #-108]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bge	.L119
	ldr	r0, .L129+8
	bl	perror
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	mov	r0, #1
	bl	exit
.L119:
	sub	r3, fp, #68
	mov	r0, r3
	mov	r3, #60
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-104]
	orr	r3, r3, #2224
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #40]
	cmp	r3, #0
	beq	.L120
	ldr	r3, [fp, #-60]
	orr	r3, r3, #-2147483648
	str	r3, [fp, #-60]
.L120:
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #44]
	cmp	r3, #0
	beq	.L121
	ldr	r3, [fp, #-60]
	orr	r3, r3, #64
	str	r3, [fp, #-60]
.L121:
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #48]
	cmp	r3, #0
	beq	.L122
	ldr	r3, [fp, #-60]
	orr	r3, r3, #256
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #52]
	cmp	r3, #0
	beq	.L123
	ldr	r3, [fp, #-60]
	orr	r3, r3, #512
	str	r3, [fp, #-60]
.L123:
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #56]
	cmp	r3, #0
	beq	.L122
	ldr	r3, [fp, #-60]
	orr	r3, r3, #1073741824
	str	r3, [fp, #-60]
.L122:
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-56]
	mvn	r3, #127
	strb	r3, [fp, #-45]
	mov	r3, #5
	strb	r3, [fp, #-46]
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	mov	r1, #2
	mov	r0, r3
	bl	tcflush
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	sub	r2, fp, #68
	mov	r1, #0
	mov	r0, r3
	bl	tcsetattr
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	sub	r2, fp, #100
	ldr	r1, .L129+12
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L124
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	blt	.L128
	ldr	r0, .L129+16
	bl	perror
	b	.L128
.L124:
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #84]
	cmp	r3, #0
	blt	.L126
	ldr	r3, [fp, #-100]
	orr	r3, r3, #7
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-112]
	ldr	r3, [r3, #84]
	str	r3, [fp, #-92]
	mov	r3, #0
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	sub	r2, fp, #100
	ldr	r1, .L129+20
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L128
	ldr	r0, .L129+24
	bl	perror
	b	.L128
.L126:
	ldr	r3, [fp, #-100]
	bic	r3, r3, #7
	str	r3, [fp, #-100]
	mov	r3, #0
	str	r3, [fp, #-92]
	mov	r3, #0
	str	r3, [fp, #-96]
	ldr	r3, [fp, #-108]
	ldr	r3, [r3, #4]
	sub	r2, fp, #100
	ldr	r1, .L129+20
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L128
	ldr	r0, .L129+28
	bl	perror
.L128:
	nop
	ldr	r3, .L129
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L127
	bl	__stack_chk_fail
.L127:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L130:
	.align	2
.L129:
	.word	.LC24
	.word	2050
	.word	.LC20
	.word	21550
	.word	.LC21
	.word	21551
	.word	.LC22
	.word	.LC23
	.size	setup_serial_port, .-setup_serial_port
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	diff_ms, %function
diff_ms:
	@ 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, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	sub	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	sub	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L132
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	ldr	r3, .L134
	add	r3, r2, r3
	str	r3, [fp, #-8]
.L132:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #5
	sub	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r1, r3
	ldr	r3, [fp, #-8]
	ldr	r2, .L134+4
	smull	r0, r2, r3, r2
	asr	r2, r2, #18
	asr	r3, r3, #31
	sub	r3, r2, r3
	add	r3, r1, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L135:
	.align	2
.L134:
	.word	1000000000
	.word	1125899907
	.size	diff_ms, .-diff_ms
	.section	.rodata
	.align	2
.LC25:
	.ascii	"Linux serial test app\000"
	.align	2
.LC26:
	.ascii	"ERROR: Port argument required\012\000"
	.align	2
.LC27:
	.ascii	"NOTE: non standard baud rate, trying custom divisor"
	.ascii	"\000"
	.align	2
.LC28:
	.ascii	"write()\000"
	.align	2
.LC29:
	.ascii	"ERROR: write() returned %d, not %d\012\000"
	.align	2
.LC30:
	.ascii	"ERROR: Memory allocation failed\012\000"
	.align	2
.LC31:
	.ascii	"poll()\000"
	.global	__aeabi_i2d
	.align	2
.LC32:
	.ascii	"No data received for %.1fs.\000"
	.align	2
.LC33:
	.ascii	" \000"
	.align	2
.LC34:
	.ascii	"\000"
	.align	2
.LC35:
	.ascii	"%sNo data transmitted for %.1fs.\000"
	.align	2
.LC36:
	.ascii	"Stopped transmitting.\000"
	.align	2
.LC37:
	.ascii	"Stopped receiving.\000"
	.align	2
.LC38:
	.ascii	"Exiting...\000"
	.align	2
.LC39:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 256
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #256
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	ldr	r3, .L180
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r0, .L180+4
	bl	puts
	sub	r3, fp, #136
	mov	r2, #100
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mvn	r3, #0
	str	r3, [fp, #-104]
	mvn	r3, #0
	str	r3, [fp, #-100]
	mvn	r3, #0
	str	r3, [fp, #-52]
	sub	r3, fp, #180
	mov	r2, #40
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mvn	r3, #0
	str	r3, [fp, #-176]
	sub	r3, fp, #136
	mov	r2, r3
	ldr	r1, [fp, #-284]
	ldr	r0, [fp, #-280]
	bl	process_options
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L137
	ldr	r3, .L180+8
	ldr	r3, [r3]
	mov	r2, #30
	mov	r1, #1
	ldr	r0, .L180+12
	bl	fwrite
	bl	display_help
	mov	r3, #1
	b	.L178
.L137:
	ldr	r3, .L180+16
	str	r3, [fp, #-272]
	ldr	r3, [fp, #-136]
	cmp	r3, #0
	beq	.L139
	ldr	r3, [fp, #-136]
	mov	r0, r3
	bl	get_baud
	str	r0, [fp, #-272]
.L139:
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bgt	.L140
	ldr	r0, .L180+20
	bl	puts
	mov	r3, #15
	str	r3, [fp, #-272]
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r3
	mov	r0, #15
	bl	setup_serial_port
	ldr	r3, [fp, #-176]
	ldr	r2, [fp, #-136]
	mov	r1, r2
	mov	r0, r3
	bl	set_baud_divisor
	b	.L141
.L140:
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r3
	ldr	r0, [fp, #-272]
	bl	setup_serial_port
.L141:
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	blt	.L142
	mov	r3, #1
	str	r3, [fp, #-268]
	ldr	r3, [fp, #-104]
	and	r3, r3, #255
	strb	r3, [fp, #-36]
	ldr	r3, [fp, #-100]
	cmp	r3, #0
	blt	.L143
	ldr	r3, [fp, #-100]
	and	r3, r3, #255
	strb	r3, [fp, #-35]
	ldr	r3, [fp, #-268]
	add	r3, r3, #1
	str	r3, [fp, #-268]
.L143:
	ldr	r3, [fp, #-176]
	ldr	r2, [fp, #-268]
	sub	r1, fp, #36
	mov	r0, r3
	bl	write
	str	r0, [fp, #-248]
	ldr	r3, [fp, #-248]
	cmp	r3, #0
	bge	.L144
	ldr	r0, .L180+24
	bl	perror
	mov	r3, #1
	b	.L178
.L144:
	ldr	r2, [fp, #-248]
	ldr	r3, [fp, #-268]
	cmp	r2, r3
	beq	.L146
	ldr	r3, .L180+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-268]
	ldr	r2, [fp, #-248]
	ldr	r1, .L180+28
	bl	fprintf
	mov	r3, #1
	b	.L178
.L146:
	mov	r3, #0
	b	.L178
.L142:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L147
	ldr	r3, [fp, #-56]
	b	.L148
.L147:
	mov	r3, #1024
.L148:
	str	r3, [fp, #-168]
	ldr	r3, [fp, #-168]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-172]
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	bne	.L149
	ldr	r3, .L180+8
	ldr	r3, [r3]
	mov	r2, #32
	mov	r1, #1
	ldr	r0, .L180+32
	bl	fwrite
	mov	r3, #1
	b	.L178
.L149:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L150
	mov	r3, #32
	strb	r3, [fp, #-180]
	ldrb	r3, [fp, #-180]	@ zero_extendqisi2
	strb	r3, [fp, #-179]
.L150:
	sub	r3, fp, #236
	mov	r2, #8
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-176]
	str	r3, [fp, #-236]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L151
	ldrsh	r3, [fp, #-232]
	orr	r3, r3, #1
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-232]	@ movhi
	b	.L152
.L151:
	ldrsh	r3, [fp, #-232]
	bic	r3, r3, #1
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-232]	@ movhi
.L152:
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L153
	ldrsh	r3, [fp, #-232]
	orr	r3, r3, #4
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-232]	@ movhi
	b	.L154
.L153:
	ldrsh	r3, [fp, #-232]
	bic	r3, r3, #4
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-232]	@ movhi
.L154:
	sub	r3, fp, #228
	mov	r1, r3
	mov	r0, #1
	bl	clock_gettime
	sub	r3, fp, #220
	sub	r2, fp, #228
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	sub	r3, fp, #212
	sub	r2, fp, #228
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	sub	r3, fp, #204
	sub	r2, fp, #228
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	sub	r3, fp, #196
	sub	r2, fp, #228
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	b	.L155
.L174:
	sub	r3, fp, #236
	mov	r2, #1000
	mov	r1, #1
	mov	r0, r3
	bl	poll
	str	r0, [fp, #-256]
	sub	r3, fp, #188
	mov	r1, r3
	mov	r0, #1
	bl	clock_gettime
	ldr	r3, [fp, #-256]
	cmn	r3, #1
	bne	.L156
	ldr	r0, .L180+36
	bl	perror
	b	.L157
.L156:
	ldr	r3, [fp, #-256]
	cmp	r3, #0
	beq	.L157
	ldrsh	r3, [fp, #-230]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L158
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	beq	.L159
	sub	r2, fp, #204
	sub	r3, fp, #188
	mov	r1, r2
	mov	r0, r3
	bl	diff_ms
	mov	r2, r0
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	ble	.L158
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r2
	mov	r0, r3
	bl	process_read_data
	sub	r3, fp, #204
	sub	r2, fp, #188
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	b	.L158
.L159:
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r2
	mov	r0, r3
	bl	process_read_data
	sub	r3, fp, #204
	sub	r2, fp, #188
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
.L158:
	ldrsh	r3, [fp, #-230]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #4
	cmp	r3, #0
	beq	.L157
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	beq	.L160
	sub	r2, fp, #196
	sub	r3, fp, #188
	mov	r1, r2
	mov	r0, r3
	bl	diff_ms
	mov	r2, r0
	ldr	r3, [fp, #-60]
	cmp	r2, r3
	ble	.L157
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r2
	mov	r0, r3
	bl	process_write_data
	sub	r3, fp, #196
	sub	r2, fp, #188
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	b	.L157
.L160:
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r2
	mov	r0, r3
	bl	process_write_data
	sub	r3, fp, #196
	sub	r2, fp, #188
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
.L157:
	sub	r2, fp, #212
	sub	r3, fp, #188
	mov	r1, r2
	mov	r0, r3
	bl	diff_ms
	mov	r3, r0
	cmp	r3, #1000
	ble	.L161
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L162
	sub	r2, fp, #204
	sub	r3, fp, #188
	mov	r1, r2
	mov	r0, r3
	bl	diff_ms
	mov	r3, r0
	cmp	r3, #2000
	ble	.L162
	mov	r3, #1
	b	.L163
.L162:
	mov	r3, #0
.L163:
	str	r3, [fp, #-264]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L164
	sub	r2, fp, #196
	sub	r3, fp, #188
	mov	r1, r2
	mov	r0, r3
	bl	diff_ms
	mov	r3, r0
	cmp	r3, #2000
	ble	.L164
	mov	r3, #1
	b	.L165
.L164:
	mov	r3, #0
.L165:
	str	r3, [fp, #-252]
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	beq	.L166
	sub	r3, fp, #164
	ldmia	r3, {r2-r3}
	orrs	r3, r2, r3
	beq	.L166
	sub	r1, fp, #164
	ldmia	r1, {r0-r1}
	sub	r3, fp, #156
	ldmia	r3, {r2-r3}
	cmp	r1, r3
	cmpeq	r0, r2
	bne	.L166
	mov	r3, #0
	str	r3, [fp, #-264]
.L166:
	ldr	r3, [fp, #-264]
	cmp	r3, #0
	bne	.L167
	ldr	r3, [fp, #-252]
	cmp	r3, #0
	beq	.L161
.L167:
	ldr	r3, [fp, #-264]
	cmp	r3, #0
	beq	.L168
	sub	r2, fp, #204
	sub	r3, fp, #188
	mov	r1, r2
	mov	r0, r3
	bl	diff_ms
	mov	r3, r0
	ldr	r2, .L180+40
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L180+44
	bl	printf
	ldr	r3, .L180+48
	str	r3, [fp, #-260]
	b	.L169
.L168:
	ldr	r3, .L180+52
	str	r3, [fp, #-260]
.L169:
	ldr	r3, [fp, #-252]
	cmp	r3, #0
	beq	.L170
	sub	r2, fp, #196
	sub	r3, fp, #188
	mov	r1, r2
	mov	r0, r3
	bl	diff_ms
	mov	r3, r0
	ldr	r2, .L180+40
	smull	r1, r2, r3, r2
	asr	r2, r2, #6
	asr	r3, r3, #31
	sub	r3, r2, r3
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-260]
	ldr	r0, .L180+56
	bl	printf
.L170:
	mov	r0, #10
	bl	putchar
	sub	r3, fp, #212
	sub	r2, fp, #188
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
.L161:
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	beq	.L171
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-220]
	sub	r3, r2, r3
	cmp	r3, #5
	ble	.L171
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r2
	mov	r0, r3
	bl	dump_serial_port_stats
	sub	r3, fp, #220
	sub	r2, fp, #188
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
.L171:
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L172
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-228]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-48]
	cmp	r2, r3
	bcc	.L172
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #1
	str	r3, [fp, #-68]
	ldrsh	r3, [fp, #-232]
	bic	r3, r3, #4
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-232]	@ movhi
	ldr	r0, .L180+60
	bl	puts
.L172:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L155
	ldr	r2, [fp, #-188]
	ldr	r3, [fp, #-228]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-44]
	cmp	r2, r3
	bcc	.L155
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #1
	str	r3, [fp, #-72]
	ldrsh	r3, [fp, #-232]
	bic	r3, r3, #1
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-232]	@ movhi
	ldr	r0, .L180+64
	bl	puts
.L155:
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L174
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	beq	.L174
	ldr	r0, .L180+68
	bl	puts
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	beq	.L175
	mov	r3, #0
	str	r3, [fp, #-96]
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r3
	ldr	r0, [fp, #-272]
	bl	setup_serial_port
.L175:
	ldr	r3, [fp, #-176]
	mov	r0, r3
	bl	tcdrain
	sub	r2, fp, #136
	sub	r3, fp, #180
	mov	r1, r2
	mov	r0, r3
	bl	dump_serial_port_stats
	ldr	r3, [fp, #-176]
	mov	r1, #2
	mov	r0, r3
	bl	tcflush
	ldr	r3, [fp, #-132]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-176]
	mov	r0, r3
	bl	close
	mvn	r3, #0
	str	r3, [fp, #-176]
	sub	r1, fp, #164
	ldmia	r1, {r0-r1}
	sub	r3, fp, #156
	ldmia	r3, {r2-r3}
	subs	r6, r0, r2
	sbc	r7, r1, r3
	mov	r2, #0
	mov	r3, #0
	asr	r2, r7, #31
	asr	r3, r7, #31
	eor	r4, r2, r6
	eor	r5, r3, r7
	subs	r4, r4, r2
	sbc	r5, r5, r3
	sub	r3, fp, #148
	ldmia	r3, {r2-r3}
	adds	r8, r4, r2
	adc	r9, r5, r3
	str	r8, [fp, #-244]
	str	r9, [fp, #-240]
	sub	r3, fp, #244
	ldmia	r3, {r2-r3}
	cmp	r2, #126
	sbcs	r3, r3, #0
	bge	.L176
	ldr	r3, [fp, #-244]
	b	.L178
.L176:
	mov	r3, #125
.L178:
	ldr	r2, .L180
	ldr	r1, [r2]
	ldr	r2, [fp, #-32]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L179
	bl	__stack_chk_fail
.L179:
	mov	r0, r3
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L181:
	.align	2
.L180:
	.word	.LC39
	.word	.LC25
	.word	stderr
	.word	.LC26
	.word	4098
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	274877907
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	.LC38
	.size	main, .-main
	.section	.rodata
	.align	2
.LC40:
	.ascii	"hb:p:d:R:TsSy:z:cBertq:l:a:w:o:i:P:A\000"
	.data
	.align	2
	.type	short_options.6439, %object
	.size	short_options.6439, 4
short_options.6439:
	.word	.LC40
	.section	.rodata
	.align	2
.LC41:
	.ascii	"help\000"
	.align	2
.LC42:
	.ascii	"baud\000"
	.align	2
.LC43:
	.ascii	"port\000"
	.align	2
.LC44:
	.ascii	"divisor\000"
	.align	2
.LC45:
	.ascii	"rx_dump\000"
	.align	2
.LC46:
	.ascii	"detailed_tx\000"
	.align	2
.LC47:
	.ascii	"stats\000"
	.align	2
.LC48:
	.ascii	"stop-on-err\000"
	.align	2
.LC49:
	.ascii	"single-byte\000"
	.align	2
.LC50:
	.ascii	"second-byte\000"
	.align	2
.LC51:
	.ascii	"rts-cts\000"
	.align	2
.LC52:
	.ascii	"2-stop-bit\000"
	.align	2
.LC53:
	.ascii	"parity\000"
	.align	2
.LC54:
	.ascii	"dump-err\000"
	.align	2
.LC55:
	.ascii	"no-rx\000"
	.align	2
.LC56:
	.ascii	"no-tx\000"
	.align	2
.LC57:
	.ascii	"rx-delay\000"
	.align	2
.LC58:
	.ascii	"tx-delay\000"
	.align	2
.LC59:
	.ascii	"tx-bytes\000"
	.align	2
.LC60:
	.ascii	"rs485\000"
	.align	2
.LC61:
	.ascii	"tx-time\000"
	.align	2
.LC62:
	.ascii	"rx-time\000"
	.align	2
	.type	long_options.6440, %object
	.size	long_options.6440, 384
long_options.6440:
	.word	.LC41
	.word	0
	.word	0
	.word	0
	.word	.LC42
	.word	1
	.word	0
	.word	98
	.word	.LC43
	.word	1
	.word	0
	.word	112
	.word	.LC44
	.word	1
	.word	0
	.word	100
	.word	.LC45
	.word	1
	.word	0
	.word	82
	.word	.LC46
	.word	0
	.word	0
	.word	84
	.word	.LC47
	.word	0
	.word	0
	.word	115
	.word	.LC48
	.word	0
	.word	0
	.word	83
	.word	.LC49
	.word	0
	.word	0
	.word	121
	.word	.LC50
	.word	0
	.word	0
	.word	122
	.word	.LC51
	.word	0
	.word	0
	.word	99
	.word	.LC52
	.word	0
	.word	0
	.word	66
	.word	.LC53
	.word	1
	.word	0
	.word	80
	.word	.LC54
	.word	0
	.word	0
	.word	101
	.word	.LC55
	.word	0
	.word	0
	.word	114
	.word	.LC56
	.word	0
	.word	0
	.word	116
	.word	.LC57
	.word	1
	.word	0
	.word	108
	.word	.LC58
	.word	1
	.word	0
	.word	97
	.word	.LC59
	.word	1
	.word	0
	.word	119
	.word	.LC60
	.word	1
	.word	0
	.word	113
	.word	.LC61
	.word	1
	.word	0
	.word	111
	.word	.LC62
	.word	1
	.word	0
	.word	105
	.word	.LC8
	.word	0
	.word	0
	.word	65
	.word	0
	.word	0
	.word	0
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
