// File: moporgic[P]2048-Framework/2048.cpp
// Function: main
int main(int argc, const char* argv[]) {
	std::cout << "2048 Demo: ";
	std::copy(argv, argv + argc, std::ostream_iterator<const char*>(std::cout, " "));
	std::cout << std::endl << std::endl;

	size_t total = 1000, block = 0, limit = 0;
	std::string slide_args, place_args;
	std::string load_path, save_path;
	for (int i = 1; i < argc; i++) {
		std::string arg = argv[i];
		auto match_arg = [&](std::string flag) -> bool {
			auto it = arg.find_first_not_of('-');
			return arg.find(flag, it) == it;
		};
		auto next_opt = [&]() -> std::string {
			auto it = arg.find('=') + 1;
			return it ? arg.substr(it) : argv[++i];
		};
		if (match_arg("total")) {
			total = std::stoull(next_opt());
		} else if (match_arg("block")) {
			block = std::stoull(next_opt());
		} else if (match_arg("limit")) {
			limit = std::stoull(next_opt());
		} else if (match_arg("slide") || match_arg("play")) {
			slide_args = next_opt();
		} else if (match_arg("place") || match_arg("env")) {
			place_args = next_opt();
		} else if (match_arg("load")) {
			load_path = next_opt();
		} else if (match_arg("save")) {
			save_path = next_opt();
		}
	}

	statistics stats(total, block, limit);

	if (load_path.size()) {
		std::ifstream in(load_path, std::ios::in);
		in >> stats;
		in.close();
		if (stats.is_finished()) stats.summary();
	}

	random_slider slide(slide_args);
	random_placer place(place_args);

	while (!stats.is_finished()) {
//		std::cerr << "======== Game " << stats.step() << " ========" << std::endl;
		slide.open_episode("~:" + place.name());
		place.open_episode(slide.name() + ":~");

		stats.open_episode(slide.name() + ":" + place.name());
		episode& game = stats.back();
		while (true) {
			agent& who = game.take_turns(slide, place);
			action move = who.take_action(game.state());
//			std::cerr << game.state() << "#" << game.step() << " " << who.name() << ": " << move << std::endl;
			if (game.apply_action(move) != true) break;
			if (who.check_for_win(game.state())) break;
		}
		agent& win = game.last_turns(slide, place);
		stats.close_episode(win.name());

		slide.close_episode(win.name());
		place.close_episode(win.name());
	}

	if (save_path.size()) {
		std::ofstream out(save_path, std::ios::out | std::ios::trunc);
		out << stats;
		out.close();
	}

	return 0;
}

