	.file	"650544.c"
	.intel_syntax noprefix
	.text
	.globl	cur_x
	.bss
	.align 4
	.type	cur_x, @object
	.size	cur_x, 4
cur_x:
	.zero	4
	.globl	cur_y
	.align 4
	.type	cur_y, @object
	.size	cur_y, 4
cur_y:
	.zero	4
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	lines
	.align 4
	.type	lines, @object
	.size	lines, 4
lines:
	.zero	4
	.globl	fd
	.align 4
	.type	fd, @object
	.size	fd, 4
fd:
	.zero	4
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 26400
buf:
	.zero	26400
	.text
	.globl	read_file
	.type	read_file, @function
read_file:
.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rsi, QWORD PTR [rdx+rax]
	lea	rcx, 1[rsi]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	QWORD PTR [rdx+rax], rcx
	movzx	ecx, BYTE PTR -13[rbp]
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, [rax+rsi]
	lea	rax, buf[rip+8]
	add	rax, rdx
	mov	BYTE PTR [rax], cl
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 10
	jne	.L2
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR fd[rip]
	lea	rcx, -13[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jne	.L3
	add	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR lines[rip], eax
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	read_file, .-read_file
	.section	.rodata
.LC0:
	.string	"\033[1;1H"
.LC1:
	.string	"          "
.LC2:
	.string	"\033[1;1P"
.LC3:
	.string	"\033[%d;1H~\n"
	.text
	.globl	draw_win
	.type	draw_win, @function
draw_win:
.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, 16
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L6
.L7:
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L6:
	cmp	DWORD PTR -4[rbp], 191
	jle	.L7
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rcx, rax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, buf[rip]
	add	rax, rdx
	add	rax, 8
	mov	rdx, rcx
	mov	rsi, rax
	mov	edi, 0
	call	write@PLT
	add	DWORD PTR -8[rbp], 1
.L8:
	mov	eax, DWORD PTR lines[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L9
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	eax, DWORD PTR -8[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -8[rbp], edx
	cmp	eax, 23
	jle	.L11
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	draw_win, .-draw_win
	.section	.rodata
.LC4:
	.string	"\033[1;%dH"
.LC5:
	.string	"\033[%d;%dH"
	.text
	.globl	insert
	.type	insert, @function
insert:
.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, 32
	mov	eax, edi
	mov	BYTE PTR -20[rbp], al
	mov	edx, DWORD PTR top[rip]
	mov	eax, DWORD PTR cur_y[rip]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, buf[rip]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -12[rbp]
	lea	esi, 1[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	movzx	ecx, BYTE PTR 8[rdx+rax]
	mov	rdx, QWORD PTR -8[rbp]
	movsx	rax, esi
	mov	BYTE PTR 8[rdx+rax], cl
	sub	DWORD PTR -12[rbp], 1
.L13:
	mov	eax, DWORD PTR cur_x[rip]
	cmp	DWORD PTR -12[rbp], eax
	jg	.L14
	mov	eax, DWORD PTR cur_x[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR cur_x[rip], edx
	mov	rdx, QWORD PTR -8[rbp]
	cdqe
	movzx	ecx, BYTE PTR -20[rbp]
	mov	BYTE PTR 8[rdx+rax], cl
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, DWORD PTR cur_y[rip]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	mov	rsi, rax
	mov	edi, 0
	call	write@PLT
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR cur_x[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	insert, .-insert
	.globl	save
	.type	save, @function
save:
.LFB9:
	.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	eax, DWORD PTR fd[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L16
.L17:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rsi, rax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	lea	rdx, buf[rip]
	add	rax, rdx
	lea	rcx, 8[rax]
	mov	eax, DWORD PTR fd[rip]
	mov	rdx, rsi
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	DWORD PTR -4[rbp], 1
.L16:
	mov	eax, DWORD PTR lines[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L17
	mov	eax, DWORD PTR fd[rip]
	mov	edi, eax
	call	close@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	save, .-save
	.section	.rodata
.LC6:
	.string	"default.vi"
.LC7:
	.string	"%s"
.LC8:
	.string	"\033[0;0E"
.LC9:
	.string	"\033%d;%dP"
.LC10:
	.string	"\033[e"
.LC11:
	.string	"\033[25;1H"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR cur_x[rip], 0
	mov	DWORD PTR cur_y[rip], 0
	mov	DWORD PTR top[rip], 0
	cmp	DWORD PTR -20[rbp], 1
	jle	.L19
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 66
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
	jmp	.L20
.L19:
	mov	esi, 66
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
.L20:
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	jns	.L21
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 0
	call	exit@PLT
.L21:
	mov	edx, 26400
	mov	esi, 0
	lea	rdi, buf[rip]
	call	memset@PLT
	mov	eax, 0
	call	read_file
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	draw_win
	mov	DWORD PTR cur_x[rip], 0
	mov	DWORD PTR cur_y[rip], 0
	mov	DWORD PTR top[rip], 0
	mov	DWORD PTR -12[rbp], 1
.L42:
	lea	rax, -13[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	cmp	DWORD PTR -12[rbp], 1
	je	.L22
	cmp	DWORD PTR -12[rbp], 2
	je	.L23
	jmp	.L24
.L22:
	movzx	eax, BYTE PTR -13[rbp]
	movsx	eax, al
	sub	eax, 104
	cmp	eax, 9
	ja	.L44
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L27[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L27[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L27:
	.long	.L32-.L27
	.long	.L31-.L27
	.long	.L30-.L27
	.long	.L29-.L27
	.long	.L28-.L27
	.long	.L44-.L27
	.long	.L44-.L27
	.long	.L44-.L27
	.long	.L44-.L27
	.long	.L26-.L27
	.text
.L32:
	mov	eax, DWORD PTR cur_x[rip]
	test	eax, eax
	jle	.L45
	mov	eax, DWORD PTR cur_x[rip]
	sub	eax, 1
	mov	DWORD PTR cur_x[rip], eax
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR cur_x[rip]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L45
.L30:
	mov	eax, DWORD PTR cur_y[rip]
	test	eax, eax
	jle	.L34
	mov	eax, DWORD PTR cur_y[rip]
	sub	eax, 1
	mov	DWORD PTR cur_y[rip], eax
	mov	eax, DWORD PTR cur_x[rip]
	movsx	rcx, eax
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR top[rip]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rax, QWORD PTR [rdx+rax]
	cmp	rcx, rax
	jle	.L35
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR top[rip]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	DWORD PTR cur_x[rip], eax
.L35:
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR cur_x[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L25
.L34:
	mov	eax, DWORD PTR top[rip]
	test	eax, eax
	jle	.L46
	mov	eax, DWORD PTR top[rip]
	sub	eax, 1
	mov	DWORD PTR top[rip], eax
	mov	eax, 0
	call	draw_win
	jmp	.L25
.L29:
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR top[rip]
	add	edx, eax
	mov	eax, DWORD PTR lines[rip]
	cmp	edx, eax
	jge	.L47
	mov	eax, DWORD PTR cur_y[rip]
	cmp	eax, 23
	jg	.L38
	mov	eax, DWORD PTR cur_y[rip]
	add	eax, 1
	mov	DWORD PTR cur_y[rip], eax
	mov	eax, DWORD PTR cur_x[rip]
	movsx	rcx, eax
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR top[rip]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rax, QWORD PTR [rdx+rax]
	cmp	rcx, rax
	jle	.L39
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR top[rip]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rax, QWORD PTR [rdx+rax]
	mov	DWORD PTR cur_x[rip], eax
.L39:
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR cur_x[rip]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L25
.L38:
	mov	eax, DWORD PTR top[rip]
	add	eax, 1
	mov	DWORD PTR top[rip], eax
	mov	eax, 0
	call	draw_win
	jmp	.L25
.L28:
	mov	eax, DWORD PTR cur_x[rip]
	movsx	rcx, eax
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR top[rip]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	lea	rax, buf[rip]
	mov	rax, QWORD PTR [rdx+rax]
	cmp	rcx, rax
	jge	.L48
	mov	eax, DWORD PTR cur_x[rip]
	add	eax, 1
	mov	DWORD PTR cur_x[rip], eax
	mov	edx, DWORD PTR cur_y[rip]
	mov	eax, DWORD PTR cur_x[rip]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L48
.L31:
	mov	DWORD PTR -12[rbp], 2
	jmp	.L25
.L26:
	mov	eax, 0
	call	save
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L45:
	nop
	jmp	.L44
.L46:
	nop
	jmp	.L44
.L47:
	nop
	jmp	.L44
.L48:
	nop
.L25:
	jmp	.L44
.L23:
	movzx	eax, BYTE PTR -13[rbp]
	cmp	al, 27
	jne	.L41
	mov	DWORD PTR -12[rbp], 1
	jmp	.L24
.L41:
	movzx	eax, BYTE PTR -13[rbp]
	movsx	eax, al
	mov	edi, eax
	call	insert
	jmp	.L24
.L44:
	nop
.L24:
	jmp	.L42
	.cfi_endproc
.LFE10:
	.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	"650544.c"
	.text
	.comm	cur_x,4,4
	.comm	cur_y,4,4
	.comm	top,4,4
	.comm	lines,4,4
	.comm	fd,4,4
	.comm	buf,25200,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_file, %function
read_file:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L3:
	ldr	r1, .L5+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r1, [r3]
	add	r0, r1, #1
	ldr	ip, .L5+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, ip, r2
	str	r0, [r3]
	ldrb	ip, [fp, #-13]	@ zero_extendqisi2
	ldr	r0, .L5+4
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r0, r2
	add	r3, r3, r1
	add	r3, r3, #4
	mov	r2, ip
	strb	r2, [r3]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L2
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, .L5+8
	ldr	r3, [r3]
	sub	r1, fp, #13
	mov	r2, #1
	mov	r0, r3
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r2, .L5+12
	ldr	r3, [fp, #-12]
	str	r3, [r2]
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	buf
	.word	fd
	.word	lines
	.size	read_file, .-read_file
	.section	.rodata
	.align	2
.LC1:
	.ascii	"\033[1;1H\000"
	.align	2
.LC2:
	.ascii	"          \000"
	.align	2
.LC3:
	.ascii	"\033[1;1P\000"
	.align	2
.LC4:
	.ascii	"\033[%d;1H~\012\000"
	.text
	.align	2
	.global	draw_win
	.syntax unified
	.arm
	.fpu softvfp
	.type	draw_win, %function
draw_win:
	@ 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	r0, .L14
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L8
.L9:
	ldr	r0, .L14+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L8:
	ldr	r3, [fp, #-8]
	cmp	r3, #191
	ble	.L9
	ldr	r0, .L14+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L10
.L11:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, .L14+12
	add	r3, r2, r3
	add	r1, r3, #4
	ldr	r0, .L14+12
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r0, r2
	ldr	r3, [r3]
	mov	r2, r3
	mov	r0, #0
	bl	write
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L10:
	ldr	r3, .L14+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L11
	b	.L12
.L13:
	ldr	r1, [fp, #-12]
	ldr	r0, .L14+20
	bl	printf
.L12:
	ldr	r3, [fp, #-12]
	add	r2, r3, #1
	str	r2, [fp, #-12]
	cmp	r3, #23
	ble	.L13
	ldr	r0, .L14
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	buf
	.word	lines
	.word	.LC4
	.size	draw_win, .-draw_win
	.section	.rodata
	.align	2
.LC5:
	.ascii	"\033[1;%dH\000"
	.align	2
.LC6:
	.ascii	"\033[%d;%dH\000"
	.text
	.align	2
	.global	insert
	.syntax unified
	.arm
	.fpu softvfp
	.type	insert, %function
insert:
	@ 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	r3, r0
	strb	r3, [fp, #-13]
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, .L19+4
	ldr	r3, [r3]
	add	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, .L19+8
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L17
.L18:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldr	r1, [fp, #-8]
	ldr	r2, [fp, #-12]
	add	r2, r1, r2
	add	r2, r2, #4
	ldrb	r1, [r2]	@ zero_extendqisi2
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L17:
	ldr	r3, .L19+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bgt	.L18
	ldr	r3, .L19+12
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L19+12
	str	r2, [r1]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [fp, #-13]
	strb	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L19+16
	bl	printf
	ldr	r3, [fp, #-8]
	add	r1, r3, #4
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r2, r3
	mov	r0, #0
	bl	write
	ldr	r3, .L19+12
	ldr	r3, [r3]
	ldr	r2, .L19+4
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L19+20
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	top
	.word	cur_y
	.word	buf
	.word	cur_x
	.word	.LC5
	.word	.LC6
	.size	insert, .-insert
	.align	2
	.global	save
	.syntax unified
	.arm
	.fpu softvfp
	.type	save, %function
save:
	@ 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, .L24
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	lseek
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L22
.L23:
	ldr	r3, .L24
	ldr	r0, [r3]
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	ldr	r3, .L24+4
	add	r3, r2, r3
	add	r1, r3, #4
	ldr	ip, .L24+4
	ldr	r2, [fp, #-8]
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, ip, r2
	ldr	r3, [r3]
	mov	r2, r3
	bl	write
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L22:
	ldr	r3, .L24+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L23
	ldr	r3, .L24
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	fd
	.word	buf
	.word	lines
	.size	save, .-save
	.section	.rodata
	.align	2
.LC7:
	.ascii	"default.vi\000"
	.align	2
.LC8:
	.ascii	"%s\000"
	.align	2
.LC9:
	.ascii	"\033[0;0E\000"
	.align	2
.LC10:
	.ascii	"\033%d;%dP\000"
	.align	2
.LC11:
	.ascii	"\033[e\000"
	.align	2
.LC12:
	.ascii	"\033[25;1H\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L57
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L57+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L57+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L57+12
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L27
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #66
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L57+16
	str	r3, [r2]
	b	.L28
.L27:
	mov	r1, #66
	ldr	r0, .L57+20
	bl	open
	mov	r3, r0
	ldr	r2, .L57+16
	str	r3, [r2]
.L28:
	ldr	r3, .L57+16
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L57+24
	bl	printf
	mov	r0, #0
	bl	exit
.L29:
	ldr	r2, .L57+28
	mov	r1, #0
	ldr	r0, .L57+32
	bl	memset
	bl	read_file
	ldr	r0, .L57+36
	bl	printf
	bl	draw_win
	ldr	r3, .L57+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L57+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L57+12
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-12]
.L50:
	sub	r3, fp, #13
	mov	r2, #1
	mov	r1, r3
	mov	r0, #0
	bl	read
	ldr	r3, [fp, #-12]
	cmp	r3, #1
	beq	.L30
	ldr	r3, [fp, #-12]
	cmp	r3, #2
	beq	.L31
	b	.L32
.L30:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #104
	cmp	r3, #9
	ldrls	pc, [pc, r3, asl #2]
	b	.L52
.L35:
	.word	.L40
	.word	.L39
	.word	.L38
	.word	.L37
	.word	.L36
	.word	.L52
	.word	.L52
	.word	.L52
	.word	.L52
	.word	.L34
.L40:
	ldr	r3, .L57+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L53
	ldr	r3, .L57+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L57+4
	str	r3, [r2]
	ldr	r3, .L57+4
	ldr	r3, [r3]
	ldr	r2, .L57+8
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L57+40
	bl	printf
	b	.L53
.L38:
	ldr	r3, .L57+8
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L42
	ldr	r3, .L57+8
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L57+8
	str	r3, [r2]
	ldr	r3, .L57+8
	ldr	r2, [r3]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r1, .L57+32
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r2, [r3]
	ldr	r3, .L57+4
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L43
	ldr	r3, .L57+8
	ldr	r2, [r3]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r1, .L57+32
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r3, [r3]
	ldr	r2, .L57+4
	str	r3, [r2]
.L43:
	ldr	r3, .L57+4
	ldr	r3, [r3]
	ldr	r2, .L57+8
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L57+44
	bl	printf
	b	.L33
.L42:
	ldr	r3, .L57+12
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L54
	ldr	r3, .L57+12
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L57+12
	str	r3, [r2]
	bl	draw_win
	b	.L33
.L37:
	ldr	r3, .L57+8
	ldr	r2, [r3]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r3, .L57+48
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L55
	ldr	r3, .L57+8
	ldr	r3, [r3]
	cmp	r3, #23
	bgt	.L46
	ldr	r3, .L57+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L57+8
	str	r3, [r2]
	ldr	r3, .L57+8
	ldr	r2, [r3]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r1, .L57+32
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r2, [r3]
	ldr	r3, .L57+4
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L47
	ldr	r3, .L57+8
	ldr	r2, [r3]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r1, .L57+32
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r3, [r3]
	ldr	r2, .L57+4
	str	r3, [r2]
.L47:
	ldr	r3, .L57+4
	ldr	r3, [r3]
	ldr	r2, .L57+8
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L57+44
	bl	printf
	b	.L33
.L46:
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L57+12
	str	r3, [r2]
	bl	draw_win
	b	.L33
.L36:
	ldr	r3, .L57+8
	ldr	r2, [r3]
	ldr	r3, .L57+12
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r1, .L57+32
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r2, r3, #3
	sub	r2, r2, r3
	lsl	r3, r2, #2
	mov	r2, r3
	add	r3, r1, r2
	ldr	r2, [r3]
	ldr	r3, .L57+4
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L56
	ldr	r3, .L57+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L57+4
	str	r3, [r2]
	ldr	r3, .L57+4
	ldr	r3, [r3]
	ldr	r2, .L57+8
	ldr	r2, [r2]
	mov	r1, r3
	ldr	r0, .L57+40
	bl	printf
	b	.L56
.L39:
	mov	r3, #2
	str	r3, [fp, #-12]
	b	.L33
.L34:
	bl	save
	ldr	r0, .L57+52
	bl	printf
	ldr	r0, .L57+56
	bl	puts
	mov	r0, #0
	bl	exit
.L53:
	nop
	b	.L52
.L54:
	nop
	b	.L52
.L55:
	nop
	b	.L52
.L56:
	nop
.L33:
	b	.L52
.L31:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #27
	bne	.L49
	mov	r3, #1
	str	r3, [fp, #-12]
	b	.L32
.L49:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r0, r3
	bl	insert
	b	.L32
.L52:
	nop
.L32:
	b	.L50
.L58:
	.align	2
.L57:
	.word	.LC13
	.word	cur_x
	.word	cur_y
	.word	top
	.word	fd
	.word	.LC7
	.word	.LC8
	.word	25200
	.word	buf
	.word	.LC9
	.word	.LC10
	.word	.LC6
	.word	lines
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
