	.file	"1098527.c"
	.intel_syntax noprefix
	.text
	.globl	text
	.bss
	.align 8
	.type	text, @object
	.size	text, 8
text:
	.zero	8
	.globl	t_cap
	.align 4
	.type	t_cap, @object
	.size	t_cap, 4
t_cap:
	.zero	4
	.globl	t_len
	.align 4
	.type	t_len, @object
	.size	t_len, 4
t_len:
	.zero	4
	.globl	in_buf
	.align 8
	.type	in_buf, @object
	.size	in_buf, 8
in_buf:
	.zero	8
	.globl	in_size
	.align 8
	.type	in_size, @object
	.size	in_size, 8
in_size:
	.zero	8
	.globl	in_len
	.align 8
	.type	in_len, @object
	.size	in_len, 8
in_len:
	.zero	8
	.globl	status
	.type	status, @object
	.size	status, 1
status:
	.zero	1
	.globl	history
	.align 8
	.type	history, @object
	.size	history, 8
history:
	.zero	8
	.globl	stateCount
	.align 4
	.type	stateCount, @object
	.size	stateCount, 4
stateCount:
	.zero	4
	.globl	currentState
	.align 4
	.type	currentState, @object
	.size	currentState, 4
currentState:
	.zero	4
	.globl	actions_to_restore
	.align 4
	.type	actions_to_restore, @object
	.size	actions_to_restore, 4
actions_to_restore:
	.zero	4
	.globl	rightMost
	.align 8
	.type	rightMost, @object
	.size	rightMost, 8
rightMost:
	.zero	8
	.globl	rm_len
	.align 4
	.type	rm_len, @object
	.size	rm_len, 4
rm_len:
	.zero	4
	.globl	rm_state
	.align 4
	.type	rm_state, @object
	.size	rm_state, 4
rm_state:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%d,%dp"
.LC1:
	.string	"%d,%dc"
.LC2:
	.string	"%d,%dd"
.LC3:
	.string	"%du"
.LC4:
	.string	"%dr"
	.text
	.globl	main
	.type	main, @function
main:
.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, 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	edi, 8
	call	SetTextCapacity
	mov	eax, 0
	call	UpdateHistory
	nop
	jmp	.L3
