	.file	"90762970.c"
	.intel_syntax noprefix
	.text
	.globl	tobuf
	.bss
	.align 32
	.type	tobuf, @object
	.size	tobuf, 128
tobuf:
	.zero	128
	.globl	ostate
	.align 32
	.type	ostate, @object
	.size	ostate, 60
ostate:
	.zero	60
	.globl	nstate
	.align 32
	.type	nstate, @object
	.size	nstate, 60
nstate:
	.zero	60
	.section	.rodata
	.align 8
.LC0:
	.string	"Can't read terminal capabilites\n"
.LC1:
	.string	"Can't set terminal mode\n"
	.text
	.globl	ttopen
	.type	ttopen, @function
ttopen:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, ostate[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	test	eax, eax
	js	.L2
	lea	rsi, nstate[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	test	eax, eax
	jns	.L3
.L2:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rdi, nstate[rip]
	call	cfmakeraw@PLT
	mov	BYTE PTR nstate[rip+23], 1
	mov	BYTE PTR nstate[rip+22], 0
	lea	rdx, nstate[rip]
	mov	esi, 1
	mov	edi, 0
	call	tcsetattr@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR stdout[rip]
	mov	edx, 128
	lea	rsi, tobuf[rip]
	mov	rdi, rax
	call	setbuffer@PLT
	mov	esi, 0
	mov	edi, 20
	call	signal@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	ttopen, .-ttopen
	.section	.rodata
.LC2:
	.string	"Can't restore terminal flags"
	.text
	.globl	ttclose
	.type	ttclose, @function
ttclose:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	ttflush
	lea	rdx, ostate[rip]
	mov	esi, 1
	mov	edi, 0
	call	tcsetattr@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ttclose, .-ttclose
	.globl	ttputc
	.type	ttputc, @function
ttputc:
.LFB8:
	.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	DWORD PTR -4[rbp], edi
	mov	rdx, QWORD PTR stdout[rip]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	fputc@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ttputc, .-ttputc
	.globl	ttflush
	.type	ttflush, @function
ttflush:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 0
	call	tcdrain@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ttflush, .-ttflush
	.globl	ttgetc
	.type	ttgetc, @function
ttgetc:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fgetc@PLT
	and	eax, 127
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	ttgetc, .-ttgetc
	.globl	typeahead
	.type	typeahead, @function
typeahead:
.LFB11:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -12[rbp]
	mov	rdx, rax
	mov	esi, 21531
	mov	edi, 0
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	js	.L13
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L15
.L13:
	mov	eax, 0
.L15:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	typeahead, .-typeahead
	.section	.rodata
.LC3:
	.string	"panic: "
	.text
	.globl	panic
	.type	panic, @function
panic:
.LFB12:
	.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	QWORD PTR -8[rbp], rdi
	mov	eax, 0
	call	ttclose
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	mov	rdx, QWORD PTR stderr[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE12:
	.size	panic, .-panic
	.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	"90762970.c"
	.text
	.comm	tobuf,128,4
	.comm	ostate,60,4
	.comm	nstate,60,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Can't read terminal capabilites\012\000"
	.align	2
.LC1:
	.ascii	"Can't set terminal mode\012\000"
	.text
	.align	2
	.global	ttopen
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttopen, %function
ttopen:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L5
	mov	r0, #0
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	blt	.L2
	ldr	r1, .L5+4
	mov	r0, #0
	bl	tcgetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
.L2:
	ldr	r0, .L5+8
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	ldr	r0, .L5+4
	bl	cfmakeraw
	ldr	r3, .L5+4
	mov	r2, #1
	strb	r2, [r3, #23]
	ldr	r3, .L5+4
	mov	r2, #0
	strb	r2, [r3, #22]
	ldr	r2, .L5+4
	mov	r1, #1
	mov	r0, #0
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L5+12
	bl	puts
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, .L5+16
	ldr	r3, [r3]
	mov	r2, #128
	ldr	r1, .L5+20
	mov	r0, r3
	bl	setbuffer
	mov	r1, #0
	mov	r0, #20
	bl	signal
	nop
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	ostate
	.word	nstate
	.word	.LC0
	.word	.LC1
	.word	stdout
	.word	tobuf
	.size	ttopen, .-ttopen
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Can't restore terminal flags\000"
	.text
	.align	2
	.global	ttclose
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttclose, %function
ttclose:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	ttflush
	ldr	r2, .L10
	mov	r1, #1
	mov	r0, #0
	bl	tcsetattr
	mov	r3, r0
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L10+4
	bl	puts
	mov	r0, #1
	bl	exit
.L9:
	nop
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	ostate
	.word	.LC2
	.size	ttclose, .-ttclose
	.align	2
	.global	ttputc
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttputc, %function
ttputc:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L13
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputc
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	stdout
	.size	ttputc, .-ttputc
	.align	2
	.global	ttflush
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttflush, %function
ttflush:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #0
	bl	tcdrain
	ldr	r3, .L16
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	nop
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	stdout
	.size	ttflush, .-ttflush
	.align	2
	.global	ttgetc
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttgetc, %function
ttgetc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r0, r3
	bl	fgetc
	mov	r3, r0
	and	r3, r3, #127
	mov	r0, r3
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	stdin
	.size	ttgetc, .-ttgetc
	.section	.rodata
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	typeahead
	.syntax unified
	.arm
	.fpu softvfp
	.type	typeahead, %function
typeahead:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #12
	mov	r2, r3
	ldr	r1, .L27+4
	mov	r0, #0
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	blt	.L23
	ldr	r3, [fp, #-12]
	b	.L25
.L23:
	mov	r3, #0
.L25:
	ldr	r2, .L27
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC3
	.word	21531
	.size	typeahead, .-typeahead
	.section	.rodata
	.align	2
.LC4:
	.ascii	"panic: \000"
	.text
	.align	2
	.global	panic
	.syntax unified
	.arm
	.fpu softvfp
	.type	panic, %function
panic:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	bl	ttclose
	ldr	r3, .L30
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L30+4
	bl	fwrite
	ldr	r3, .L30
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
	ldr	r3, .L30
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L31:
	.align	2
.L30:
	.word	stderr
	.word	.LC4
	.size	panic, .-panic
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
