	.file	"87637351.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%02x "
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 13
	mov	rdi, rax
	call	open_serial
	mov	DWORD PTR -280[rbp], eax
.L5:
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -280[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -276[rbp], eax
	cmp	DWORD PTR -276[rbp], 0
	jle	.L2
	mov	DWORD PTR -284[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -284[rbp]
	cdqe
	movzx	eax, BYTE PTR -272[rbp+rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -284[rbp], 1
.L3:
	mov	eax, DWORD PTR -284[rbp]
	cmp	eax, DWORD PTR -276[rbp]
	jl	.L4
.L2:
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"\n  Error! in Opening tty  "
	.align 8
.LC2:
	.string	"\n  ERROR ! in Setting attributes"
	.align 8
.LC3:
	.string	"\n  Baud rate = 9600 StopBits = 1 Parity = none"
	.text
	.globl	open_serial
	.type	open_serial, @function
open_serial:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	DWORD PTR -108[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -104[rbp]
	mov	esi, 258
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], -1
	jne	.L8
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	lea	rax, -80[rbp]
	mov	esi, 13
	mov	rdi, rax
	call	cfsetispeed@PLT
	lea	rax, -80[rbp]
	mov	esi, 13
	mov	rdi, rax
	call	cfsetospeed@PLT
	mov	eax, DWORD PTR -72[rbp]
	and	ah, -2
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, -65
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, -49
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 48
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	and	eax, 2147483647
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -72[rbp]
	or	eax, 2176
	mov	DWORD PTR -72[rbp], eax
	mov	eax, DWORD PTR -80[rbp]
	and	ah, -29
	mov	DWORD PTR -80[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -28
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -76[rbp]
	and	eax, -2
	mov	DWORD PTR -76[rbp], eax
	mov	BYTE PTR -57[rbp], 1
	mov	BYTE PTR -58[rbp], 0
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	cfmakeraw@PLT
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	test	eax, eax
	je	.L9
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L9:
	lea	rdi, .LC3[rip]
	call	puts@PLT
.L10:
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcflush@PLT
	mov	eax, DWORD PTR -84[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	open_serial, .-open_serial
	.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	"87637351.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%02x \000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #280
	str	r0, [fp, #-280]
	str	r1, [fp, #-284]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-284]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #13
	mov	r0, r3
	bl	open_serial
	str	r0, [fp, #-272]
.L5:
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, r3
	ldr	r0, [fp, #-272]
	bl	read
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmp	r3, #0
	ble	.L2
	mov	r3, #0
	str	r3, [fp, #-276]
	b	.L3
.L4:
	sub	r2, fp, #264
	ldr	r3, [fp, #-276]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L7+4
	bl	printf
	ldr	r3, [fp, #-276]
	add	r3, r3, #1
	str	r3, [fp, #-276]
.L3:
	ldr	r2, [fp, #-276]
	ldr	r3, [fp, #-268]
	cmp	r2, r3
	blt	.L4
.L2:
	ldr	r3, .L7+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	b	.L5
.L8:
	.align	2
.L7:
	.word	.LC1
	.word	.LC0
	.word	stdout
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"\012  Error! in Opening tty  \000"
	.align	2
.LC3:
	.ascii	"\012  ERROR ! in Setting attributes\000"
	.align	2
.LC4:
	.ascii	"\012  Baud rate = 9600 StopBits = 1 Parity = none\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	open_serial
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_serial, %function
open_serial:
	@ 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, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L15+4
	ldr	r0, [fp, #-80]
	bl	open
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L15+8
	bl	printf
.L10:
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	tcgetattr
	sub	r3, fp, #68
	mov	r1, #13
	mov	r0, r3
	bl	cfsetispeed
	sub	r3, fp, #68
	mov	r1, #13
	mov	r0, r3
	bl	cfsetospeed
	ldr	r3, [fp, #-60]
	bic	r3, r3, #256
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #64
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #48
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	orr	r3, r3, #48
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	orr	r3, r3, #2176
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-68]
	bic	r3, r3, #7168
	str	r3, [fp, #-68]
	ldr	r3, [fp, #-56]
	bic	r3, r3, #27
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-64]
	bic	r3, r3, #1
	str	r3, [fp, #-64]
	mov	r3, #1
	strb	r3, [fp, #-45]
	mov	r3, #0
	strb	r3, [fp, #-46]
	sub	r3, fp, #68
	mov	r0, r3
	bl	cfmakeraw
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L15+12
	bl	printf
	b	.L12
.L11:
	ldr	r0, .L15+16
	bl	puts
.L12:
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	tcflush
	ldr	r3, [fp, #-72]
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC5
	.word	258
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	open_serial, .-open_serial
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
