// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a2e6
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x38(%rsp), %rdi
movq %rbx, 0x58(%rsp)
movq %rbx, %rsi
callq 0xa65a
leaq 0x40(%rsp), %r14
movq -0x8(%r14), %rax
movq %rax, 0x15ded(%rip)     # 0x2fb80
leaq 0x15dee(%rip), %rdi     # 0x2fb88
movq %r14, %rsi
callq 0x1a456
movq (%r14), %rdi
testq %rdi, %rdi
je 0x19daf
callq 0xad5c
callq 0x19ce9
leaq 0x70(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x7506(%rip), %rsi      # 0x212ca
leaq 0x7503(%rip), %rdx      # 0x212ce
leaq 0x60(%rsp), %rdi
callq 0xb2e0
leaq 0x60(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1997b
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x19dfe
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x7320
cmpb $0x0, 0xa0(%rsp)
je 0x19e9a
leaq 0x15d6d(%rip), %rdi     # 0x2fb80
callq 0x1a3c6
leaq 0x80(%rsp), %rdi
callq 0xab8e
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19e46
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x7320
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19e67
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x7320
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19e88
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x7320
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x48(%rsp), %rbx
leaq 0x118(%rsp), %r12
leaq 0x38(%rsp), %r15
leaq 0x108(%rsp), %r13
movzbl 0xa1(%rsp), %eax
shll $0x5, %eax
movq 0xa8(%rsp,%rax), %rdi
callq 0x1369d
movq %rax, %r14
testq %rax, %rax
je 0x1a0f7
movq %rbx, 0x38(%rsp)
movq %r14, %rdi
callq 0x7180
leaq (%rax,%r14), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xb2e0
movq %r14, %rdi
callq 0x7400
cmpb $0x1, 0xa1(%rsp)
jne 0x19f4d
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
leaq 0xe8(%rsp), %rsi
movq %r15, %rdx
callq 0x1a36c
movq %r15, %rdi
movq %rbp, %rsi
callq 0x7420
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x19f45
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7320
movb $0x0, 0xa1(%rsp)
movq %r12, 0x108(%rsp)
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0xb250
movq %r13, %rdi
callq 0x1992b
movq %rax, %rbp
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x19f92
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x7320
testq %rbp, %rbp
je 0x19fa7
leaq 0xa0(%rsp), %rdi
callq *0x20(%rbp)
jmp 0x1a0e0
movq $0x0, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x18d1f
movq 0x10(%rsp), %rax
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movq %rax, 0x8(%rsp)
testq %rdi, %rdi
je 0x19fe0
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x19ff0
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x38(%rsp), %rdi
callq 0x13405
leaq 0x30(%rsp), %rbp
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x15aac
leaq 0x80(%rsp), %rdi
movq %rbp, %rsi
callq 0xd58c
movq 0x30(%rsp), %rsi
testq %rsi, %rsi
je 0x1a038
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *0x38(%rax)
jmp 0x1a064
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movabsq $0x5f7274705f6f6e3c, %rcx # imm = 0x5F7274705F6F6E3C
movq %rcx, (%rax)
movl $0x3e666572, 0x8(%rax)  # imm = 0x3E666572
movq $0xc, 0x18(%rsp)
movb $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x14f53(%rip), %rdi     # 0x2efc8
callq 0x73c0
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x72d0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7040
movq %rax, %rdi
callq 0x7230
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1a0c0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7320
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1a0d0
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1a0e0
movq (%rdi), %rax
callq *0x10(%rax)
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a0f7
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7320
testq %r14, %r14
je 0x19e0c
cmpb $0x0, 0xa0(%rsp)
je 0x19eb4
jmp 0x19e0c
jmp 0x1a115
movq %rdx, (%rsp)
movq %rax, %rbp
jmp 0x1a180
movq %rdx, (%rsp)
movq %rax, %rbp
jmp 0x1a199
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x1a28e
movq %rbp, %rdi
callq 0x7170
movb $0x1, 0xa1(%rsp)
leaq 0xe8(%rsp), %rdi
movq %r15, %rsi
callq 0x71f0
callq 0x75d0
jmp 0x1a0d0
movq %rdx, (%rsp)
movq %rax, %rbp
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1a180
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x7320
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1a190
movq (%rdi), %rax
callq *0x10(%rax)
movq $0x0, 0x30(%rsp)
cmpl $0x3, (%rsp)
jne 0x1a1ed
movq %rbp, %rdi
callq 0x7170
movq %rax, %rbp
movl $0xf, %edx
movq 0x14e3a(%rip), %rdi     # 0x2eff0
leaq 0x87d2(%rip), %rsi      # 0x2298f
callq 0x73c0
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movq 0x14e1d(%rip), %rdi     # 0x2eff0
movq %rax, %rsi
callq 0x72e0
movq %rax, %rdi
callq 0x71a0
callq 0x75d0
jmp 0x1a0d0
cmpl $0x2, (%rsp)
jne 0x1a28e
movq %rbp, %rdi
callq 0x7170
movq %rax, %rbp
movl $0xb, %edx
movq 0x14de2(%rip), %rdi     # 0x2eff0
leaq 0x7093(%rip), %rsi      # 0x212a8
callq 0x73c0
movq (%rbp), %rax
movq %rbp, %rdi
callq *0x10(%rax)
movq 0x14dc5(%rip), %rdi     # 0x2eff0
movq %rax, %rsi
callq 0x72e0
movq %rax, %rdi
callq 0x71a0
callq 0x75d0
jmp 0x1a0d0
jmp 0x1a28b
movq %rax, %rbp
callq 0x75d0
jmp 0x1a28e
jmp 0x1a28b
movq %rax, %rbp
callq 0x75d0
jmp 0x1a28e
jmp 0x1a28b
movq %rax, %rbp
callq 0x75d0
jmp 0x1a28e
movq %rax, %rdi
callq 0xab83
movq %rax, %rbp
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a2c3
movq 0x70(%rsp), %rsi
jmp 0x1a2bb
jmp 0x1a2a4
jmp 0x1a2a4
jmp 0x1a2a4
movq %rax, %rbp
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1a2ac
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x1a2ac
jmp 0x1a2a9
jmp 0x1a2a4
movq %rax, %rbp
jmp 0x1a2c3
movq %rax, %rbp
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1a2c3
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x7320
leaq 0x80(%rsp), %rdi
callq 0xab8e
leaq 0xa0(%rsp), %rdi
callq 0x1a406
movq %rbp, %rdi
callq 0x7620
nop