// File: andrakis[P]alisp/ALisp.cpp
// Function: main
int main(int argc, char **argv) {
	MainState.readFrom(argc, argv);

	ErrorCode error_code;
	switch (error_code = alisp_init()) {
		case ErrorCode::NONE:
			// All good
			break;
		default:
			std::cerr << "alisp_init() returned " << error_code << std::endl;
			return 1;
	}

	auto after_startup = Atoms::Count();
	if (MainState.debug)
		std::cerr << "(dbg) " << after_startup << " atoms created at startup." << std::endl;

	EnvironmentCell ec(std::make_shared<Environment>());
	Stdlib::add_stdlib(ec);
	// Set argv in our environment
	ec.env()->create(Atoms::Declare("argv"), ListCell(MainState.args));
	auto after_stdlib = Atoms::Count();
	if (MainState.debug)
		std::cerr << "(dbg) " << (after_stdlib - after_startup) << " atoms created at add_stdlib." << std::endl;

	if (MainState.help) {
		MainState.did_anything = true;
		show_help();
		return 1;
	} else if (MainState.tests) {
		MainState.did_anything = true;
		test();
	}
	
	if (MainState.has_file()) {
		MainState.did_anything = true;
		try {
			// Find the full path to the file
			Cell full_path = invoke_lib(file_path, StringCell(MainState.file));
			if (invoke_lib(file_exists, full_path) == False) {
				std::cerr << "Failed to open " << full_path << std::endl;
				return 2;
			}
			// Read the file
			Cell read = invoke_lib(file_read, full_path);
			// Parse the read file
			auto parse_call = Timekeeping::timeCallbackResult<Cell>([&read] () {
				return Parser::read(read.str());
			});
			Cell parsed = std::get<1>(parse_call);
			if (MainState.timing)
				std::cerr << "(tmg) Parsing took " << std::get<0>(parse_call) << Timekeeping::time_type() << std::endl;
			auto after_parsing = Atoms::Count();
			if (MainState.debug)
				std::cerr << "(dbg) " << (after_parsing - after_stdlib) << " atoms created during parsing." << std::endl;
			// Execute the code
			auto eval_call = Timekeeping::timeCallbackResult<Cell>([&parsed, &ec] () {
				return Eval::Simple::eval(parsed, ec);
			});
			if (MainState.timing)
				std::cerr << "(tmg) Execution took " << std::get<0>(eval_call) << Timekeeping::time_type() << std::endl;
			if (MainState.debug) {
				std::cerr << "(dbg) Final result: " << std::get<1>(eval_call) << std::endl;
				std::cerr << "(dbg) Final atom count: " << Atoms::Count() << std::endl;
			}
		} catch (Exception &e) {
			std::cerr << "Exception: " << e.what() << std::endl;
			return 3;
		} catch (...) {
			std::cerr << "Unknown error occurred, exception details may follow" << std::endl;
			throw;
		}
	}

	if (MainState.interactive) {
		MainState.did_anything = true;
		REPL::REPL(ec);
	}
	auto clear_time = Timekeeping::timeCall([&ec] () {
		// Clear environment
		ec.env()->clear();
		// Also clear REPL
		REPL::shutdown_repl();
	});
	if (MainState.timing)
		std::cerr << "(tmg) Cleanup took " << clear_time << Timekeeping::time_type() << std::endl;

	if (MainState.did_anything == false) {
		show_help();
		return 1;
	}

	if (debugger_attached()) {
		std::cerr << "(debugger attached) Press enter to exit";
		while (std::cin.get() != '\n') /* Nothing */;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x4d459(%rip), %rdi     # 0x57930
callq 0xb0e0
callq 0x26d60
movl %eax, -0x14(%rbp)
testl %eax, %eax
jne 0xa4ec
jmp 0xa4ea
jmp 0xa525
movq 0x4cafd(%rip), %rdi     # 0x56ff0
leaq 0x31c9a(%rip), %rsi     # 0x3c194
callq 0x83e0
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x8790
movq %rax, %rdi
movq 0x4ca7c(%rip), %rsi     # 0x56f90
callq 0x8460
movl $0x1, -0x4(%rbp)
jmp 0xb0ba
callq 0x178c0
movq %rax, -0x20(%rbp)
testb $0x1, 0x4d3fe(%rip)     # 0x57933
je 0xa574
movq 0x4cab2(%rip), %rdi     # 0x56ff0
leaq 0x31c66(%rip), %rsi     # 0x3c1ab
callq 0x83e0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x8120
movq %rax, %rdi
leaq 0x31c52(%rip), %rsi     # 0x3c1b2
callq 0x83e0
movq %rax, %rdi
movq 0x4ca21(%rip), %rsi     # 0x56f90
callq 0x8460
leaq -0x38(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0xb810
movq -0x1a8(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0xb880
jmp 0xa596
leaq -0x38(%rbp), %rdi
callq 0xb8e0
leaq -0x50(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xb900
jmp 0xa5ae
leaq -0x50(%rbp), %rdi
callq 0x316b0
jmp 0xa5b9
leaq -0x50(%rbp), %rdi
callq 0xb9d0
leaq -0x60(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xb9f0
jmp 0xa5d1
leaq -0x60(%rbp), %rdi
callq 0xba80
movq %rax, -0x1b0(%rbp)
leaq 0x31be5(%rip), %rsi     # 0x3c1cd
leaq -0x68(%rbp), %rdi
callq 0x17fe0
jmp 0xa5f3
leaq 0x4d35e(%rip), %rsi     # 0x57958
leaq -0x78(%rbp), %rdi
callq 0xbcf0
jmp 0xa605
leaq -0x70(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
leaq -0x78(%rbp), %rsi
callq 0xbd50
movq -0x1b0(%rbp), %rdi
movq -0x1b8(%rbp), %rdx
leaq -0x68(%rbp), %rsi
callq 0xbaa0
jmp 0xa632
leaq -0x70(%rbp), %rdi
callq 0xb9d0
leaq -0x78(%rbp), %rdi
callq 0xbd80
leaq -0x68(%rbp), %rdi
callq 0xb9d0
leaq -0x60(%rbp), %rdi
callq 0xb8e0
callq 0x178c0
movq %rax, -0x1c0(%rbp)
jmp 0xa664
movq -0x1c0(%rbp), %rax
movq %rax, -0x80(%rbp)
testb $0x1, 0x4d2bd(%rip)     # 0x57933
je 0xa784
movq 0x4c96d(%rip), %rdi     # 0x56ff0
leaq 0x31b21(%rip), %rsi     # 0x3c1ab
callq 0x83e0
movq %rax, -0x1c8(%rbp)
jmp 0xa698
movq -0x1c8(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x20(%rbp), %rax
subq %rax, %rsi
callq 0x8120
movq %rax, -0x1d0(%rbp)
jmp 0xa6b8
movq -0x1d0(%rbp), %rdi
leaq 0x31b0c(%rip), %rsi     # 0x3c1d2
callq 0x83e0
movq %rax, -0x1d8(%rbp)
jmp 0xa6d4
movq -0x1d8(%rbp), %rdi
movq 0x4c8ae(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xa6e9
jmp 0xa784
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xb8e0
jmp 0xb0c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xb0af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xb9d0
jmp 0xb0af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xa776
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xa76d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xb9d0
leaq -0x78(%rbp), %rdi
callq 0xbd80
leaq -0x68(%rbp), %rdi
callq 0xb9d0
leaq -0x60(%rbp), %rdi
callq 0xb8e0
jmp 0xb0af
testb $0x1, 0x4d1a9(%rip)     # 0x57934
je 0xa7b1
movb $0x1, 0x4d1dc(%rip)     # 0x57970
callq 0xa330
jmp 0xa79b
movl $0x1, -0x4(%rbp)
movl $0x1, -0x84(%rbp)
jmp 0xb0a4
testb $0x1, 0x4d17a(%rip)     # 0x57932
je 0xa7ca
movb $0x1, 0x4d1af(%rip)     # 0x57970
callq 0x3a6e0
jmp 0xa7c8
jmp 0xa7ca
jmp 0xa7cc
leaq 0x4d15d(%rip), %rdi     # 0x57930
callq 0xb4c0
movb %al, -0x1d9(%rbp)
jmp 0xa7e0
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0xa7ef
jmp 0xaf34
movb $0x1, 0x4d17a(%rip)     # 0x57970
leaq 0x4d13b(%rip), %rsi     # 0x57938
leaq -0xb8(%rbp), %rdi
callq 0x8200
jmp 0xa80b
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0xbe50
jmp 0xa820
leaq 0x2ae19(%rip), %rsi     # 0x35640
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0xbda0
jmp 0xa83c
leaq -0x98(%rbp), %rdi
callq 0xbeb0
leaq -0xb8(%rbp), %rdi
callq 0x8878
leaq -0xc8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xb900
jmp 0xa869
leaq 0x2ac90(%rip), %rsi     # 0x35500
leaq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rdx
callq 0xbed0
jmp 0xa885
leaq 0x4d2dc(%rip), %rsi     # 0x57b68
leaq -0xc0(%rbp), %rdi
callq 0xbf80
movb %al, -0x1da(%rbp)
jmp 0xa8a0
leaq -0xc0(%rbp), %rdi
callq 0xb9d0
leaq -0xc8(%rbp), %rdi
callq 0xb9d0
movb -0x1da(%rbp), %al
testb $0x1, %al
jne 0xa8c7
jmp 0xa9ba
movq 0x4c722(%rip), %rdi     # 0x56ff0
leaq 0x3191b(%rip), %rsi     # 0x3c1f0
callq 0x83e0
movq %rax, -0x1e8(%rbp)
jmp 0xa8e3
movq -0x1e8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x1c140
movq %rax, -0x1f0(%rbp)
jmp 0xa8ff
movq -0x1f0(%rbp), %rdi
movq 0x4c683(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xa914
movl $0x2, -0x4(%rbp)
movl $0x1, -0x84(%rbp)
jmp 0xadcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xae28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xa961
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xbeb0
leaq -0xb8(%rbp), %rdi
callq 0x8878
jmp 0xae28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xae1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xa9a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0xb9d0
leaq -0xc8(%rbp), %rdi
callq 0xb9d0
jmp 0xae1c
leaq -0xd8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0xb900
jmp 0xa9cf
leaq 0x2b04a(%rip), %rsi     # 0x35a20
leaq -0xd0(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0xbed0
jmp 0xa9eb
leaq -0xd8(%rbp), %rdi
callq 0xb9d0
leaq -0xd0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0xb4f0
jmp 0xaa1a
leaq -0xe8(%rbp), %rdi
callq 0xbff0
movq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0xb900
jmp 0xaa37
testb $0x1, 0x4cef3(%rip)     # 0x57931
je 0xab3e
movq 0x4c5a5(%rip), %rdi     # 0x56ff0
leaq 0x317ae(%rip), %rsi     # 0x3c200
callq 0x83e0
movq %rax, -0x1f8(%rbp)
jmp 0xaa60
leaq -0xe8(%rbp), %rdi
callq 0xc010
movq -0x1f8(%rbp), %rdi
movq (%rax), %rsi
callq 0x87f0
movq %rax, -0x200(%rbp)
jmp 0xaa84
leaq -0x118(%rbp), %rdi
callq 0xa110
jmp 0xaa92
movq -0x200(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x8390
movq %rax, -0x208(%rbp)
jmp 0xaaae
movq -0x208(%rbp), %rdi
movq 0x4c4d4(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xaac3
leaq -0x118(%rbp), %rdi
callq 0x8878
jmp 0xab3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xb9d0
jmp 0xae1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xae10
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xae04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xadf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x8878
jmp 0xadf8
callq 0x178c0
movq %rax, -0x210(%rbp)
jmp 0xab4c
movq -0x210(%rbp), %rax
movq %rax, -0x120(%rbp)
testb $0x1, 0x4cdd2(%rip)     # 0x57933
je 0xabd5
movq 0x4c486(%rip), %rdi     # 0x56ff0
leaq 0x3163a(%rip), %rsi     # 0x3c1ab
callq 0x83e0
movq %rax, -0x218(%rbp)
jmp 0xab7f
movq -0x218(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq -0x80(%rbp), %rax
subq %rax, %rsi
callq 0x8120
movq %rax, -0x220(%rbp)
jmp 0xaba2
movq -0x220(%rbp), %rdi
leaq 0x31664(%rip), %rsi     # 0x3c214
callq 0x83e0
movq %rax, -0x228(%rbp)
jmp 0xabbe
movq -0x228(%rbp), %rdi
movq 0x4c3c4(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xabd3
jmp 0xabd5
leaq -0xf8(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0xb5c0
jmp 0xac0a
testb $0x1, 0x4cd20(%rip)     # 0x57931
je 0xacd2
movq 0x4c3d2(%rip), %rdi     # 0x56ff0
leaq 0x3160e(%rip), %rsi     # 0x3c233
callq 0x83e0
movq %rax, -0x230(%rbp)
jmp 0xac33
leaq -0x130(%rbp), %rdi
callq 0xc010
movq -0x230(%rbp), %rdi
movq (%rax), %rsi
callq 0x87f0
movq %rax, -0x238(%rbp)
jmp 0xac57
leaq -0x160(%rbp), %rdi
callq 0xa110
jmp 0xac65
movq -0x238(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x8390
movq %rax, -0x240(%rbp)
jmp 0xac81
movq -0x240(%rbp), %rdi
movq 0x4c301(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xac96
leaq -0x160(%rbp), %rdi
callq 0x8878
jmp 0xacd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xadec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x8878
jmp 0xadec
testb $0x1, 0x4cc5a(%rip)     # 0x57933
je 0xad91
movq 0x4c30a(%rip), %rdi     # 0x56ff0
leaq 0x3155c(%rip), %rsi     # 0x3c249
callq 0x83e0
movq %rax, -0x248(%rbp)
jmp 0xacfb
leaq -0x130(%rbp), %rdi
callq 0xbff0
movq -0x248(%rbp), %rdi
movq %rax, %rsi
callq 0x1c140
movq %rax, -0x250(%rbp)
jmp 0xad1f
movq -0x250(%rbp), %rdi
movq 0x4c263(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xad34
movq 0x4c2b5(%rip), %rdi     # 0x56ff0
leaq 0x3151c(%rip), %rsi     # 0x3c25e
callq 0x83e0
movq %rax, -0x258(%rbp)
jmp 0xad50
callq 0x178c0
movq %rax, -0x260(%rbp)
jmp 0xad5e
movq -0x260(%rbp), %rsi
movq -0x258(%rbp), %rdi
callq 0x8120
movq %rax, -0x268(%rbp)
jmp 0xad7a
movq -0x268(%rbp), %rdi
movq 0x4c208(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xad8f
jmp 0xad91
leaq -0x130(%rbp), %rdi
callq 0xc030
leaq -0xf8(%rbp), %rdi
callq 0xb9d0
leaq -0xe8(%rbp), %rdi
callq 0xc030
leaq -0xd0(%rbp), %rdi
callq 0xb9d0
movl $0x0, -0x84(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xb9d0
movl -0x84(%rbp), %eax
testl %eax, %eax
jne 0xb0a4
jmp 0xade7
jmp 0xaf32
leaq -0x130(%rbp), %rdi
callq 0xc030
leaq -0xf8(%rbp), %rdi
callq 0xb9d0
leaq -0xe8(%rbp), %rdi
callq 0xc030
leaq -0xd0(%rbp), %rdi
callq 0xb9d0
leaq -0x90(%rbp), %rdi
callq 0xb9d0
movl -0x44(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0xaeb9
movq -0x40(%rbp), %rdi
callq 0x81d0
movq %rax, -0x168(%rbp)
movq 0x4c1a1(%rip), %rdi     # 0x56ff0
leaq 0x31456(%rip), %rsi     # 0x3c2ac
callq 0x83e0
movq %rax, -0x270(%rbp)
jmp 0xae64
movq -0x168(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq -0x270(%rbp), %rdi
movq %rax, %rsi
callq 0x83e0
movq %rax, -0x278(%rbp)
jmp 0xae8c
movq -0x278(%rbp), %rdi
movq 0x4c0f6(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xaea1
movl $0x3, -0x4(%rbp)
movl $0x1, -0x84(%rbp)
callq 0x8730
jmp 0xaf28
movq -0x40(%rbp), %rdi
callq 0x81d0
movq 0x4c127(%rip), %rdi     # 0x56ff0
leaq 0x313a7(%rip), %rsi     # 0x3c277
callq 0x83e0
movq %rax, -0x280(%rbp)
jmp 0xaede
movq -0x280(%rbp), %rdi
movq 0x4c0a4(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xaef3
callq 0x8670
jmp 0xb0d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x8730
jmp 0xaf10
jmp 0xb0af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x8730
jmp 0xaf2d
jmp 0xb0a4
jmp 0xb0af
jmp 0xaf34
testb $0x1, 0x4c9f5(%rip)     # 0x57930
je 0xaf8f
movb $0x1, 0x4ca2c(%rip)     # 0x57970
leaq -0x170(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xb900
jmp 0xaf56
leaq -0x170(%rbp), %rdi
callq 0x305c0
jmp 0xaf64
leaq -0x170(%rbp), %rdi
callq 0xb9d0
jmp 0xaf8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x170(%rbp), %rdi
callq 0xb9d0
jmp 0xb0af
leaq -0x28(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
callq 0xb690
movq %rax, -0x288(%rbp)
jmp 0xafaf
movq -0x288(%rbp), %rax
movq %rax, -0x178(%rbp)
testb $0x1, 0x4c96d(%rip)     # 0x57931
je 0xb069
movq 0x4c01f(%rip), %rdi     # 0x56ff0
leaq 0x312e0(%rip), %rsi     # 0x3c2b8
callq 0x83e0
movq %rax, -0x290(%rbp)
jmp 0xafe6
movq -0x290(%rbp), %rdi
movq -0x178(%rbp), %rsi
callq 0x87f0
movq %rax, -0x298(%rbp)
jmp 0xb002
leaq -0x1a0(%rbp), %rdi
callq 0xa110
jmp 0xb010
movq -0x298(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x8390
movq %rax, -0x2a0(%rbp)
jmp 0xb02c
movq -0x2a0(%rbp), %rdi
movq 0x4bf56(%rip), %rsi     # 0x56f90
callq 0x8460
jmp 0xb041
leaq -0x1a0(%rbp), %rdi
callq 0x8878
jmp 0xb069
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x8878
jmp 0xb0af
movb 0x4c901(%rip), %al      # 0x57970
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xb093
callq 0xa330
jmp 0xb080
movl $0x1, -0x4(%rbp)
movl $0x1, -0x84(%rbp)
jmp 0xb0a4
movl $0x0, -0x4(%rbp)
movl $0x1, -0x84(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xc060
jmp 0xb0ba
leaq -0x28(%rbp), %rdi
callq 0xc060
jmp 0xb0c6
movl -0x4(%rbp), %eax
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x87b0
movq %rax, %rdi
callq 0xc050
nopw (%rax,%rax)