	.file	"55521.c"
	.intel_syntax noprefix
	.text
	.local	cbuf
	.comm	cbuf,1000001,32
	.local	clen
	.comm	clen,4,4
	.section	.data.rel.local,"aw"
	.align 8
	.type	cend, @object
	.size	cend, 8
cend:
	.quad	cbuf
	.local	undo_stack
	.comm	undo_stack,16000000,32
	.local	undo_stack_top
	.comm	undo_stack_top,4,4
	.section	.rodata
.LC0:
	.string	"the_stack_data/55521.c"
.LC1:
	.string	"w != NULL"
.LC2:
	.string	"clen < CHAR_BUF_SIZE"
	.text
	.globl	append
	.type	append, @function
append:
.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	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	lea	rcx, __PRETTY_FUNCTION__.4[rip]
	mov	edx, 102
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L2:
	mov	eax, DWORD PTR clen[rip]
	cmp	eax, 1000000
	jle	.L3
	lea	rcx, __PRETTY_FUNCTION__.4[rip]
	mov	edx, 103
	lea	rsi, .LC0[rip]
	lea	rdi, .LC2[rip]
	call	__assert_fail@PLT
.L3:
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip]
	mov	BYTE PTR [rdx+rax], 0
	mov	edx, DWORD PTR undo_stack_top[rip]
	mov	eax, DWORD PTR clen[rip]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, undo_stack[rip+4]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L4
.L6:
	mov	rax, QWORD PTR cend[rip]
	mov	rdx, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR [rdx]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -8[rbp], 1
	mov	rax, QWORD PTR cend[rip]
	add	rax, 1
	mov	QWORD PTR cend[rip], rax
	mov	eax, DWORD PTR clen[rip]
	add	eax, 1
	mov	DWORD PTR clen[rip], eax
.L4:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 10
	je	.L5
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L6
.L5:
	mov	rax, QWORD PTR cend[rip]
	mov	BYTE PTR [rax], 0
	mov	edx, DWORD PTR clen[rip]
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	lea	rax, undo_stack[rip+4]
	mov	esi, DWORD PTR [rcx+rax]
	mov	eax, DWORD PTR undo_stack_top[rip]
	mov	ecx, edx
	sub	ecx, esi
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+4]
	mov	DWORD PTR [rdx+rax], ecx
	mov	eax, DWORD PTR undo_stack_top[rip]
	add	eax, 1
	mov	DWORD PTR undo_stack_top[rip], eax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	append, .-append
	.section	.rodata
.LC3:
	.string	"k >= 0"
	.align 8
.LC4:
	.string	"undo_stack[undo_stack_top].s != NULL"
	.text
	.globl	delete
	.type	delete, @function
delete:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 0
	jns	.L8
	lea	rcx, __PRETTY_FUNCTION__.3[rip]
	mov	edx, 141
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L8:
	mov	eax, DWORD PTR clen[rip]
	cmp	DWORD PTR -20[rbp], eax
	jle	.L9
	mov	eax, DWORD PTR clen[rip]
	mov	DWORD PTR -20[rbp], eax
.L9:
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip]
	mov	BYTE PTR [rdx+rax], 1
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rcx, rax
	lea	rdx, undo_stack[rip+4]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	cdqe
	mov	ebx, DWORD PTR undo_stack_top[rip]
	mov	rdi, rax
	call	malloc@PLT
	mov	rcx, rax
	movsx	rax, ebx
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+8]
	mov	QWORD PTR [rdx+rax], rcx
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+8]
	mov	rax, QWORD PTR [rdx+rax]
	test	rax, rax
	jne	.L10
	lea	rcx, __PRETTY_FUNCTION__.3[rip]
	mov	edx, 157
	lea	rsi, .LC0[rip]
	lea	rdi, .LC4[rip]
	call	__assert_fail@PLT
