	.file	"269500.c"
	.intel_syntax noprefix
	.text
	.globl	t0
	.bss
	.align 8
	.type	t0, @object
	.size	t0, 8
t0:
	.zero	8
	.globl	fout
	.align 8
	.type	fout, @object
	.size	fout, 8
fout:
	.zero	8
	.globl	comdev
	.section	.rodata
.LC0:
	.string	"/dev/ttyUSB0"
	.section	.data.rel.local,"aw"
	.align 8
	.type	comdev, @object
	.size	comdev, 8
comdev:
	.quad	.LC0
	.globl	BAUD_RATE
	.data
	.align 4
	.type	BAUD_RATE, @object
	.size	BAUD_RATE, 4
BAUD_RATE:
	.long	4097
	.globl	oldtty
	.bss
	.align 16
	.type	oldtty, @object
	.size	oldtty, 18
oldtty:
	.zero	18
	.globl	tty
	.align 16
	.type	tty, @object
	.size	tty, 18
tty:
	.zero	18
	.globl	oldt
	.align 32
	.type	oldt, @object
	.size	oldt, 60
oldt:
	.zero	60
	.globl	newt
	.align 32
	.type	newt, @object
	.size	newt, 60
newt:
	.zero	60
	.globl	comfd
	.align 4
	.type	comfd, @object
	.size	comfd, 4
comfd:
	.zero	4
	.text
	.globl	dtime
	.type	dtime, @function
