	.file	"507320.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/dev/ttyS1"
.LC1:
	.string	"Open error on %s\n"
	.align 8
.LC2:
	.string	"\n\n\rPrint on RS232 with hardware flow control ( CTS & RTS pin )\n\n\r"
	.align 8
.LC3:
	.string	"The input and output queues have been flushed.\n\n\r"
.LC4:
	.string	"tcflush error"
	.align 8
.LC5:
	.string	"Start echo from RS232 rx pin to terminal\n\r"
	.text
	.globl	main
	.type	main, @function
main:
.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, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 2306
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	jns	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	mov	eax, DWORD PTR -88[rbp]
	or	al, -128
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -88[rbp]
	or	eax, 48
	mov	DWORD PTR -88[rbp], eax
	mov	eax, DWORD PTR -96[rbp]
	or	eax, 4
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -96[rbp]
	or	eax, -2147483648
	mov	DWORD PTR -96[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	and	eax, -3
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	and	eax, -9
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	and	eax, -17
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	and	eax, -2
	mov	DWORD PTR -84[rbp], eax
	mov	BYTE PTR -73[rbp], 1
	mov	BYTE PTR -74[rbp], 0
	lea	rax, -96[rbp]
	mov	esi, 13
	mov	rdi, rax
	call	cfsetospeed@PLT
	lea	rax, -96[rbp]
	mov	esi, 13
	mov	rdi, rax
	call	cfsetispeed@PLT
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	BYTE PTR -28[rbp], 65
	mov	BYTE PTR -27[rbp], 66
	mov	BYTE PTR -26[rbp], 67
	mov	BYTE PTR -25[rbp], 10
	lea	rcx, -28[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edi, 200000
	call	usleep@PLT
	mov	eax, DWORD PTR -100[rbp]
	mov	esi, 2
	mov	edi, eax
	call	tcflush@PLT
	test	eax, eax
	jne	.L3
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L4
.L3:
	lea	rdi, .LC4[rip]
	call	perror@PLT
.L4:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L6:
	lea	rcx, -18[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	cmp	rax, 1
	jne	.L6
	movzx	eax, BYTE PTR -18[rbp]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
	jmp	.L6
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.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	"507320.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/ttyS1\000"
	.align	2
.LC1:
	.ascii	"Open error on %s\012\000"
	.align	2
.LC2:
	.ascii	"\012\012\015Print on RS232 with hardware flow contr"
	.ascii	"ol ( CTS & RTS pin )\012\012\015\000"
	.align	2
.LC3:
	.ascii	"The input and output queues have been flushed.\012\012"
	.ascii	"\015\000"
	.align	2
.LC4:
	.ascii	"tcflush error\000"
	.align	2
.LC5:
	.ascii	"Start echo from RS232 rx pin to terminal\012\015\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #100
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r1, .L8+4
	ldr	r0, .L8+8
	bl	open
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bge	.L2
	ldr	r3, .L8+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L8+16
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	tcgetattr
	ldr	r3, [fp, #-92]
	orr	r3, r3, #128
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	orr	r3, r3, #48
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-100]
	orr	r3, r3, #4
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-100]
	orr	r3, r3, #-2147483648
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-88]
	bic	r3, r3, #2
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	bic	r3, r3, #8
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	bic	r3, r3, #16
	str	r3, [fp, #-88]
	ldr	r3, [fp, #-88]
	bic	r3, r3, #1
	str	r3, [fp, #-88]
	mov	r3, #1
	strb	r3, [fp, #-77]
	mov	r3, #0
	strb	r3, [fp, #-78]
	sub	r3, fp, #100
	mov	r1, #13
	mov	r0, r3
	bl	cfsetospeed
	sub	r3, fp, #100
	mov	r1, #13
	mov	r0, r3
	bl	cfsetispeed
	sub	r3, fp, #100
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-104]
	bl	tcsetattr
	ldr	r0, .L8+20
	bl	printf
	mov	r3, #65
	strb	r3, [fp, #-40]
	mov	r3, #66
	strb	r3, [fp, #-39]
	mov	r3, #67
	strb	r3, [fp, #-38]
	mov	r3, #10
	strb	r3, [fp, #-37]
	sub	r3, fp, #40
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	write
	ldr	r0, .L8+24
	bl	usleep
	mov	r1, #2
	ldr	r0, [fp, #-104]
	bl	tcflush
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L8+28
	bl	printf
	b	.L4
.L3:
	ldr	r0, .L8+32
	bl	perror
.L4:
	ldr	r0, .L8+36
	bl	printf
.L6:
	sub	r3, fp, #28
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	read
	mov	r3, r0
	cmp	r3, #1
	bne	.L6
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	mov	r0, #10
	bl	putchar
	b	.L6
.L9:
	.align	2
.L8:
	.word	.LC6
	.word	2306
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	200000
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
