LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl 0xc(%rdi), %eax
cmpl (%rdi), %eax
jl 0x293a
cmpl $0x0, 0x14(%rdi)
jg 0x293a
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rdx
cmpq %rdx, %rcx
je 0x293d
pushq %r14
pushq %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
movl 0x4(%rcx), %r8d
movb $0x1, %dil
testl %r8d, %r8d
je 0x2926
movq 0x20(%rcx), %r10
movq 0x28(%rcx), %r9
movq %r9, %rbx
subq %r10, %rbx
sarq $0x2, %rbx
imulq %rsi, %rbx
sarq $0x2, %rbx
testq %rbx, %rbx
jle 0x28c5
leaq (%rbx,%rbx,2), %r14
shlq $0x4, %r14
addq %r10, %r14
incq %rbx
addq $0x18, %r10
movq %r10, %r11
cmpl %r8d, -0x18(%r11)
je 0x2906
cmpl %r8d, -0xc(%r11)
je 0x290c
cmpl %r8d, (%r11)
je 0x2916
cmpl %r8d, 0xc(%r11)
je 0x2912
decq %rbx
addq $0x30, %r11
cmpq $0x1, %rbx
jg 0x289e
movq %r14, %r10
movq %r9, %rbx
subq %r10, %rbx
sarq $0x2, %rbx
imulq %rsi, %rbx
cmpq $0x1, %rbx
je 0x28fa
cmpq $0x2, %rbx
je 0x28f1
movq %r9, %r11
cmpq $0x3, %rbx
jne 0x2916
cmpl %r8d, (%r10)
je 0x2901
addq $0xc, %r10
cmpl %r8d, (%r10)
je 0x2901
addq $0xc, %r10
cmpl %r8d, (%r10)
cmovneq %r9, %r10
movq %r10, %r11
jmp 0x2916
addq $-0x18, %r11
jmp 0x2916
addq $-0xc, %r11
jmp 0x2916
addq $0xc, %r11
cmpq %r9, %r11
je 0x2926
cmpl $-0x1, %eax
sete %dil
cmovel %r8d, %eax
testb %dil, %dil
je 0x2943
addq $0x38, %rcx
cmpq %rdx, %rcx
jne 0x285a
jmp 0x2945
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rdx
cmpq %rdx, %rax
sete %cl
je 0x2979
cmpl %esi, (%rax)
je 0x2979
leaq 0x38(%rax), %rdi
cmpq %rdx, %rdi
sete %cl
je 0x2979
cmpl %esi, (%rdi)
cmoveq %rdi, %rax
leaq 0x38(%rdi), %rdi
jne 0x2963
jmp 0x2979
testb %cl, %cl
jne 0x297f
popq %rcx
retq
movl $0x8, %edi
callq 0x20d0
leaq 0x8708(%rip), %rcx      # 0xb098
movq %rcx, (%rax)
movq 0xd61e(%rip), %rsi      # 0xffb8
movq %rax, %rdi
xorl %edx, %edx
callq 0x22b0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x50(%rdi), %rax
addq $0x40, %r14
cmpq %r14, %rax
je 0x29ee
movl 0x24(%rax), %ecx
cmpl %ebx, %ecx
setne %sil
cmpl $0x0, 0x28(%rax)
setle %dl
orb %sil, %dl
jne 0x29d8
movl 0x20(%rax), %ebp
movl %ecx, %r15d
cmpb $0x1, %dl
jne 0x29f2
movq %rax, %rdi
callq 0x2200
cmpq %r14, %rax
jne 0x29bd
xorl %ebp, %ebp
jmp 0x29f5
xorl %eax, %eax
jmp 0x29f7
movl %r15d, %ebx
movl %ebp, %eax
shlq $0x20, %rbx
orq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x20(%rdi), %r15
movq 0x28(%rdi), %r12
xorl %ebx, %ebx
movl $0x0, %ebp
cmpq %r12, %r15
je 0x2a40
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x2aa2
addl %eax, %ebp
addq $0x38, %r15
cmpq %r12, %r15
jne 0x2a2d
movslq (%r14), %rax
leaq 0x8642(%rip), %rcx      # 0xb08c
movslq 0x4(%r14), %rdx
movl (%rcx,%rdx,4), %edx
addl (%rcx,%rax,4), %edx
movslq 0x14(%r14), %rax
leaq 0x85d1(%rip), %rsi      # 0xb030
movl 0x18(%r14), %edi
leaq 0x85d6(%rip), %r8       # 0xb040
movslq 0xc(%r14), %r9
movl (%rcx,%r9,4), %ecx
movl %ecx, %r9d
shll $0x5, %r9d
subl %ecx, %r9d
cmpb $0x0, 0x8(%r14)
movl $0xd7067b50, %ecx       # imm = 0xD7067B50
cmovnel %ecx, %ebx
xorl %ebp, %edx
xorl (%rsi,%rax,4), %edx
xorl (%r8,%rdi,4), %edx
xorl %r9d, %ebx
xorl %edx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game.cc
// Function: Game::hash_string[abi:cxx11]() const
std::string Game::hash_string() const {
  std::string h = "";
  // maximum compression! fails for more than 7 players
  // TODO: adapt for more than 7 players, or forbid games from having more than
  // 7 players
  h += (char)(num_players_ << 4 | cur_player_);
  h += (char)(done_main_action_ << 7 | homeworlds_built_ << 4 |
              sacrifice_actions_ << 2 | sacrifice_colour_);
  std::set<std::string> system_hashes;
  for (const System& system : systems_) {
    system_hashes.insert(::hash_string(system));
  }
  for (std::string str : system_hashes) {
    h += str;
  }
  return h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x20(%rsp)
movq %rax, (%rdi)
leaq 0x866a(%rip), %rdx      # 0xb1c9
movq %rdx, %rsi
callq 0x4a6a
movl (%r14), %eax
shll $0x4, %eax
orl 0x4(%r14), %eax
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2190
movl 0x8(%r14), %eax
movl 0xc(%r14), %ecx
shll $0x7, %eax
shll $0x4, %ecx
orl %eax, %ecx
movl 0x14(%r14), %eax
shll $0x2, %eax
orl %ecx, %eax
orl 0x18(%r14), %eax
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2190
leaq 0x30(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x20(%r14), %r15
movq 0x28(%r14), %rbp
cmpq %rbp, %r15
je 0x2c10
leaq 0x10(%rsp), %r13
movq %rsp, %r14
leaq 0x28(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x2cf0
movq %r12, %rdi
movq %r14, %rsi
callq 0x4afa
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2c07
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
addq $0x38, %r15
cmpq %rbp, %r15
jne 0x2bdb
movq 0x40(%rsp), %r14
leaq 0x30(%rsp), %r13
cmpq %r13, %r14
je 0x2c75
leaq 0x10(%rsp), %r12
movq %rsp, %r15
movq %r12, (%rsp)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x470c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x2080
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2c65
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x2200
movq %rax, %r14
cmpq %r13, %rax
jne 0x2c27
leaq 0x28(%rsp), %rdi
callq 0x45f4
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x2cce
jmp 0x2ca6
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x2cb7
jmp 0x2cc4
movq %rax, %r14
jmp 0x2cc4
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2cc4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21d0
leaq 0x28(%rsp), %rdi
callq 0x45f4
movq (%rbx), %rdi
cmpq 0x20(%rsp), %rdi
je 0x2ce8
movq 0x20(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x8(%rsi), %rbp
movq 0x10(%rsi), %r14
cmpq %r14, %rbp
je 0x2d6a
leaq 0x8(%rsp), %r12
leaq 0x7(%rsp), %r13
movb 0x4(%r15), %al
movq (%rbp), %rcx
leal (,%rcx,4), %edx
shrq $0x20, %rcx
shlb $0x4, %al
orb %cl, %al
orb %dl, %al
movb %al, 0x7(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x582c
addq $0x8, %rbp
cmpq %r14, %rbp
jne 0x2d38
movq 0x20(%r15), %r14
movq 0x28(%r15), %r13
cmpq %r13, %r14
je 0x2dae
leaq 0x8(%rsp), %r15
leaq 0x7(%rsp), %r12
movb (%r14), %al
movl 0x4(%r14), %ecx
shll $0x2, %ecx
orl 0x8(%r14), %ecx
shlb $0x4, %al
orb %cl, %al
orb $-0x80, %al
movb %al, 0x7(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x582c
addq $0xc, %r14
cmpq %r13, %r14
jne 0x2d81
movq 0x20(%rsp), %rsi
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %rbx, %rdi
leaq 0x10(%rsp), %rdx
callq 0x593c
leaq 0x8(%rsp), %rdi
callq 0x46bc
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2de7
jmp 0x2de7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x46bc
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/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:
testl %ecx, %ecx
je 0x3579
movq 0x8(%rdi), %rcx
movq 0x10(%rdi), %rax
cmpq %rax, %rcx
sete %r8b
je 0x3579
cmpl %edx, 0x4(%rcx)
je 0x3572
addq $0x8, %rcx
cmpq %rax, %rcx
sete %r8b
je 0x3579
leaq 0x8(%rcx), %r9
cmpl %edx, 0x4(%rcx)
movq %r9, %rcx
jne 0x355d
movb $0x1, %al
testb %r8b, %r8b
je 0x35b0
movq 0x20(%rdi), %r8
movq 0x28(%rdi), %rcx
cmpq %rcx, %r8
setne %al
je 0x35b0
cmpl %esi, (%r8)
jne 0x3594
cmpl %edx, 0x8(%r8)
je 0x35b0
addq $0xc, %r8
cmpq %rcx, %r8
setne %al
je 0x35b0
movq %r8, %rdi
addq $0xc, %r8
cmpl %esi, (%rdi)
jne 0x3598
cmpl %edx, 0x8(%rdi)
jne 0x3598
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl 0x4(%rdi), %eax
cltd
idivl (%rdi)
incl %edx
movl %edx, 0x4(%rdi)
callq 0x2822
testl %eax, %eax
jne 0x3a31
movb $0x0, 0x8(%rbx)
movl $0x0, 0x14(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movq 0x28(%r14), %rax
movq %rax, %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rdx
sarq $0x2, %rdx
testq %rdx, %rdx
jle 0x3cd2
imulq $0xe0, %rdx, %r8
addq %rdi, %r8
incq %rdx
addq $0x70, %rdi
cmpl %esi, -0x70(%rdi)
je 0x3d0a
cmpl %esi, -0x38(%rdi)
je 0x3d10
cmpl %esi, (%rdi)
je 0x3d1f
cmpl %esi, 0x38(%rdi)
je 0x3d1b
decq %rdx
addq $0xe0, %rdi
cmpq $0x1, %rdx
jg 0x3cac
movq %r8, %rdi
movq %rax, %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq $0x1, %rdx
je 0x3d02
cmpq $0x2, %rdx
je 0x3cfa
cmpq $0x3, %rdx
jne 0x3d16
cmpl %esi, (%rdi)
je 0x3d1f
addq $0x38, %rdi
cmpl %esi, (%rdi)
je 0x3d1f
addq $0x38, %rdi
cmpl %esi, (%rdi)
cmovneq %rax, %rdi
jmp 0x3d1f
addq $-0x70, %rdi
jmp 0x3d1f
addq $-0x38, %rdi
jmp 0x3d1f
movq %rax, %rdi
jmp 0x3d1f
addq $0x38, %rdi
movq 0x28(%rdi), %rsi
cmpq 0x30(%rdi), %rsi
je 0x3d3c
movl 0x8(%rbx), %eax
movl %eax, 0x8(%rsi)
movq (%rbx), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%rdi)
jmp 0x3d48
addq $0x20, %rdi
movq %rbx, %rdx
callq 0x56dc
addq $0x38, %r14
addq $0x4, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x434e
decl (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game.cc
// Function: Game::create_system(std::vector<Pyramid, std::allocator<Pyramid>> const&, int)
int Game::create_system(const std::vector<Pyramid>& stars, int player) {
  for (const Pyramid& star : stars) {
    stash_[star]--;
  }
  if (player != 0) {
    homeworlds_built_++;
  }
  return add_system(System{0, player, stars});
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
movq 0x8(%rsi), %r13
cmpq %r13, %r15
je 0x3da2
leaq 0x38(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x434e
decl (%rax)
addq $0x8, %r15
cmpq %r13, %r15
jne 0x3d8c
testl %ebp, %ebp
je 0x3da9
incl 0xc(%rbx)
leaq 0x8(%rsp), %r15
movl $0x0, -0x8(%r15)
movl %ebp, -0x4(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x44be
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movq $0x0, 0x28(%r15)
movl 0x10(%rbx), %eax
movl %eax, -0x8(%r15)
leaq 0x20(%rbx), %rdi
movq %rsp, %rsi
callq 0x4570
movl 0x10(%rbx), %r14d
leal 0x1(%r14), %eax
movl %eax, 0x10(%rbx)
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x3e0a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3e21
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21d0
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x453e
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game.cc
// Function: Game::destroy_system(int)
void Game::destroy_system(int system_id) {
  const auto& it = find_if(systems_.begin(), systems_.end(),
      [system_id](const System& s) {
        return s.id == system_id;
      });
  for (const Pyramid& star : it->stars) {
    stash_[star]++;
  }
  for (const Ship& ship : it->ships) {
    stash_[ship.pyramid]++;
  }
  systems_.erase(it);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %r14
movq 0x28(%rdi), %rax
movq %rax, %rdx
subq %r14, %rdx
sarq $0x3, %rdx
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rdx
sarq $0x2, %rdx
testq %rdx, %rdx
jle 0x3eb6
imulq $0xe0, %rdx, %rdi
addq %r14, %rdi
incq %rdx
addq $0x70, %r14
cmpl %esi, -0x70(%r14)
je 0x3ef1
cmpl %esi, -0x38(%r14)
je 0x3ef7
cmpl %esi, (%r14)
je 0x3f06
cmpl %esi, 0x38(%r14)
je 0x3f02
decq %rdx
addq $0xe0, %r14
cmpq $0x1, %rdx
jg 0x3e8c
movq %rdi, %r14
movq %rax, %rdx
subq %r14, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
cmpq $0x1, %rdx
je 0x3ee8
cmpq $0x2, %rdx
je 0x3edf
cmpq $0x3, %rdx
jne 0x3efd
cmpl %esi, (%r14)
je 0x3f06
addq $0x38, %r14
cmpl %esi, (%r14)
je 0x3f06
addq $0x38, %r14
cmpl %esi, (%r14)
cmovneq %rax, %r14
jmp 0x3f06
addq $-0x70, %r14
jmp 0x3f06
addq $-0x38, %r14
jmp 0x3f06
movq %rax, %r14
jmp 0x3f06
addq $0x38, %r14
movq 0x8(%r14), %r15
movq 0x10(%r14), %r13
cmpq %r13, %r15
je 0x3f2d
leaq 0x38(%rbx), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x434e
incl (%rax)
addq $0x8, %r15
cmpq %r13, %r15
jne 0x3f17
leaq 0x20(%rbx), %r15
movq 0x20(%r14), %r12
movq 0x28(%r14), %r13
cmpq %r13, %r12
je 0x3f5a
addq $0x38, %rbx
leaq 0x4(%r12), %rsi
movq %rbx, %rdi
callq 0x434e
incl (%rax)
addq $0xc, %r12
cmpq %r13, %r12
jne 0x3f42
movq %r15, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x55b6
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/negamax.cc
// Function: Negamax::half_heuristic(Game const*, int)
int Negamax::half_heuristic(const Game *game, int player) {
  if (game->winner() == player) {
    return 1000000;
  } else if (game->winner() != 0) {
    return 0;
  }

  int total = 0;
  for (const System& system : game->systems()) {
    for (const Ship& ship : system.ships) {
      if (ship.player == player) {
        total += 100 * ship.pyramid.size * ship.pyramid.size;
      }
    }
  }

  return total;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x2822
movl $0xf4240, %ebp          # imm = 0xF4240
cmpl %ebx, %eax
je 0x63c1
movq %r14, %rdi
callq 0x2822
xorl %ebp, %ebp
testl %eax, %eax
jne 0x63c1
movq %r14, %rdi
callq 0x27fc
movq (%rax), %rcx
movq 0x8(%rax), %rax
cmpq %rax, %rcx
je 0x63c1
xorl %edx, %edx
xorl %ebp, %ebp
movq 0x20(%rcx), %rsi
movq 0x28(%rcx), %rdi
cmpq %rdi, %rsi
je 0x63b8
movl 0x4(%rsi), %r8d
imull %r8d, %r8d
imull $0x64, %r8d, %r8d
cmpl %ebx, (%rsi)
cmovnel %edx, %r8d
addl %r8d, %ebp
addq $0xc, %rsi
jmp 0x6398
addq $0x38, %rcx
cmpq %rax, %rcx
jne 0x6390
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game_io.cc
// Function: operator<<(std::ostream&, System const&)
std::ostream& operator<<(std::ostream &os, const System& system) {
  os << "(";
  if (system.player != 0) {
    os << system.player << ", ";
  }
  for (const Pyramid& pyramid : system.stars) {
    os << pyramid;
  }
  os << ")";
  for (const Ship& ship : system.ships) {
    os << " " << ship;
  }
  return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x2f28(%rip), %rsi      # 0xb1c5
movl $0x1, %edx
callq 0x21f0
movl 0x4(%r14), %esi
testl %esi, %esi
je 0x82cb
movq %rbx, %rdi
callq 0x22c0
leaq 0x2f09(%rip), %rsi      # 0xb1c7
movl $0x2, %edx
movq %rax, %rdi
callq 0x21f0
movq 0x8(%r14), %r12
movq 0x10(%r14), %r13
cmpq %r13, %r12
je 0x8315
leaq 0x2ee1(%rip), %rbp      # 0xb1c0
leaq 0x7(%rsp), %r15
movl 0x4(%r12), %eax
movb (%rax,%rbp), %al
movb %al, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21f0
movl (%r12), %esi
movq %rax, %rdi
callq 0x22c0
addq $0x8, %r12
cmpq %r13, %r12
jne 0x82e4
leaq 0x2e62(%rip), %rsi      # 0xb17e
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movq 0x20(%r14), %r15
movq 0x28(%r14), %r12
cmpq %r12, %r15
je 0x8361
leaq 0x2e8b(%rip), %r14      # 0xb1c8
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x823d
addq $0xc, %r15
cmpq %r12, %r15
jne 0x833d
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game_io.cc
// Function: print_game(std::ostream&, Game const&, std::map<int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<int>, std::allocator<std::pair<int const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&)
void print_game(std::ostream& os, const Game& game,
                const std::map<int, std::string>& system_names) {
  os << game.num_players() << " ";
  os << game.homeworlds_built() << " ";
  os << game.cur_player() << std::endl;
  for (const System& system : game.systems()) {
    os << system_names.at(system.id) << " " << system << std::endl;
  }
  os << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x27e0
movq %rbx, %rdi
movl %eax, %esi
callq 0x22c0
leaq 0x279c(%rip), %r12      # 0xb1c8
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x27ec
movq %rbx, %rdi
movl %eax, %esi
callq 0x22c0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x27e4
movq %rbx, %rdi
movl %eax, %esi
callq 0x22c0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq %r15, %rdi
callq 0x27fc
movq (%rax), %r15
movq 0x8(%rax), %rbp
cmpq %rbp, %r15
je 0x8b1e
leaq 0x2713(%rip), %r12      # 0xb1c8
movq %r14, %rdi
movq %r15, %rsi
callq 0x95ec
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x21f0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
movq %r13, %rdi
movq %r15, %rsi
callq 0x8285
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
addq $0x38, %r15
cmpq %rbp, %r15
jne 0x8ab5
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2130
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game_io.cc
// Function: operator>>(std::istream&, Pyramid&)
std::istream& operator>>(std::istream& is, Pyramid& pyramid) {
  is >> std::ws;
  char c;
  is.get(c);
  pyramid.colour =
    c == 'r' || c == 'R' ? RED :
    c == 'y' || c == 'Y' ? YELLOW :
    c == 'g' || c == 'G' ? GREEN : BLUE;
  int size;
  is >> size;
  pyramid.size = (Size)size;
  return is;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2180
leaq 0xb(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2230
movzbl (%r15), %ecx
andl $-0x21, %ecx
cmpl $0x52, %ecx
je 0x8b8f
cmpl $0x59, %ecx
jne 0x8b93
movl $0x1, %eax
jmp 0x8b9e
xorl %eax, %eax
jmp 0x8b9e
xorl %eax, %eax
cmpb $0x47, %cl
sete %al
xorl $0x3, %eax
movl %eax, 0x4(%r14)
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2110
movl (%r15), %eax
movl %eax, (%r14)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game_io.cc
// Function: operator>>(std::istream&, Ship&)
std::istream& operator>>(std::istream& is, Ship& ship) {
  is >> std::ws;
  char c;
  is.get(c);
  ship.player = (int)(c - '0');
  is >> ship.pyramid;
  return is;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2180
leaq 0xf(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2230
movsbl (%r15), %eax
addl $-0x30, %eax
movl %eax, (%rbx)
addq $0x4, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8b53
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/czinn[P]homeworlds/game_io.cc
// Function: operator>>(std::istream&, System&)
std::istream& operator>>(std::istream& is, System& system) {
  system.player = 0;
  system.id = 0;
  is >> std::ws;
  is.ignore(); // (
  if (std::isdigit(is.peek())) {
    is >> system.player;
    is.ignore(256, ' ');
  }
  while (is.peek() != ')') {
    Pyramid star;
    is >> star;
    system.stars.push_back(star);
  }
  is.ignore(); // )
  while (!is.eof()) {
    Ship ship;
    is >> ship;
    system.ships.push_back(ship);
  }
  return is;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, (%rsi)
callq 0x2180
movq %rbx, %rdi
callq 0x22f0
movq %rbx, %rdi
callq 0x20b0
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x8c61
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
callq 0x2110
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movl $0x20, %edx
callq 0x2120
movq %rbx, %rdi
callq 0x20b0
cmpl $0x29, %eax
je 0x8cb3
leaq 0x8(%r14), %r15
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8b53
movq 0x10(%r14), %rsi
cmpq 0x18(%r14), %rsi
je 0x8c9b
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x10(%r14)
jmp 0x8ca6
movq %r15, %rdi
movq %r12, %rdx
callq 0x972c
movq %rbx, %rdi
callq 0x20b0
cmpl $0x29, %eax
jne 0x8c77
movq %rbx, %rdi
callq 0x22f0
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rbx,%rax)
jne 0x8d16
leaq 0x20(%r14), %r15
leaq 0x8(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x8bc5
movq 0x28(%r14), %rsi
cmpq 0x30(%r14), %rsi
je 0x8cfd
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x28(%r14)
jmp 0x8d08
movq %r15, %rdi
movq %r12, %rdx
callq 0x56dc
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rbx,%rax)
je 0x8cd2
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/html_writer.cc
// Function: HTMLWriter::WriteFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool HTMLWriter::WriteFile(std::string const& filename)
{
    this->file_ = fopen(filename.c_str(), "w");
    if (this->file_) {
        this->WriteHTML();
        fclose(this->file_);
    }
    return (this->file_ != NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x1884(%rip), %rsi      # 0x40be
callq 0x2190
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x2859
movq %rbx, %rdi
callq 0x2864
movq 0x8(%rbx), %rdi
callq 0x2130
cmpq $0x0, 0x8(%rbx)
setne %al
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/html_writer.cc
// Function: HTMLWriter::WriteHTML()
void HTMLWriter::WriteHTML()
{
    fprintf(this->file_, "%s\n", "<!DOCTYPE html>");
    fprintf(this->file_, "%s\n", "<html>");
    
    this->WriteHead();
    this->WriteBody();
    
    fprintf(this->file_, "%s\n", "</html>");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x17c0(%rip), %r14      # 0x4036
leaq 0x184a(%rip), %rdx      # 0x40c7
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
leaq 0x1845(%rip), %rdx      # 0x40d7
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq %rbx, %rdi
callq 0x2958
movq %rbx, %rdi
callq 0x29d4
movq 0x8(%rbx), %rdi
leaq 0x1827(%rip), %rdx      # 0x40de
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/html_writer.cc
// Function: HTMLWriter::Escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
std::string HTMLWriter::Escape(std::string const& input) const
{
    std::string result;
    for (char c : input) {
        switch (c) {
        case ' ':   result.append("&nbsp;");    break;
        default:    result.push_back(c);
        }
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rdx), %r12
testq %r12, %r12
je 0x2927
movq (%rdx), %r13
xorl %ebp, %ebp
leaq 0x17c2(%rip), %r14      # 0x40c0
movb (%r13,%rbp), %al
cmpb $0x20, %al
jne 0x2914
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2240
jmp 0x291f
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2110
incq %rbp
cmpq %rbp, %r12
jne 0x28fe
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x294f
movq (%r15), %rsi
incq %rsi
callq 0x2150
movq %r14, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/html_writer.cc
// Function: HTMLWriter::WriteHead()
void HTMLWriter::WriteHead()
{
    fprintf(this->file_, "%s\n", "<head>");
    
    fprintf(this->file_, "%s\n", "<meta charset=\"utf-8\" />");
    fprintf(this->file_, "<title>%s</title>", this->title_.c_str());
    this->WriteStyle();
    this->WriteScript();
    
    fprintf(this->file_, "%s\n", "</head>");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x16cc(%rip), %r14      # 0x4036
leaq 0x1775(%rip), %rdx      # 0x40e6
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
leaq 0x1767(%rip), %rdx      # 0x40ed
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
leaq 0x1767(%rip), %rsi      # 0x4106
xorl %eax, %eax
callq 0x21c0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x8(%rbx), %rdi
leaq 0x1755(%rip), %rdx      # 0x4118
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/html_writer.cc
// Function: ImageWriter::WriteStyle()
void ImageWriter::WriteStyle()
{
    fprintf(this->file_, "%s\n", "<style type=\"text/css\">");
    fprintf(this->file_, "%s\n", "*{margin:0;padding:0;line-height:5px;}");
    fprintf(this->file_, "%s\n", ".pixel{width:5px;height:5px;float:left;}");
    fprintf(this->file_, "%s\n", "br{clear:left;}");
    fprintf(this->file_, "%s\n", "</style>");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
leaq 0x1508(%rip), %r14      # 0x4036
leaq 0x160a(%rip), %rdx      # 0x413f
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
leaq 0x160d(%rip), %rdx      # 0x4157
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
leaq 0x161f(%rip), %rdx      # 0x417e
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
leaq 0x1633(%rip), %rdx      # 0x41a7
movq %r14, %rsi
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
leaq 0x162e(%rip), %rdx      # 0x41b7
movq %r14, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21c0
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/html_writer.cc
// Function: ImageWriter::WriteContent()
void ImageWriter::WriteContent()
{
    Bitmap bitmap;

    fprintf(this->file_, "%s\n", "<div class=\"image\">");
    if (bitmap.Load(this->filename_)) {
        auto w = bitmap.GetWidth();
        auto h = bitmap.GetHeight();
        for (auto y = 0; y < h; y++) {
            for (auto x = 0; x < w; x++) {
                Color color = bitmap.GetColor(x, y);
                this->WritePixel(color);
            }
            fprintf(this->file_, "%s\n", "<br />");
        }
    } else {
        fprintf(this->file_, "<p>Failed open %s: %s</p>",
                             this->filename_.c_str(),
                             bitmap.GetError().c_str());
    }
    fprintf(this->file_, "%s\n", "</div>");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x30b0
movq 0x8(%rbx), %rdi
leaq 0x1475(%rip), %rsi      # 0x4036
leaq 0x15f8(%rip), %rdx      # 0x41c0
xorl %eax, %eax
callq 0x21c0
leaq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x321a
testb %al, %al
je 0x2c40
movl 0x4(%rsp), %ebp
testl %ebp, %ebp
jle 0x2c5b
movl (%rsp), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
jle 0x2c1d
movslq %r13d, %r14
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movslq (%rsp), %rcx
imulq %r14, %rcx
addq %r15, %rcx
movl (%rax,%rcx,4), %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x28(%rax)
incq %r15
cmpl %r15d, %r12d
jne 0x2bf9
movq 0x8(%rbx), %rdi
leaq 0x140e(%rip), %rsi      # 0x4036
leaq 0x15a5(%rip), %rdx      # 0x41d4
xorl %eax, %eax
callq 0x21c0
incl %r13d
cmpl %ebp, %r13d
jne 0x2bee
jmp 0x2c5b
movq 0x8(%rbx), %rdi
movq 0x30(%rbx), %rdx
movq 0x18(%rsp), %rcx
leaq 0x1587(%rip), %rsi      # 0x41db
xorl %eax, %eax
callq 0x21c0
movq 0x8(%rbx), %rdi
leaq 0x13d0(%rip), %rsi      # 0x4036
leaq 0x1588(%rip), %rdx      # 0x41f5
xorl %eax, %eax
callq 0x21c0
movq %rsp, %rdi
callq 0x31bc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2c8d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x31bc
movq %rbx, %rdi
callq 0x2220
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/bitmap.cc
// Function: Bitmap::operator=(Bitmap const&)
Bitmap& Bitmap::operator=(Bitmap const& rhs)
{
    if (this != &rhs) {
        this->Free();
        auto size = rhs.width_ * rhs.height_;
        this->width_  = rhs.width_;
        this->height_ = rhs.height_;
        this->pixels_ = new Color[size];
        memcpy(this->pixels_, rhs.pixels_, size);
    }
    return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x317e
movq %rsi, %r14
movq %rbx, %rdi
callq 0x31e0
movl (%r14), %eax
movl 0x4(%r14), %ecx
movl %eax, (%rbx)
movl %ecx, 0x4(%rbx)
imull %eax, %ecx
movslq %ecx, %r15
leaq (,%r15,4), %rax
testl %r15d, %r15d
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2040
movq %rax, 0x8(%rbx)
movq 0x8(%r14), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x2100
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/bitmap.cc
// Function: Bitmap::Free()
void Bitmap::Free()
{
    this->width_  = 0;
    this->height_ = 0;

    if (this->pixels_) {
        delete[] this->pixels_;
        this->pixels_ = nullptr;
    }

    this->error_type_ = kSuccess;
    this->error_description_.clear();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, (%rdi)
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3201
callq 0x21a0
movq $0x0, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq 0x18(%rbx), %rax
movb $0x0, (%rax)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/bitmap.cc
// Function: Bitmap::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool Bitmap::Load(std::string const& filename)
{
    this->Free();

    FILE *file = fopen(filename.c_str(), "rb");
    if (file == NULL) {
        this->error_type_ = kIOError;
        this->error_description_ = strerror(errno);
        return false;
    }

    fseek(file, 0, SEEK_END);
    auto length = ftell(file);
    fseek(file, 0, SEEK_SET);

    std::vector<char> buffer;

    buffer.resize(length);
    if (fread(buffer.data(), length, 1, file) != 1) {
        this->error_type_ = kIOError;
        this->error_description_ = "Failed reading data";
        return false;
    }

    fclose(file);

    return this->LoadData(buffer.data(), length);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x31e0
movq (%r14), %rdi
leaq 0x1097(%rip), %rsi      # 0x42d1
callq 0x2190
testq %rax, %rax
je 0x32bc
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2170
movq %r14, %rdi
callq 0x2030
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2170
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %r15, %rsi
callq 0x38a8
movq (%rsp), %rdi
movl $0x1, %edx
movq %r15, %rsi
movq %r14, %rcx
callq 0x21d0
cmpq $0x1, %rax
jne 0x32fa
movq %r14, %rdi
callq 0x2130
movq (%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x336a
movl %eax, %r14d
jmp 0x3323
movl $0x1, 0x10(%rbx)
callq 0x2050
movl (%rax), %edi
callq 0x2090
movq %rax, %r15
movq 0x20(%rbx), %r12
addq $0x18, %rbx
movq %rax, %rdi
callq 0x20a0
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0x21f0
jmp 0x3339
movl $0x1, 0x10(%rbx)
movq 0x20(%rbx), %rdx
addq $0x18, %rbx
xorl %r14d, %r14d
leaq 0xfc1(%rip), %rcx       # 0x42d4
movl $0x13, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21f0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3339
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2150
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3361
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/bitmap.cc
// Function: Bitmap::LoadData(char const*, unsigned long)
bool Bitmap::LoadData(char const *data, size_t size)
{
    if (!CheckFormat(data, size)) {
        this->error_type_ = kInvalidBitmap;
        return false;
    }

    auto *bf = reinterpret_cast<BITMAPFILEHEADER const *>(data);
    auto *bi = reinterpret_cast<BITMAPINFOHEADER const *>(bf + 1);

    int w = this->width_  = abs(bi->biWidth );
    int h = this->height_ = abs(bi->biHeight);

    this->pixels_ = new Color[w * h];

    if (bi->biSize < sizeof(BITMAPINFOHEADER)) {
        this->error_type_ = kUnsupportedBitmap;
        this->error_description_ = "DIB header type not supported";
        return false;   // mainly means no BITMAPCOREHEADER support
    }

    if (bi->biCompression != BI_RGB) {
        this->error_type_ = kUnsupportedBitmap;
        this->error_description_ = "Compressed format not supported";
        return false;   // unsupported
    }

    return this->LoadUncompressedPixelData(bf, bi);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3424
testb %al, %al
je 0x33cd
movl 0x12(%r14), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
movl %ecx, (%rbx)
movl 0x16(%r14), %eax
movl %eax, %edi
negl %edi
cmovsl %eax, %edi
movl %edi, 0x4(%rbx)
imull %ecx, %edi
shlq $0x2, %rdi
callq 0x2040
movq %rax, 0x8(%rbx)
cmpl $0x27, 0xe(%r14)
ja 0x33d6
movl $0x3, 0x10(%rbx)
movq 0x20(%rbx), %rdx
addq $0x18, %rbx
leaq 0xfd9(%rip), %rcx       # 0x439e
movl $0x1d, %r8d
jmp 0x33f9
movl $0x2, 0x10(%rbx)
jmp 0x3403
cmpl $0x0, 0x1e(%r14)
je 0x340d
movl $0x3, 0x10(%rbx)
movq 0x20(%rbx), %rdx
addq $0x18, %rbx
leaq 0xfc9(%rip), %rcx       # 0x43bc
movl $0x1f, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x21f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xe(%r14), %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x352a
nop
// File: /workspace/github_cpp_makefile_star2_O1/timothyqiu[P]ssoaag/bitmap.cc
// Function: Bitmap::CheckFormat(char const*, unsigned long)
static bool HasBitmapSignature(char const *data, size_t size)
{
    if (size < 2)
        return false;

    // http://en.wikipedia.org/wiki/BMP_file_format#Bitmap_file_header
    return (memcmp(data, "BM", 2) == 0 ||   // Windows 3.1x, 95, NT, ... etc.
            memcmp(data, "BA", 2) == 0 ||   // OS/2 struct Bitmap Array
            memcmp(data, "CI", 2) == 0 ||   // OS/2 struct Color Icon
            memcmp(data, "CP", 2) == 0 ||   // OS/2 const Color Pointer
            memcmp(data, "IC", 2) == 0 ||   // OS/2 struct Icon
            memcmp(data, "PT", 2) == 0);    // OS/2 Pointer
}

// Assembly:
pushq %rbx
cmpq $0x2, %rdx
jae 0x343c
movq 0x20(%rdi), %rdx
addq $0x18, %rdi
leaq 0xeae(%rip), %rcx       # 0x42e8
jmp 0x347b
cmpw $0x4d42, (%rsi)         # imm = 0x4D42
je 0x3466
cmpw $0x4142, (%rsi)         # imm = 0x4142
je 0x3466
cmpw $0x4943, (%rsi)         # imm = 0x4943
je 0x3466
cmpw $0x5043, (%rsi)         # imm = 0x5043
je 0x3466
cmpw $0x4349, (%rsi)         # imm = 0x4349
je 0x3466
cmpw $0x5450, (%rsi)         # imm = 0x5450
jne 0x342b
cmpq $0xd, %rdx
ja 0x348e
movq 0x20(%rdi), %rdx
addq $0x18, %rdi
leaq 0xe81(%rip), %rcx       # 0x42fc
xorl %ebx, %ebx
movl $0x13, %r8d
xorl %esi, %esi
callq 0x21f0
movl %ebx, %eax
popq %rbx
retq
movl 0x2(%rsi), %eax
cmpq %rdx, %rax
jne 0x34a7
cmpl $0xc, 0xe(%rsi)
jne 0x34c0
movb $0x1, %bl
cmpw $0x1, 0x16(%rsi)
je 0x348a
jmp 0x34f6
movq 0x20(%rdi), %rdx
addq $0x18, %rdi
leaq 0xe5a(%rip), %rcx       # 0x4310
xorl %ebx, %ebx
movl $0x26, %r8d
jmp 0x3483
cmpw $0x1, 0x1a(%rsi)
jne 0x34f6
movl 0x1e(%rsi), %eax
movb $0x1, %bl
cmpl $0x2, %eax
je 0x34e2
cmpl $0x1, %eax
jne 0x348a
cmpw $0x8, 0x1c(%rsi)
jne 0x3512
cmpl $0x2, %eax
jne 0x348a
cmpw $0x4, 0x1c(%rsi)
je 0x348a
addq $0x18, %rdi
leaq 0xe82(%rip), %rsi       # 0x4376
jmp 0x351d
movq 0x20(%rdi), %rdx
addq $0x18, %rdi
leaq 0xe32(%rip), %rcx       # 0x4337
xorl %ebx, %ebx
movl $0x16, %r8d
jmp 0x3483
addq $0x18, %rdi
leaq 0xe31(%rip), %rsi       # 0x434e
callq 0x21b0
xorl %ebx, %ebx
jmp 0x348a
nop
// File: /workspace/github_cpp_makefile_star2_O1/ctSkennerton[P]fxtract/util/realpath.c
// Function: main
int main(int argc, char **argv)
{
    int     i;
    char    path[argc][8192];

    if (argc > 1 && !strcmp(argv[1], "-q"))
        --argc, ++argv, fclose(stderr);

    if (argc < 2)
        return fputs("usage: realpath [-q] path [...]\n", stderr), 1;

    for (i = 1; i < argc; ++i)
        if (!realpath(argv[i], path[i]))
            return perror(argv[i]), 1;

    for (i = 1; i < argc; ++i)
        puts(path[i]);

    return  0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %r15d
movl %edi, %eax
movq %rsp, %rbx
shlq $0xd, %rax
subq %rax, %rbx
movq %rbx, %rsp
cmpl $0x2, %edi
jl 0x11fe
movq 0x8(%r14), %rdi
leaq 0xe25(%rip), %rsi       # 0x2004
callq 0x1070
testl %eax, %eax
jne 0x11fe
addq $0x8, %r14
decl %r15d
movq 0x2dea(%rip), %rax      # 0x3fe0
movq (%rax), %rdi
callq 0x1050
cmpl $0x2, %r15d
jl 0x1263
movl %r15d, %r12d
leaq 0x2000(%rbx), %r15
movl $0x1, %r13d
movq (%r14,%r13,8), %rdi
movq %r15, %rsi
callq 0x1030
testq %rax, %rax
je 0x126a
incq %r13
addq $0x2000, %r15           # imm = 0x2000
cmpq %r13, %r12
jne 0x1214
addq $0x2000, %rbx           # imm = 0x2000
decq %r12
movq %rbx, %rdi
callq 0x1080
addq $0x2000, %rbx           # imm = 0x2000
decq %r12
jne 0x123e
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x10a0
jmp 0x1273
movq (%r14,%r13,8), %rdi
callq 0x1040
movl $0x1, %eax
jmp 0x1254
// File: /workspace/github_cpp_makefile_star2_O1/brianquinlan[P]brainfuck-jit/bf_compile_and_go.cpp
// Function: BrainfuckCompileAndGo::emit_offset_table(std::map<signed char, unsigned char, std::less<signed char>, std::allocator<std::pair<signed char const, unsigned char>>>*, signed char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
void BrainfuckCompileAndGo::emit_offset_table(
    map<int8_t, uint8_t>* offset_to_change, int8_t* offset, string *code) {
  for (auto it = offset_to_change->begin();
       it != offset_to_change->end();
       ++it) {
    int8_t change_offset = it->first;
    uint8_t change_value = it->second;

    if (change_value == 0) {
      continue;
    }

    *code += "\x80\x43";                                  // addb [rbx+XX],YY
    *code += string(reinterpret_cast<char *>(&change_offset), 1);  // XX
    *code += string(reinterpret_cast<char *>(&change_value), 1);   // YY
  }

  if (*offset != 0) {
    *code += "\x48\x83\xc3";                                // add rbx ...
    *code += string(reinterpret_cast<char *>(offset), 1);   // ... offset
    *offset = 0;
  }
  offset_to_change->clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, 0x30(%rsp)
movq 0x18(%rsi), %r13
movq %rsi, 0x28(%rsp)
leaq 0x8(%rsi), %r14
cmpq %r14, %r13
je 0x3855
leaq 0x18(%rsp), %r12
movb 0x21(%r13), %bl
testb %bl, %bl
je 0x3841
movb 0x20(%r13), %bpl
movq %r15, %rdi
leaq 0x2b06(%rip), %rsi      # 0x62d5
callq 0x22e0
movq %r12, 0x8(%rsp)
movb %bpl, 0x18(%rsp)
movq $0x1, 0x10(%rsp)
movb $0x0, 0x19(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x20a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x380b
callq 0x2180
movq %r12, 0x8(%rsp)
movb %bl, 0x18(%rsp)
movq $0x1, 0x10(%rsp)
movb $0x0, 0x19(%rsp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x20a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3841
callq 0x2180
movq %r13, %rdi
callq 0x2130
movq %rax, %r13
cmpq %r14, %rax
jne 0x37b5
movq 0x30(%rsp), %rbx
cmpb $0x0, (%rbx)
je 0x38af
leaq 0x2a72(%rip), %rsi      # 0x62d8
movq %r15, %rdi
callq 0x22e0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movb (%rbx), %al
movb %al, (%r12)
movq $0x1, -0x8(%r12)
movb $0x0, 0x1(%r12)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x20a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x38ac
callq 0x2180
movb $0x0, (%rbx)
movq 0x28(%rsp), %rdi
callq 0x3bf8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38cc
jmp 0x38cc
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x38de
callq 0x2180
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/Shenggan[P]SnowFlake/test/test_SnowFlake.cc
// Function: test(void*)
void *test(void *arg) {
    SnowFlake* sf;
    sf = (SnowFlake*)arg;
    for (int i = 0; i < (1<<12); i++) {
        LLOG(INFO) << sf->nextId();
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movl $0x1000, %r13d          # imm = 0x1000
leaq 0x20(%rsp), %r12
movq %rsp, %r14
leaq 0x48(%rsp), %r15
callq 0x2862
cmpl $0x0, (%rax)
jg 0x2557
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r12, %rdi
leaq 0x1baf(%rip), %rsi      # 0x4004
leaq 0x1bbe(%rip), %rdx      # 0x401a
callq 0x3bca
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
leaq 0x1ba7(%rip), %rsi      # 0x401b
leaq 0x1ba4(%rip), %rdx      # 0x401f
callq 0x3bca
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r14, %rcx
movl $0x8, %r8d
callq 0x2936
movq %rbx, %rdi
callq 0x2d04
movq %rax, 0x40(%rsp)
movq %r15, %rdi
leaq 0x40(%rsp), %rsi
callq 0x2c2c
movq %rax, %rbp
callq 0x2862
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2f00
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x24e8
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x2504
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x2520
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2180
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x253b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2557
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
decl %r13d
jne 0x2433
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x25a6
movq %rax, %rbx
jmp 0x258b
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x3116
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x25a6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2180
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x25c2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2180
movq %rbx, %rdi
callq 0x2280