// Assembly:
subq $0xb88, %rsp            # imm = 0xB88
movl $0x0, 0xb84(%rsp)
movl %edi, 0xb80(%rsp)
movq %rsi, 0xb78(%rsp)
movq 0x168b8(%rip), %rdi     # 0x1afd0
leaq 0xe941(%rip), %rsi      # 0x13060
callq 0x42e0
movq 0xb78(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0xb78(%rsp), %rax
movslq 0xb80(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x120(%rsp)
leaq 0xb68(%rsp), %rdi
movq 0x1686e(%rip), %rsi     # 0x1afd0
leaq 0xe9fc(%rip), %rdx      # 0x13165
callq 0x6180
movq 0x118(%rsp), %rsi
movq 0x120(%rsp), %rdx
leaq 0xb58(%rsp), %rdi
leaq 0xb68(%rsp), %rcx
callq 0x6100
movq 0x16836(%rip), %rdi     # 0x1afd0
movq 0x16817(%rip), %rsi     # 0x1afb8
callq 0x4320
movq %rax, %rdi
movq 0x16808(%rip), %rsi     # 0x1afb8
callq 0x4320
movq $0x3e8, 0xb50(%rsp) # imm = 0x3E8
movq $0x0, 0xb48(%rsp)
movq $0x0, 0xb40(%rsp)
leaq 0xb20(%rsp), %rdi
callq 0x43d0
leaq 0xb00(%rsp), %rdi
callq 0x43d0
leaq 0xae0(%rsp), %rdi
callq 0x43d0
leaq 0xac0(%rsp), %rdi
callq 0x43d0
movl $0x1, 0xabc(%rsp)
movl 0xabc(%rsp), %eax
cmpl 0xb80(%rsp), %eax
jge 0x536e
movq 0xb78(%rsp), %rax
movslq 0xabc(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x108(%rsp)
leaq 0xa97(%rsp), %rdi
movq %rdi, 0x110(%rsp)
callq 0x4500
movq 0x108(%rsp), %rsi
movq 0x110(%rsp), %rdx
leaq 0xa98(%rsp), %rdi
callq 0x43c0
jmp 0x487c
leaq 0xa97(%rsp), %rdi
callq 0x4330
leaq 0xa98(%rsp), %rax
movq %rax, 0xa78(%rsp)
movq %rax, 0xa60(%rsp)
leaq 0xb78(%rsp), %rax
movq %rax, 0xa68(%rsp)
leaq 0xabc(%rsp), %rax
movq %rax, 0xa70(%rsp)
leaq 0xa3f(%rsp), %rdi
movq %rdi, 0x100(%rsp)
callq 0x4500
movq 0x100(%rsp), %rdx
leaq 0xe787(%rip), %rsi      # 0x1306c
leaq 0xa40(%rsp), %rdi
callq 0x43c0
jmp 0x48f4
leaq 0xa78(%rsp), %rdi
leaq 0xa40(%rsp), %rsi
callq 0x5c70
movb %al, 0xff(%rsp)
jmp 0x4912
leaq 0xa40(%rsp), %rdi
callq 0x4210
leaq 0xa3f(%rsp), %rdi
callq 0x4330
movb 0xff(%rsp), %al
testb $0x1, %al
jne 0x493c
jmp 0x4a43
leaq 0xa18(%rsp), %rdi
leaq 0xa60(%rsp), %rsi
callq 0x5cd0
jmp 0x4953
xorl %eax, %eax
movl %eax, %esi
leaq 0xa18(%rsp), %rdi
movl $0xa, %edx
callq 0x61b0
movq %rax, 0xf0(%rsp)
jmp 0x4973
movq 0xf0(%rsp), %rax
movq %rax, 0xb50(%rsp)
leaq 0xa18(%rsp), %rdi
callq 0x4210
jmp 0x5339
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0xa97(%rsp), %rdi
callq 0x4330
jmp 0x5c26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x49f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0xa40(%rsp), %rdi
callq 0x4210
leaq 0xa3f(%rsp), %rdi
callq 0x4330
jmp 0x535c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x535c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0xa18(%rsp), %rdi
callq 0x4210
jmp 0x535c
leaq 0x9f7(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x4500
movq 0xe8(%rsp), %rdx
leaq 0xe60b(%rip), %rsi      # 0x13072
leaq 0x9f8(%rsp), %rdi
callq 0x43c0
jmp 0x4a76
leaq 0xa78(%rsp), %rdi
leaq 0x9f8(%rsp), %rsi
callq 0x5c70
movb %al, 0xe7(%rsp)
jmp 0x4a94
leaq 0x9f8(%rsp), %rdi
callq 0x4210
leaq 0x9f7(%rsp), %rdi
callq 0x4330
movb 0xe7(%rsp), %al
testb $0x1, %al
jne 0x4abe
jmp 0x4b86
leaq 0x9d0(%rsp), %rdi
leaq 0xa60(%rsp), %rsi
callq 0x5cd0
jmp 0x4ad5
xorl %eax, %eax
movl %eax, %esi
leaq 0x9d0(%rsp), %rdi
movl $0xa, %edx
callq 0x61b0
movq %rax, 0xd8(%rsp)
jmp 0x4af5
movq 0xd8(%rsp), %rax
movq %rax, 0xb48(%rsp)
leaq 0x9d0(%rsp), %rdi
callq 0x4210
jmp 0x5337
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x4b4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x9f8(%rsp), %rdi
callq 0x4210
leaq 0x9f7(%rsp), %rdi
callq 0x4330
jmp 0x535c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x9d0(%rsp), %rdi
callq 0x4210
jmp 0x535c
leaq 0x9af(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x4500
movq 0xd0(%rsp), %rdx
leaq 0xe4ce(%rip), %rsi      # 0x13078
leaq 0x9b0(%rsp), %rdi
callq 0x43c0
jmp 0x4bb9
leaq 0xa78(%rsp), %rdi
leaq 0x9b0(%rsp), %rsi
callq 0x5c70
movb %al, 0xcf(%rsp)
jmp 0x4bd7
leaq 0x9b0(%rsp), %rdi
callq 0x4210
leaq 0x9af(%rsp), %rdi
callq 0x4330
movb 0xcf(%rsp), %al
testb $0x1, %al
jne 0x4c01
jmp 0x4cc9
leaq 0x988(%rsp), %rdi
leaq 0xa60(%rsp), %rsi
callq 0x5cd0
jmp 0x4c18
xorl %eax, %eax
movl %eax, %esi
leaq 0x988(%rsp), %rdi
movl $0xa, %edx
callq 0x61b0
movq %rax, 0xc0(%rsp)
jmp 0x4c38
movq 0xc0(%rsp), %rax
movq %rax, 0xb40(%rsp)
leaq 0x988(%rsp), %rdi
callq 0x4210
jmp 0x5335
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x4c91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x9b0(%rsp), %rdi
callq 0x4210
leaq 0x9af(%rsp), %rdi
callq 0x4330
jmp 0x535c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x988(%rsp), %rdi
callq 0x4210
jmp 0x535c
leaq 0x967(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x4500
movq 0xb8(%rsp), %rdx
movb $0x0, 0x93e(%rsp)
movb $0x0, 0x93d(%rsp)
leaq 0xe381(%rip), %rsi      # 0x1307e
leaq 0x968(%rsp), %rdi
callq 0x43c0
jmp 0x4d0c
leaq 0xa78(%rsp), %rdi
leaq 0x968(%rsp), %rsi
callq 0x5c70
movb %al, 0xb7(%rsp)
jmp 0x4d2a
movb 0xb7(%rsp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xb6(%rsp)
jne 0x4db2
jmp 0x4d41
leaq 0x93f(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x4500
movq 0xa8(%rsp), %rdx
movb $0x1, 0x93e(%rsp)
leaq 0xe317(%rip), %rsi      # 0x13084
leaq 0x940(%rsp), %rdi
callq 0x43c0
jmp 0x4d7c
movb $0x1, 0x93d(%rsp)
leaq 0xa78(%rsp), %rdi
leaq 0x940(%rsp), %rsi
callq 0x5c70
movb %al, 0xa7(%rsp)
jmp 0x4da2
movb 0xa7(%rsp), %al
movb %al, 0xb6(%rsp)
jmp 0x4db2
movb 0xb6(%rsp), %al
movb %al, 0xa6(%rsp)
testb $0x1, 0x93d(%rsp)
jne 0x4dcc
jmp 0x4dd9
leaq 0x940(%rsp), %rdi
callq 0x4210
testb $0x1, 0x93e(%rsp)
jne 0x4de5
jmp 0x4df2
leaq 0x93f(%rsp), %rdi
callq 0x4330
leaq 0x968(%rsp), %rdi
callq 0x4210
leaq 0x967(%rsp), %rdi
callq 0x4330
movb 0xa6(%rsp), %al
testb $0x1, %al
jne 0x4e1c
jmp 0x4f08
leaq 0x918(%rsp), %rdi
leaq 0xa60(%rsp), %rsi
callq 0x5cd0
jmp 0x4e33
leaq 0xb20(%rsp), %rdi
leaq 0x918(%rsp), %rsi
callq 0x4350
leaq 0x918(%rsp), %rdi
callq 0x4210
jmp 0x5333
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x4ef6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x4ee9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x4ece
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
testb $0x1, 0x93d(%rsp)
jne 0x4ebf
jmp 0x4ecc
leaq 0x940(%rsp), %rdi
callq 0x4210
jmp 0x4ece
testb $0x1, 0x93e(%rsp)
jne 0x4eda
jmp 0x4ee7
leaq 0x93f(%rsp), %rdi
callq 0x4330
jmp 0x4ee9
leaq 0x968(%rsp), %rdi
callq 0x4210
leaq 0x967(%rsp), %rdi
callq 0x4330
jmp 0x535c
leaq 0x8f7(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0x4500
movq 0x98(%rsp), %rdx
movb $0x0, 0x8ce(%rsp)
movb $0x0, 0x8cd(%rsp)
leaq 0xe14d(%rip), %rsi      # 0x13089
leaq 0x8f8(%rsp), %rdi
callq 0x43c0
jmp 0x4f4b
leaq 0xa78(%rsp), %rdi
leaq 0x8f8(%rsp), %rsi
callq 0x5c70
movb %al, 0x97(%rsp)
jmp 0x4f69
movb 0x97(%rsp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x96(%rsp)
jne 0x4ff1
jmp 0x4f80
leaq 0x8cf(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x4500
movq 0x88(%rsp), %rdx
movb $0x1, 0x8ce(%rsp)
leaq 0xe0e3(%rip), %rsi      # 0x1308f
leaq 0x8d0(%rsp), %rdi
callq 0x43c0
jmp 0x4fbb
movb $0x1, 0x8cd(%rsp)
leaq 0xa78(%rsp), %rdi
leaq 0x8d0(%rsp), %rsi
callq 0x5c70
movb %al, 0x87(%rsp)
jmp 0x4fe1
movb 0x87(%rsp), %al
movb %al, 0x96(%rsp)
jmp 0x4ff1
movb 0x96(%rsp), %al
movb %al, 0x86(%rsp)
testb $0x1, 0x8cd(%rsp)
jne 0x500b
jmp 0x5018
leaq 0x8d0(%rsp), %rdi
callq 0x4210
testb $0x1, 0x8ce(%rsp)
jne 0x5024
jmp 0x5031
leaq 0x8cf(%rsp), %rdi
callq 0x4330
leaq 0x8f8(%rsp), %rdi
callq 0x4210
leaq 0x8f7(%rsp), %rdi
callq 0x4330
movb 0x86(%rsp), %al
testb $0x1, %al
jne 0x505b
jmp 0x5147
leaq 0x8a8(%rsp), %rdi
leaq 0xa60(%rsp), %rsi
callq 0x5cd0
jmp 0x5072
leaq 0xb00(%rsp), %rdi
leaq 0x8a8(%rsp), %rsi
callq 0x4350
leaq 0x8a8(%rsp), %rdi
callq 0x4210
jmp 0x5331
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5135
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5128
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x510d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
testb $0x1, 0x8cd(%rsp)
jne 0x50fe
jmp 0x510b
leaq 0x8d0(%rsp), %rdi
callq 0x4210
jmp 0x510d
testb $0x1, 0x8ce(%rsp)
jne 0x5119
jmp 0x5126
leaq 0x8cf(%rsp), %rdi
callq 0x4330
jmp 0x5128
leaq 0x8f8(%rsp), %rdi
callq 0x4210
leaq 0x8f7(%rsp), %rdi
callq 0x4330
jmp 0x535c
leaq 0x887(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0x4500
movq 0x78(%rsp), %rdx
leaq 0xdf2e(%rip), %rsi      # 0x13093
leaq 0x888(%rsp), %rdi
callq 0x43c0
jmp 0x5174
leaq 0xa78(%rsp), %rdi
leaq 0x888(%rsp), %rsi
callq 0x5c70
movb %al, 0x77(%rsp)
jmp 0x518f
leaq 0x888(%rsp), %rdi
callq 0x4210
leaq 0x887(%rsp), %rdi
callq 0x4330
movb 0x77(%rsp), %al
testb $0x1, %al
jne 0x51b6
jmp 0x523d
leaq 0x860(%rsp), %rdi
leaq 0xa60(%rsp), %rsi
callq 0x5cd0
jmp 0x51cd
leaq 0xae0(%rsp), %rdi
leaq 0x860(%rsp), %rsi
callq 0x4350
leaq 0x860(%rsp), %rdi
callq 0x4210
jmp 0x532f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x522b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x888(%rsp), %rdi
callq 0x4210
leaq 0x887(%rsp), %rdi
callq 0x4330
jmp 0x535c
leaq 0x83f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0x4500
movq 0x68(%rsp), %rdx
leaq 0xde3d(%rip), %rsi      # 0x13098
leaq 0x840(%rsp), %rdi
callq 0x43c0
jmp 0x526a
leaq 0xa78(%rsp), %rdi
leaq 0x840(%rsp), %rsi
callq 0x5c70
movb %al, 0x67(%rsp)
jmp 0x5285
leaq 0x840(%rsp), %rdi
callq 0x4210
leaq 0x83f(%rsp), %rdi
callq 0x4330
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0x52ac
jmp 0x532d
leaq 0x818(%rsp), %rdi
leaq 0xa60(%rsp), %rsi
callq 0x5cd0
jmp 0x52c3
leaq 0xac0(%rsp), %rdi
leaq 0x818(%rsp), %rsi
callq 0x4350
leaq 0x818(%rsp), %rdi
callq 0x4210
jmp 0x532d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x531e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x840(%rsp), %rdi
callq 0x4210
leaq 0x83f(%rsp), %rdi
callq 0x4330
jmp 0x535c
jmp 0x532f
jmp 0x5331
jmp 0x5333
jmp 0x5335
jmp 0x5337
jmp 0x5339
leaq 0xa98(%rsp), %rdi
callq 0x4210
movl 0xabc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xabc(%rsp)
jmp 0x4818
leaq 0xa98(%rsp), %rdi
callq 0x4210
jmp 0x5c26
movq 0xb50(%rsp), %rsi
movq 0xb48(%rsp), %rdx
movq 0xb40(%rsp), %rcx
leaq 0x7a8(%rsp), %rdi
callq 0x6200
jmp 0x5395
leaq 0xae0(%rsp), %rdi
callq 0x4250
cmpq $0x0, %rax
je 0x5481
leaq 0x5a0(%rsp), %rdi
leaq 0xae0(%rsp), %rsi
movl $0x8, %edx
callq 0x4480
jmp 0x53c8
leaq 0x5a0(%rsp), %rdi
leaq 0x7a8(%rsp), %rsi
callq 0x62b0
jmp 0x53df
leaq 0x5a0(%rsp), %rdi
callq 0x40b0
jmp 0x53ee
leaq 0x7a8(%rsp), %rdi
callq 0x6480
movb %al, 0x66(%rsp)
jmp 0x5401
movb 0x66(%rsp), %al
testb $0x1, %al
jne 0x540b
jmp 0x5474
leaq 0x7a8(%rsp), %rdi
callq 0x64a0
jmp 0x541a
jmp 0x5474
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5c26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5c19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x5a0(%rsp), %rdi
callq 0x40e0
jmp 0x5c19
leaq 0x5a0(%rsp), %rdi
callq 0x40e0
leaq 0x550(%rsp), %rdi
leaq 0xb20(%rsp), %rsi
callq 0x64e0
jmp 0x5498
leaq 0x4c8(%rsp), %rdi
leaq 0xb00(%rsp), %rsi
callq 0x6590
jmp 0x54af
jmp 0x54b1
leaq 0x7a8(%rsp), %rdi
callq 0x6480
movb %al, 0x65(%rsp)
jmp 0x54c4
movb 0x65(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x54d3
jmp 0x5add
leaq 0x488(%rsp), %rdi
leaq 0x4c8(%rsp), %rsi
callq 0x66d0
jmp 0x54ea
leaq 0xdbac(%rip), %rsi      # 0x1309d
leaq 0x4a8(%rsp), %rdi
leaq 0x488(%rsp), %rdx
callq 0x6680
jmp 0x5508
leaq 0x550(%rsp), %rdi
leaq 0x4a8(%rsp), %rsi
callq 0x6670
jmp 0x551f
leaq 0x4a8(%rsp), %rdi
callq 0x4210
leaq 0x488(%rsp), %rdi
callq 0x4210
leaq 0x448(%rsp), %rdi
leaq 0x550(%rsp), %rsi
callq 0x66d0
jmp 0x5550
leaq 0xdb49(%rip), %rdx      # 0x130a0
leaq 0x468(%rsp), %rdi
leaq 0x448(%rsp), %rsi
callq 0x6790
jmp 0x556e
leaq 0x4c8(%rsp), %rdi
leaq 0x468(%rsp), %rsi
callq 0x6670
jmp 0x5585
leaq 0x468(%rsp), %rdi
callq 0x4210
leaq 0x448(%rsp), %rdi
callq 0x4210
leaq 0x3e8(%rsp), %rdi
leaq 0x550(%rsp), %rsi
callq 0x66d0
jmp 0x55b6
leaq 0xdae1(%rip), %rdx      # 0x1309e
leaq 0x408(%rsp), %rdi
leaq 0x3e8(%rsp), %rsi
callq 0x6790
jmp 0x55d4
leaq 0x3c8(%rsp), %rdi
leaq 0x4c8(%rsp), %rsi
callq 0x66d0
jmp 0x55eb
leaq 0x428(%rsp), %rdi
leaq 0x408(%rsp), %rsi
leaq 0x3c8(%rsp), %rdx
callq 0x6850
jmp 0x560a
leaq 0x7a8(%rsp), %rdi
leaq 0x428(%rsp), %rsi
callq 0x67e0
jmp 0x5621
leaq 0x428(%rsp), %rdi
callq 0x4210
leaq 0x3c8(%rsp), %rdi
callq 0x4210
leaq 0x408(%rsp), %rdi
callq 0x4210
leaq 0x3e8(%rsp), %rdi
callq 0x4210
leaq 0x7a8(%rsp), %rdi
callq 0x6940
movq %rax, 0x58(%rsp)
jmp 0x5669
movq 0x58(%rsp), %rax
movq %rax, 0x3c0(%rsp)
jmp 0x5678
movq 0x3c0(%rsp), %rdi
leaq 0x550(%rsp), %rsi
leaq 0x4c8(%rsp), %rdx
callq 0x6960
movq %rax, 0x50(%rsp)
jmp 0x569c
movq 0x50(%rsp), %rax
movq %rax, 0x3b8(%rsp)
movq 0x3b8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x3c0(%rsp), %rdi
callq 0x69e0
movq %rax, 0x48(%rsp)
jmp 0x56ca
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq 0x3a8(%rsp), %rdi
callq *%rax
jmp 0x56e7
movq 0x3c0(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x398(%rsp), %rdi
leaq 0x3a8(%rsp), %rsi
callq 0x6a90
jmp 0x570b
movq 0x38(%rsp), %rdi
leaq 0x398(%rsp), %rsi
callq 0x69f0
movb %al, 0x37(%rsp)
jmp 0x5723
movb 0x37(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x30(%rsp)
leaq 0x398(%rsp), %rdi
callq 0x5fd0
movl 0x30(%rsp), %eax
cmpl $0x1, %eax
je 0x58e9
movl $0x8, 0x394(%rsp)
jmp 0x5945
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5c0c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x57c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x4a8(%rsp), %rdi
callq 0x4210
leaq 0x488(%rsp), %rdi
callq 0x4210
jmp 0x5bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x580c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x468(%rsp), %rdi
callq 0x4210
leaq 0x448(%rsp), %rdi
callq 0x4210
jmp 0x5bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x589b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x588e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5881
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x428(%rsp), %rdi
callq 0x4210
leaq 0x3c8(%rsp), %rdi
callq 0x4210
leaq 0x408(%rsp), %rdi
callq 0x4210
leaq 0x3e8(%rsp), %rdi
callq 0x4210
jmp 0x5bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
jmp 0x5966
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x398(%rsp), %rdi
callq 0x5fd0
jmp 0x5966
movq 0x3b8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x3c0(%rsp), %rdi
callq 0x69e0
movq %rax, 0x28(%rsp)
jmp 0x590a
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
movq 0x28(%rax), %rax
callq *%rax
movb %al, 0x1f(%rsp)
jmp 0x5923
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x592d
jmp 0x593a
movl $0x8, 0x394(%rsp)
jmp 0x5945
movl $0x0, 0x394(%rsp)
leaq 0x3a8(%rsp), %rdi
callq 0x5fd0
movl 0x394(%rsp), %eax
testl %eax, %eax
je 0x5961
jmp 0x595f
jmp 0x5978
jmp 0x5676
leaq 0x3a8(%rsp), %rdi
callq 0x5fd0
jmp 0x5bff
movq 0x3c0(%rsp), %rdi
leaq 0x550(%rsp), %rsi
leaq 0x4c8(%rsp), %rdx
callq 0x6ac0
movq %rax, 0x10(%rsp)
jmp 0x599c
movq 0x10(%rsp), %rax
movq %rax, 0x388(%rsp)
movq 0x388(%rsp), %rsi
movq (%rsi), %rax
movq 0x40(%rax), %rax
leaq 0x368(%rsp), %rdi
callq *%rax
jmp 0x59c4
leaq 0x7a8(%rsp), %rdi
leaq 0x368(%rsp), %rsi
callq 0x6b20
jmp 0x59db
leaq 0x368(%rsp), %rdi
callq 0x4210
movq 0x388(%rsp), %rsi
movq (%rsi), %rax
movq 0x40(%rax), %rax
leaq 0x348(%rsp), %rdi
callq *%rax
jmp 0x5a03
leaq 0x550(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x6b80
jmp 0x5a1a
leaq 0x348(%rsp), %rdi
callq 0x4210
movq 0x388(%rsp), %rsi
movq (%rsi), %rax
movq 0x40(%rax), %rax
leaq 0x328(%rsp), %rdi
callq *%rax
jmp 0x5a42
leaq 0x4c8(%rsp), %rdi
leaq 0x328(%rsp), %rsi
callq 0x6b80
jmp 0x5a59
leaq 0x328(%rsp), %rdi
callq 0x4210
jmp 0x54b1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x368(%rsp), %rdi
callq 0x4210
jmp 0x5bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x4210
jmp 0x5bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x328(%rsp), %rdi
callq 0x4210
jmp 0x5bff
leaq 0xac0(%rsp), %rdi
callq 0x4250
cmpq $0x0, %rax
je 0x5b7f
movl $0x10, %edi
movl $0x20, %esi
callq 0x6b90
movl %eax, 0xc(%rsp)
jmp 0x5b09
movl 0xc(%rsp), %edx
leaq 0x128(%rsp), %rdi
leaq 0xac0(%rsp), %rsi
callq 0x4580
jmp 0x5b24
leaq 0x128(%rsp), %rdi
leaq 0x7a8(%rsp), %rsi
callq 0x6bb0
jmp 0x5b3b
leaq 0x128(%rsp), %rdi
callq 0x43e0
jmp 0x5b4a
leaq 0x128(%rsp), %rdi
callq 0x4410
jmp 0x5b7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa88(%rsp)
movl %eax, 0xa84(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x4410
jmp 0x5bff
movl $0x0, 0xb84(%rsp)
movl $0x1, 0x394(%rsp)
leaq 0x4c8(%rsp), %rdi
callq 0x6c50
leaq 0x550(%rsp), %rdi
callq 0x6c60
leaq 0x7a8(%rsp), %rdi
callq 0x6c70
leaq 0xac0(%rsp), %rdi
callq 0x4210
leaq 0xae0(%rsp), %rdi
callq 0x4210
leaq 0xb00(%rsp), %rdi
callq 0x4210
leaq 0xb20(%rsp), %rdi
callq 0x4210
movl 0xb84(%rsp), %eax
addq $0xb88, %rsp            # imm = 0xB88
retq
leaq 0x4c8(%rsp), %rdi
callq 0x6c50
leaq 0x550(%rsp), %rdi
callq 0x6c60
leaq 0x7a8(%rsp), %rdi
callq 0x6c70
leaq 0xac0(%rsp), %rdi
callq 0x4210
leaq 0xae0(%rsp), %rdi
callq 0x4210
leaq 0xb00(%rsp), %rdi
callq 0x4210
leaq 0xb20(%rsp), %rdi
callq 0x4210
movq 0xa88(%rsp), %rdi
callq 0x44f0
nopw (%rax,%rax)