	.file	"181582.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Canonical mode transmission"
.LC1:
	.string	"\tUsage:\t%s <device>\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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -100[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -112[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], -1
	jne	.L4
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L11
.L4:
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	test	eax, eax
	je	.L5
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L11
.L5:
	lea	rax, -80[rbp]
	mov	esi, 13
	mov	rdi, rax
	call	cfsetspeed@PLT
	test	eax, eax
	je	.L6
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L11
.L6:
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L11
.L7:
	call	getchar@PLT
	mov	BYTE PTR -85[rbp], al
	lea	rcx, -85[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	cmp	rax, -1
	jne	.L8
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L11
.L8:
	movzx	eax, BYTE PTR -85[rbp]
	cmp	al, 43
	jne	.L7
	mov	eax, DWORD PTR -84[rbp]
	mov	edi, eax
	call	tcdrain@PLT
	test	eax, eax
	je	.L9
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L11
.L9:
	mov	eax, DWORD PTR -84[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	je	.L10
	mov	rax, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	neg	eax
	jmp	.L11
.L10:
	mov	eax, 0
.L11:
	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
.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	"181582.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Canonical mode transmission\000"
	.align	2
.LC1:
	.ascii	"\011Usage:\011%s <device>\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-80]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L13+4
	bl	puts
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L13+8
	bl	printf
	mvn	r3, #0
	b	.L11
.L2:
	ldr	r3, [fp, #-84]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmn	r3, #1
	bne	.L4
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L11
.L4:
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L11
.L5:
	sub	r3, fp, #68
	mov	r1, #13
	mov	r0, r3
	bl	cfsetspeed
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L11
.L6:
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L11
.L7:
	bl	getchar
	mov	r3, r0
	and	r3, r3, #255
	strb	r3, [fp, #-73]
	sub	r3, fp, #73
	mov	r2, #1
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	write
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L11
.L8:
	ldrb	r3, [fp, #-73]	@ zero_extendqisi2
	cmp	r3, #43
	bne	.L7
	ldr	r0, [fp, #-72]
	bl	tcdrain
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L11
.L9:
	ldr	r0, [fp, #-72]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-84]
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L11
.L10:
	mov	r3, #0
.L11:
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
