// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/Main.cpp
// Function: main
int main(int argc, char const *argv[])
{
	auto parsed = parseOptions(argc, argv);
	auto options = parsed.first;
	if (options["version"] == "true")
	{
		std::cout << _ROSSA_VERSION_LONG_ << "\n";
		return 0;
	}
	parser_t wrapper(parsed.second);

	printc("", RESET_TEXT);
	bool tree = options["tree"] == "true";

	if (options["file"] == "")
	{
		std::cout << _ROSSA_INTERPRETER_START_ << "\n";

		if (options["standard"] == "true")
		{
			try
			{
				wrapper.runCode(wrapper.compileCode(KEYWORD_LOAD " \"standard\";", std::filesystem::current_path() / "*"), false);
				std::cout << _STANDARD_LIBRARY_LOADED_ << "\n";
			}
			catch (const rossa_error_t &e)
			{
				std::cout << _STANDARD_LIBRARY_LOAD_FAIL_ << std::string(e.what()) << "\n";
			}
		}
		else
		{
			std::cout << _OPTION_NO_STD_ << "\n";
		}

		std::string code;
		while (true)
		{
			std::cout << "> ";
			std::getline(std::cin, code);
			try
			{
				auto comp = wrapper.compileCode(code, std::filesystem::current_path() / "*");
				auto value = wrapper.runCode(std::move(comp), tree);
				trace_t stack_trace;
				if (value.getValueType() == value_type_enum::ARRAY)
				{
					if (value.vectorSize() != 1)
					{
						int i = 0;
						for (auto &e : value.getVector(NULL, stack_trace))
						{
							printc("\t(" + std::to_string(i) + ")\t", CYAN_TEXT);
#ifdef DEBUG
							std::cout << e.toCodeString() << "\n";
#else
							std::cout << e.toString(NULL, stack_trace) << "\n";
#endif
							i++;
						}
					}
					else
					{
#ifdef DEBUG
						std::cout << "\t" << value.getVector(NULL, stack_trace)[0].toCodeString() << "\n";
#else
						std::cout << "\t" << value.getVector(NULL, stack_trace)[0].toString(NULL, stack_trace) << "\n";
#endif
					}
				}
			}
			catch (const rossa_error_t &e)
			{
				parser_t::printError(e);
			}
#ifdef DEBUG
	std::cout << "\t(SYMBOL COUNT: " << parser_t::symbol_count << ")\n";
	std::cout << "\t(OBJECT COUNT: " << parser_t::object_count << ")\n";
#endif
		}
	}
	else
	{
		std::ifstream file;
		file.open(options["file"]);
		if (!file.is_open())
		{
			std::cerr << _FAILURE_FILEPATH_ << options["file"] << "\n";
			return 1;
		}

		std::string content = "";
		std::string line;
		while (std::getline(file, line))
			content += line + "\n";

		try
		{
			if (options["standard"] == "true")
				content = (KEYWORD_LOAD " \"standard\";\n") + content;
			auto entry = wrapper.compileCode(content, std::filesystem::path(options["file"]));
			wrapper.runCode(entry, tree);
		}
		catch (const rossa_error_t &e)
		{
			parser_t::printError(e);
			return 1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movq %rsi, %rdx
movl %edi, %esi
leaq 0x360(%rsp), %rbx
movq %rbx, %rdi
callq 0x1c255
leaq 0xc8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1d5b4
leaq 0x5abf7(%rip), %rsi     # 0x76200
leaq 0x158(%rsp), %rdi
leaq 0xf8(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x1c7ae
leaq 0x5aa51(%rip), %rsi     # 0x7608b
movq %rax, %rdi
callq 0x1c7a0
movl %eax, %ebx
leaq 0x158(%rsp), %rdi
callq 0x101d0
testb %bl, %bl
je 0x1b67e
movq 0x9a92c(%rip), %rdi     # 0xb5f88
leaq 0x5aa2d(%rip), %rsi     # 0x76090
callq 0x103b0
xorl %ebx, %ebx
leaq 0x5c4ac(%rip), %rsi     # 0x77b1d
movq %rax, %rdi
callq 0x103b0
jmp 0x1ba31
leaq 0x390(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x1e040
leaq 0x5ab14(%rip), %rsi     # 0x761ae
leaq 0x158(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x1c814
leaq 0x8(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x158(%rsp), %rdi
callq 0x1c84f
leaq 0x158(%rsp), %rdi
callq 0x101d0
leaq 0x5ab0c(%rip), %rsi     # 0x761e4
leaq 0x158(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x1c7ae
leaq 0x5a985(%rip), %rsi     # 0x7608b
movq %rax, %rdi
callq 0x1c7a0
movl %eax, %ebx
leaq 0x158(%rsp), %rdi
callq 0x101d0
movb %bl, 0x7(%rsp)
leaq 0x5a9d6(%rip), %rsi     # 0x760fe
leaq 0x158(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x1c7ae
leaq 0x5aa58(%rip), %rsi     # 0x761ae
movq %rax, %rdi
callq 0x1c7a0
movl %eax, %ebx
leaq 0x158(%rsp), %rdi
callq 0x101d0
testb %bl, %bl
jne 0x1ba5f
leaq 0x158(%rsp), %rdi
callq 0x10480
leaq 0x5a975(%rip), %rsi     # 0x760fe
leaq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1c7ae
leaq 0x158(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x10350
leaq 0x8(%rsp), %rdi
callq 0x101d0
leaq 0x1d0(%rsp), %rdi
callq 0x100c0
testb %al, %al
je 0x1b870
leaq 0x5a9c8(%rip), %rsi     # 0x761ae
leaq 0x80(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1c814
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x158(%rsp), %rbx
leaq 0xa8(%rsp), %r14
leaq 0x5c2fa(%rip), %r15     # 0x77b1d
leaq 0x8(%rsp), %r12
leaq 0x80(%rsp), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0x10090
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x1b8dd
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1cb3b
movq %r13, %rdi
movq %r12, %rsi
callq 0x10790
movq %r12, %rdi
callq 0x101d0
jmp 0x1b830
movq 0x9a771(%rip), %rdi     # 0xb5fe8
leaq 0x5a931(%rip), %rsi     # 0x761af
callq 0x103b0
movq %rax, %rbx
leaq 0x5a871(%rip), %rsi     # 0x760fe
leaq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1c7ae
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10370
leaq 0x5c25a(%rip), %rsi     # 0x77b1d
movq %rax, %rdi
callq 0x103b0
leaq 0x8(%rsp), %rdi
callq 0x101d0
pushq $0x1
popq %rbx
jmp 0x1ba17
leaq 0x5a90d(%rip), %rsi     # 0x761f1
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1c7ae
leaq 0x5a77f(%rip), %rsi     # 0x7608b
movq %rax, %rdi
callq 0x1c7a0
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x101d0
testb %bl, %bl
je 0x1b95a
leaq 0x5a89f(%rip), %rsi     # 0x761ca
leaq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x1cb73
leaq 0x80(%rsp), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x104e0
movq %rbx, %rdi
callq 0x101d0
leaq 0x5a79d(%rip), %rsi     # 0x760fe
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x1c7ae
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rdx
movq %rax, %rsi
callq 0x1cbea
leaq 0x68(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x80(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x1e30e
leaq 0x8(%rsp), %rdi
callq 0x1ca5c
leaq 0x30(%rsp), %rdi
callq 0x101d0
leaq 0x138(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x7(%rsp), %rcx
callq 0x1e3fe
leaq 0x138(%rsp), %rdi
callq 0x39102
leaq 0x70(%rsp), %rdi
callq 0x1d786
xorl %ebx, %ebx
leaq 0xa8(%rsp), %rdi
callq 0x101d0
leaq 0x80(%rsp), %rdi
callq 0x101d0
leaq 0x158(%rsp), %rdi
callq 0x100f0
leaq 0xf8(%rsp), %rdi
callq 0x1ef1e
leaq 0xc8(%rsp), %rdi
callq 0x1cf10
leaq 0x360(%rsp), %rdi
callq 0x1cc52
movl %ebx, %eax
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x9a522(%rip), %rdi     # 0xb5f88
leaq 0x5a696(%rip), %rsi     # 0x76103
callq 0x103b0
leaq 0x5c0a4(%rip), %rsi     # 0x77b1d
movq %rax, %rdi
callq 0x103b0
leaq 0x5a769(%rip), %rsi     # 0x761f1
leaq 0x158(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x1c814
leaq 0xc8(%rsp), %rdi
leaq 0x158(%rsp), %rsi
callq 0x1c7ae
leaq 0x5a5d5(%rip), %rsi     # 0x7608b
movq %rax, %rdi
callq 0x1c7a0
movl %eax, %ebx
leaq 0x158(%rsp), %rdi
callq 0x101d0
testb %bl, %bl
je 0x1bbd9
leaq 0x5a647(%rip), %rsi     # 0x76123
leaq 0xa8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x1c814
leaq 0x8(%rsp), %rdi
callq 0x105f0
leaq 0x5a528(%rip), %rsi     # 0x76027
leaq 0x80(%rsp), %rdi
pushq $0x2
popq %rdx
callq 0x1c9f0
leaq 0x158(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x1c9b7
leaq 0x30(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
leaq 0x158(%rsp), %rcx
callq 0x1e30e
leaq 0x58(%rsp), %rcx
movb $0x0, (%rcx)
leaq 0x148(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x1e3fe
leaq 0x148(%rsp), %rdi
callq 0x39102
leaq 0x38(%rsp), %rdi
callq 0x1d786
leaq 0x158(%rsp), %rdi
callq 0x1ca5c
leaq 0x80(%rsp), %rdi
callq 0x1ca5c
leaq 0x8(%rsp), %rdi
callq 0x1ca5c
leaq 0xa8(%rsp), %rdi
callq 0x101d0
movq 0x9a3cc(%rip), %rdi     # 0xb5f88
leaq 0x5a571(%rip), %rsi     # 0x76134
callq 0x103b0
leaq 0x5bf4e(%rip), %rsi     # 0x77b1d
movq %rax, %rdi
callq 0x103b0
jmp 0x1bbfb
movq 0x9a3a8(%rip), %rdi     # 0xb5f88
leaq 0x5a587(%rip), %rsi     # 0x7616e
callq 0x103b0
leaq 0x5bf2a(%rip), %rsi     # 0x77b1d
movq %rax, %rdi
callq 0x103b0
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x8(%rsp), %rbx
leaq 0x80(%rsp), %r12
leaq 0x158(%rsp), %r14
movq 0x9a35d(%rip), %rdi     # 0xb5f88
leaq 0x5a574(%rip), %rsi     # 0x761a6
callq 0x103b0
movq 0x9a38a(%rip), %rdi     # 0xb5fc8
leaq 0xa8(%rsp), %rsi
callq 0x10090
movq %rbx, %rdi
callq 0x105f0
movq %r12, %rdi
leaq 0x5a3ca(%rip), %rsi     # 0x76027
pushq $0x2
popq %rdx
callq 0x1c9f0
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1c9b7
leaq 0x68(%rsp), %r15
movq %r15, %rdi
leaq 0xf8(%rsp), %r13
movq %r13, %rsi
leaq 0xa8(%rsp), %rdx
movq %r14, %rcx
callq 0x1e30e
movq %r14, %rdi
callq 0x1ca5c
movq %r12, %rdi
callq 0x1ca5c
movq %rbx, %rdi
callq 0x1ca5c
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
leaq 0x7(%rsp), %rcx
callq 0x1e3fe
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movq %rbp, %rdi
callq 0x39ca6
cmpl $-0x5, %eax
jne 0x1bd4d
leaq 0x58(%rsp), %rdi
callq 0x3a2fc
cmpq $0x1, %rax
jne 0x1bd70
movq 0x9a290(%rip), %rdi     # 0xb5f88
leaq 0x5a4ae(%rip), %rsi     # 0x761ad
callq 0x103b0
movq %rax, %r15
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
leaq 0x30(%rsp), %r13
movq %r13, %rdx
callq 0x39a02
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
movq %r13, %rcx
callq 0x3a326
movq %r15, %rdi
movq %r14, %rsi
callq 0x10370
movq %rax, %rdi
leaq 0x5bddd(%rip), %rsi     # 0x77b1d
callq 0x103b0
movq %r14, %rdi
callq 0x101d0
leaq 0x30(%rsp), %rdi
callq 0x1cb1a
leaq 0x58(%rsp), %rdi
callq 0x39102
leaq 0x70(%rsp), %rdi
callq 0x1d786
jmp 0x1bc24
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
leaq 0x30(%rsp), %rdx
callq 0x39a02
movq (%rax), %r13
movq 0x8(%rax), %rbp
xorl %r15d, %r15d
cmpq %rbp, %r13
je 0x1bd4d
movq %r12, %rdi
movl %r15d, %esi
callq 0x1cac0
movq %rbx, %rdi
leaq 0x5a404(%rip), %rsi     # 0x761a9
movq %r12, %rdx
callq 0x1ca9c
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x5a3f2(%rip), %rdx     # 0x761ac
callq 0x1ca7d
movl $0x24, 0x7c(%rsp)
movq %r14, %rdi
leaq 0x7c(%rsp), %rsi
callq 0x1c84f
movq %r14, %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x101d0
movq %r12, %rdi
callq 0x101d0
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
leaq 0x30(%rsp), %rcx
callq 0x3a326
movq 0x9a183(%rip), %rdi     # 0xb5f88
movq %r14, %rsi
callq 0x10370
movq %rax, %rdi
leaq 0x5bd06(%rip), %rsi     # 0x77b1d
callq 0x103b0
movq %r14, %rdi
callq 0x101d0
incl %r15d
addq $0x10, %r13
jmp 0x1bd8b
jmp 0x1be8d
jmp 0x1beb0
jmp 0x1be8d
movq %rdx, %r13
movq %rax, %r15
jmp 0x1bed2
movq %rdx, %r13
movq %rax, %r15
movq %r14, %rdi
callq 0x1ca5c
jmp 0x1be57
movq %rdx, %r13
movq %rax, %r15
movq %r12, %rdi
callq 0x1ca5c
jmp 0x1be67
movq %rdx, %r13
movq %rax, %r15
movq %rbx, %rdi
callq 0x1ca5c
jmp 0x1bedc
movq %rdx, %r13
movq %rax, %r15
jmp 0x1bedc
jmp 0x1be8d
movq %rdx, %r13
movq %rax, %r15
movq %r14, %rdi
callq 0x101d0
jmp 0x1bea3
jmp 0x1be8d
movq %rdx, %r13
movq %rax, %r15
jmp 0x1bebe
movq %rdx, %r13
movq %rax, %r15
jmp 0x1beab
movq %rdx, %r13
movq %rax, %r15
movq %rbx, %rdi
callq 0x101d0
movq %r12, %rdi
jmp 0x1beb9
movq %rdx, %r13
movq %rax, %r15
movq %r14, %rdi
callq 0x101d0
leaq 0x30(%rsp), %rdi
callq 0x1cb1a
leaq 0x58(%rsp), %rdi
callq 0x39102
leaq 0x70(%rsp), %rdi
callq 0x1d786
cmpl $0x1, %r13d
jne 0x1bf74
movq %r15, %rdi
callq 0x10190
movq %rax, %rdi
callq 0x1e604
callq 0x10680
jmp 0x1bc24
jmp 0x1bf71
movq %rax, %r15
callq 0x10680
jmp 0x1bf74
jmp 0x1bf81
movq %rdx, %rbx
movq %rax, %r15
leaq 0x38(%rsp), %rdi
callq 0x1d786
jmp 0x1bf26
movq %rdx, %rbx
movq %rax, %r15
leaq 0x158(%rsp), %rdi
callq 0x1ca5c
jmp 0x1bf3b
movq %rdx, %rbx
movq %rax, %r15
leaq 0x80(%rsp), %rdi
callq 0x1ca5c
jmp 0x1bf50
movq %rdx, %rbx
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x1ca5c
jmp 0x1bf62
movq %rdx, %rbx
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
callq 0x101d0
jmp 0x1bf87
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
jmp 0x1c0de
movq %rdx, %rbx
movq %rax, %r15
cmpl $0x1, %ebx
jne 0x1c151
movq %r15, %rdi
callq 0x10190
movq %rax, %r14
movq 0x99fe6(%rip), %rdi     # 0xb5f88
leaq 0x5a1a3(%rip), %rsi     # 0x7614c
callq 0x103b0
movq %rax, %rbx
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
leaq 0x158(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rax, %rsi
callq 0x1c814
leaq 0x158(%rsp), %rsi
movq %rbx, %rdi
callq 0x10370
leaq 0x5bb37(%rip), %rsi     # 0x77b1d
movq %rax, %rdi
callq 0x103b0
leaq 0x158(%rsp), %rdi
callq 0x101d0
callq 0x10680
jmp 0x1bbfb
jmp 0x1c0e5
movq %rax, %r15
leaq 0x158(%rsp), %rdi
callq 0x101d0
jmp 0x1c021
jmp 0x1c01e
movq %rax, %r15
callq 0x10680
jmp 0x1c151
jmp 0x1c0d3
jmp 0x1c0e5
jmp 0x1c06a
movq %rdx, %rbx
movq %rax, %r15
leaq 0x70(%rsp), %rdi
callq 0x1d786
jmp 0x1c08a
movq %rdx, %rbx
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x1ca5c
jmp 0x1c080
jmp 0x1c06a
movq %rdx, %rbx
movq %rax, %r15
leaq 0x8(%rsp), %rdi
jmp 0x1c085
movq %rdx, %rbx
movq %rax, %r15
jmp 0x1c08a
jmp 0x1c0c4
jmp 0x1c0c4
jmp 0x1c0c4
jmp 0x1c0e5
movq %rdx, %rbx
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x101d0
cmpl $0x1, %ebx
jne 0x1c12a
movq %r15, %rdi
callq 0x10190
movq %rax, %rdi
callq 0x1e604
callq 0x10680
pushq $0x1
popq %rbx
jmp 0x1b9fd
jmp 0x1c127
movq %rax, %r15
callq 0x10680
jmp 0x1c12a
movq %rax, %rdi
callq 0x1ca72
movq %rax, %r15
jmp 0x1c144
jmp 0x1c0e5
jmp 0x1c0d3
jmp 0x1c0e5
jmp 0x1c0d3
jmp 0x1c0e5
movq %rax, %r15
leaq 0x158(%rsp), %rdi
callq 0x101d0
jmp 0x1c151
movq %rax, %r15
jmp 0x1c151
jmp 0x1c10c
jmp 0x1c0ee
movq %rax, %r15
leaq 0x8(%rsp), %rdi
jmp 0x1c13f
jmp 0x1c10c
movq %rax, %r15
leaq 0x158(%rsp), %rdi
callq 0x101d0
jmp 0x1c15e
movq %rax, %r15
jmp 0x1c15e
movq %rax, %r15
jmp 0x1c16b
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x101d0
jmp 0x1c12a
jmp 0x1c127
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
callq 0x101d0
leaq 0x80(%rsp), %rdi
callq 0x101d0
leaq 0x158(%rsp), %rdi
callq 0x100f0
leaq 0xf8(%rsp), %rdi
callq 0x1ef1e
leaq 0xc8(%rsp), %rdi
callq 0x1cf10
leaq 0x360(%rsp), %rdi
callq 0x1cc52
movq %r15, %rdi
callq 0x106f0