.L10:
	mov	QWORD PTR in_buf[rip], 0
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	lea	rsi, in_size[rip]
	lea	rdi, in_buf[rip]
	call	getline@PLT
	mov	QWORD PTR in_len[rip], rax
	mov	rdx, QWORD PTR in_buf[rip]
	mov	rax, QWORD PTR in_len[rip]
	sub	rax, 2
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR status[rip], al
	movzx	eax, BYTE PTR status[rip]
	movsx	eax, al
	sub	eax, 99
	cmp	eax, 18
	ja	.L3
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L5[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L5[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L5:
	.long	.L9-.L5
	.long	.L8-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L7-.L5
	.long	.L3-.L5
	.long	.L6-.L5
	.long	.L3-.L5
	.long	.L3-.L5
	.long	.L4-.L5
	.text
.L7:
	mov	eax, 0
	call	RestoreEdits
	mov	rax, QWORD PTR in_buf[rip]
	lea	rcx, -12[rbp]
	lea	rdx, -16[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	OnPrint
	jmp	.L3
.L9:
	mov	eax, 0
	call	RestoreEdits
	mov	rax, QWORD PTR in_buf[rip]
	lea	rcx, -12[rbp]
	lea	rdx, -16[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	OnChange
	jmp	.L3
.L8:
	mov	eax, 0
	call	RestoreEdits
	mov	rax, QWORD PTR in_buf[rip]
	lea	rcx, -12[rbp]
	lea	rdx, -16[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	edx, DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, edx
	mov	edi, eax
	call	OnDelete
	jmp	.L3
.L4:
	mov	rax, QWORD PTR in_buf[rip]
	lea	rdx, -16[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	QueueUndos
	jmp	.L3
.L6:
	mov	rax, QWORD PTR in_buf[rip]
	lea	rdx, -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	QueueRedos
	nop
.L3:
	movzx	eax, BYTE PTR status[rip]
	cmp	al, 113
	jne	.L10
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	SetTextCapacity
	.type	SetTextCapacity, @function
SetTextCapacity:
.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
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR t_cap[rip], eax
	mov	eax, DWORD PTR t_cap[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR text[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR text[rip], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	SetTextCapacity, .-SetTextCapacity
	.globl	AdjustTextCapacity
	.type	AdjustTextCapacity, @function
AdjustTextCapacity:
.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	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR t_cap[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jge	.L19
	jmp	.L16
.L17:
	sub	DWORD PTR -4[rbp], 8
.L16:
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 7
	cmp	DWORD PTR -20[rbp], eax
	jl	.L17
	jmp	.L18
.L20:
	add	DWORD PTR -4[rbp], 8
.L19:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jg	.L20
.L18:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	SetTextCapacity
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	AdjustTextCapacity, .-AdjustTextCapacity
	.globl	SetTextLength
	.type	SetTextLength, @function
SetTextLength:
.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	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR t_len[rip], eax
	mov	eax, DWORD PTR t_len[rip]
	mov	edi, eax
	call	AdjustTextCapacity
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	SetTextLength, .-SetTextLength
	.globl	SetLine
	.type	SetLine, @function
SetLine:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR text[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	SetLine, .-SetLine
	.globl	UpdateHistory
	.type	UpdateHistory, @function
UpdateHistory:
.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	eax, DWORD PTR stateCount[rip]
	test	eax, eax
	je	.L24
	mov	eax, DWORD PTR stateCount[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR currentState[rip]
	cmp	edx, eax
	jne	.L25
.L24:
	mov	eax, DWORD PTR stateCount[rip]
	add	eax, 1
	mov	DWORD PTR stateCount[rip], eax
	jmp	.L26
.L25:
	mov	eax, DWORD PTR currentState[rip]
	add	eax, 1
	mov	DWORD PTR -4[rbp], eax
	jmp	.L27
.L28:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	FreeStateContent
	add	DWORD PTR -4[rbp], 1
.L27:
	mov	eax, DWORD PTR stateCount[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L28
	mov	eax, DWORD PTR currentState[rip]
	add	eax, 2
	mov	DWORD PTR stateCount[rip], eax
.L26:
	mov	eax, DWORD PTR stateCount[rip]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	mov	rax, QWORD PTR history[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR history[rip], rax
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR stateCount[rip]
	cdqe
	sal	rax, 4
	sub	rax, 16
	add	rax, rdx
	mov	QWORD PTR [rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR stateCount[rip]
	cdqe
	sal	rax, 4
	sub	rax, 16
	add	rax, rdx
	mov	QWORD PTR 8[rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	UpdateHistory, .-UpdateHistory
	.globl	FreeStateContent
	.type	FreeStateContent, @function
FreeStateContent:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L30
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	QWORD PTR [rax], 0
.L30:
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L32
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	QWORD PTR 8[rax], 0
.L32:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	FreeStateContent, .-FreeStateContent
	.globl	GetStateEdit
	.type	GetStateEdit, @function
GetStateEdit:
.LFB13:
	.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	eax, edi
	mov	BYTE PTR -20[rbp], al
	cmp	BYTE PTR -20[rbp], 117
	jne	.L34
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L35
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	lea	rbx, [rdx+rax]
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 4[rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 8[rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR 12[rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 16[rax], 0
.L35:
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	add	rax, 1
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	jmp	.L36
.L34:
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	jne	.L37
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	lea	rbx, [rdx+rax]
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	DWORD PTR 4[rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	DWORD PTR 8[rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	DWORD PTR 12[rax], 0
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR 16[rax], 0
.L37:
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
.L36:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	GetStateEdit, .-GetStateEdit
	.globl	SetupEdit
	.type	SetupEdit, @function
SetupEdit:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	eax, esi
	mov	DWORD PTR -16[rbp], edx
	mov	DWORD PTR -20[rbp], ecx
	mov	DWORD PTR -24[rbp], r8d
	mov	BYTE PTR -12[rbp], al
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, BYTE PTR -12[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	SetupEdit, .-SetupEdit
	.globl	AddLineToEdit
	.type	AddLineToEdit, @function
AddLineToEdit:
.LFB15:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	AddLineToEdit, .-AddLineToEdit
	.section	.rodata
.LC5:
	.string	"%s"
.LC6:
	.string	"."
	.text
	.globl	OnPrint
	.type	OnPrint, @function
OnPrint:
.LFB16:
	.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	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L41
.L44:
	cmp	DWORD PTR -4[rbp], 0
	jle	.L42
	mov	eax, DWORD PTR t_len[rip]
	cmp	DWORD PTR -4[rbp], eax
	jg	.L42
	mov	rdx, QWORD PTR text[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L43
.L42:
	lea	rdi, .LC6[rip]
	call	puts@PLT
.L43:
	add	DWORD PTR -4[rbp], 1
.L41:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -24[rbp]
	jle	.L44
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	OnPrint, .-OnPrint
	.globl	OnChange
	.type	OnChange, @function
OnChange:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	DWORD PTR -56[rbp], esi
	mov	eax, DWORD PTR t_len[rip]
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -56[rbp]
	cmp	DWORD PTR -28[rbp], eax
	cmovge	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	SetTextLength
	mov	eax, 0
	call	UpdateHistory
	mov	edi, 114
	call	GetStateEdit
	mov	QWORD PTR -24[rbp], rax
	mov	ecx, DWORD PTR t_len[rip]
	mov	edx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, 0
	mov	esi, 99
	mov	rdi, rax
	call	SetupEdit
	mov	eax, DWORD PTR currentState[rip]
	cmp	eax, -1
	je	.L46
	mov	edi, 117
	call	GetStateEdit
	mov	QWORD PTR -8[rbp], rax
	mov	ecx, DWORD PTR -28[rbp]
	mov	edx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, 0
	mov	esi, 99
	mov	rdi, rax
	call	SetupEdit
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR -36[rbp], eax
	jmp	.L47
.L49:
	mov	QWORD PTR in_buf[rip], 0
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	lea	rsi, in_size[rip]
	lea	rdi, in_buf[rip]
	call	getline@PLT
	mov	QWORD PTR in_len[rip], rax
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jg	.L48
	mov	rdx, QWORD PTR text[rip]
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	AddLineToEdit
.L48:
	mov	eax, DWORD PTR -36[rbp]
	lea	rsi, in_buf[rip]
	mov	edi, eax
	call	SetLine
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, in_buf[rip]
	mov	rdi, rax
	call	AddLineToEdit
	add	DWORD PTR -36[rbp], 1
.L47:
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	jle	.L49
	jmp	.L50
.L46:
	mov	edi, 117
	call	GetStateEdit
	mov	QWORD PTR -16[rbp], rax
	mov	edx, DWORD PTR -28[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	r8d, 0
	mov	ecx, edx
	mov	edx, 0
	mov	esi, 122
	mov	rdi, rax
	call	SetupEdit
	mov	eax, DWORD PTR -52[rbp]
	mov	DWORD PTR -32[rbp], eax
	jmp	.L51
.L54:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jg	.L52
	mov	rdx, QWORD PTR text[rip]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rdx, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	AddLineToEdit
.L52:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -52[rbp]
	jl	.L53
	mov	QWORD PTR in_buf[rip], 0
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	lea	rsi, in_size[rip]
	lea	rdi, in_buf[rip]
	call	getline@PLT
	mov	QWORD PTR in_len[rip], rax
	mov	eax, DWORD PTR -32[rbp]
	lea	rsi, in_buf[rip]
	mov	edi, eax
	call	SetLine
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, in_buf[rip]
	mov	rdi, rax
	call	AddLineToEdit
.L53:
	add	DWORD PTR -32[rbp], 1
.L51:
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	jle	.L54
.L50:
	mov	eax, DWORD PTR currentState[rip]
	add	eax, 1
	mov	DWORD PTR currentState[rip], eax
	mov	DWORD PTR rm_state[rip], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	OnChange, .-OnChange
	.globl	OnDelete
	.type	OnDelete, @function
OnDelete:
.LFB18:
	.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	DWORD PTR -72[rbp], esi
	mov	eax, DWORD PTR t_len[rip]
	cmp	DWORD PTR -68[rbp], eax
	jg	.L56
	cmp	DWORD PTR -72[rbp], 0
	jg	.L57
.L56:
	mov	eax, 0
	call	UpdateHistory
	mov	edi, 117
	call	GetStateEdit
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	SetupEdit
	mov	edi, 114
	call	GetStateEdit
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	SetupEdit
	mov	eax, DWORD PTR currentState[rip]
	add	eax, 1
	mov	DWORD PTR currentState[rip], eax
	jmp	.L55
.L57:
	mov	eax, DWORD PTR t_len[rip]
	cmp	DWORD PTR -72[rbp], eax
	cmovle	eax, DWORD PTR -72[rbp]
	mov	DWORD PTR -48[rbp], eax
	mov	eax, DWORD PTR -48[rbp]
	sub	eax, DWORD PTR -68[rbp]
	add	eax, 1
	mov	DWORD PTR -44[rbp], eax
	mov	eax, 0
	call	UpdateHistory
	mov	eax, DWORD PTR currentState[rip]
	cmp	eax, -1
	je	.L59
	mov	edi, 117
	call	GetStateEdit
	mov	QWORD PTR -32[rbp], rax
	mov	ecx, DWORD PTR t_len[rip]
	mov	edx, DWORD PTR -68[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	r8d, 0
	mov	esi, 100
	mov	rdi, rax
	call	SetupEdit
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	mov	DWORD PTR -56[rbp], eax
	jmp	.L60
.L63:
	mov	eax, DWORD PTR -56[rbp]
	cmp	eax, DWORD PTR -48[rbp]
	jge	.L61
	mov	rdx, QWORD PTR text[rip]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	AddLineToEdit
.L61:
	mov	edx, DWORD PTR -56[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	eax, DWORD PTR t_len[rip]
	cmp	edx, eax
	jge	.L62
	mov	rdx, QWORD PTR text[rip]
	mov	ecx, DWORD PTR -56[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rcx, QWORD PTR text[rip]
	mov	edx, DWORD PTR -56[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	mov	rdx, QWORD PTR text[rip]
	mov	ecx, DWORD PTR -56[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
.L62:
	add	DWORD PTR -56[rbp], 1
.L60:
	mov	eax, DWORD PTR t_len[rip]
	cmp	DWORD PTR -56[rbp], eax
	jl	.L63
	jmp	.L64
.L59:
	mov	edi, 117
	call	GetStateEdit
	mov	QWORD PTR -40[rbp], rax
	mov	edx, DWORD PTR t_len[rip]
	mov	rax, QWORD PTR -40[rbp]
	mov	r8d, 0
	mov	ecx, edx
	mov	edx, 0
	mov	esi, 122
	mov	rdi, rax
	call	SetupEdit
	mov	DWORD PTR -52[rbp], 0
	jmp	.L65
.L67:
	mov	eax, DWORD PTR -68[rbp]
	sub	eax, 1
	cmp	DWORD PTR -52[rbp], eax
	jl	.L66
	mov	edx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	edx, eax
	mov	eax, DWORD PTR t_len[rip]
	cmp	edx, eax
	jge	.L66
	mov	rdx, QWORD PTR text[rip]
	mov	ecx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rcx, QWORD PTR text[rip]
	mov	edx, DWORD PTR -52[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	mov	rdx, QWORD PTR text[rip]
	mov	ecx, DWORD PTR -52[rbp]
	mov	eax, DWORD PTR -44[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
.L66:
	mov	rdx, QWORD PTR text[rip]
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	AddLineToEdit
	add	DWORD PTR -52[rbp], 1
.L65:
	mov	eax, DWORD PTR t_len[rip]
	cmp	DWORD PTR -52[rbp], eax
	jl	.L67
.L64:
	mov	edi, 114
	call	GetStateEdit
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR t_len[rip]
	sub	eax, DWORD PTR -44[rbp]
	mov	ecx, eax
	mov	esi, DWORD PTR -44[rbp]
	mov	edx, DWORD PTR -68[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	r8d, esi
	mov	esi, 100
	mov	rdi, rax
	call	SetupEdit
	mov	eax, DWORD PTR t_len[rip]
	sub	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	SetTextLength
	mov	eax, DWORD PTR currentState[rip]
	add	eax, 1
	mov	DWORD PTR currentState[rip], eax
	mov	DWORD PTR rm_state[rip], 0
.L55:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	OnDelete, .-OnDelete
	.globl	OnUndo
	.type	OnUndo, @function
OnUndo:
.LFB19:
	.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	DWORD PTR -36[rbp], edi
	mov	eax, DWORD PTR stateCount[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR currentState[rip]
	cmp	edx, eax
	jne	.L72
	mov	eax, DWORD PTR t_cap[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR rightMost[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR rightMost[rip], rax
	mov	eax, DWORD PTR t_len[rip]
	mov	DWORD PTR rm_len[rip], eax
	mov	eax, DWORD PTR currentState[rip]
	mov	DWORD PTR rm_state[rip], eax
	mov	DWORD PTR -20[rbp], 0
	jmp	.L70
.L71:
	mov	rdx, QWORD PTR text[rip]
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rcx, QWORD PTR rightMost[rip]
	mov	edx, DWORD PTR -20[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -20[rbp], 1
.L70:
	mov	eax, DWORD PTR rm_len[rip]
	cmp	DWORD PTR -20[rbp], eax
	jl	.L71
	jmp	.L72
.L84:
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 122
	je	.L73
	cmp	eax, 122
	jg	.L74
	cmp	eax, 99
	je	.L73
	cmp	eax, 100
	je	.L75
	jmp	.L74
.L73:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	edi, eax
	call	SetTextLength
	mov	DWORD PTR -16[rbp], 0
	jmp	.L76
.L77:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, ecx
	mov	rsi, rdx
	mov	edi, eax
	call	SetLine
	add	DWORD PTR -16[rbp], 1
.L76:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L77
	jmp	.L74
.L75:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	edi, eax
	call	SetTextLength
	mov	eax, DWORD PTR t_len[rip]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L78
.L82:
	mov	edx, DWORD PTR t_len[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	sub	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	sub	eax, 1
	cmp	edx, eax
	jne	.L79
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, ecx
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	SetLine
	jmp	.L80
.L79:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, edx
	test	eax, eax
	jle	.L81
	mov	rdx, QWORD PTR text[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, ecx
	cdqe
	sal	rax, 3
	sub	rax, 8
	add	rax, rdx
	mov	rcx, QWORD PTR text[rip]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	sub	rdx, 8
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
.L81:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	add	eax, edx
	cmp	DWORD PTR -12[rbp], eax
	jge	.L80
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, ecx
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	eax, DWORD PTR -12[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	SetLine
.L80:
	sub	DWORD PTR -12[rbp], 1
.L78:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	cmp	DWORD PTR -12[rbp], eax
	jge	.L82
	nop
.L74:
	sub	DWORD PTR -36[rbp], 1
	mov	eax, DWORD PTR currentState[rip]
	sub	eax, 1
	mov	DWORD PTR currentState[rip], eax
.L72:
	mov	eax, DWORD PTR currentState[rip]
	test	eax, eax
	jle	.L85
	cmp	DWORD PTR -36[rbp], 0
	jg	.L84
.L85:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	OnUndo, .-OnUndo
	.globl	OnRedo
	.type	OnRedo, @function
OnRedo:
.LFB20:
	.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
	jmp	.L87
.L97:
	mov	rdx, QWORD PTR history[rip]
	mov	eax, DWORD PTR currentState[rip]
	cdqe
	sal	rax, 4
	add	rax, rdx
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	eax, 99
	je	.L88
	cmp	eax, 100
	je	.L89
	jmp	.L90
.L88:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	edi, eax
	call	SetTextLength
	mov	DWORD PTR -16[rbp], 0
	jmp	.L91
.L92:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	sal	rax, 3
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, ecx
	mov	rsi, rdx
	mov	edi, eax
	call	SetLine
	add	DWORD PTR -16[rbp], 1
.L91:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	cmp	DWORD PTR -16[rbp], eax
	jl	.L92
	jmp	.L90
.L89:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 4[rax]
	sub	eax, 1
	mov	DWORD PTR -12[rbp], eax
	jmp	.L93
.L95:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	add	edx, eax
	mov	eax, DWORD PTR t_len[rip]
	cmp	edx, eax
	jge	.L94
	mov	rdx, QWORD PTR text[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rcx, QWORD PTR text[rip]
	mov	edx, DWORD PTR -12[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	mov	rdx, QWORD PTR text[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -12[rbp]
	add	eax, ecx
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	QWORD PTR [rax], 0
.L94:
	add	DWORD PTR -12[rbp], 1
.L93:
	mov	eax, DWORD PTR t_len[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L95
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 12[rax]
	mov	edi, eax
	call	SetTextLength
	nop
.L90:
	sub	DWORD PTR -20[rbp], 1
	mov	eax, DWORD PTR currentState[rip]
	add	eax, 1
	mov	DWORD PTR currentState[rip], eax
.L87:
	mov	eax, DWORD PTR stateCount[rip]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR currentState[rip]
	cmp	edx, eax
	jle	.L98
	cmp	DWORD PTR -20[rbp], 0
	jg	.L97
.L98:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	OnRedo, .-OnRedo
	.globl	QueueUndos
	.type	QueueUndos, @function
QueueUndos:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR actions_to_restore[rip]
	sub	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR actions_to_restore[rip], eax
	mov	edx, DWORD PTR currentState[rip]
	mov	eax, DWORD PTR actions_to_restore[rip]
	add	eax, edx
	test	eax, eax
	jns	.L101
	mov	eax, DWORD PTR currentState[rip]
	neg	eax
	mov	DWORD PTR actions_to_restore[rip], eax
.L101:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	QueueUndos, .-QueueUndos
	.globl	QueueRedos
	.type	QueueRedos, @function
QueueRedos:
.LFB22:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	edx, DWORD PTR actions_to_restore[rip]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR actions_to_restore[rip], eax
	mov	edx, DWORD PTR actions_to_restore[rip]
	mov	eax, DWORD PTR currentState[rip]
	add	edx, eax
	mov	eax, DWORD PTR stateCount[rip]
	cmp	edx, eax
	jl	.L104
	mov	eax, DWORD PTR stateCount[rip]
	sub	eax, 1
	mov	edx, DWORD PTR currentState[rip]
	sub	eax, edx
	mov	DWORD PTR actions_to_restore[rip], eax
.L104:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	QueueRedos, .-QueueRedos
	.globl	RestoreEdits
	.type	RestoreEdits, @function
RestoreEdits:
.LFB23:
	.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 actions_to_restore[rip]
	test	eax, eax
	je	.L110
	mov	eax, 0
	call	TryRestoreState
	mov	eax, DWORD PTR actions_to_restore[rip]
	test	eax, eax
	jle	.L108
	mov	eax, DWORD PTR actions_to_restore[rip]
	mov	edi, eax
	call	OnRedo
	jmp	.L109
.L108:
	mov	eax, DWORD PTR actions_to_restore[rip]
	test	eax, eax
	jns	.L109
	mov	eax, DWORD PTR actions_to_restore[rip]
	neg	eax
	mov	edi, eax
	call	OnUndo
.L109:
	mov	DWORD PTR actions_to_restore[rip], 0
	jmp	.L105
.L110:
	nop
.L105:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	RestoreEdits, .-RestoreEdits
	.globl	TryRestoreState
	.type	TryRestoreState, @function
TryRestoreState:
.LFB24:
	.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	edx, DWORD PTR currentState[rip]
	mov	eax, DWORD PTR actions_to_restore[rip]
	add	eax, edx
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR actions_to_restore[rip]
	test	eax, eax
	jns	.L112
	mov	eax, DWORD PTR actions_to_restore[rip]
	neg	eax
	cmp	DWORD PTR -4[rbp], eax
	jge	.L112
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR actions_to_restore[rip], eax
	mov	edi, 0
	call	SetTextLength
	mov	DWORD PTR currentState[rip], 0
	jmp	.L116
.L112:
	mov	eax, DWORD PTR actions_to_restore[rip]
	test	eax, eax
	jle	.L116
	mov	eax, DWORD PTR rm_state[rip]
	test	eax, eax
	jle	.L116
	mov	edx, DWORD PTR rm_state[rip]
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, edx
	cdq
	xor	eax, edx
	sub	eax, edx
	mov	edx, DWORD PTR actions_to_restore[rip]
	cmp	eax, edx
	jge	.L116
	mov	eax, DWORD PTR rm_len[rip]
	mov	edi, eax
	call	SetTextLength
	mov	eax, DWORD PTR rm_state[rip]
	mov	DWORD PTR currentState[rip], eax
	mov	DWORD PTR -8[rbp], 0
	jmp	.L114
.L115:
	mov	rdx, QWORD PTR rightMost[rip]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	sal	rax, 3
	add	rax, rdx
	mov	rcx, QWORD PTR text[rip]
	mov	edx, DWORD PTR -8[rbp]
	movsx	rdx, edx
	sal	rdx, 3
	add	rdx, rcx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR [rdx], rax
	add	DWORD PTR -8[rbp], 1
.L114:
	mov	eax, DWORD PTR rm_len[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L115
	mov	edx, DWORD PTR rm_state[rip]
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, edx
	mov	DWORD PTR actions_to_restore[rip], eax
.L116:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	TryRestoreState, .-TryRestoreState
	.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	"1098527.c"
	.text
	.comm	text,4,4
	.global	t_cap
	.bss
	.align	2
	.type	t_cap, %object
	.size	t_cap, 4
t_cap:
	.space	4
	.global	t_len
	.align	2
	.type	t_len, %object
	.size	t_len, 4
t_len:
	.space	4
	.global	in_buf
	.align	2
	.type	in_buf, %object
	.size	in_buf, 4
in_buf:
	.space	4
	.global	in_size
	.align	2
	.type	in_size, %object
	.size	in_size, 4
in_size:
	.space	4
	.global	in_len
	.align	2
	.type	in_len, %object
	.size	in_len, 4
in_len:
	.space	4
	.global	status
	.type	status, %object
	.size	status, 1
status:
	.space	1
	.comm	history,4,4
	.global	stateCount
	.align	2
	.type	stateCount, %object
	.size	stateCount, 4
stateCount:
	.space	4
	.global	currentState
	.align	2
	.type	currentState, %object
	.size	currentState, 4
currentState:
	.space	4
	.global	actions_to_restore
	.align	2
	.type	actions_to_restore, %object
	.size	actions_to_restore, 4
actions_to_restore:
	.space	4
	.global	rightMost
	.align	2
	.type	rightMost, %object
	.size	rightMost, 4
rightMost:
	.space	4
	.global	rm_len
	.align	2
	.type	rm_len, %object
	.size	rm_len, 4
rm_len:
	.space	4
	.global	rm_state
	.align	2
	.type	rm_state, %object
	.size	rm_state, 4
rm_state:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d,%dp\000"
	.align	2
.LC1:
	.ascii	"%d,%dc\000"
	.align	2
.LC2:
	.ascii	"%d,%dd\000"
	.align	2
.LC3:
	.ascii	"%du\000"
	.align	2
.LC4:
	.ascii	"%dr\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 = 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, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #8
	bl	SetTextCapacity
	bl	UpdateHistory
	nop
	b	.L3
.L10:
	ldr	r3, .L13+4
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L13+8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L13+12
	ldr	r0, .L13+4
	bl	getline
	mov	r3, r0
	ldr	r2, .L13+16
	str	r3, [r2]
	ldr	r3, .L13+4
	ldr	r2, [r3]
	ldr	r3, .L13+16
	ldr	r3, [r3]
	sub	r3, r3, #2
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, .L13+20
	strb	r2, [r3]
	ldr	r3, .L13+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #99
	cmp	r3, #18
	ldrls	pc, [pc, r3, asl #2]
	b	.L3
.L5:
	.word	.L9
	.word	.L8
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L7
	.word	.L3
	.word	.L6
	.word	.L3
	.word	.L3
	.word	.L4
.L7:
	bl	RestoreEdits
	ldr	r3, .L13+4
	ldr	r0, [r3]
	sub	r3, fp, #12
	sub	r2, fp, #16
	ldr	r1, .L13+24
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	OnPrint
	b	.L3
.L9:
	bl	RestoreEdits
	ldr	r3, .L13+4
	ldr	r0, [r3]
	sub	r3, fp, #12
	sub	r2, fp, #16
	ldr	r1, .L13+28
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	OnChange
	b	.L3
.L8:
	bl	RestoreEdits
	ldr	r3, .L13+4
	ldr	r0, [r3]
	sub	r3, fp, #12
	sub	r2, fp, #16
	ldr	r1, .L13+32
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r1, r2
	mov	r0, r3
	bl	OnDelete
	b	.L3
.L4:
	ldr	r3, .L13+4
	ldr	r3, [r3]
	sub	r2, fp, #16
	ldr	r1, .L13+36
	mov	r0, r3
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	QueueUndos
	b	.L3
.L6:
	ldr	r3, .L13+4
	ldr	r3, [r3]
	sub	r2, fp, #16
	ldr	r1, .L13+40
	mov	r0, r3
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	QueueRedos
	nop
.L3:
	ldr	r3, .L13+20
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L10
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC5
	.word	in_buf
	.word	stdin
	.word	in_size
	.word	in_len
	.word	status
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.align	2
	.global	SetTextCapacity
	.syntax unified
	.arm
	.fpu softvfp
	.type	SetTextCapacity, %function
SetTextCapacity:
	@ 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	r2, .L16
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, .L16+4
	ldr	r3, [r3]
	ldr	r2, .L16
	ldr	r2, [r2]
	lsl	r2, r2, #2
	mov	r1, r2
	mov	r0, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L16+4
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	t_cap
	.word	text
	.size	SetTextCapacity, .-SetTextCapacity
	.align	2
	.global	AdjustTextCapacity
	.syntax unified
	.arm
	.fpu softvfp
	.type	AdjustTextCapacity, %function
AdjustTextCapacity:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bge	.L23
	b	.L20
.L21:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #8
	str	r3, [fp, #-8]
.L20:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #7
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L21
	b	.L22
.L24:
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
	str	r3, [fp, #-8]
.L23:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bgt	.L24
.L22:
	ldr	r0, [fp, #-8]
	bl	SetTextCapacity
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	t_cap
	.size	AdjustTextCapacity, .-AdjustTextCapacity
	.align	2
	.global	SetTextLength
	.syntax unified
	.arm
	.fpu softvfp
	.type	SetTextLength, %function
SetTextLength:
	@ 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	r2, .L28
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	ldr	r3, .L28
	ldr	r3, [r3]
	mov	r0, r3
	bl	AdjustTextCapacity
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	t_len
	.size	SetTextLength, .-SetTextLength
	.align	2
	.global	SetLine
	.syntax unified
	.arm
	.fpu softvfp
	.type	SetLine, %function
SetLine:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r2, [r2]
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L32:
	.align	2
.L31:
	.word	text
	.size	SetLine, .-SetLine
	.align	2
	.global	UpdateHistory
	.syntax unified
	.arm
	.fpu softvfp
	.type	UpdateHistory, %function
UpdateHistory:
	@ 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, .L39
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L34
	ldr	r3, .L39
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, .L39+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L35
.L34:
	ldr	r3, .L39
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L39
	str	r3, [r2]
	b	.L36
.L35:
	ldr	r3, .L39+4
	ldr	r3, [r3]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L37
.L38:
	ldr	r0, [fp, #-8]
	bl	FreeStateContent
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L37:
	ldr	r3, .L39
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L38
	ldr	r3, .L39+4
	ldr	r3, [r3]
	add	r3, r3, #2
	ldr	r2, .L39
	str	r3, [r2]
.L36:
	ldr	r3, .L39+8
	ldr	r3, [r3]
	ldr	r2, .L39
	ldr	r2, [r2]
	lsl	r2, r2, #3
	mov	r1, r2
	mov	r0, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L39+8
	str	r3, [r2]
	ldr	r3, .L39+8
	ldr	r2, [r3]
	ldr	r3, .L39
	ldr	r3, [r3]
	sub	r3, r3, #-536870911
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L39+8
	ldr	r2, [r3]
	ldr	r3, .L39
	ldr	r3, [r3]
	sub	r3, r3, #-536870911
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #4]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	stateCount
	.word	currentState
	.word	history
	.size	UpdateHistory, .-UpdateHistory
	.align	2
	.global	FreeStateContent
	.syntax unified
	.arm
	.fpu softvfp
	.type	FreeStateContent, %function
FreeStateContent:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L42
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
.L42:
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L44
	ldr	r0, [fp, #-8]
	bl	free
	ldr	r3, .L45
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #4]
.L44:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L46:
	.align	2
.L45:
	.word	history
	.size	FreeStateContent, .-FreeStateContent
	.align	2
	.global	GetStateEdit
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetStateEdit, %function
GetStateEdit:
	@ 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
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #117
	bne	.L48
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L49
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r4, r2, r3
	mov	r0, #20
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [r3, #16]
.L49:
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	b	.L50
.L48:
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L51
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r4, r2, r3
	mov	r0, #20
	bl	malloc
	mov	r3, r0
	str	r3, [r4, #4]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r2, #0
	str	r2, [r3, #16]
.L51:
	ldr	r3, .L52
	ldr	r2, [r3]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
.L50:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L53:
	.align	2
.L52:
	.word	history
	.word	currentState
	.size	GetStateEdit, .-GetStateEdit
	.align	2
	.global	SetupEdit
	.syntax unified
	.arm
	.fpu softvfp
	.type	SetupEdit, %function
SetupEdit:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	mov	r3, r1
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-8]
	ldrb	r2, [fp, #-9]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #4]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #16]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	SetupEdit, .-SetupEdit
	.align	2
	.global	AddLineToEdit
	.syntax unified
	.arm
	.fpu softvfp
	.type	AddLineToEdit, %function
AddLineToEdit:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #2
	mov	r1, r3
	mov	r0, r2
	bl	realloc
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	ldr	r2, [r2]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	AddLineToEdit, .-AddLineToEdit
	.section	.rodata
	.align	2
.LC6:
	.ascii	"%s\000"
	.align	2
.LC7:
	.ascii	".\000"
	.text
	.align	2
	.global	OnPrint
	.syntax unified
	.arm
	.fpu softvfp
	.type	OnPrint, %function
OnPrint:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	b	.L57
.L60:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L58
	ldr	r3, .L61
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bgt	.L58
	ldr	r3, .L61+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L61+8
	bl	printf
	b	.L59
.L58:
	ldr	r0, .L61+12
	bl	puts
.L59:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L57:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	ble	.L60
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	t_len
	.word	text
	.word	.LC6
	.word	.LC7
	.size	OnPrint, .-OnPrint
	.align	2
	.global	OnChange
	.syntax unified
	.arm
	.fpu softvfp
	.type	OnChange, %function
OnChange:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L73
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	mov	r0, r3
	bl	SetTextLength
	bl	UpdateHistory
	mov	r0, #114
	bl	GetStateEdit
	str	r0, [fp, #-16]
	ldr	r3, .L73
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp]
	ldr	r2, [fp, #-32]
	mov	r1, #99
	ldr	r0, [fp, #-16]
	bl	SetupEdit
	ldr	r3, .L73+4
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L64
	mov	r0, #117
	bl	GetStateEdit
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-32]
	mov	r1, #99
	ldr	r0, [fp, #-8]
	bl	SetupEdit
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-28]
	b	.L65
.L67:
	ldr	r3, .L73+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L73+12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L73+16
	ldr	r0, .L73+8
	bl	getline
	mov	r3, r0
	ldr	r2, .L73+20
	str	r3, [r2]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bgt	.L66
	ldr	r3, .L73+24
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	AddLineToEdit
.L66:
	ldr	r1, .L73+8
	ldr	r0, [fp, #-28]
	bl	SetLine
	ldr	r1, .L73+8
	ldr	r0, [fp, #-16]
	bl	AddLineToEdit
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L65:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L67
	b	.L68
.L64:
	mov	r0, #117
	bl	GetStateEdit
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	mov	r2, #0
	mov	r1, #122
	ldr	r0, [fp, #-12]
	bl	SetupEdit
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	b	.L69
.L72:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bgt	.L70
	ldr	r3, .L73+24
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	AddLineToEdit
.L70:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	blt	.L71
	ldr	r3, .L73+8
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, .L73+12
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L73+16
	ldr	r0, .L73+8
	bl	getline
	mov	r3, r0
	ldr	r2, .L73+20
	str	r3, [r2]
	ldr	r1, .L73+8
	ldr	r0, [fp, #-24]
	bl	SetLine
	ldr	r1, .L73+8
	ldr	r0, [fp, #-16]
	bl	AddLineToEdit
.L71:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L69:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	ble	.L72
.L68:
	ldr	r3, .L73+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L73+4
	str	r3, [r2]
	ldr	r3, .L73+28
	mov	r2, #0
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L74:
	.align	2
.L73:
	.word	t_len
	.word	currentState
	.word	in_buf
	.word	stdin
	.word	in_size
	.word	in_len
	.word	text
	.word	rm_state
	.size	OnChange, .-OnChange
	.align	2
	.global	OnDelete
	.syntax unified
	.arm
	.fpu softvfp
	.type	OnDelete, %function
OnDelete:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L88
	ldr	r3, [r3]
	ldr	r2, [fp, #-48]
	cmp	r2, r3
	bgt	.L76
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bgt	.L77
.L76:
	bl	UpdateHistory
	mov	r0, #117
	bl	GetStateEdit
	str	r0, [fp, #-12]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	SetupEdit
	mov	r0, #114
	bl	GetStateEdit
	str	r0, [fp, #-8]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	SetupEdit
	ldr	r3, .L88+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L88+4
	str	r3, [r2]
	b	.L75
.L77:
	ldr	r3, .L88
	ldr	r3, [r3]
	ldr	r2, [fp, #-52]
	cmp	r2, r3
	movlt	r3, r2
	movge	r3, r3
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-48]
	sub	r3, r2, r3
	add	r3, r3, #1
	str	r3, [fp, #-28]
	bl	UpdateHistory
	ldr	r3, .L88+4
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L79
	mov	r0, #117
	bl	GetStateEdit
	str	r0, [fp, #-20]
	ldr	r3, .L88
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp]
	ldr	r2, [fp, #-48]
	mov	r1, #100
	ldr	r0, [fp, #-20]
	bl	SetupEdit
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	str	r3, [fp, #-40]
	b	.L80
.L83:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bge	.L81
	ldr	r3, .L88+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	AddLineToEdit
.L81:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, .L88
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L82
	ldr	r3, .L88+8
	ldr	r2, [r3]
	ldr	r1, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L88+8
	ldr	r1, [r3]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L88+8
	ldr	r2, [r3]
	ldr	r1, [fp, #-40]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
.L82:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L80:
	ldr	r3, .L88
	ldr	r3, [r3]
	ldr	r2, [fp, #-40]
	cmp	r2, r3
	blt	.L83
	b	.L84
.L79:
	mov	r0, #117
	bl	GetStateEdit
	str	r0, [fp, #-24]
	ldr	r3, .L88
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp]
	mov	r2, #0
	mov	r1, #122
	ldr	r0, [fp, #-24]
	bl	SetupEdit
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L85
.L87:
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L86
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, .L88
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L86
	ldr	r3, .L88+8
	ldr	r2, [r3]
	ldr	r1, [fp, #-36]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L88+8
	ldr	r1, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L88+8
	ldr	r2, [r3]
	ldr	r1, [fp, #-36]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
.L86:
	ldr	r3, .L88+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-24]
	bl	AddLineToEdit
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L85:
	ldr	r3, .L88
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	cmp	r2, r3
	blt	.L87
.L84:
	mov	r0, #114
	bl	GetStateEdit
	str	r0, [fp, #-16]
	ldr	r3, .L88
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r2, r2, r3
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-48]
	mov	r1, #100
	ldr	r0, [fp, #-16]
	bl	SetupEdit
	ldr	r3, .L88
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	mov	r0, r3
	bl	SetTextLength
	ldr	r3, .L88+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L88+4
	str	r3, [r2]
	ldr	r3, .L88+12
	mov	r2, #0
	str	r2, [r3]
.L75:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L89:
	.align	2
.L88:
	.word	t_len
	.word	currentState
	.word	text
	.word	rm_state
	.size	OnDelete, .-OnDelete
	.align	2
	.global	OnUndo
	.syntax unified
	.arm
	.fpu softvfp
	.type	OnUndo, %function
OnUndo:
	@ 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]
	ldr	r3, .L108
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, .L108+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L94
	ldr	r3, .L108+8
	ldr	r3, [r3]
	ldr	r2, .L108+12
	ldr	r2, [r2]
	lsl	r2, r2, #2
	mov	r1, r2
	mov	r0, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L108+8
	str	r3, [r2]
	ldr	r3, .L108+16
	ldr	r3, [r3]
	ldr	r2, .L108+20
	str	r3, [r2]
	ldr	r3, .L108+4
	ldr	r3, [r3]
	ldr	r2, .L108+24
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L92
.L93:
	ldr	r3, .L108+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L108+8
	ldr	r1, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L92:
	ldr	r3, .L108+20
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	blt	.L93
	b	.L94
.L106:
	ldr	r3, .L108+32
	ldr	r2, [r3]
	ldr	r3, .L108+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #122
	beq	.L95
	cmp	r3, #122
	bgt	.L96
	cmp	r3, #99
	beq	.L95
	cmp	r3, #100
	beq	.L97
	b	.L96
.L95:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	SetTextLength
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L98
.L99:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r0, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	bl	SetLine
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L98:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L99
	b	.L96
.L97:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	SetTextLength
	ldr	r3, .L108+16
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	b	.L100
.L104:
	ldr	r3, .L108+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	sub	r2, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	sub	r3, r3, #1
	cmp	r2, r3
	bne	.L101
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-12]
	sub	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	SetLine
	b	.L102
.L101:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-12]
	sub	r3, r2, r3
	cmp	r3, #0
	ble	.L103
	ldr	r3, .L108+28
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r1, [fp, #-12]
	sub	r3, r1, r3
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L108+28
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #-1073741823
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
.L103:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L102
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, [fp, #-12]
	sub	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	SetLine
.L102:
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L100:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	bge	.L104
	nop
.L96:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, .L108+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L108+4
	str	r3, [r2]
.L94:
	ldr	r3, .L108+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L107
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L106
.L107:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L109:
	.align	2
.L108:
	.word	stateCount
	.word	currentState
	.word	rightMost
	.word	t_cap
	.word	t_len
	.word	rm_len
	.word	rm_state
	.word	text
	.word	history
	.size	OnUndo, .-OnUndo
	.align	2
	.global	OnRedo
	.syntax unified
	.arm
	.fpu softvfp
	.type	OnRedo, %function
OnRedo:
	@ 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]
	b	.L111
.L121:
	ldr	r3, .L123
	ldr	r2, [r3]
	ldr	r3, .L123+4
	ldr	r3, [r3]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #99
	beq	.L112
	cmp	r3, #100
	beq	.L113
	b	.L114
.L112:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	SetTextLength
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L115
.L116:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r0, r2, r3
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r1, r3
	bl	SetLine
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L115:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L116
	b	.L114
.L113:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L117
.L119:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	add	r2, r2, r3
	ldr	r3, .L123+8
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L118
	ldr	r3, .L123+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L123+12
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, .L123+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-12]
	add	r3, r1, r3
	lsl	r3, r3, #2
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3]
.L118:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L117:
	ldr	r3, .L123+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L119
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	SetTextLength
	nop
.L114:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	ldr	r3, .L123+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L123+4
	str	r3, [r2]
.L111:
	ldr	r3, .L123+16
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, .L123+4
	ldr	r3, [r3]
	cmp	r2, r3
	ble	.L122
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bgt	.L121
.L122:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L124:
	.align	2
.L123:
	.word	history
	.word	currentState
	.word	t_len
	.word	text
	.word	stateCount
	.size	OnRedo, .-OnRedo
	.align	2
	.global	QueueUndos
	.syntax unified
	.arm
	.fpu softvfp
	.type	QueueUndos, %function
QueueUndos:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L128
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, .L128
	str	r3, [r2]
	ldr	r3, .L128+4
	ldr	r2, [r3]
	ldr	r3, .L128
	ldr	r3, [r3]
	add	r3, r2, r3
	cmp	r3, #0
	bge	.L127
	ldr	r3, .L128+4
	ldr	r3, [r3]
	rsb	r3, r3, #0
	ldr	r2, .L128
	str	r3, [r2]
.L127:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L129:
	.align	2
.L128:
	.word	actions_to_restore
	.word	currentState
	.size	QueueUndos, .-QueueUndos
	.align	2
	.global	QueueRedos
	.syntax unified
	.arm
	.fpu softvfp
	.type	QueueRedos, %function
QueueRedos:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L133
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, .L133
	str	r3, [r2]
	ldr	r3, .L133
	ldr	r2, [r3]
	ldr	r3, .L133+4
	ldr	r3, [r3]
	add	r2, r2, r3
	ldr	r3, .L133+8
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L132
	ldr	r3, .L133+8
	ldr	r3, [r3]
	sub	r2, r3, #1
	ldr	r3, .L133+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L133
	str	r3, [r2]
.L132:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L134:
	.align	2
.L133:
	.word	actions_to_restore
	.word	currentState
	.word	stateCount
	.size	QueueRedos, .-QueueRedos
	.align	2
	.global	RestoreEdits
	.syntax unified
	.arm
	.fpu softvfp
	.type	RestoreEdits, %function
RestoreEdits:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L141
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L140
	bl	TryRestoreState
	ldr	r3, .L141
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L138
	ldr	r3, .L141
	ldr	r3, [r3]
	mov	r0, r3
	bl	OnRedo
	b	.L139
.L138:
	ldr	r3, .L141
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L139
	ldr	r3, .L141
	ldr	r3, [r3]
	rsb	r3, r3, #0
	mov	r0, r3
	bl	OnUndo
.L139:
	ldr	r3, .L141
	mov	r2, #0
	str	r2, [r3]
	pop	{fp, pc}
.L140:
	nop
	pop	{fp, pc}
.L142:
	.align	2
.L141:
	.word	actions_to_restore
	.size	RestoreEdits, .-RestoreEdits
	.align	2
	.global	TryRestoreState
	.syntax unified
	.arm
	.fpu softvfp
	.type	TryRestoreState, %function
TryRestoreState:
	@ 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, .L149
	ldr	r2, [r3]
	ldr	r3, .L149+4
	ldr	r3, [r3]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, .L149+4
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L144
	ldr	r3, .L149+4
	ldr	r3, [r3]
	rsb	r3, r3, #0
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L144
	ldr	r2, .L149+4
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	mov	r0, #0
	bl	SetTextLength
	ldr	r3, .L149
	mov	r2, #0
	str	r2, [r3]
	b	.L148
.L144:
	ldr	r3, .L149+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L148
	ldr	r3, .L149+8
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L148
	ldr	r3, .L149+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	sub	r3, r2, r3
	eor	r2, r3, r3, asr #31
	sub	r2, r2, r3, asr #31
	ldr	r3, .L149+4
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L148
	ldr	r3, .L149+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	SetTextLength
	ldr	r3, .L149+8
	ldr	r3, [r3]
	ldr	r2, .L149
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L146
.L147:
	ldr	r3, .L149+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r2, r2, r3
	ldr	r3, .L149+20
	ldr	r1, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r2, [r2]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L146:
	ldr	r3, .L149+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L147
	ldr	r3, .L149+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	sub	r3, r2, r3
	ldr	r2, .L149+4
	str	r3, [r2]
.L148:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L150:
	.align	2
.L149:
	.word	currentState
	.word	actions_to_restore
	.word	rm_state
	.word	rm_len
	.word	rightMost
	.word	text
	.size	TryRestoreState, .-TryRestoreState
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
