	.file	"122015448.c"
	.intel_syntax noprefix
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 2048
buf:
	.zero	2048
	.section	.rodata
.LC0:
	.string	"/dev/tty02"
.LC1:
	.string	"Failed to open %s, exiting.\n"
.LC2:
	.string	"/tmp/log_tty02.log"
	.align 8
.LC3:
	.string	"Failed to open log file, %s, exiting.\n"
	.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, 16
	mov	edx, 0
	mov	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L2
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edx, 420
	mov	esi, 577
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jns	.L4
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC2[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -8[rbp]
	lea	rsi, buf[rip]
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -4[rbp], eax
.L4:
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 2048
	lea	rsi, buf[rip]
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jg	.L5
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"122015448.c"
	.text
	.comm	buf,2048,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/tty02\000"
	.align	2
.LC1:
	.ascii	"Failed to open %s, exiting.\012\000"
	.align	2
.LC2:
	.ascii	"/tmp/log_tty02.log\000"
	.align	2
.LC3:
	.ascii	"Failed to open log file, %s, exiting.\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r2, #0
	mov	r1, #0
	ldr	r0, .L7
	bl	open
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L2
	ldr	r3, .L7+4
	ldr	r3, [r3]
	ldr	r2, .L7
	ldr	r1, .L7+8
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	mov	r2, #420
	ldr	r1, .L7+12
	ldr	r0, .L7+16
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L4
	ldr	r3, .L7+4
	ldr	r3, [r3]
	ldr	r2, .L7+16
	ldr	r1, .L7+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-8]
	mov	r2, r3
	ldr	r1, .L7+24
	ldr	r0, [fp, #-12]
	bl	write
	str	r0, [fp, #-8]
.L4:
	mov	r2, #2048
	ldr	r1, .L7+24
	ldr	r0, [fp, #-16]
	bl	read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L5
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	577
	.word	.LC2
	.word	.LC3
	.word	buf
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