dtime:
.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -32[rbp]
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, rax
	mov	rax, QWORD PTR -24[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm2, QWORD PTR .LC1[rip]
	divsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movsd	QWORD PTR -40[rbp], xmm0
	movsd	xmm0, QWORD PTR -40[rbp]
	movq	rax, xmm0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	movq	xmm0, rax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dtime, .-dtime
	.section	.rodata
.LC2:
	.string	"Exit! (%d)\n"
	.text
	.globl	quit
	.type	quit, @function
quit:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rdx, oldt[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	eax, DWORD PTR comfd[rip]
	lea	rdx, oldtty[rip]
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	eax, DWORD PTR comfd[rip]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR fout[rip]
	test	rax, rax
	je	.L5
	mov	rax, QWORD PTR fout[rip]
	mov	rdi, rax
	call	fclose@PLT
.L5:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	quit, .-quit
	.globl	crc
	.type	crc, @function
crc:
.LFB8:
	.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	BYTE PTR -20[rbp], al
	movzx	eax, BYTE PTR -20[rbp]
	and	eax, 1
	mov	BYTE PTR -5[rbp], al
	mov	DWORD PTR -4[rbp], 1
	jmp	.L7
.L8:
	movzx	edx, BYTE PTR -20[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, edx
	and	eax, 1
	mov	edx, eax
	movzx	eax, BYTE PTR -5[rbp]
	xor	eax, edx
	mov	BYTE PTR -5[rbp], al
	add	DWORD PTR -4[rbp], 1
.L7:
	cmp	DWORD PTR -4[rbp], 7
	jbe	.L8
	movzx	eax, BYTE PTR -5[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	crc, .-crc
	.section	.rodata
.LC3:
	.string	"\nOpen port..."
.LC4:
	.string	"Can't use port %s\n"
.LC5:
	.string	" OK\nGet current settings..."
.LC6:
	.string	" OK"
	.text
	.globl	tty_init
	.type	tty_init, @function
tty_init:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, oldt[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	mov	rax, QWORD PTR oldt[rip]
	mov	rdx, QWORD PTR oldt[rip+8]
	mov	QWORD PTR newt[rip], rax
	mov	QWORD PTR newt[rip+8], rdx
	mov	rax, QWORD PTR oldt[rip+16]
	mov	rdx, QWORD PTR oldt[rip+24]
	mov	QWORD PTR newt[rip+16], rax
	mov	QWORD PTR newt[rip+24], rdx
	mov	rax, QWORD PTR oldt[rip+32]
	mov	rdx, QWORD PTR oldt[rip+40]
	mov	QWORD PTR newt[rip+32], rax
	mov	QWORD PTR newt[rip+40], rdx
	mov	rax, QWORD PTR oldt[rip+48]
	mov	QWORD PTR newt[rip+48], rax
	mov	eax, DWORD PTR oldt[rip+56]
	mov	DWORD PTR newt[rip+56], eax
	mov	eax, DWORD PTR newt[rip+12]
	and	eax, -11
	mov	DWORD PTR newt[rip+12], eax
	lea	rdx, newt[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	test	eax, eax
	jns	.L11
	mov	edi, -2
	call	quit
.L11:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	rax, QWORD PTR comdev[rip]
	mov	esi, 2306
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR comfd[rip], eax
	mov	eax, DWORD PTR comfd[rip]
	test	eax, eax
	jns	.L12
	mov	rdx, QWORD PTR comdev[rip]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	quit
.L12:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, DWORD PTR comfd[rip]
	lea	rdx, oldtty[rip]
	mov	esi, 21509
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L13
	mov	edi, -1
	call	exit@PLT
.L13:
	mov	rax, QWORD PTR oldtty[rip]
	mov	rdx, QWORD PTR oldtty[rip+8]
	mov	QWORD PTR tty[rip], rax
	mov	QWORD PTR tty[rip+8], rdx
	movzx	eax, WORD PTR oldtty[rip+16]
	mov	WORD PTR tty[rip+16], ax
	mov	WORD PTR tty[rip+6], 0
	mov	WORD PTR tty[rip+2], 0
	mov	WORD PTR tty[rip], 0
	mov	eax, DWORD PTR BAUD_RATE[rip]
	or	ax, 2480
	mov	WORD PTR tty[rip+4], ax
	mov	BYTE PTR tty[rip+15], 0
	mov	BYTE PTR tty[rip+14], 5
	mov	eax, DWORD PTR comfd[rip]
	lea	rdx, tty[rip]
	mov	esi, 21510
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L14
	mov	edi, -1
	call	exit@PLT
.L14:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdx, newt[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	tty_init, .-tty_init
	.globl	read_console
	.type	read_console, @function
read_console:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 114 "the_stack_data/269500.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -172[rbp], edx
	mov	DWORD PTR -168[rbp], eax
	mov	rax, QWORD PTR -144[rbp]
	or	rax, 1
	mov	QWORD PTR -144[rbp], rax
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 10000
	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	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	jne	.L16
	mov	DWORD PTR -176[rbp], 0
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -144[rbp]
	and	eax, 1
	test	rax, rax
	je	.L18
	call	getchar@PLT
	mov	DWORD PTR -176[rbp], eax
	jmp	.L17
.L18:
	mov	DWORD PTR -176[rbp], 0
.L17:
	mov	eax, DWORD PTR -176[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	read_console, .-read_console
	.globl	mygetchar
	.type	mygetchar, @function
mygetchar:
.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, 16
.L22:
	mov	eax, 0
	call	read_console
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L22
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	mygetchar, .-mygetchar
	.globl	read_tty
	.type	read_tty, @function
read_tty:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	QWORD PTR -200[rbp], rdi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -168[rbp], 0
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 149 "the_stack_data/269500.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -180[rbp], edx
	mov	DWORD PTR -176[rbp], eax
	mov	eax, DWORD PTR comfd[rip]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR comfd[rip]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 10000
	mov	eax, DWORD PTR comfd[rip]
	lea	edi, 1[rax]
	lea	rdx, -160[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -172[rbp], eax
	cmp	DWORD PTR -172[rbp], 0
	jne	.L25
	mov	eax, 0
	jmp	.L28
.L25:
	mov	eax, DWORD PTR comfd[rip]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR comfd[rip]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L27
	mov	eax, DWORD PTR comfd[rip]
	mov	rdx, QWORD PTR -208[rbp]
	mov	rcx, QWORD PTR -200[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jg	.L27
	mov	eax, 0
	jmp	.L28
.L27:
	mov	rax, QWORD PTR -168[rbp]
.L28:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	read_tty, .-read_tty
	.section	.rodata
	.align 8
.LC7:
	.string	"Use this commands:\nH\tShow this help\nD\tChange device number\nq\tQuit"
	.text
	.globl	help
	.type	help, @function
help:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	help, .-help
	.section	.rodata
.LC8:
	.string	"Ioctl"
.LC9:
	.string	"Can't write to port"
	.text
	.globl	send_with_9
	.type	send_with_9, @function
send_with_9:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	eax, edi
	mov	DWORD PTR -8[rbp], esi
	mov	BYTE PTR -4[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	movzx	eax, al
	mov	edi, eax
	call	crc
	movzx	eax, al
	cmp	DWORD PTR -8[rbp], eax
	je	.L32
	movzx	eax, WORD PTR tty[rip+4]
	or	ah, 2
	mov	WORD PTR tty[rip+4], ax
	jmp	.L33
.L32:
	movzx	eax, WORD PTR tty[rip+4]
	and	ah, -3
	mov	WORD PTR tty[rip+4], ax
.L33:
	mov	eax, DWORD PTR comfd[rip]
	lea	rdx, tty[rip]
	mov	esi, 21510
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L34
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 2
	call	quit
.L34:
	mov	eax, DWORD PTR comfd[rip]
	lea	rcx, -4[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L36
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 2
	call	quit
.L36:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	send_with_9, .-send_with_9
	.section	.rodata
.LC10:
	.string	"device number: "
.LC11:
	.string	"%d"
.LC12:
	.string	"\nWRONG DEVNUM!"
	.text
	.globl	con_sig
	.type	con_sig, @function
con_sig:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -20[rbp], 0
	jle	.L47
	cmp	DWORD PTR -20[rbp], 113
	jne	.L40
	mov	edi, 0
	call	quit
	jmp	.L41
.L40:
	cmp	DWORD PTR -20[rbp], 72
	jne	.L42
	mov	eax, 0
	call	help
	jmp	.L37
.L42:
	cmp	DWORD PTR -20[rbp], 68
	jne	.L41
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, oldt[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	lea	rax, -12[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdx, newt[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	eax, DWORD PTR -12[rbp]
	test	eax, eax
	js	.L43
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, 255
	jle	.L44
.L43:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	jmp	.L37
.L44:
	mov	eax, DWORD PTR -12[rbp]
	movzx	eax, al
	mov	esi, 1
	mov	edi, eax
	call	send_with_9
	jmp	.L37
.L41:
	mov	eax, DWORD PTR -20[rbp]
	movzx	eax, al
	mov	esi, 0
	mov	edi, eax
	call	send_with_9
	jmp	.L37
.L47:
	nop
.L37:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L46
	call	__stack_chk_fail@PLT
.L46:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	con_sig, .-con_sig
	.section	.rodata
.LC13:
	.string	"Bad data length!\n"
	.text
	.globl	get_int
	.type	get_int, @function
get_int:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -48[rbp], 2
	je	.L49
	cmp	QWORD PTR -48[rbp], 4
	je	.L49
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 17
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L53
.L49:
	mov	DWORD PTR -20[rbp], 0
	lea	rax, -20[rbp]
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -48[rbp], 2
	jne	.L51
	mov	rax, QWORD PTR -40[rbp]
	movzx	edx, WORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	WORD PTR [rax], dx
	jmp	.L52
.L51:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
.L52:
	mov	eax, DWORD PTR -20[rbp]
.L53:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L54
	call	__stack_chk_fail@PLT
.L54:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	get_int, .-get_int
	.section	.rodata
.LC14:
	.string	"a"
.LC15:
	.string	"Can't open output file"
.LC16:
	.string	"%s"
.LC17:
	.string	"%zd\t%s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -164[rbp], 2
	jne	.L56
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR fout[rip], rax
	mov	rax, QWORD PTR fout[rip]
	test	rax, rax
	jne	.L57
	lea	rdi, .LC15[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L57:
	mov	rax, QWORD PTR fout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
.L56:
	mov	eax, 0
	call	tty_init
	lea	rsi, quit[rip]
	mov	edi, 15
	call	signal@PLT
	lea	rsi, quit[rip]
	mov	edi, 2
	call	signal@PLT
	mov	esi, 1
	mov	edi, 3
	call	signal@PLT
	mov	esi, 1
	mov	edi, 20
	call	signal@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	mov	eax, 0
	call	dtime
	movq	rax, xmm0
	mov	QWORD PTR t0[rip], rax
.L60:
	mov	eax, 0
	call	read_console
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	jle	.L58
	mov	eax, DWORD PTR -156[rbp]
	mov	edi, eax
	call	con_sig
.L58:
	lea	rax, -144[rbp]
	mov	esi, 127
	mov	rdi, rax
	call	read_tty
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 0
	je	.L60
	lea	rdx, -144[rbp]
	mov	rax, QWORD PTR -152[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -144[rbp]
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR fout[rip]
	test	rax, rax
	je	.L60
	mov	edi, 0
	call	time@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR fout[rip]
	lea	rdx, -144[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L60
	.cfi_endproc
.LFE17:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	1093567616
	.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	"269500.c"
	.text
	.comm	t0,8,8
	.global	fout
	.bss
	.align	2
	.type	fout, %object
	.size	fout, 4
fout:
	.space	4
	.global	comdev
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/ttyUSB0\000"
	.data
	.align	2
	.type	comdev, %object
	.size	comdev, 4
comdev:
	.word	.LC0
	.global	BAUD_RATE
	.align	2
	.type	BAUD_RATE, %object
	.size	BAUD_RATE, 4
BAUD_RATE:
	.word	4097
	.comm	oldtty,18,4
	.comm	tty,18,4
	.comm	oldt,60,4
	.comm	newt,60,4
	.comm	comfd,4,4
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dtime
	.syntax unified
	.arm
	.fpu softvfp
	.type	dtime, %function
dtime:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #24
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L4+4
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	ldr	r1, .L4
	ldr	r0, [r1]
	ldr	r1, [fp, #-16]
	eors	r0, r1, r0
	mov	r1, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC1
	.word	1093567616
	.size	dtime, .-dtime
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Exit! (%d)\012\000"
	.text
	.align	2
	.global	quit
	.syntax unified
	.arm
	.fpu softvfp
	.type	quit, %function
quit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r2, .L8
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r3, .L8+4
	ldr	r3, [r3]
	ldr	r2, .L8+8
	mov	r1, #0
	mov	r0, r3
	bl	ioctl
	ldr	r3, .L8+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L8+12
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L7
	ldr	r3, .L8+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	fclose
.L7:
	ldr	r1, [fp, #-8]
	ldr	r0, .L8+16
	bl	printf
	ldr	r0, [fp, #-8]
	bl	exit
.L9:
	.align	2
.L8:
	.word	oldt
	.word	comfd
	.word	oldtty
	.word	fout
	.word	.LC2
	.size	quit, .-quit
	.align	2
	.global	crc
	.syntax unified
	.arm
	.fpu softvfp
	.type	crc, %function
crc:
	@ 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
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]
	and	r3, r3, #1
	strb	r3, [fp, #-9]
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L11
.L12:
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	ldr	r3, [fp, #-8]
	asr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	and	r3, r3, #1
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldrsb	r3, [fp, #-9]
	eor	r3, r3, r2
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L11:
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	bls	.L12
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	crc, .-crc
	.section	.rodata
	.align	2
.LC3:
	.ascii	"\012Open port...\000"
	.align	2
.LC4:
	.ascii	"Can't use port %s\012\000"
	.align	2
.LC5:
	.ascii	" OK\012Get current settings...\000"
	.align	2
.LC6:
	.ascii	" OK\000"
	.text
	.align	2
	.global	tty_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	tty_init, %function
tty_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L19
	mov	r0, #0
	bl	tcgetattr
	ldr	r2, .L19+4
	ldr	r3, .L19
	mov	ip, r2
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, .L19+4
	ldr	r3, [r3, #12]
	bic	r3, r3, #10
	ldr	r2, .L19+4
	str	r3, [r2, #12]
	ldr	r2, .L19+4
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L15
	mvn	r0, #1
	bl	quit
.L15:
	ldr	r0, .L19+8
	bl	puts
	ldr	r3, .L19+12
	ldr	r3, [r3]
	ldr	r1, .L19+16
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L19+20
	str	r3, [r2]
	ldr	r3, .L19+20
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L16
	ldr	r3, .L19+24
	ldr	r3, [r3]
	ldr	r2, .L19+12
	ldr	r2, [r2]
	ldr	r1, .L19+28
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	quit
.L16:
	ldr	r0, .L19+32
	bl	puts
	ldr	r3, .L19+20
	ldr	r3, [r3]
	ldr	r2, .L19+36
	ldr	r1, .L19+40
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L17
	mvn	r0, #0
	bl	exit
.L17:
	ldr	r2, .L19+44
	ldr	r3, .L19+36
	mov	r0, r2
	mov	r1, r3
	mov	r3, #18
	mov	r2, r3
	bl	memcpy
	ldr	r3, .L19+44
	mov	r2, #0
	strh	r2, [r3, #6]	@ movhi
	ldr	r3, .L19+44
	mov	r2, #0
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, .L19+44
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	ldr	r3, .L19+48
	ldr	r3, [r3]
	lsl	r3, r3, #16
	asr	r3, r3, #16
	orr	r3, r3, #2480
	lsl	r3, r3, #16
	asr	r3, r3, #16
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, .L19+44
	strh	r3, [r2, #4]	@ movhi
	ldr	r3, .L19+44
	mov	r2, #0
	strb	r2, [r3, #15]
	ldr	r3, .L19+44
	mov	r2, #5
	strb	r2, [r3, #14]
	ldr	r3, .L19+20
	ldr	r3, [r3]
	ldr	r2, .L19+44
	ldr	r1, .L19+52
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L18
	mvn	r0, #0
	bl	exit
.L18:
	ldr	r0, .L19+56
	bl	puts
	ldr	r2, .L19+4
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	nop
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	oldt
	.word	newt
	.word	.LC3
	.word	comdev
	.word	2306
	.word	comfd
	.word	stderr
	.word	.LC4
	.word	.LC5
	.word	oldtty
	.word	21509
	.word	tty
	.word	BAUD_RATE
	.word	21510
	.word	.LC6
	.size	tty_init, .-tty_init
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_console
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_console, %function
read_console:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #136
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L22
.L23:
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-156]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L22:
	ldr	r3, [fp, #-156]
	cmp	r3, #31
	bls	.L23
	ldr	r3, [fp, #-136]
	orr	r3, r3, #1
	str	r3, [fp, #-136]
	mov	r3, #0
	str	r3, [fp, #-144]
	ldr	r3, .L29+4
	str	r3, [fp, #-140]
	sub	r1, fp, #136
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r0, #1
	bl	select
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L24
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L25
.L24:
	ldr	r3, [fp, #-136]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L26
	bl	getchar
	str	r0, [fp, #-160]
	b	.L25
.L26:
	mov	r3, #0
	str	r3, [fp, #-160]
.L25:
	ldr	r3, [fp, #-160]
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC7
	.word	10000
	.size	read_console, .-read_console
	.align	2
	.global	mygetchar
	.syntax unified
	.arm
	.fpu softvfp
	.type	mygetchar, %function
mygetchar:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
.L32:
	bl	read_console
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L32
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	mygetchar, .-mygetchar
	.section	.rodata
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_tty
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_tty, %function
read_tty:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #176
	str	r0, [fp, #-168]
	str	r1, [fp, #-172]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-160]
	sub	r3, fp, #136
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-156]
	b	.L35
.L36:
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-156]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-156]
	add	r3, r3, #1
	str	r3, [fp, #-156]
.L35:
	ldr	r3, [fp, #-156]
	cmp	r3, #31
	bls	.L36
	ldr	r3, .L42+4
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-132]
	ldr	r3, .L42+4
	ldr	r3, [r3]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-132]
	mov	r3, #0
	str	r3, [fp, #-144]
	ldr	r3, .L42+8
	str	r3, [fp, #-140]
	ldr	r3, .L42+4
	ldr	r3, [r3]
	add	r0, r3, #1
	sub	r1, fp, #136
	sub	r3, fp, #144
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L37
	mov	r3, #0
	b	.L40
.L37:
	ldr	r3, .L42+4
	ldr	r3, [r3]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-132]
	ldr	r3, .L42+4
	ldr	r3, [r3]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L39
	ldr	r3, .L42+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-172]
	ldr	r1, [fp, #-168]
	mov	r0, r3
	bl	read
	str	r0, [fp, #-160]
	ldr	r3, [fp, #-160]
	cmp	r3, #0
	bgt	.L39
	mov	r3, #0
	b	.L40
.L39:
	ldr	r3, [fp, #-160]
.L40:
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC8
	.word	comfd
	.word	10000
	.size	read_tty, .-read_tty
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Use this commands:\012H\011Show this help\012D\011C"
	.ascii	"hange device number\012q\011Quit\000"
	.text
	.align	2
	.global	help
	.syntax unified
	.arm
	.fpu softvfp
	.type	help, %function
help:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L45
	bl	puts
	nop
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	.LC9
	.size	help, .-help
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Ioctl\000"
	.align	2
.LC11:
	.ascii	"Can't write to port\000"
	.text
	.align	2
	.global	send_with_9
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_with_9, %function
send_with_9:
	@ 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, r0
	str	r1, [fp, #-12]
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	crc
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-12]
	cmp	r3, r2
	beq	.L48
	ldr	r3, .L53
	ldrh	r3, [r3, #4]
	orr	r3, r3, #512
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, .L53
	strh	r3, [r2, #4]	@ movhi
	b	.L49
.L48:
	ldr	r3, .L53
	ldrh	r3, [r3, #4]
	bic	r3, r3, #512
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldr	r2, .L53
	strh	r3, [r2, #4]	@ movhi
.L49:
	ldr	r3, .L53+4
	ldr	r3, [r3]
	ldr	r2, .L53
	ldr	r1, .L53+8
	mov	r0, r3
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L50
	ldr	r0, .L53+12
	bl	perror
	mov	r0, #2
	bl	quit
.L50:
	ldr	r3, .L53+4
	ldr	r3, [r3]
	sub	r1, fp, #5
	mov	r2, #1
	mov	r0, r3
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L52
	ldr	r0, .L53+16
	bl	perror
	mov	r0, #2
	bl	quit
.L52:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L54:
	.align	2
.L53:
	.word	tty
	.word	comfd
	.word	21510
	.word	.LC10
	.word	.LC11
	.size	send_with_9, .-send_with_9
	.section	.rodata
	.align	2
.LC12:
	.ascii	"device number: \000"
	.align	2
.LC13:
	.ascii	"%d\000"
	.align	2
.LC14:
	.ascii	"\012WRONG DEVNUM!\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	con_sig
	.syntax unified
	.arm
	.fpu softvfp
	.type	con_sig, %function
con_sig:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L66
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L65
	ldr	r3, [fp, #-16]
	cmp	r3, #113
	bne	.L58
	mov	r0, #0
	bl	quit
	b	.L59
.L58:
	ldr	r3, [fp, #-16]
	cmp	r3, #72
	bne	.L60
	bl	help
	b	.L55
.L60:
	ldr	r3, [fp, #-16]
	cmp	r3, #68
	bne	.L59
	ldr	r0, .L66+4
	bl	printf
	ldr	r2, .L66+8
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	sub	r3, fp, #12
	mov	r1, r3
	ldr	r0, .L66+12
	bl	__isoc99_scanf
	ldr	r2, .L66+16
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L61
	ldr	r3, [fp, #-12]
	cmp	r3, #255
	ble	.L62
.L61:
	ldr	r0, .L66+20
	bl	puts
	b	.L55
.L62:
	ldr	r3, [fp, #-12]
	and	r3, r3, #255
	mov	r1, #1
	mov	r0, r3
	bl	send_with_9
	b	.L55
.L59:
	ldr	r3, [fp, #-16]
	and	r3, r3, #255
	mov	r1, #0
	mov	r0, r3
	bl	send_with_9
	b	.L55
.L65:
	nop
.L55:
	ldr	r3, .L66
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L64
	bl	__stack_chk_fail
.L64:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC15
	.word	.LC12
	.word	oldt
	.word	.LC13
	.word	newt
	.word	.LC14
	.size	con_sig, .-con_sig
	.section	.rodata
	.align	2
.LC16:
	.ascii	"Bad data length!\012\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_int
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_int, %function
get_int:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, .L75
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	beq	.L69
	ldr	r3, [fp, #-28]
	cmp	r3, #4
	beq	.L69
	ldr	r3, .L75+4
	ldr	r3, [r3]
	mov	r2, #17
	mov	r1, #1
	ldr	r0, .L75+8
	bl	fwrite
	mvn	r3, #0
	b	.L73
.L69:
	mov	r3, #0
	str	r3, [fp, #-16]
	sub	r3, fp, #16
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	cmp	r3, #2
	bne	.L71
	mov	r2, #2
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	memcpy
	b	.L72
.L71:
	mov	r2, #4
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	memcpy
.L72:
	ldr	r3, [fp, #-16]
.L73:
	ldr	r2, .L75
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L76:
	.align	2
.L75:
	.word	.LC17
	.word	stdout
	.word	.LC16
	.size	get_int, .-get_int
	.section	.rodata
	.align	2
.LC18:
	.ascii	"a\000"
	.align	2
.LC19:
	.ascii	"Can't open output file\000"
	.align	2
.LC20:
	.ascii	"%s\000"
	.align	2
.LC21:
	.ascii	"%zd\011%s\012\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #156
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L84
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-160]
	cmp	r3, #2
	bne	.L78
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L84+4
	mov	r0, r3
	bl	fopen
	mov	r3, r0
	ldr	r2, .L84+8
	str	r3, [r2]
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L79
	ldr	r0, .L84+12
	bl	perror
	mvn	r0, #0
	bl	exit
.L79:
	ldr	r3, .L84+8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
.L78:
	bl	tty_init
	ldr	r1, .L84+16
	mov	r0, #15
	bl	signal
	ldr	r1, .L84+16
	mov	r0, #2
	bl	signal
	mov	r1, #1
	mov	r0, #3
	bl	signal
	mov	r1, #1
	mov	r0, #20
	bl	signal
	ldr	r3, .L84+20
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	bl	dtime
	mov	r2, r0
	mov	r3, r1
	ldr	r1, .L84+24
	stm	r1, {r2-r3}
.L82:
	bl	read_console
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	ble	.L80
	ldr	r0, [fp, #-152]
	bl	con_sig
.L80:
	sub	r3, fp, #144
	mov	r1, #127
	mov	r0, r3
	bl	read_tty
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	beq	.L82
	sub	r2, fp, #144
	ldr	r3, [fp, #-148]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #144
	mov	r1, r3
	ldr	r0, .L84+28
	bl	printf
	ldr	r3, .L84+8
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L82
	ldr	r3, .L84+8
	ldr	r4, [r3]
	mov	r0, #0
	bl	time
	mov	r2, r0
	sub	r3, fp, #144
	ldr	r1, .L84+32
	mov	r0, r4
	bl	fprintf
	b	.L82
.L85:
	.align	2
.L84:
	.word	.LC22
	.word	.LC18
	.word	fout
	.word	.LC19
	.word	quit
	.word	stdout
	.word	t0
	.word	.LC20
	.word	.LC21
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
