	.file	"812557.c"
	.intel_syntax noprefix
	.text
	.globl	setline
	.type	setline, @function
setline:
.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	DWORD PTR -88[rbp], esi
	mov	DWORD PTR -92[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	tcgetattr@PLT
	mov	eax, DWORD PTR -88[rbp]
	or	eax, 3200
	mov	DWORD PTR -72[rbp], eax
	mov	DWORD PTR -80[rbp], 5
	mov	DWORD PTR -76[rbp], 0
	mov	DWORD PTR -68[rbp], 0
	mov	BYTE PTR -57[rbp], 1
	mov	BYTE PTR -58[rbp], 0
	mov	edx, DWORD PTR -92[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetispeed@PLT
	mov	edx, DWORD PTR -92[rbp]
	lea	rax, -80[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	cfsetospeed@PLT
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 0
	mov	edi, eax
	call	tcsetattr@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L2
	call	__stack_chk_fail@PLT
.L2:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	setline, .-setline
	.section	.rodata
.LC0:
	.string	"err : serio attach failure"
.LC1:
	.string	"%s is opened\n"
	.align 8
.LC2:
	.string	"can't set line discipline - %d\n"
.LC3:
	.string	"can't set device type\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -57[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -48[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -48[rbp], 48
	mov	DWORD PTR -44[rbp], 13
	mov	DWORD PTR -52[rbp], 60
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 2306
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L4
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L8
.L4:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edx, DWORD PTR -44[rbp]
	mov	ecx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	setline
	mov	DWORD PTR -56[rbp], 2
	lea	rdx, -56[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 21539
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	je	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -36[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L8
.L6:
	mov	eax, DWORD PTR -52[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	sal	rax, 8
	or	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	sal	rax, 16
	or	rax, rdx
	mov	QWORD PTR -32[rbp], rax
	lea	rdx, -32[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 1074295041
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	je	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	read@PLT
	jmp	.L7
.L8:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"812557.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setline
	.syntax unified
	.arm
	.fpu softvfp
	.type	setline, %function
setline:
	@ 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, #-72]
	str	r1, [fp, #-76]
	str	r2, [fp, #-80]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	tcgetattr
	ldr	r3, [fp, #-76]
	orr	r3, r3, #3200
	str	r3, [fp, #-60]
	mov	r3, #5
	str	r3, [fp, #-68]
	mov	r3, #0
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #1
	strb	r3, [fp, #-45]
	mov	r3, #0
	strb	r3, [fp, #-46]
	ldr	r2, [fp, #-80]
	sub	r3, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	cfsetispeed
	ldr	r2, [fp, #-80]
	sub	r3, fp, #68
	mov	r1, r2
	mov	r0, r3
	bl	cfsetospeed
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-72]
	bl	tcsetattr
	nop
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L2
	bl	__stack_chk_fail
.L2:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.size	setline, .-setline
	.section	.rodata
	.align	2
.LC1:
	.ascii	"err : serio attach failure\000"
	.align	2
.LC2:
	.ascii	"%s is opened\012\000"
	.align	2
.LC3:
	.ascii	"can't set line discipline - %d\012\000"
	.align	2
.LC4:
	.ascii	"can't set device type\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-45]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #48
	str	r3, [fp, #-32]
	mov	r3, #13
	str	r3, [fp, #-28]
	mov	r3, #60
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L12+4
	mov	r0, r3
	bl	open
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L12+8
	bl	perror
	mov	r3, #1
	b	.L10
.L6:
	ldr	r3, .L12+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+16
	bl	fprintf
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-24]
	bl	setline
	mov	r3, #2
	str	r3, [fp, #-44]
	sub	r3, fp, #44
	mov	r2, r3
	ldr	r1, .L12+20
	ldr	r0, [fp, #-24]
	bl	ioctl
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L12+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, .L12+24
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L10
.L8:
	ldr	r3, [fp, #-20]
	lsl	r2, r3, #8
	ldr	r3, [fp, #-36]
	orr	r2, r2, r3
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #16
	orr	r3, r2, r3
	str	r3, [fp, #-40]
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L12+28
	ldr	r0, [fp, #-24]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r3, .L12+12
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L12+32
	bl	fwrite
	mov	r3, #1
	b	.L10
.L9:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-24]
	bl	read
	b	.L9
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	2306
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	21539
	.word	.LC3
	.word	1074032897
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
