LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: metastableB[P]Program-Dependence-Graph-Creator/./pdg.cpp
// Function: PDG::print_cdg()
void PDG::print_cdg(){
 	std::printf("CDG\n   ");
 	for(int i = 0; i <= total_lines;i++)
 		std::printf("%3d ",i);
 	std::cout << std::endl;
 	for(int i = 0; i <= total_lines;i++){
 		std::printf("%3d",i);
 		std::cout.flush();
 		for(int j = 0; j <= total_lines; j++){
 			std::printf("%3d ",g_cdg[i][j]);
 			std::cout.flush();
 		}
 		std::cout << std::endl;
 	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x5629(%rip), %rdi      # 0xa104
movb $0x0, %al
callq 0x3060
movl $0x0, -0xc(%rbp)
movq -0x20(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x214(%rcx), %eax
jg 0x4b14
movl -0xc(%rbp), %esi
leaq 0x560a(%rip), %rdi      # 0xa10c
movb $0x0, %al
callq 0x3060
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4ae9
movq 0xa4bd(%rip), %rdi      # 0xefd8
movq 0xa4a6(%rip), %rsi      # 0xefc8
callq 0x32c0
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x214(%rcx), %eax
jg 0x4bd4
movl -0x10(%rbp), %esi
leaq 0x55c6(%rip), %rdi      # 0xa111
movb $0x0, %al
callq 0x3060
movq 0xa47f(%rip), %rdi      # 0xefd8
callq 0x31b0
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x214(%rcx), %eax
jg 0x4bb3
movq -0x20(%rbp), %rax
movq 0x260(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x5577(%rip), %rdi      # 0xa10c
movb $0x0, %al
callq 0x3060
movq 0xa435(%rip), %rdi      # 0xefd8
callq 0x31b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4b65
movq 0xa41e(%rip), %rdi      # 0xefd8
movq 0xa407(%rip), %rsi      # 0xefc8
callq 0x32c0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4b2e
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: metastableB[P]Program-Dependence-Graph-Creator/./pdg.cpp
// Function: PDG::ddg()
void PDG::ddg(){
	if(!allocate_g_ddg())
 		valid = false;
 	if(make_variable_map())
 		valid = true;
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x44e0
testb $0x1, %al
jne 0x4f28
movq -0x10(%rbp), %rax
movb $0x0, 0x210(%rax)
movq -0x10(%rbp), %rdi
callq 0x4f50
testb $0x1, %al
jne 0x4f37
jmp 0x4f42
movq -0x10(%rbp), %rax
movb $0x1, 0x210(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: metastableB[P]Program-Dependence-Graph-Creator/./pdg.cpp
// Function: PDG::print_ddg()
void PDG::print_ddg(){
 	std::printf("\nDDG\n   ");
 	for(int i = 1; i <= total_lines;i++)
 		std::printf("%3d ",i);
 	std::cout << std::endl;
 	for(int i = 1; i <= total_lines;i++){
 		std::printf("%3d",i);
 		std::cout.flush();
 		for(int j = 1; j <= total_lines; j++){
 			std::printf("%3d ",g_ddg[i][j]);
 			std::cout.flush();
 		}
 		std::cout << std::endl;
 	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x48fc(%rip), %rdi      # 0xa187
movb $0x0, %al
callq 0x3060
movl $0x1, -0xc(%rbp)
movq -0x20(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x214(%rcx), %eax
jg 0x58c4
movl -0xc(%rbp), %esi
leaq 0x485a(%rip), %rdi      # 0xa10c
movb $0x0, %al
callq 0x3060
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5899
movq 0x970d(%rip), %rdi      # 0xefd8
movq 0x96f6(%rip), %rsi      # 0xefc8
callq 0x32c0
movl $0x1, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x214(%rcx), %eax
jg 0x5984
movl -0x10(%rbp), %esi
leaq 0x4816(%rip), %rdi      # 0xa111
movb $0x0, %al
callq 0x3060
movq 0x96cf(%rip), %rdi      # 0xefd8
callq 0x31b0
movl $0x1, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x214(%rcx), %eax
jg 0x5963
movq -0x20(%rbp), %rax
movq 0x268(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x47c7(%rip), %rdi      # 0xa10c
movb $0x0, %al
callq 0x3060
movq 0x9685(%rip), %rdi      # 0xefd8
callq 0x31b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5915
movq 0x966e(%rip), %rdi      # 0xefd8
movq 0x9657(%rip), %rsi      # 0xefc8
callq 0x32c0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x58de
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: kdungs[P]codecon/src/compliance.cc
// Function: check(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
auto check(const std::string& str) noexcept -> bool {
  auto chars = std::multiset<char>{std::begin(str), std::end(str)};
  auto foundOdd = false;
  for (auto it = std::begin(chars); it != std::end(chars); it = chars.upper_bound(*it)) {
    if (chars.count(*it) % 2 == 1) {
      if (foundOdd) {
        return false;
      }
      foundOdd = true;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1490
movq %rax, -0x80(%rbp)
jmp 0x12be
movq -0x80(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x14d0
movq %rax, -0x88(%rbp)
jmp 0x12d8
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x1500
jmp 0x12f6
movb $0x0, -0x51(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1580
movq %rax, -0x90(%rbp)
jmp 0x130c
movq -0x90(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x15e0
movq %rax, -0x98(%rbp)
jmp 0x1329
movq -0x98(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x15b0
testb $0x1, %al
jne 0x1347
jmp 0x13c5
leaq -0x60(%rbp), %rdi
callq 0x1640
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x1610
movq %rax, -0xa0(%rbp)
jmp 0x1365
movq -0xa0(%rbp), %rax
andq $0x1, %rax
cmpq $0x1, %rax
jne 0x138d
testb $0x1, -0x51(%rbp)
je 0x1389
movb $0x0, -0x1(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x13d0
movb $0x1, -0x51(%rbp)
jmp 0x138f
leaq -0x60(%rbp), %rdi
callq 0x1640
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x1660
movq %rax, -0xa8(%rbp)
jmp 0x13ad
movq -0xa8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x1317
movb $0x1, -0x1(%rbp)
movl $0x1, -0x6c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x16a0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x14c0
nop
// File: kdungs[P]codecon/src/compliance.cc
// Function: main
int main() {
  auto word = std::string{};
  std::cin >> word;

  if (check(word)) {
    std::cout << "yes\n";
  } else {
    std::cout << "no\n";
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x40(%rbp)
callq 0x1120
movq -0x40(%rbp), %rsi
movq 0x4bc9(%rip), %rdi      # 0x5fe0
callq 0x1110
jmp 0x141e
leaq -0x28(%rbp), %rdi
callq 0x12a0
testb $0x1, %al
jne 0x142d
jmp 0x145b
movq 0x4b9c(%rip), %rdi      # 0x5fd0
leaq 0x1bc9(%rip), %rsi      # 0x3004
callq 0x10c0
jmp 0x1442
jmp 0x1472
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1070
jmp 0x1484
movq 0x4b6e(%rip), %rdi      # 0x5fd0
leaq 0x1ba0(%rip), %rsi      # 0x3009
callq 0x10c0
jmp 0x1470
jmp 0x1472
leaq -0x28(%rbp), %rdi
callq 0x1070
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x1140
nopl (%rax)
// File: nmmmnu[P]HM3/hm3/main/db_lsm.cc
// Function: main
int main(int argc, char **argv){
	if (argc <= 3){
		printUsage(argv[0]);
		return 1;
	}

	// =======================

	const auto op		= argv[1];
	const auto path		= argv[2];

	size_t const keyCount	= (size_t) argc - 3;
	char **keys		= & argv[3];

	// =======================

	using DirectoryTableLoader = hm3::tableloader::DirectoryTableLoader;
	using MyLSMTable = hm3::LSMTable<DirectoryTableLoader::container_type>;

	DirectoryTableLoader dl{ path };
	MyLSMTable mtlist(*dl);

	// =======================

	switch(op[0]){
	case 'r':	return op_filesearch(mtlist, keyCount, keys);
	case 'l':	return op_list(mtlist, keyCount, keys);
	}

	printUsage(argv[0]);
	return 1;
}

// Assembly:
subq $0xb8, %rsp
movl $0x0, 0xb4(%rsp)
movl %edi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
cmpl $0x3, 0xb0(%rsp)
jg 0x25db
movq 0xa8(%rsp), %rax
movq (%rax), %rdi
callq 0x2770
movl $0x1, 0xb4(%rsp)
jmp 0x2757
movq 0xa8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x98(%rsp)
movslq 0xb0(%rsp), %rax
addq $-0x3, %rax
movq %rax, 0x90(%rsp)
movq 0xa8(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x88(%rsp)
movq 0x98(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2b80
movq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2bd0
movq 0x18(%rsp), %rdi
callq 0x2c50
movq %rax, 0x20(%rsp)
jmp 0x2667
movq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x2c60
jmp 0x2678
movq 0xa0(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x6c, %eax
je 0x26ee
jmp 0x268e
movl 0xc(%rsp), %eax
subl $0x72, %eax
je 0x26b9
jmp 0x2728
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x2c80
jmp 0x2766
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x2890
movl %eax, 0x8(%rsp)
jmp 0x26d9
movl 0x8(%rsp), %eax
movl %eax, 0xb4(%rsp)
movl $0x1, 0x28(%rsp)
jmp 0x274d
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x38(%rsp), %rdi
movl $0xa, %ecx
callq 0x2950
movl %eax, 0x4(%rsp)
jmp 0x2713
movl 0x4(%rsp), %eax
movl %eax, 0xb4(%rsp)
movl $0x1, 0x28(%rsp)
jmp 0x274d
movq 0xa8(%rsp), %rax
movq (%rax), %rdi
callq 0x2770
jmp 0x273a
movl $0x1, 0xb4(%rsp)
movl $0x1, 0x28(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x2c80
movl 0xb4(%rsp), %eax
addq $0xb8, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x2360
// File: nmmmnu[P]HM3/hm3/main/db_lsm.cc
// Function: printUsage(char const*)
static void printUsage(const char *cmd){
	std::cout
		<< "Usage:"	<< '\n'
		<< "\t"		<< cmd	<< " r [lsm_path] [key] - load lsm_path, then search for the key"	<< '\n'
		<< "\t"		<< cmd	<< " l [lsm_path] -     - load lsm_path, then list using iterator"	<< '\n'
		<< "\t"		<< cmd	<< " l [lsm_path] [key] - load lsm_path, then list using iterator"	<< '\n'

		<< "\t\tPath names must be written without extention"		<< '\n'
		<< "\t\tExample 'directory/file.*'"				<< '\n'

		<< '\n';
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq 0x13854(%rip), %rdi     # 0x15fd0
leaq 0xc881(%rip), %rsi      # 0xf004
callq 0x2200
movq %rax, %rdi
movl $0xa, %esi
callq 0x2260
movq %rax, %rdi
leaq 0xc86c(%rip), %rsi      # 0xf00b
callq 0x2200
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x2200
movq %rax, %rdi
leaq 0xc853(%rip), %rsi      # 0xf00d
callq 0x2200
movq %rax, %rdi
movl $0xa, %esi
callq 0x2260
movq %rax, %rdi
leaq 0xc835(%rip), %rsi      # 0xf00b
callq 0x2200
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x2200
movq %rax, %rdi
leaq 0xc859(%rip), %rsi      # 0xf04a
callq 0x2200
movq %rax, %rdi
movl $0xa, %esi
callq 0x2260
movq %rax, %rdi
leaq 0xc7fe(%rip), %rsi      # 0xf00b
callq 0x2200
movq %rax, %rdi
movq (%rsp), %rsi
callq 0x2200
movq %rax, %rdi
leaq 0xc860(%rip), %rsi      # 0xf088
callq 0x2200
movq %rax, %rdi
movl $0xa, %esi
callq 0x2260
movq %rax, %rdi
leaq 0xc882(%rip), %rsi      # 0xf0c6
callq 0x2200
movq %rax, %rdi
movl $0xa, %esi
callq 0x2260
movq %rax, %rdi
leaq 0xc895(%rip), %rsi      # 0xf0f5
callq 0x2200
movq %rax, %rdi
movl $0xa, %esi
callq 0x2260
movq %rax, %rdi
movl $0xa, %esi
callq 0x2260
popq %rax
retq
nopw %cs:(%rax,%rax)
// File: btbujiangjun[P]abcdl/example/sessionq.cpp
// Function: SessionQ::pass(abcdl::algebra::Matrix<float>, abcdl::algebra::Matrix<float>, abcdl::algebra::Matrix<float>, abcdl::algebra::Matrix<float>)
void pass(abcdl::algebra::Mat train_data,
              abcdl::algebra::Mat train_label,
              abcdl::algebra::Mat test_data,
              abcdl::algebra::Mat test_label){
        real loss = 0;
        fnn.train(train_data, train_label);
        fnn.evaluate(test_data, test_label, &loss);
        fnn.write_model();
    }

// Assembly:
subq $0x48, %rsp
movq %rcx, (%rsp)
movq %r8, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rsp)
callq 0x585e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rdi
leaq 0x1c(%rsp), %rcx
callq 0x593b0
movq 0x10(%rsp), %rdi
callq 0x1d510
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: yangwanyuan[P]HLKVDS/tools/ExampleKV.cc
// Function: Get(hlkvds::DB*)
void Get(hlkvds::DB *db) {
    int key_len;
    for (int index = 0; index < TEST_RECORD_NUM; index++) {
        stringstream key_ss;
        key_ss << index;
        std::string key(key_ss.str());
        key_len = key.length();
        std::string get_data;
        db->Get(key.c_str(), key_len, get_data);
        std::cout << "Get Item Success. key = " << key << " ,value = "
                << get_data << std::endl;
    }

}

// Assembly:
subq $0x238, %rsp            # imm = 0x238
movq %rdi, 0x230(%rsp)
movl $0x0, 0x228(%rsp)
cmpl $0x1, 0x228(%rsp)
jge 0x8eea
leaq 0xa0(%rsp), %rdi
callq 0x8390
leaq 0xb0(%rsp), %rdi
movl 0x228(%rsp), %esi
callq 0x8890
jmp 0x8d7b
leaq 0x70(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x8520
jmp 0x8d8f
leaq 0x70(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x8780
movl %eax, 0x22c(%rsp)
leaq 0x50(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x86f0
movq 0x28(%rsp), %rdi
movq 0x230(%rsp), %rax
movq %rax, 0x30(%rsp)
callq 0x81a0
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %r8
movq %rax, %rdx
movl 0x22c(%rsp), %ecx
leaq 0x40(%rsp), %rdi
callq 0x275b0
jmp 0x8deb
leaq 0x40(%rsp), %rdi
callq 0x9530
movq 0x681d4(%rip), %rdi     # 0x70fd0
leaq 0x49201(%rip), %rsi     # 0x52004
callq 0x8530
movq %rax, 0x20(%rsp)
jmp 0x8e0f
movq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x84b0
movq %rax, 0x18(%rsp)
jmp 0x8e25
movq 0x18(%rsp), %rdi
leaq 0x491ec(%rip), %rsi     # 0x5201d
callq 0x8530
movq %rax, 0x10(%rsp)
jmp 0x8e3d
movq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x84b0
movq %rax, 0x8(%rsp)
jmp 0x8e53
movq 0x8(%rsp), %rdi
movq 0x68141(%rip), %rsi     # 0x70fa0
callq 0x8570
jmp 0x8e66
leaq 0x50(%rsp), %rdi
callq 0x89b8
leaq 0x70(%rsp), %rdi
callq 0x89b8
leaq 0xa0(%rsp), %rdi
callq 0x8400
movl 0x228(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x228(%rsp)
jmp 0x8d4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x8edb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x89b8
leaq 0x70(%rsp), %rdi
callq 0x89b8
leaq 0xa0(%rsp), %rdi
callq 0x8400
jmp 0x8ef2
addq $0x238, %rsp            # imm = 0x238
retq
movq 0x98(%rsp), %rdi
callq 0x88a0
nop
// File: yangwanyuan[P]HLKVDS/tools/ExampleKV.cc
// Function: Insert(hlkvds::DB*)
void Insert(hlkvds::DB *db) {
    int key_len;
    int value_len;
    for (int index = 0; index < TEST_RECORD_NUM; index++) {
        stringstream key_ss;
        key_ss << index;
        std::string key(key_ss.str());
        std::string value = "Begin" + key + "End";
        key_len = key.length();
        value_len = value.length();
        db->Insert(key.c_str(), key_len, value.c_str(), value_len);
        std::cout << "Insert Item Success. key = " << key << " ,value = "
                << value << std::endl;
    }

}

// Assembly:
subq $0x278, %rsp            # imm = 0x278
movq %rdi, 0x270(%rsp)
movl $0x0, 0x264(%rsp)
cmpl $0x1, 0x264(%rsp)
jge 0x917b
leaq 0xd8(%rsp), %rdi
callq 0x8390
leaq 0xe8(%rsp), %rdi
movl 0x264(%rsp), %esi
callq 0x8890
jmp 0x8f4b
leaq 0xa8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x8520
jmp 0x8f62
leaq 0x490bf(%rip), %rsi     # 0x52028
leaq 0x68(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x95c0
jmp 0x8f7d
leaq 0x490aa(%rip), %rdx     # 0x5202e
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x9570
jmp 0x8f98
leaq 0x68(%rsp), %rdi
callq 0x89b8
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8780
movl %eax, 0x26c(%rsp)
leaq 0x88(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x8780
movq 0x30(%rsp), %rdi
movl %eax, 0x268(%rsp)
movq 0x270(%rsp), %rax
movq %rax, 0x40(%rsp)
callq 0x81a0
movq 0x38(%rsp), %rdi
movq %rax, 0x48(%rsp)
movl 0x26c(%rsp), %eax
movl %eax, 0x54(%rsp)
callq 0x81a0
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl 0x54(%rsp), %ecx
movq %rax, %r8
movzwl 0x268(%rsp), %r9d
movq %rsp, %rax
movl $0x0, (%rax)
leaq 0x58(%rsp), %rdi
callq 0x273c0
jmp 0x9034
leaq 0x58(%rsp), %rdi
callq 0x9530
movq 0x67f8b(%rip), %rdi     # 0x70fd0
leaq 0x48fe6(%rip), %rsi     # 0x52032
callq 0x8530
movq %rax, 0x28(%rsp)
jmp 0x9058
movq 0x28(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x84b0
movq %rax, 0x20(%rsp)
jmp 0x9071
movq 0x20(%rsp), %rdi
leaq 0x48fa0(%rip), %rsi     # 0x5201d
callq 0x8530
movq %rax, 0x18(%rsp)
jmp 0x9089
movq 0x18(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x84b0
movq %rax, 0x10(%rsp)
jmp 0x90a2
movq 0x10(%rsp), %rdi
movq 0x67ef2(%rip), %rsi     # 0x70fa0
callq 0x8570
jmp 0x90b5
leaq 0x88(%rsp), %rdi
callq 0x89b8
leaq 0xa8(%rsp), %rdi
callq 0x89b8
leaq 0xd8(%rsp), %rdi
callq 0x8400
movl 0x264(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x264(%rsp)
jmp 0x8f1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x916c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x915f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x89b8
jmp 0x915f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x89b8
leaq 0xa8(%rsp), %rdi
callq 0x89b8
leaq 0xd8(%rsp), %rdi
callq 0x8400
jmp 0x9183
addq $0x278, %rsp            # imm = 0x278
retq
movq 0xd0(%rsp), %rdi
callq 0x88a0
// File: yangwanyuan[P]HLKVDS/tools/ExampleKV.cc
// Function: Delete(hlkvds::DB*)
void Delete(hlkvds::DB *db) {
    int key_len;
    for (int index = 0; index < TEST_RECORD_NUM; index++) {
        stringstream key_ss;
        key_ss << index;
        std::string key(key_ss.str());
        key_len = key.length();
        db->Delete(key.c_str(), key_len);
        std::cout << "Delete Item Success. key = " << key << std::endl;
    }

}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, 0x1f0(%rsp)
movl $0x0, 0x1e8(%rsp)
cmpl $0x1, 0x1e8(%rsp)
jge 0x92d7
leaq 0x60(%rsp), %rdi
callq 0x8390
leaq 0x70(%rsp), %rdi
movl 0x1e8(%rsp), %esi
callq 0x8890
jmp 0x91d5
leaq 0x30(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x8520
jmp 0x91e6
leaq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x8780
movq 0x10(%rsp), %rdi
movl %eax, 0x1ec(%rsp)
movq 0x1f0(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x81a0
movq 0x18(%rsp), %rsi
movq %rax, %rdx
movl 0x1ec(%rsp), %ecx
leaq 0x20(%rsp), %rdi
callq 0x274e0
jmp 0x922e
leaq 0x20(%rsp), %rdi
callq 0x9530
movq 0x67d91(%rip), %rdi     # 0x70fd0
leaq 0x48e08(%rip), %rsi     # 0x5204e
callq 0x8530
movq %rax, 0x8(%rsp)
jmp 0x9252
movq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x84b0
movq %rax, (%rsp)
jmp 0x9267
movq (%rsp), %rdi
movq 0x67d2e(%rip), %rsi     # 0x70fa0
callq 0x8570
jmp 0x9279
leaq 0x30(%rsp), %rdi
callq 0x89b8
leaq 0x60(%rsp), %rdi
callq 0x8400
movl 0x1e8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1e8(%rsp)
jmp 0x91aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0x92cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x89b8
leaq 0x60(%rsp), %rdi
callq 0x8400
jmp 0x92df
addq $0x1f8, %rsp            # imm = 0x1F8
retq
movq 0x58(%rsp), %rdi
callq 0x88a0
nopl (%rax)
// File: yangwanyuan[P]HLKVDS/tools/ExampleKV.cc
// Function: OpenExample(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void OpenExample(string filename) {
    hlkvds::DB *db;

    if (!hlkvds::DB::OpenDB(filename, &db)) {
        return;
    }

    Get(db);
    Insert(db);
    //sleep(2);
    Get(db);
    Delete(db);
    //sleep(2);
    Get(db);
    Insert(db);
    //sleep(2);
    Get(db);

    delete db;
}

// Assembly:
subq $0xe8, %rsp
movq %rdi, %rsi
movq %rsi, 0xe0(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x81c0
leaq 0x68(%rsp), %rdi
callq 0x369c0
jmp 0x931b
movups 0xa8(%rsp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x40(%rax)
movups 0x68(%rsp), %xmm0
movups 0x78(%rsp), %xmm1
movups 0x88(%rsp), %xmm2
movups 0x98(%rsp), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0xb8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x270d0
movb %al, 0x5b(%rsp)
jmp 0x936e
movb 0x5b(%rsp), %al
xorb $-0x1, %al
movb %al, 0x5a(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x89b8
movb 0x5a(%rsp), %al
testb $0x1, %al
jne 0x938f
jmp 0x93b4
jmp 0x942d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x89b8
jmp 0x9435
movq 0xd8(%rsp), %rdi
callq 0x8d30
movq 0xd8(%rsp), %rdi
callq 0x8f00
movq 0xd8(%rsp), %rdi
callq 0x8d30
movq 0xd8(%rsp), %rdi
callq 0x9190
movq 0xd8(%rsp), %rdi
callq 0x8d30
movq 0xd8(%rsp), %rdi
callq 0x8f00
movq 0xd8(%rsp), %rdi
callq 0x8d30
movq 0xd8(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
je 0x942d
movq 0x50(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
addq $0xe8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x88a0
nop
// File: ArashPartow[P]exprtk/exprtk_simple_example_20.cpp
// Function: vector_access_rtc::handle_runtime_violation(exprtk::vector_access_runtime_check::violation_context&)
bool handle_runtime_violation(violation_context& context)
   {
      const map_t::iterator itr     = vector_map.find(static_cast<void*>(context.base_ptr));
      const std::string vector_name = (itr != vector_map.end()) ?
                                      itr->second : "Unknown"   ;

      printf("Runtime vector access violation\n"
             "Vector: %s base: %p end: %p access: %p typesize: %d\n",
             vector_name.c_str(),
             context.base_ptr   ,
             context.end_ptr    ,
             context.access_ptr ,
             static_cast<unsigned int>(context.type_size));

      throw std::runtime_error
         ("Runtime vector access violation. Vector: " + vector_name);

      return false;
   }

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
addq $0x8, %rdi
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x88(%rsp)
leaq 0x88(%rsp), %rsi
callq 0x11af20
movq 0x18(%rsp), %rdi
movq %rax, 0x90(%rsp)
addq $0x8, %rdi
callq 0x11af70
movq %rax, 0x60(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x11af50
movb $0x0, 0x5e(%rsp)
testb $0x1, %al
jne 0x11ac20
jmp 0x11ac40
leaq 0x90(%rsp), %rdi
callq 0x11afa0
movq %rax, %rsi
addq $0x8, %rsi
leaq 0x68(%rsp), %rdi
callq 0x111110
jmp 0x11ac6e
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x111670
movq 0x10(%rsp), %rdx
movb $0x1, 0x5e(%rsp)
leaq 0x32f9e5(%rip), %rsi    # 0x44a645
leaq 0x68(%rsp), %rdi
callq 0x118770
jmp 0x11ac6c
jmp 0x11ac6e
testb $0x1, 0x5e(%rsp)
jne 0x11ac77
jmp 0x11ac81
leaq 0x5f(%rsp), %rdi
callq 0x111790
leaq 0x68(%rsp), %rdi
callq 0x1110f0
movq %rax, %rsi
movq 0x98(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r8
movl 0x18(%rax), %r9d
leaq 0x32f9a1(%rip), %rdi    # 0x44a64d
xorl %eax, %eax
callq 0x111080
jmp 0x11acb5
movb $0x1, 0x27(%rsp)
movl $0x10, %edi
callq 0x1112f0
movq %rax, 0x8(%rsp)
leaq 0x32f9d2(%rip), %rsi    # 0x44a6a2
leaq 0x28(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x11afd0
jmp 0x11ace1
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x111230
jmp 0x11acf2
movq 0x8(%rsp), %rdi
movb $0x0, 0x27(%rsp)
movq 0x5012e5(%rip), %rsi    # 0x61bfe8
movq 0x5012d6(%rip), %rdx    # 0x61bfe0
callq 0x111440
jmp 0x11ad98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
testb $0x1, 0x5e(%rsp)
jne 0x11ad2b
jmp 0x11ad35
leaq 0x5f(%rsp), %rdi
callq 0x111790
jmp 0x11ad8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x11ad84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
jmp 0x11ad6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x1117a8
testb $0x1, 0x27(%rsp)
jne 0x11ad78
jmp 0x11ad82
movq 0x8(%rsp), %rdi
callq 0x1115c0
jmp 0x11ad84
leaq 0x68(%rsp), %rdi
callq 0x1117a8
movq 0x50(%rsp), %rdi
callq 0x111470
nopl (%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: operator==(Action const&, Action const&)
bool operator==(const Action& lhs, const Action& rhs) {
  return lhs.type == rhs.type &&
    lhs.system == rhs.system &&
    lhs.ship == rhs.ship &&
    lhs.system_target == rhs.system_target &&
    lhs.target == rhs.target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl 0x4(%rdx), %ecx
movb %al, -0x11(%rbp)
jne 0x379a
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl 0x8(%rdx), %ecx
movb %al, -0x11(%rbp)
jne 0x379a
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
movq -0x10(%rbp), %rsi
addq $0xc, %rsi
callq 0x3620
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x11(%rbp)
jne 0x376d
jmp 0x379a
movq -0x8(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x10(%rbp), %rdx
xorl %eax, %eax
cmpl 0x14(%rdx), %ecx
movb %al, -0x11(%rbp)
jne 0x379a
movq -0x8(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x3620
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: operator<(Action const&, Action const&)
bool operator<(const Action& lhs, const Action& rhs) {
  if (lhs.type < rhs.type) return true;
  if (lhs.type > rhs.type) return false;
  if (lhs.system < rhs.system) return true;
  if (lhs.system > rhs.system) return false;
  if (lhs.ship < rhs.ship) return true;
  if (!(lhs.ship == rhs.ship)) return false;
  if (lhs.system_target < rhs.system_target) return true;
  if (lhs.system_target > rhs.system_target) return false;
  if (lhs.target < rhs.target) return true;
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x37d9
movb $0x1, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x37f2
movb $0x0, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x380b
movb $0x1, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x3824
movb $0x0, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rsi
addq $0xc, %rsi
callq 0x3660
testb $0x1, %al
jne 0x383f
jmp 0x3845
movb $0x1, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rsi
addq $0xc, %rsi
callq 0x3620
testb $0x1, %al
jne 0x3864
movb $0x0, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x387a
movb $0x1, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jle 0x3890
movb $0x0, -0x1(%rbp)
jmp 0x38b5
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
addq $0x18, %rsi
callq 0x3660
testb $0x1, %al
jne 0x38ab
jmp 0x38b1
movb $0x1, -0x1(%rbp)
jmp 0x38b5
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
// File: czinn[P]homeworlds/game.cc
// Function: Game::Game(int)
Game::Game(int num_players) :
    num_players_(num_players),
    cur_player_(1),
    done_main_action_(false),
    homeworlds_built_(0),
    next_system_(1),
    sacrifice_actions_(0),
    sacrifice_colour_(RED) {
  for (const auto colour : { RED, YELLOW, GREEN, BLUE }) {
    for (const auto size : { SMALL, MEDIUM, LARGE }) {
      Pyramid p { size, colour };
      stash_[p] = 1 + num_players;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
movl -0xc(%rbp), %eax
movl %eax, (%rdi)
movl $0x1, 0x4(%rdi)
movb $0x0, 0x8(%rdi)
movl $0x0, 0xc(%rdi)
movl $0x1, 0x10(%rdi)
movl $0x0, 0x14(%rdi)
movl $0x0, 0x18(%rdi)
addq $0x20, %rdi
movq %rdi, -0xc0(%rbp)
callq 0x8880
movq -0xb8(%rbp), %rdi
addq $0x38, %rdi
movq %rdi, -0xb0(%rbp)
callq 0x88a0
movl $0x0, -0x38(%rbp)
movl $0x1, -0x34(%rbp)
movl $0x2, -0x30(%rbp)
movl $0x3, -0x2c(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x4, -0x20(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x88c0
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x88e0
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
je 0x3a98
movq -0x40(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movl $0x1, -0x74(%rbp)
movl $0x2, -0x70(%rbp)
movl $0x3, -0x6c(%rbp)
leaq -0x74(%rbp), %rax
movq %rax, -0x68(%rbp)
movq $0x3, -0x60(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x8920
movq %rax, -0x80(%rbp)
movq -0x58(%rbp), %rdi
callq 0x8940
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rax
cmpq -0x88(%rbp), %rax
je 0x3a85
movq -0xb8(%rbp), %rdi
movq -0x80(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0xc(%rbp), %eax
incl %eax
movl %eax, -0xcc(%rbp)
addq $0x38, %rdi
leaq -0x94(%rbp), %rsi
callq 0x8980
movq %rax, -0xc8(%rbp)
jmp 0x3a3c
movq -0xc8(%rbp), %rax
movl -0xcc(%rbp), %ecx
movl %ecx, (%rax)
movq -0x80(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x80(%rbp)
jmp 0x39df
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
callq 0x8a60
movq -0xc0(%rbp), %rdi
callq 0x8a80
jmp 0x3aa1
jmp 0x3a87
movq -0x40(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x40(%rbp)
jmp 0x397e
addq $0xd0, %rsp
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x33c0
nopl (%rax)
// File: czinn[P]homeworlds/game.cc
// Function: Game::winner() const
int Game::winner() const {
  if (homeworlds_built_ < num_players_ || sacrifice_actions_ > 0) {
    return 0;
  }
  int w = -1;
  for (const System& s : systems_) {
    if (s.player != 0 && find_if(s.ships.begin(), s.ships.end(), [&s](const Ship& ship) {
            return ship.player == s.player; 
          }) != s.ships.end()) {
      if (w == -1) {
        w = s.player;
      } else {
        return 0;
      }
    }
  }
  return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x68(%rbp)
movl 0xc(%rcx), %eax
cmpl (%rcx), %eax
jl 0x3ca5
movq -0x68(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jle 0x3cb1
movl $0x0, -0x4(%rbp)
jmp 0x3dac
movq -0x68(%rbp), %rax
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
addq $0x20, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8ae0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8b10
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x8b40
testb $0x1, %al
jne 0x3cf4
jmp 0x3da6
leaq -0x28(%rbp), %rdi
callq 0x8b80
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x4(%rcx)
movb %al, -0x69(%rbp)
je 0x3d70
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
callq 0x8be0
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
callq 0x8c10
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x3dc0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
addq $0x20, %rdi
callq 0x8c10
movq %rax, -0x60(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x8ba0
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x3d79
jmp 0x3d96
cmpl $-0x1, -0x14(%rbp)
jne 0x3d8b
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x3d94
movl $0x0, -0x4(%rbp)
jmp 0x3dac
jmp 0x3d96
jmp 0x3d98
leaq -0x28(%rbp), %rdi
callq 0x8c40
jmp 0x3cde
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: Game::get_system(int) const
const System& Game::get_system(int id) const {
  for (const System& system : systems_) {
    if (system.id == id) {
      return system;
    }
  }
  throw "system not found";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8ae0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8b10
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x8b40
testb $0x1, %al
jne 0x3e68
jmp 0x3e97
leaq -0x20(%rbp), %rdi
callq 0x8b80
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x3e8a
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
jmp 0x3e8c
leaq -0x20(%rbp), %rdi
callq 0x8c40
jmp 0x3e55
movl $0x8, %edi
callq 0x3100
movq %rax, %rdi
leaq 0x20265(%rip), %rax     # 0x24110
movq %rax, (%rdi)
movq 0x32103(%rip), %rsi     # 0x35fb8
xorl %eax, %eax
movl %eax, %edx
callq 0x33a0
nop
// File: czinn[P]homeworlds/game.cc
// Function: Game::smallest_of_colour(Colour) const
Pyramid Game::smallest_of_colour(Colour colour) const {
  for (const auto& it : stash_) {
    if (it.first.colour == colour && it.second > 0) {
      return it.first;
    }
  }
  return Pyramid{ZERO, colour};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8c60
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x8c90
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x8cc0
testb $0x1, %al
jne 0x3f08
jmp 0x3f45
leaq -0x28(%rbp), %rdi
callq 0x8cf0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x3f38
movq -0x38(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jle 0x3f38
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3f52
jmp 0x3f3a
leaq -0x28(%rbp), %rdi
callq 0x8d10
jmp 0x3ef5
movl $0x0, -0x8(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: czinn[P]homeworlds/game.cc
// Function: Game::hash() const
int Game::hash() const {
  int systems = 0;
  for (const System& system : systems_) {
    systems += ::hash(system);
  }
  return systems ^ (PLAYER_HASH[num_players_] + PLAYER_HASH[cur_player_]) ^
    SIZE_HASH[sacrifice_actions_] ^ COLOUR_HASH[sacrifice_colour_] ^
    (31 * PLAYER_HASH[homeworlds_built_]) ^ (done_main_action_ ? 0xd7067b50 : 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0xc(%rbp)
addq $0x20, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8ae0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8b10
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x8b40
testb $0x1, %al
jne 0x3fb0
jmp 0x3fd7
leaq -0x20(%rbp), %rdi
callq 0x8b80
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4050
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x8c40
jmp 0x3f9d
movq -0x38(%rbp), %rcx
movl -0xc(%rbp), %eax
movslq (%rcx), %rsi
leaq 0x200f8(%rip), %rdx     # 0x240e0
movl (%rdx,%rsi,4), %edx
movslq 0x4(%rcx), %rdi
leaq 0x200ea(%rip), %rsi     # 0x240e0
addl (%rsi,%rdi,4), %edx
xorl %edx, %eax
movslq 0x14(%rcx), %rsi
leaq 0x200ea(%rip), %rdx     # 0x240f0
xorl (%rdx,%rsi,4), %eax
movl 0x18(%rcx), %edx
movl %edx, %esi
leaq 0x200eb(%rip), %rdx     # 0x24100
xorl (%rdx,%rsi,4), %eax
movslq 0xc(%rcx), %rsi
leaq 0x200bd(%rip), %rdx     # 0x240e0
imull $0x1f, (%rdx,%rsi,4), %edx
xorl %edx, %eax
movb 0x8(%rcx), %sil
xorl %ecx, %ecx
movl $0xd7067b50, %edx       # imm = 0xD7067B50
testb $0x1, %sil
cmovnel %edx, %ecx
xorl %ecx, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: hash(System const&)
int hash(const System& system) {
  int ships = SHIPS_HASH;
  int stars = STARS_HASH;
  for (const Pyramid& star : system.stars) {
    stars += hash(star);
  }
  for (const Ship& ship : system.ships) {
    ships += hash(ship);
  }
  return ships ^ stars ^ PLAYER_HASH[system.player];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x12ec3a54, -0xc(%rbp) # imm = 0x12EC3A54
movl $0xd9a110c5, -0x10(%rbp) # imm = 0xD9A110C5
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x90e0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x9110
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x9140
testb $0x1, %al
jne 0x40a3
jmp 0x40ca
leaq -0x20(%rbp), %rdi
callq 0x9180
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x6af0
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x91a0
jmp 0x4090
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x8be0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x8c10
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x8ba0
testb $0x1, %al
jne 0x4103
jmp 0x412a
leaq -0x40(%rbp), %rdi
callq 0x8fb0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x6b20
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8fd0
jmp 0x40f0
movl -0xc(%rbp), %eax
xorl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rdx
leaq 0x1ffa1(%rip), %rcx     # 0x240e0
xorl (%rcx,%rdx,4), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: hash_string[abi:cxx11](System const&)
std::string hash_string(const System& system) {
  std::set<char> chars;
  for (const Pyramid& pyramid : system.stars) {
    chars.insert(hash_string(Ship{system.player, pyramid}));
  }
  for (const Ship& ship : system.ships) {
    chars.insert(0x80 | hash_string(ship));
  }
  return std::string(chars.begin(), chars.end());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0xf0(%rbp)
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x9c50
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x90e0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x9110
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x9140
testb $0x1, %al
jne 0x4499
jmp 0x452a
leaq -0x50(%rbp), %rdi
callq 0x9180
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x70(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x6c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x6b50
movb %al, -0xf1(%rbp)
jmp 0x44cc
movb -0xf1(%rbp), %al
movb %al, -0x61(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x61(%rbp), %rsi
callq 0x9c70
movb %dl, -0x101(%rbp)
movq %rax, -0x100(%rbp)
jmp 0x44f1
movb -0x101(%rbp), %al
movq -0x100(%rbp), %rcx
movq %rcx, -0x90(%rbp)
movb %al, -0x88(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x91a0
jmp 0x4483
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x4694
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rdi
callq 0x8be0
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rdi
callq 0x8c10
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x8ba0
testb $0x1, %al
jne 0x4578
jmp 0x45f7
leaq -0xa0(%rbp), %rdi
callq 0x8fb0
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
callq 0x6b50
movb %al, -0x102(%rbp)
jmp 0x459f
movb -0x102(%rbp), %al
orb $-0x80, %al
movb %al, -0xb1(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0xb1(%rbp), %rsi
callq 0x9c70
movb %dl, -0x111(%rbp)
movq %rax, -0x110(%rbp)
jmp 0x45cc
movb -0x111(%rbp), %al
movq -0x110(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movb %al, -0xc0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8fd0
jmp 0x455f
leaq -0x40(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x9cc0
movq -0x128(%rbp), %rdi
movq %rax, -0xd0(%rbp)
callq 0x9cf0
movq %rax, -0xd8(%rbp)
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x33d0
movq -0xf0(%rbp), %rdi
movq -0x120(%rbp), %rcx
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
callq 0x9d20
jmp 0x4657
leaq -0xd9(%rbp), %rdi
callq 0x3280
leaq -0x40(%rbp), %rdi
callq 0x9da0
movq -0xe8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xd9(%rbp), %rdi
callq 0x3280
leaq -0x40(%rbp), %rdi
callq 0x9da0
movq -0x78(%rbp), %rdi
callq 0x33c0
nopw %cs:(%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: colour_available(System const&, int, Colour, bool)
bool colour_available(const System& system, int player, Colour colour,
    bool include_stars) {
  if (include_stars) {
    for (const Pyramid& star : system.stars) {
      if (star.colour == colour) {
        return true;
      }
    }
  }

  for (const Ship& ship : system.ships) {
    if (ship.player == player && ship.pyramid.colour == colour) {
      return true;
    }
  }

  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0x5709
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x90e0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x9110
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9140
testb $0x1, %al
jne 0x56d8
jmp 0x5707
leaq -0x30(%rbp), %rdi
callq 0x9180
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x56fa
movb $0x1, -0x1(%rbp)
jmp 0x577d
jmp 0x56fc
leaq -0x30(%rbp), %rdi
callq 0x91a0
jmp 0x56c5
jmp 0x5709
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x8be0
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
callq 0x8c10
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x8ba0
testb $0x1, %al
jne 0x5742
jmp 0x5779
leaq -0x50(%rbp), %rdi
callq 0x8fb0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x576c
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x576c
movb $0x1, -0x1(%rbp)
jmp 0x577d
jmp 0x576e
leaq -0x50(%rbp), %rdi
callq 0x8fd0
jmp 0x572f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: connected(System const&, Pyramid const&)
bool connected(const System& a, const Pyramid& b) {
  for (const Pyramid& star : a.stars) {
    if (star.size == b.size) {
      return false;
    }
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x90e0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9110
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x9140
testb $0x1, %al
jne 0x57d9
jmp 0x5807
leaq -0x28(%rbp), %rdi
callq 0x9180
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x57fa
movb $0x0, -0x1(%rbp)
jmp 0x580b
jmp 0x57fc
leaq -0x28(%rbp), %rdi
callq 0x91a0
jmp 0x57c6
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: czinn[P]homeworlds/game.cc
// Function: connected(System const&, System const&)
bool connected(const System& a, const System& b) {
  for (const Pyramid& star : a.stars) {
    for (const Pyramid& star2 : b.stars) {
      if (star.size == star2.size) {
        return false;
      }
    }
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x90e0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x9110
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x9140
testb $0x1, %al
jne 0x586c
jmp 0x58f0
leaq -0x28(%rbp), %rdi
callq 0x9180
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x90e0
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x9110
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x9140
testb $0x1, %al
jne 0x58b2
jmp 0x58e0
leaq -0x48(%rbp), %rdi
callq 0x9180
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x58(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x58d3
movb $0x0, -0x1(%rbp)
jmp 0x58f4
jmp 0x58d5
leaq -0x48(%rbp), %rdi
callq 0x91a0
jmp 0x589f
jmp 0x58e2
leaq -0x28(%rbp), %rdi
callq 0x91a0
jmp 0x5856
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nop
// File: czinn[P]homeworlds/game.cc
// Function: Game::advance_cur_player()
void Game::advance_cur_player() {
  cur_player_ = (cur_player_ % num_players_) + 1;
  if (winner() == 0) {
    done_main_action_ = false;
    sacrifice_actions_ = 0;
    // TODO: handle eliminated players in games with more than two players
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movl 0x4(%rdi), %eax
cltd
idivl (%rdi)
addl $0x1, %edx
movl %edx, 0x4(%rdi)
callq 0x3c80
cmpl $0x0, %eax
jne 0x5f29
movq -0x10(%rbp), %rax
movb $0x0, 0x8(%rax)
movl $0x0, 0x14(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: czinn[P]homeworlds/game.cc
// Function: Game::remove_ship(int, Ship const&)
Ship Game::remove_ship(int system_id, const Ship& ship) {
  auto system = find_if(systems_.begin(), systems_.end(),
      [system_id](const System& s) {
        return s.id == system_id;
      });
  const auto& it = find_if(system->ships.begin(), system->ships.end(),
      [&ship](const Ship& ship2) {
        return ship == ship2;
      });
  if (it != system->ships.end()) {
    stash_[ship.pyramid]++;
    system->ships.erase(it);
  }
  return ship;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movq %rdx, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
addq $0x20, %rdi
callq 0x96c0
movq -0xa8(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0x20, %rdi
callq 0x96f0
movq %rax, -0x40(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x44(%rbp), %edx
callq 0x6850
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9720
movq %rax, %rdi
addq $0x20, %rdi
callq 0x9820
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9720
movq %rax, %rdi
addq $0x20, %rdi
callq 0x9850
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdx
callq 0x68b0
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9720
movq %rax, %rdi
addq $0x20, %rdi
callq 0x9850
movq -0xa0(%rbp), %rdi
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x9880
testb $0x1, %al
jne 0x607d
jmp 0x60d4
movq -0xa8(%rbp), %rdi
addq $0x38, %rdi
movq -0x28(%rbp), %rsi
addq $0x4, %rsi
callq 0x8980
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
callq 0x9720
addq $0x20, %rax
movq %rax, -0xb0(%rbp)
movq -0x50(%rbp), %rsi
leaq -0x80(%rbp), %rdi
callq 0x9a90
movq -0xb0(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x9a20
movq %rax, -0x88(%rbp)
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, -0x8(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movl -0x90(%rbp), %edx
addq $0xb0, %rsp
popq %rbp
retq
nop
// File: czinn[P]homeworlds/game.cc
// Function: Game::add_ship(int, Ship const&)
void Game::add_ship(int system_id, const Ship& ship) {
  auto it = find_if(systems_.begin(), systems_.end(),
      [system_id](const System& s) {
        return s.id == system_id;
      });
  it->ships.push_back(ship);
  stash_[ship.pyramid]--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x20, %rdi
callq 0x96c0
movq -0x40(%rbp), %rdi
movq %rax, -0x28(%rbp)
addq $0x20, %rdi
callq 0x96f0
movq %rax, -0x30(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x34(%rbp), %edx
callq 0x67f0
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9720
movq %rax, %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rsi
callq 0x99b0
movq -0x40(%rbp), %rdi
addq $0x38, %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
callq 0x8980
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nop