.L10:
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+8]
	mov	rax, QWORD PTR [rdx+rax]
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR cend[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	neg	rax
	add	rax, rdx
	mov	QWORD PTR cend[rip], rax
	mov	eax, DWORD PTR clen[rip]
	sub	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR clen[rip], eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR cend[rip]
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rsi, rax
	lea	rax, undo_stack[rip+8]
	mov	rax, QWORD PTR [rsi+rax]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR cend[rip]
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR undo_stack_top[rip]
	add	eax, 1
	mov	DWORD PTR undo_stack_top[rip], eax
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	delete, .-delete
	.globl	print
	.type	print, @function
print:
.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
	cmp	DWORD PTR -4[rbp], 0
	jns	.L12
	lea	rcx, __PRETTY_FUNCTION__.2[rip]
	mov	edx, 171
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L12:
	mov	eax, DWORD PTR clen[rip]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L14
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, cbuf[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	mov	edi, eax
	call	putchar@PLT
	mov	edi, 10
	call	putchar@PLT
.L14:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print, .-print
	.globl	undo
	.type	undo, @function
undo:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR undo_stack_top[rip]
	test	eax, eax
	jle	.L19
	mov	eax, DWORD PTR undo_stack_top[rip]
	sub	eax, 1
	mov	DWORD PTR undo_stack_top[rip], eax
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	test	al, al
	jne	.L18
	mov	rcx, QWORD PTR cend[rip]
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	neg	rax
	add	rax, rcx
	mov	QWORD PTR cend[rip], rax
	mov	eax, DWORD PTR clen[rip]
	mov	edx, DWORD PTR undo_stack_top[rip]
	movsx	rdx, edx
	mov	rcx, rdx
	sal	rcx, 4
	lea	rdx, undo_stack[rip+4]
	mov	edx, DWORD PTR [rcx+rdx]
	sub	eax, edx
	mov	DWORD PTR clen[rip], eax
	mov	rax, QWORD PTR cend[rip]
	mov	BYTE PTR [rax], 0
	jmp	.L15
.L18:
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip]
	movzx	eax, BYTE PTR [rdx+rax]
	cmp	al, 1
	jne	.L15
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+8]
	mov	rdx, QWORD PTR [rdx+rax]
	mov	rax, QWORD PTR cend[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rcx, QWORD PTR cend[rip]
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	add	rax, rcx
	mov	QWORD PTR cend[rip], rax
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+4]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR clen[rip]
	add	eax, edx
	mov	DWORD PTR clen[rip], eax
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+8]
	mov	rax, QWORD PTR [rdx+rax]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR undo_stack_top[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, undo_stack[rip+8]
	mov	QWORD PTR [rdx+rax], 0
	jmp	.L15
.L19:
	nop
.L15:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	undo, .-undo
	.section	.rodata
.LC5:
	.string	"%d\n"
.LC6:
	.string	"0"
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -28[rbp], 0
	mov	DWORD PTR -24[rbp], 0
	mov	DWORD PTR -20[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	lea	rax, -28[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 1
	je	.L22
	lea	rcx, __PRETTY_FUNCTION__.1[rip]
	mov	edx, 244
	lea	rsi, .LC0[rip]
	lea	rdi, .LC6[rip]
	call	__assert_fail@PLT
.L29:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	mov	esi, 1000004
	lea	rdi, line.0[rip]
	call	fgets@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L23
	mov	eax, 3
	jmp	.L30
.L23:
	movzx	eax, BYTE PTR line.0[rip]
	cmp	al, 49
	jne	.L25
	lea	rdi, line.0[rip+2]
	call	append
	jmp	.L22
.L25:
	movzx	eax, BYTE PTR line.0[rip]
	cmp	al, 50
	jne	.L26
	lea	rdi, line.0[rip+2]
	call	atoi@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	delete
	jmp	.L22
.L26:
	movzx	eax, BYTE PTR line.0[rip]
	cmp	al, 51
	jne	.L27
	lea	rdi, line.0[rip+2]
	call	atoi@PLT
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	edi, eax
	call	print
	jmp	.L22
.L27:
	movzx	eax, BYTE PTR line.0[rip]
	cmp	al, 52
	jne	.L28
	call	undo
	jmp	.L22
.L28:
	mov	eax, 2
	jmp	.L30
.L22:
	mov	eax, DWORD PTR -28[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -28[rbp], edx
	test	eax, eax
	jg	.L29
	mov	eax, 0
.L30:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.4, @object
	.size	__PRETTY_FUNCTION__.4, 7
__PRETTY_FUNCTION__.4:
	.string	"append"
	.type	__PRETTY_FUNCTION__.3, @object
	.size	__PRETTY_FUNCTION__.3, 7
__PRETTY_FUNCTION__.3:
	.string	"delete"
	.type	__PRETTY_FUNCTION__.2, @object
	.size	__PRETTY_FUNCTION__.2, 6
__PRETTY_FUNCTION__.2:
	.string	"print"
	.type	__PRETTY_FUNCTION__.1, @object
	.size	__PRETTY_FUNCTION__.1, 5
__PRETTY_FUNCTION__.1:
	.string	"main"
	.local	line.0
	.comm	line.0,1000004,32
	.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	"55521.c"
	.text
	.local	cbuf
	.comm	cbuf,1000001,4
	.local	clen
	.comm	clen,4,4
	.data
	.align	2
	.type	cend, %object
	.size	cend, 4
cend:
	.word	cbuf
	.local	undo_stack
	.comm	undo_stack,12000000,4
	.local	undo_stack_top
	.comm	undo_stack_top,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/55521.c\000"
	.align	2
.LC1:
	.ascii	"w != NULL\000"
	.align	2
.LC2:
	.ascii	"clen < CHAR_BUF_SIZE\000"
	.text
	.align	2
	.global	append
	.syntax unified
	.arm
	.fpu softvfp
	.type	append, %function
append:
	@ 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, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L7
	mov	r2, #102
	ldr	r1, .L7+4
	ldr	r0, .L7+8
	bl	__assert_fail
.L2:
	ldr	r3, .L7+12
	ldr	r3, [r3]
	ldr	r2, .L7+16
	cmp	r3, r2
	ble	.L3
	ldr	r3, .L7
	mov	r2, #103
	ldr	r1, .L7+4
	ldr	r0, .L7+20
	bl	__assert_fail
.L3:
	ldr	r3, .L7+24
	ldr	r2, [r3]
	ldr	r1, .L7+28
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L7+24
	ldr	r2, [r3]
	ldr	r3, .L7+12
	ldr	r1, [r3]
	ldr	r0, .L7+28
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	str	r1, [r3]
	b	.L4
.L6:
	ldr	r3, .L7+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, .L7+32
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L7+32
	str	r3, [r2]
	ldr	r3, .L7+12
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L7+12
	str	r3, [r2]
.L4:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L5
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L6
.L5:
	ldr	r3, .L7+32
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L7+12
	ldr	r1, [r3]
	ldr	r3, .L7+24
	ldr	r2, [r3]
	ldr	r0, .L7+28
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L7+24
	ldr	r2, [r2]
	sub	r1, r1, r3
	ldr	r0, .L7+28
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	str	r1, [r3]
	ldr	r3, .L7+24
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L7+24
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	__PRETTY_FUNCTION__.6360
	.word	.LC0
	.word	.LC1
	.word	clen
	.word	1000000
	.word	.LC2
	.word	undo_stack_top
	.word	undo_stack
	.word	cend
	.size	append, .-append
	.section	.rodata
	.align	2
.LC3:
	.ascii	"k >= 0\000"
	.align	2
.LC4:
	.ascii	"undo_stack[undo_stack_top].s != NULL\000"
	.text
	.align	2
	.global	delete
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete, %function
delete:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L10
	ldr	r3, .L13
	mov	r2, #141
	ldr	r1, .L13+4
	ldr	r0, .L13+8
	bl	__assert_fail
.L10:
	ldr	r3, .L13+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	ble	.L11
	ldr	r3, .L13+12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
.L11:
	ldr	r3, .L13+16
	ldr	r2, [r3]
	ldr	r1, .L13+20
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #1
	strb	r2, [r3]
	ldr	r3, .L13+16
	ldr	r2, [r3]
	ldr	r1, .L13+20
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	mov	r2, r3
	ldr	r3, .L13+16
	ldr	r4, [r3]
	mov	r0, r2
	bl	malloc
	mov	r3, r0
	mov	r1, r3
	ldr	r2, .L13+20
	mov	r3, r4
	lsl	r3, r3, #1
	add	r3, r3, r4
	lsl	r3, r3, #2
	add	r3, r2, r3
	add	r3, r3, #8
	str	r1, [r3]
	ldr	r3, .L13+16
	ldr	r2, [r3]
	ldr	r1, .L13+20
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L13
	mov	r2, #157
	ldr	r1, .L13+4
	ldr	r0, .L13+24
	bl	__assert_fail
.L12:
	ldr	r3, .L13+16
	ldr	r2, [r3]
	ldr	r1, .L13+20
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L13+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	rsb	r3, r3, #0
	add	r3, r2, r3
	ldr	r2, .L13+28
	str	r3, [r2]
	ldr	r3, .L13+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	ldr	r2, .L13+12
	str	r3, [r2]
	ldr	r3, .L13+16
	ldr	r2, [r3]
	ldr	r1, .L13+20
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r2, .L13+28
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	mov	r0, r3
	bl	strncpy
	ldr	r3, .L13+28
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L13+16
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L13+16
	str	r3, [r2]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L14:
	.align	2
.L13:
	.word	__PRETTY_FUNCTION__.6367
	.word	.LC0
	.word	.LC3
	.word	clen
	.word	undo_stack_top
	.word	undo_stack
	.word	.LC4
	.word	cend
	.size	delete, .-delete
	.align	2
	.global	print
	.syntax unified
	.arm
	.fpu softvfp
	.type	print, %function
print:
	@ 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, [fp, #-8]
	cmp	r3, #0
	bge	.L16
	ldr	r3, .L19
	mov	r2, #171
	ldr	r1, .L19+4
	ldr	r0, .L19+8
	bl	__assert_fail
.L16:
	ldr	r3, .L19+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L18
	ldr	r2, .L19+16
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
	mov	r0, #10
	bl	putchar
.L18:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	__PRETTY_FUNCTION__.6371
	.word	.LC0
	.word	.LC3
	.word	clen
	.word	cbuf
	.size	print, .-print
	.align	2
	.global	undo
	.syntax unified
	.arm
	.fpu softvfp
	.type	undo, %function
undo:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L26
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L25
	ldr	r3, .L26
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L26
	str	r3, [r2]
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r1, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L24
	ldr	r3, .L26+8
	ldr	r1, [r3]
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r0, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	rsb	r3, r3, #0
	add	r3, r1, r3
	ldr	r2, .L26+8
	str	r3, [r2]
	ldr	r3, .L26+12
	ldr	r1, [r3]
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r0, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r3, r1, r3
	ldr	r2, .L26+12
	str	r3, [r2]
	ldr	r3, .L26+8
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	pop	{fp, pc}
.L24:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r1, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #1
	popne	{fp, pc}
	ldr	r3, .L26+8
	ldr	r0, [r3]
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r1, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	bl	strcpy
	ldr	r3, .L26+8
	ldr	r1, [r3]
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r0, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r0, r3
	add	r3, r3, #4
	ldr	r3, [r3]
	add	r3, r1, r3
	ldr	r2, .L26+8
	str	r3, [r2]
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r1, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, .L26+12
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L26+12
	str	r3, [r2]
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r1, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r1, .L26+4
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r1, r3
	add	r3, r3, #8
	mov	r2, #0
	str	r2, [r3]
	pop	{fp, pc}
.L25:
	nop
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	undo_stack_top
	.word	undo_stack
	.word	cend
	.word	clen
	.size	undo, .-undo
	.section	.rodata
	.align	2
.LC5:
	.ascii	"%d\012\000"
	.align	2
.LC6:
	.ascii	"0\000"
	.align	2
.LC7:
	.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
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	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, #-12]
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L40+4
	bl	__isoc99_scanf
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	beq	.L30
	ldr	r3, .L40+8
	mov	r2, #244
	ldr	r1, .L40+12
	ldr	r0, .L40+16
	bl	__assert_fail
.L37:
	ldr	r3, .L40+20
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L40+24
	ldr	r0, .L40+28
	bl	fgets
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L31
	mov	r3, #3
	b	.L38
.L31:
	ldr	r3, .L40+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L33
	ldr	r0, .L40+32
	bl	append
	b	.L30
.L33:
	ldr	r3, .L40+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #50
	bne	.L34
	ldr	r0, .L40+32
	bl	atoi
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	delete
	b	.L30
.L34:
	ldr	r3, .L40+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #51
	bne	.L35
	ldr	r0, .L40+32
	bl	atoi
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	mov	r0, r3
	bl	print
	b	.L30
.L35:
	ldr	r3, .L40+28
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #52
	bne	.L36
	bl	undo
	b	.L30
.L36:
	mov	r3, #2
	b	.L38
.L30:
	ldr	r3, [fp, #-24]
	sub	r2, r3, #1
	str	r2, [fp, #-24]
	cmp	r3, #0
	bgt	.L37
	mov	r3, #0
.L38:
	ldr	r2, .L40
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L39
	bl	__stack_chk_fail
.L39:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC7
	.word	.LC5
	.word	__PRETTY_FUNCTION__.6382
	.word	.LC0
	.word	.LC6
	.word	stdin
	.word	1000004
	.word	line.6377
	.word	line.6377+2
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.6360, %object
	.size	__PRETTY_FUNCTION__.6360, 7
__PRETTY_FUNCTION__.6360:
	.ascii	"append\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6367, %object
	.size	__PRETTY_FUNCTION__.6367, 7
__PRETTY_FUNCTION__.6367:
	.ascii	"delete\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6371, %object
	.size	__PRETTY_FUNCTION__.6371, 6
__PRETTY_FUNCTION__.6371:
	.ascii	"print\000"
	.align	2
	.type	__PRETTY_FUNCTION__.6382, %object
	.size	__PRETTY_FUNCTION__.6382, 5
__PRETTY_FUNCTION__.6382:
	.ascii	"main\000"
	.local	line.6377
	.comm	line.6377,1000004,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
