	.file	"545510.c"
	.intel_syntax noprefix
	.text
	.local	term_attr_old
	.comm	term_attr_old,60,32
	.section	.rodata
.LC0:
	.string	"\033[?25h"
.LC1:
	.string	"\033[D \033[D"
.LC2:
	.string	"\033[?25l"
	.text
	.globl	command_line_input
	.type	command_line_input, @function
command_line_input:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	cmp	QWORD PTR -40[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -40[rbp], rax
.L2:
	cmp	QWORD PTR -40[rbp], 0
	jne	.L3
	mov	eax, 0
	jmp	.L15
.L3:
	mov	rdx, QWORD PTR stderr[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 6
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	BYTE PTR [rax], 0
.L14:
	nop
.L5:
	lea	rax, -13[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	test	rax, rax
	jle	.L5
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 10
	je	.L6
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 4
	je	.L6
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 8
	je	.L7
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 127
	jne	.L8
.L7:
	cmp	DWORD PTR -12[rbp], 0
	je	.L17
	sub	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 7
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	jmp	.L11
.L8:
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 127
	je	.L12
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 31
	jle	.L12
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	mov	rdx, QWORD PTR -32[rbp]
	sub	rdx, 1
	cmp	rax, rdx
	jnb	.L18
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -13[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR stderr[rip]
	movzx	eax, BYTE PTR -13[rbp]
	movsx	eax, al
	mov	rsi, rdx
	mov	edi, eax
	call	putc@PLT
	jmp	.L11
.L12:
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 27
	jne	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 7
	call	putc@PLT
	jmp	.L14
.L17:
	nop
	jmp	.L14
.L18:
	nop
.L11:
	jmp	.L14
.L6:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 6
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -40[rbp]
.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
.LFE6:
	.size	command_line_input, .-command_line_input
	.globl	terminal_init
	.type	terminal_init, @function
terminal_init:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -80[rbp], 258
	mov	DWORD PTR -76[rbp], 5
	mov	DWORD PTR -68[rbp], 1
	movabs	rax, 2216555446275
	mov	edx, 0
	mov	QWORD PTR -63[rbp], rax
	mov	QWORD PTR -55[rbp], rdx
	mov	QWORD PTR -47[rbp], 0
	mov	QWORD PTR -39[rbp], 0
	lea	rsi, term_attr_old[rip]
	mov	edi, 0
	call	tcgetattr@PLT
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 6
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	terminal_init, .-terminal_init
	.globl	terminal_restore
	.type	terminal_restore, @function
terminal_restore:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdx, term_attr_old[rip]
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 6
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	terminal_restore, .-terminal_restore
	.section	.rodata
.LC3:
	.string	"\033[?1049h\033[H"
	.text
	.globl	terminal_buffer_enable
	.type	terminal_buffer_enable, @function
terminal_buffer_enable:
.LFB9:
	.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 stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	terminal_buffer_enable, .-terminal_buffer_enable
	.section	.rodata
.LC4:
	.string	"\033[?1049l"
	.text
	.globl	terminal_buffer_disable
	.type	terminal_buffer_disable, @function
terminal_buffer_disable:
.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 stderr[rip]
	mov	rcx, rax
	mov	edx, 8
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	terminal_buffer_disable, .-terminal_buffer_disable
	.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	"545510.c"
	.text
	.local	term_attr_old
	.comm	term_attr_old,60,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\033[?25h\000"
	.align	2
.LC1:
	.ascii	"\033[D \033[D\000"
	.align	2
.LC2:
	.ascii	"\033[?25l\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	command_line_input
	.syntax unified
	.arm
	.fpu softvfp
	.type	command_line_input, %function
command_line_input:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L2
	ldr	r0, [fp, #-28]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
.L2:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L3
	mov	r3, #0
	b	.L15
.L3:
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	fputs
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #6
	mov	r1, #1
	ldr	r0, .L19+8
	bl	fwrite
	ldr	r3, [fp, #-32]
	mov	r2, #0
	strb	r2, [r3]
.L14:
	nop
.L5:
	sub	r3, fp, #13
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	mov	r3, r0
	cmp	r3, #0
	ble	.L5
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L6
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #4
	beq	.L6
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #8
	beq	.L7
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #127
	bne	.L8
.L7:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #7
	mov	r1, #1
	ldr	r0, .L19+12
	bl	fwrite
	b	.L11
.L8:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #126
	bhi	.L12
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #31
	bls	.L12
	ldr	r3, [fp, #-28]
	sub	r2, r3, #1
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bls	.L18
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	ldrb	r2, [fp, #-13]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, r2
	bl	putc
	b	.L11
.L12:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #27
	bne	.L14
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #7
	bl	putc
	b	.L14
.L17:
	nop
	b	.L14
.L18:
	nop
.L11:
	b	.L14
.L6:
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #6
	mov	r1, #1
	ldr	r0, .L19+16
	bl	fwrite
	ldr	r3, [fp, #-32]
.L15:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	command_line_input, .-command_line_input
	.section	.rodata
	.align	2
.LC4:
	.ascii	"\003\000\000\025\004\002\000\000\000\000\000\000\000"
	.space	19
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	terminal_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	terminal_init, %function
terminal_init:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #68
	mov	r2, #60
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L23+4
	str	r3, [fp, #-68]
	mov	r3, #5
	str	r3, [fp, #-64]
	mov	r3, #1
	str	r3, [fp, #-56]
	ldr	r2, .L23+8
	sub	r3, fp, #51
	mov	r1, r2
	mov	r2, #13
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #38
	mov	r2, #19
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r1, .L23+12
	mov	r0, #0
	bl	tcgetattr
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r3, .L23+16
	ldr	r3, [r3]
	mov	r2, #6
	mov	r1, #1
	ldr	r0, .L23+20
	bl	fwrite
	nop
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC5
	.word	258
	.word	.LC4
	.word	term_attr_old
	.word	stderr
	.word	.LC2
	.size	terminal_init, .-terminal_init
	.align	2
	.global	terminal_restore
	.syntax unified
	.arm
	.fpu softvfp
	.type	terminal_restore, %function
terminal_restore:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r2, .L26
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r3, .L26+4
	ldr	r3, [r3]
	mov	r2, #6
	mov	r1, #1
	ldr	r0, .L26+8
	bl	fwrite
	nop
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	term_attr_old
	.word	stdout
	.word	.LC0
	.size	terminal_restore, .-terminal_restore
	.section	.rodata
	.align	2
.LC6:
	.ascii	"\033[?1049h\033[H\000"
	.text
	.align	2
	.global	terminal_buffer_enable
	.syntax unified
	.arm
	.fpu softvfp
	.type	terminal_buffer_enable, %function
terminal_buffer_enable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L29
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L29+4
	bl	fwrite
	nop
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	stderr
	.word	.LC6
	.size	terminal_buffer_enable, .-terminal_buffer_enable
	.section	.rodata
	.align	2
.LC7:
	.ascii	"\033[?1049l\000"
	.text
	.align	2
	.global	terminal_buffer_disable
	.syntax unified
	.arm
	.fpu softvfp
	.type	terminal_buffer_disable, %function
terminal_buffer_disable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L32
	ldr	r3, [r3]
	mov	r2, #8
	mov	r1, #1
	ldr	r0, .L32+4
	bl	fwrite
	nop
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	stderr
	.word	.LC7
	.size	terminal_buffer_disable, .-terminal_buffer_disable
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
