// File: /workspace/github_cpp_makefile_star2_O3/andrakis[P]alisp/repl.cpp
// Function: ALisp::REPL::REPL(ALisp::Cell)
void REPL(Cell env) {
			State state;
			Eval::EvalType evaluator = Eval::Simple::eval;
			ListType history;
			last_env = env.env();

			check_linenoise();

			invokeCommand("help", state);
			while (state.exit == false) {
				const char *prompt = state.prompt.c_str();
				if (state.continuation)
					prompt = state.prompt_continuation.c_str();
				char *line_result = linenoise(prompt);
				if (line_result == NULL)
					break;

				StringType line(line_result);
				// No longer need string allocated
				free(line_result);

				if (state.continuation) {
					line = state.continued_line + line;
					state.continuation = false;
				}
				// Check if line is a repl command
				Command *cmd = getCommand(line);
				if (cmd != nullptr) {
					cmd->modifier(state);
					continue;
				}

				// Attempt to parse
				Cell read;
				try {
					read = Parser::read(line);
				} catch (ParserException const &pe) {
					state.continuation = true;
					state.continued_line = line;
					continue;
				}

				// Parsed successfully, save and execute
				linenoiseHistoryAdd(line.c_str());

				// Execute
				try {
					Cell result = evaluator(read, env);
					history.push_back(result);
					std::cout << result.repr() << std::endl;
				} catch (KeyNotFoundException &e) {
					std::cerr << "Key not found: " << e.what() << std::endl;
				} catch (Exception &e) {
					std::cerr << "Exception: " << e.what() << std::endl;
				}
			}

			last_env.reset();
		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x19ae2
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x38(%rsp), %rdi
movq %rbx, 0x58(%rsp)
movq %rbx, %rsi
callq 0xa552
leaq 0x40(%rsp), %r14
movq -0x8(%r14), %rax
movq %rax, 0x15300(%rip)     # 0x2e8a0
leaq 0x15301(%rip), %rdi     # 0x2e8a8
movq %r14, %rsi
callq 0x19c52
movq (%r14), %rdi
testq %rdi, %rdi
je 0x195bc
callq 0xac0e
callq 0x194f6
leaq 0x70(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x6cf9(%rip), %rsi      # 0x202ca
leaq 0x6cf6(%rip), %rdx      # 0x202ce
leaq 0x60(%rsp), %rdi
callq 0xb160
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1919b
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1960b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7330
cmpb $0x0, 0xa0(%rsp)
je 0x196a7
leaq 0x15280(%rip), %rdi     # 0x2e8a0
callq 0x19bc2
leaq 0x80(%rsp), %rdi
callq 0xaa3a
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19653
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x7330
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19674
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x7330
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19695
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x7330
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rsp), %rbp
leaq 0x118(%rsp), %rbx
leaq 0x38(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x108(%rsp), %r13
movzbl 0xa1(%rsp), %eax
shll $0x5, %eax
movq 0xa8(%rsp,%rax), %rdi
callq 0x13122
movq %rax, %r14
testq %rax, %rax
je 0x19619
movq %rbp, 0x38(%rsp)
movq %r14, %rdi
callq 0x7180
movq %r14, %rdx
addq %rax, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xb160
movq %r14, %rdi
callq 0x7410
cmpb $0x1, 0xa1(%rsp)
jne 0x1975c
movq %r12, %rdi
leaq 0xe8(%rsp), %rsi
movq %r15, %rdx
callq 0x19b68
movq %r15, %rdi
movq %r12, %rsi
callq 0x7430
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x19754
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7330
movb $0x0, 0xa1(%rsp)
movq %rbx, 0x108(%rsp)
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xb0ca
movq %r13, %rdi
callq 0x1914b
movq %rax, %r14
movq 0x108(%rsp), %rdi
cmpq %rbx, %rdi
je 0x197a1
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x7330
testq %r14, %r14
je 0x197b7
leaq 0xa0(%rsp), %rdi
callq *0x20(%r14)
jmp 0x198f1
movq $0x0, 0x8(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x18531
movq 0x10(%rsp), %rax
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movq %rax, 0x8(%rsp)
testq %rdi, %rdi
je 0x197fe
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x197fe
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x38(%rsp), %rdi
callq 0x12eae
leaq 0x30(%rsp), %r14
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x15588
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0xd348
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x1984e
movq (%rsi), %rax
movq %r12, %rdi
callq *0x38(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
jmp 0x1987f
leaq 0x20(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movabsq $0x5f7274705f6f6e3c, %rax # imm = 0x5F7274705F6F6E3C
movq %rax, (%rsi)
movl $0x3e666572, 0x8(%rsi)  # imm = 0x3E666572
movq $0xc, 0x18(%rsp)
movb $0x0, 0x2c(%rsp)
movl $0xc, %edx
movq 0x14742(%rip), %rdi     # 0x2dfc8
callq 0x73d0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x72e0
movsbl %al, %esi
movq %r14, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7240
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x198d1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7330
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x198e1
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x198f1
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x19908
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7330
cmpb $0x0, 0xa0(%rsp)
je 0x196c6
jmp 0x19619
jmp 0x1991d
movq %rdx, (%rsp)
movq %rax, %r14
jmp 0x19988
movq %rdx, (%rsp)
movq %rax, %r14
jmp 0x19998
movq %rax, %r14
cmpl $0x1, %edx
jne 0x19a8b
movq %r14, %rdi
callq 0x7170
movb $0x1, 0xa1(%rsp)
leaq 0xe8(%rsp), %rdi
movq %r15, %rsi
callq 0x71f0
callq 0x75e0
jmp 0x198e1
movq %rdx, (%rsp)
movq %rax, %r14
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x19988
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7330
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x19998
movq (%rdi), %rax
callq *0x10(%rax)
cmpl $0x3, (%rsp)
jne 0x199eb
movq %r14, %rdi
callq 0x7170
movq %rax, %r14
movl $0xf, %edx
movq 0x1463b(%rip), %rdi     # 0x2dff0
leaq 0x8003(%rip), %rsi      # 0x219bf
callq 0x73d0
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq 0x1461f(%rip), %rdi     # 0x2dff0
movq %rax, %rsi
callq 0x72f0
movq %rax, %rdi
callq 0x71a0
callq 0x75e0
jmp 0x198e1
cmpl $0x2, (%rsp)
jne 0x19a8b
movq %r14, %rdi
callq 0x7170
movq %rax, %r14
movl $0xb, %edx
movq 0x145e4(%rip), %rdi     # 0x2dff0
leaq 0x6895(%rip), %rsi      # 0x202a8
callq 0x73d0
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movq 0x145c8(%rip), %rdi     # 0x2dff0
movq %rax, %rsi
callq 0x72f0
movq %rax, %rdi
callq 0x71a0
callq 0x75e0
jmp 0x198e1
jmp 0x19a88
movq %rax, %r14
callq 0x75e0
jmp 0x19a8b
jmp 0x19a88
movq %rax, %r14
callq 0x75e0
jmp 0x19a8b
jmp 0x19a88
movq %rax, %r14
callq 0x75e0
jmp 0x19a8b
movq %rax, %rdi
callq 0xaa2f
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x19ac0
movq 0x70(%rsp), %rsi
jmp 0x19ab8
jmp 0x19aa1
jmp 0x19aa1
jmp 0x19aa1
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x19aa9
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x19aa9
jmp 0x19aa6
jmp 0x19aa1
movq %rax, %r14
jmp 0x19ac0
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x19ac0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7330
leaq 0x80(%rsp), %rdi
callq 0xaa3a
leaq 0xa0(%rsp), %rdi
callq 0x19c02
movq %r14, %rdi
callq 0x7630