LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::fast_ladder(int, bool) const
bool Goban::fast_ladder(int point, bool color) const
{
  if (total_liberties(point, color, 0) != 2) return false;
  if (neighbour_groups(point, !color, 2, 0)) return false;
  PointList<5> liberties;
  point_liberties(point, liberties);
  for (int i = 0; i < liberties.length(); i++) {
    PointList<5> secondary_libs;
    int delta[2] = {0};
    if (point_liberties(liberties[i], secondary_libs) == 4) continue;
  
    delta[0] = liberties[i] - point;
    for (int j = 0; j < secondary_libs.length(); j++) {
      if (secondary_libs[j] != point && secondary_libs[j] != liberties[i] + delta[0]) {
        delta[1] = secondary_libs[j] - liberties[i];
        break;
      }
    }
    if (delta[1] == 0) return true;
    int p = point, act = 0;
    while (distance_to_edge[p] > 1) {
      p = p + delta[act];
      //look for ladder breakers. TODO: complete.
      if (points[p]) {
        if (points[p]->get_color() == color) break;
        else return true;
      }
      if (points[p + delta[act]]) {
        if (points[p + delta[act]]->get_color() == color) break;
        else return true;
      }
      act = 1-act;
    }
    if (distance_to_edge[p] < 2) return true;
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
xorl %r15d, %r15d
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x833c
cmpl $0x2, %eax
jne 0x7797
movl %ebx, %eax
xorb $0x1, %al
movzbl %al, %edx
pushq $0x2
popq %rcx
movq %r14, %rdi
movl %ebp, %esi
xorl %r8d, %r8d
callq 0x5080
movl $0x0, %r15d
testl %eax, %eax
je 0x77a9
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x75d8(%rip), %rax      # 0xed88
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
andl $0x0, 0x1c(%rdx)
andl $0x0, 0x8(%rdx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x500a
pushq $0x1
popq %r12
xorl %r13d, %r13d
movslq 0x44(%rsp), %rax
cmpq %rax, %r13
setl %r15b
jge 0x7797
leaq 0x75a2(%rip), %rax      # 0xed88
movq %rax, 0x8(%rsp)
andl $0x0, 0x24(%rsp)
andl $0x0, 0x10(%rsp)
movl 0x30(%rsp,%r13,4), %esi
movq %r14, %rdi
leaq 0x8(%rsp), %rdx
callq 0x500a
cmpl $0x4, %eax
je 0x78ae
movl 0x30(%rsp,%r13,4), %eax
movl %eax, %ecx
subl %ebp, %ecx
movl %ecx, (%rsp)
movl 0x24(%rsp), %edx
addl %eax, %ecx
testl %edx, %edx
movl $0x0, %esi
cmovlel %esi, %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x7797
movl 0x10(%rsp,%rsi,4), %edi
incq %rsi
cmpl %ebp, %edi
je 0x782e
cmpl %ecx, %edi
je 0x782e
subl %eax, %edi
movl %edi, 0x4(%rsp)
je 0x7797
xorl %edx, %edx
movl %ebp, %ecx
movslq %ecx, %rax
cmpl $0x2, 0xdf6f8(%r14,%rax,4)
jl 0x789f
movl %edx, %eax
movl (%rsp,%rax,4), %esi
addl %esi, %ecx
movslq %ecx, %rax
movq 0x18(%r14,%rax,8), %rdi
testq %rdi, %rdi
jne 0x7897
addl %ecx, %esi
movslq %esi, %rsi
movq 0x18(%r14,%rsi,8), %rsi
movl %r12d, %edi
subl %edx, %edi
movl %edi, %edx
testq %rsi, %rsi
je 0x7856
cmpb %bl, (%rsi)
je 0x789f
jmp 0x7797
cmpb %bl, (%rdi)
jne 0x7797
cmpl $0x1, 0xdf6f8(%r14,%rax,4)
jle 0x7797
incq %r13
jmp 0x77d1
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::play_heavy()
int Goban::play_heavy()
{
  if (int move = last_atari_heuristic()) {
    return play_move(move);
  }

  if (last_point) {
    PointSet<MAXSIZE2> list;
    save_heuristic(last_point, list);
    if (int move = random_choose(list, &Goban::heavy_policy)) {
      return play_move(move);
    }
    list.clear();
    pattern_heuristic(last_point, list);
    if (int move = random_choose(list, &Goban::heavy_policy)) {
      return play_move(move);
    }
    list.clear();
#define CAPTURE_HEURISTICS 
#ifdef CAPTURE_HEURISTICS   //Redundant?
    capture_heuristic(last_point, list);
    if (int move = random_choose(list, &Goban::heavy_policy)) {
      return play_move(move);
    }
    list.clear();
#endif
  }
  return play_random();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x5b8, %rsp            # imm = 0x5B8
movq %rdi, %rbx
callq 0x79e6
testl %eax, %eax
je 0x7904
movq %rbx, %rdi
movl %eax, %esi
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r14
jmp 0x4b26
movl 0xd63e0(%rbx), %esi
testl %esi, %esi
je 0x79d3
leaq 0x8(%rsp), %r14
andl $0x0, 0x5ac(%r14)
andl $0x0, 0x8(%r14)
leaq 0x73cd(%rip), %rax      # 0xecf8
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7aa4
leaq -0x25c(%rip), %rdx      # 0x76e4
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x75cc
testl %eax, %eax
jne 0x79c7
leaq 0x8(%rsp), %r14
andl $0x0, 0x5ac(%r14)
andl $0x0, 0x8(%r14)
movl 0xd63e0(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7b5e
leaq -0x297(%rip), %rdx      # 0x76e4
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x75cc
testl %eax, %eax
jne 0x79c7
leaq 0x8(%rsp), %r14
andl $0x0, 0x5ac(%r14)
andl $0x0, 0x8(%r14)
movl 0xd63e0(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7bc6
leaq -0x2d2(%rip), %rdx      # 0x76e4
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x75cc
testl %eax, %eax
je 0x79d3
movq %rbx, %rdi
movl %eax, %esi
callq 0x4b26
jmp 0x79db
movq %rbx, %rdi
callq 0x78b6
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::last_atari_heuristic() const
int Goban::last_atari_heuristic() const
{
  if (Group *group = last_atari[!side]) {
    int move = group->get_liberty(0);
    if (is_legal(move, side) &&
        !is_self_atari(move, side) &&
        gains_liberties(move, group)) {
      return move;
    }
  }
  
  PointList<MAXSIZE2> save;
  if (last_atari[side]) {
    atari_escapes(last_atari[side], save);
    if (int move = random_choose(save, &Goban::heavy_policy)) {
      return move;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x5b0, %rsp            # imm = 0x5B0
movq %rdi, %rbx
movzbl (%rdi), %eax
movl %eax, %ecx
xorl $0x1, %ecx
movq 0xd63d0(%rdi,%rcx,8), %r14
testq %r14, %r14
je 0x7a43
movl 0x5ac(%r14), %ebp
movzbl %al, %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5300
testb %al, %al
je 0x7a43
movzbl (%rbx), %edx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7734
testb %al, %al
jne 0x7a43
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x7c3a
testb %al, %al
jne 0x7a95
leaq 0x730e(%rip), %rax      # 0xed58
movq %rax, (%rsp)
andl $0x0, 0x5ac(%rsp)
andl $0x0, 0x8(%rsp)
movzbl (%rbx), %eax
movq 0xd63d0(%rbx,%rax,8), %rsi
testq %rsi, %rsi
je 0x7a93
movq %rsp, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7c64
leaq -0x39c(%rip), %rdx      # 0x76e4
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x75cc
movl %eax, %ebp
testl %eax, %eax
jne 0x7a95
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x5b0, %rsp            # imm = 0x5B0
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::save_heuristic(int, PList&) const
void Goban::save_heuristic(int point, PList &list) const
{
  if (points[point] && points[point]->get_nliberties() == 2) {
    for (int i = 0; i < 2; i++) {
      int lib = points[point]->get_liberty(i);
      if (gains_liberties(lib, points[point])) {
        list.add(lib);
      }
    }
  }
  GroupSet<4> neigh;
  int nneigh = neighbour_groups(point, neigh);
  for (int j = 0; j < nneigh; j++) {
    if (neigh[j]->get_color() == side && neigh[j]->get_nliberties() == 2) { // <2?
      atari_escapes(neigh[j], list);
    }
  }
/*TODO!!!
  for (int i = 0; i < 8; i++) {
    if (int v = vicinity[point][i]) {
      if (points[v] != 0 && points[v]->get_color() == side && points[v]->get_nliberties() == 1) {
        atari_escapes(points[v], list);
      }
    }
  }
*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
movslq %esi, %r12
movq 0x18(%rdi,%r12,8), %rax
testq %rax, %rax
je 0x7b05
cmpl $0x2, 0x96c(%rax)
jne 0x7b05
xorl %r13d, %r13d
cmpq $0x2, %r13
je 0x7b05
movq 0x18(%r14,%r12,8), %rdx
movl 0x5ac(%rdx,%r13,4), %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x7c3a
testb %al, %al
je 0x7b00
movq (%rbx), %rax
movq %rbx, %rdi
movl %r15d, %esi
callq *(%rax)
incq %r13
jmp 0x7ad3
movq %rsp, %rdx
andl $0x0, 0x30(%rdx)
andq $0x0, (%rdx)
movq %r14, %rdi
movl %ebp, %esi
callq 0x4fc8
movl %eax, %r15d
xorl %r12d, %r12d
testl %eax, %eax
cmovlel %r12d, %r15d
cmpq %r12, %r15
je 0x7b4f
movq (%rsp,%r12,8), %rsi
movb (%r14), %al
cmpb (%rsi), %al
jne 0x7b4a
cmpl $0x2, 0x96c(%rsi)
jne 0x7b4a
movq %r14, %rdi
movq %rbx, %rdx
callq 0x7c64
incq %r12
jmp 0x7b26
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::pattern_heuristic(int, PList&) const
void Goban::pattern_heuristic(int point, PList &list) const
{
  for (int i = 0; i < 8; i++) {
    if (int v = vicinity[point][i]) {
      if (points[v] == 0 && match_mogo_pattern(v, side)) {
        list.add(v);
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %rax
shlq $0x6, %rax
leaq (%rax,%rdi), %r12
addq $0xd9c78, %r12          # imm = 0xD9C78
xorl %r13d, %r13d
cmpq $0x8, %r13
je 0x7bbc
movslq (%r12,%r13,4), %r15
testq %r15, %r15
je 0x7bb7
cmpq $0x0, 0x18(%r14,%r15,8)
jne 0x7bb7
movzbl (%r14), %edx
movq %r14, %rdi
movl %r15d, %esi
callq 0x7e0e
testb %al, %al
je 0x7bb7
movq (%rbx), %rax
movq %rbx, %rdi
movl %r15d, %esi
callq *(%rax)
incq %r13
jmp 0x7b82
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::capture_heuristic(int, PList&) const
void Goban::capture_heuristic(int point, PList &list) const
{
  for (int i = 0; i < 8; i++) {
    Group *group = points[vicinity[point][i]];
    if (group && group->get_color() != side && group->has_one_liberty()) {
      //atari_escapes(group, list);??
      int lib = group->get_liberty(0);
      if (gains_liberties(lib, group)) {
          list.add(lib);
      }
    }
}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %rax
shlq $0x6, %rax
leaq (%rax,%rdi), %r15
addq $0xd9c78, %r15          # imm = 0xD9C78
xorl %r12d, %r12d
cmpq $0x8, %r12
je 0x7c30
movslq (%r15,%r12,4), %rax
movq 0x18(%r14,%rax,8), %rdx
testq %rdx, %rdx
je 0x7c2b
movb (%r14), %al
cmpb (%rdx), %al
je 0x7c2b
cmpl $0x1, 0x96c(%rdx)
jne 0x7c2b
movl 0x5ac(%rdx), %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x7c3a
testb %al, %al
je 0x7c2b
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *(%rax)
incq %r12
jmp 0x7be9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::gains_liberties(int, Group const*) const
bool Goban::gains_liberties(int point, const Group *group) const
{
  int curr_liberties = 1;
  if (group) curr_liberties = group->get_nliberties();
  int nlibs = total_liberties(point, group->get_color(), 0, curr_liberties, group);
  return nlibs > curr_liberties;
}

// Assembly:
pushq %rbx
movq %rdx, %r9
testq %rdx, %rdx
je 0x7c4c
movl 0x96c(%r9), %ebx
jmp 0x7c4f
pushq $0x1
popq %rbx
movzbl (%r9), %edx
xorl %ecx, %ecx
movl %ebx, %r8d
callq 0x833c
cmpl %ebx, %eax
setg %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::atari_escapes(Group const*, PList&) const
int Goban::atari_escapes(const Group *group, PList &escapes) const
{
  for (Group::LibertyIterator lib(group); lib; ++lib) {
    if (gains_liberties(*lib, group)) {
      escapes.add(*lib);
    }
  }
  GroupSet<MAXSIZE2/3> neighbours;
  int nneigh = neighbour_groups(group, !group->get_color(), group->get_nliberties(), neighbours);
  for (int i = 0; i < nneigh; i++) {
    for (Group::LibertyIterator lib(neighbours[i]); lib; ++lib) {
      if (gains_liberties(*lib, group)) {
        escapes.add(*lib);
      }
    }
  }
  return escapes.length();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5a8, %rsp            # imm = 0x5A8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x5ac(%rsi), %r12
movl (%r12), %esi
testl %esi, %esi
je 0x7cae
movq %r15, %rdi
movq %r14, %rdx
callq 0x7c3a
testb %al, %al
je 0x7ca8
movl (%r12), %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x4, %r12
jmp 0x7c85
movq %rsp, %r8
andl $0x0, 0x5a0(%r8)
andq $0x0, (%r8)
movzbl (%r14), %edx
movl 0x96c(%r14), %ecx
xorl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x50f4
movl %eax, %r12d
xorl %r13d, %r13d
testl %eax, %eax
cmovlel %r13d, %r12d
cmpq %r12, %r13
je 0x7d1f
movq (%rsp,%r13,8), %rbp
movl $0x5ac, %eax            # imm = 0x5AC
addq %rax, %rbp
movl (%rbp), %esi
testl %esi, %esi
je 0x7d1a
movq %r15, %rdi
movq %r14, %rdx
callq 0x7c3a
testb %al, %al
je 0x7d14
movl (%rbp), %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
addq $0x4, %rbp
jmp 0x7cf3
incq %r13
jmp 0x7ce2
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
addq $0x5a8, %rsp            # imm = 0x5A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::nakade_heuristic(int, PList&) const
void Goban::nakade_heuristic(int point, PList &list) const
{
  for (int i = 0; i < 8; i++) {
    if (int v = vicinity[point][i]) {
      if (points[v] == 0 && (creates_eyes(v, 0) > 1 || creates_eyes(v, 1) > 1)) {
        list.add(v);
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %rax
shlq $0x6, %rax
leaq (%rax,%rdi), %r12
addq $0xd9c78, %r12          # imm = 0xD9C78
xorl %r13d, %r13d
pushq $0x1
popq %rbp
cmpq $0x8, %r13
je 0x7dae
movslq (%r12,%r13,4), %r15
testq %r15, %r15
je 0x7da9
cmpq $0x0, 0x18(%r14,%r15,8)
jne 0x7da9
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x7dbe
cmpl $0x1, %eax
jg 0x7d9e
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x7dbe
cmpl $0x2, %eax
jl 0x7da9
movq (%rbx), %rax
movq %rbx, %rdi
movl %r15d, %esi
callq *(%rax)
incq %r13
jmp 0x7d63
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::creates_eyes(int, bool) const
int Goban::creates_eyes(int point, bool color) const
{
  int neyes = 0;
  for (int i = 0; adjacent[point][i]; i++) {
    if (is_true_eye(adjacent[point][i], color, point)) {
      neyes++;
    }
  }
#ifdef DEBUG_INFO
  if (neyes) {
    std::cerr << point << " creates " << neyes << " eyes\n";
  }
#endif
  return neyes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movslq %esi, %rax
imulq $0x14, %rax, %rax
leaq (%rax,%rdi), %r12
addq $0xd63e8, %r12          # imm = 0xD63E8
xorl %ebp, %ebp
movzbl %dl, %r15d
movl (%r12), %esi
testl %esi, %esi
je 0x7e03
movq %r14, %rdi
movl %r15d, %edx
movl %ebx, %ecx
callq 0x51f4
movzbl %al, %eax
addl %eax, %ebp
addq $0x4, %r12
jmp 0x7de3
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::stones_around(int, int) const
bool Goban::stones_around(int point, int distance) const
{
  for (int i = 0; i < distance; i++) {
    for (int j = 0; j < 4*(i+1); j++) {
      int v =  within_manhattan[point][i][j];
      if (is_occupied(v)) return true;
    }
  }
  return false;
}

// Assembly:
xorl %ecx, %ecx
testl %edx, %edx
movl $0x0, %eax
cmovgl %edx, %eax
movslq %esi, %rsi
imulq $0x140, %rsi, %rsi      # imm = 0x140
addq %rdi, %rsi
addq $0xdfca0, %rsi          # imm = 0xDFCA0
pushq $0x4
popq %r8
cmpq %rax, %rcx
je 0x8332
movl %r8d, %r8d
leaq 0x1(%rcx), %r9
xorl %r10d, %r10d
cmpq %r10, %r8
je 0x8325
movslq (%rsi,%r10,4), %r11
incq %r10
cmpq $0x0, 0x18(%rdi,%r11,8)
je 0x830f
jmp 0x8332
addl $0x4, %r8d
addq $0x50, %rsi
movq %r9, %rcx
jmp 0x8300
movslq %edx, %rax
cmpq %rax, %rcx
setl %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::bad_self_atari(int, bool) const
bool Goban::bad_self_atari(int point, bool color) const
{
  int last_lib = atari_last_liberty(point, color);
  if (last_lib == -1) return false;
#ifdef DEBUG_INFO
  std::cerr << "self_atari at " << point << "\n";
#endif

  //Only handle throw-ins up to 2 stones:?
  //if (neighbours_size(point, color) < 2) {
    if (total_liberties(last_lib, !color, 0) < 2) {
#ifdef DEBUG_INFO
      std::cerr << "snapback\n";
#endif  
      return false;
    }
    if (creates_eyes(point, !color) && !creates_eyes(last_lib, !color)) {
#ifdef DEBUG_INFO
        std::cerr << "throw-in\n";
#endif
      return false;
    }
  //}
  if (nakade_shape(point, color)) {
#ifdef DEBUG_INFO
    std::cerr << "nakade\n";
#endif
    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
callq 0x85aa
cmpl $-0x1, %eax
je 0x866d
movl %eax, %r15d
movl %ebp, %eax
xorb $0x1, %al
movzbl %al, %r12d
xorl %r13d, %r13d
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x833c
cmpl $0x2, %eax
jl 0x8670
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x7dbe
testl %eax, %eax
je 0x8656
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x7dbe
testl %eax, %eax
je 0x866d
movzbl %bpl, %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x8682
movl %eax, %r13d
xorb $0x1, %r13b
jmp 0x8670
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::nakade_shape(int, bool) const
bool Goban::nakade_shape(int point, bool color) const
{
  int bulk = neighbour_bulkiness(point, color);
      
  switch(neighbours_size(point, color)) {
    case 2:
      return true;
      break;
    case 3:
      if (bulk == 3) return true;
      break;
    case 4:
      if (bulk == 4 || bulk == 3) return true;    //TODO.  
      break;
    case 5:
      if (bulk == 4) return true;
      break;
    default:
      return false;
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
callq 0x873a
movl %eax, %ebx
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x513c
movl %eax, %ecx
addl $-0x2, %ecx
cmpl $0x3, %ecx
ja 0x86d0
movb $0x1, %al
leaq 0x209c(%rip), %rdx      # 0xa754
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x3, %ebx
jne 0x86d0
jmp 0x86d2
addl $-0x3, %ebx
cmpl $0x2, %ebx
jb 0x86d2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, %ebx
jne 0x86d0
jmp 0x86d2
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::bulkiness(Group const*, int) const
int Goban::bulkiness(const Group *group, int point) const
{
  int max_bulkiness = 0;
  for (Group::StoneIterator st(group); st; ++st) {
    int bulk = 0;
    for (int i = 0; adjacent[*st][i]; i++) {
      if (points[adjacent[*st][i]] == group || adjacent[*st][i] == point) {
        bulk++;
      }
    }
    if (bulk > max_bulkiness) max_bulkiness = bulk;
  }
  return max_bulkiness;
}

// Assembly:
pushq %rbx
leaq 0xd63e8(%rdi), %rcx
xorl %eax, %eax
movq %rsi, %r8
movslq 0x4(%r8), %r9
testq %r9, %r9
je 0x8738
addq $0x4, %r8
imulq $0x14, %r9, %r10
addq %rcx, %r10
xorl %r9d, %r9d
movslq (%r10), %r11
testq %r11, %r11
je 0x872f
cmpq %rsi, 0x18(%rdi,%r11,8)
sete %bl
cmpl %edx, %r11d
sete %r11b
orb %bl, %r11b
movzbl %r11b, %r11d
addl %r11d, %r9d
addq $0x4, %r10
jmp 0x8708
cmpl %eax, %r9d
cmovgl %r9d, %eax
jmp 0x86f1
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::neighbour_bulkiness(int, bool) const
int Goban::neighbour_bulkiness(int point, bool color) const
{
  GroupSet<4> neighbours;
  int nneigh = neighbour_groups(point, neighbours);
  int max_bulkiness = nneigh;
  for (int i = 0; i < nneigh; i++) {
    Group *neigh = neighbours[i];
    if (neigh->get_color() == color) {
      int bulk = bulkiness(neigh, point);
      if (bulk > max_bulkiness) max_bulkiness = bulk;
    }
  }
  return max_bulkiness;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rsp, %rdx
andl $0x0, 0x30(%rdx)
movq %rdi, %r14
andq $0x0, (%rdx)
callq 0x4fc8
movl %eax, %r15d
xorl %r12d, %r12d
testl %eax, %eax
movl %eax, %r13d
cmovlel %r12d, %r13d
cmpq %r12, %r13
je 0x8791
movq (%rsp,%r12,8), %rsi
cmpb %bl, (%rsi)
jne 0x878c
movq %r14, %rdi
movl %ebp, %edx
callq 0x86e4
cmpl %r15d, %eax
cmovgl %eax, %r15d
incq %r12
jmp 0x876e
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Node::copy_values(Node const*)
void Node::copy_values(const Node *orig)
 {
  child = 0;
  sibling = 0;
  visits = orig->visits;
  results = orig->results;
  rave_visits = orig->rave_visits;
  rave_results = orig->rave_results;
  prior_visits = orig->prior_visits;
  prior_results = orig->prior_results;
  move = orig->move;
 }

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movups 0x8(%rsi), %xmm0
movups %xmm0, 0x8(%rdi)
movups 0x18(%rsi), %xmm0
movups %xmm0, 0x18(%rdi)
movups 0x28(%rsi), %xmm0
movups %xmm0, 0x28(%rdi)
movl (%rsi), %eax
movl %eax, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Node::set_amaf(int, AmafBoard const&, bool, int)
void Node::set_amaf(int result, const AmafBoard &amaf, bool side, int depth)
{
  const double discount = 0.0; //0.0001;
  for (Node *next = child; next; next = next->sibling) {
    next->rave_results += result * amaf.value(next->move, depth, side, discount);
    next->rave_visits += amaf.value(next->move, depth, side, discount);
  }
}

// Assembly:
addq $0x38, %rdi
cvtsi2sd %esi, %xmm0
movsd 0x19d6(%rip), %xmm1     # 0xa7f0
movsd 0x11f6(%rip), %xmm2     # 0xa018
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x8e7f
movslq (%rdi), %rax
testq %rax, %rax
je 0x8e59
movl (%rdx,%rax,4), %eax
movl %eax, %esi
negl %esi
testb %cl, %cl
cmovel %eax, %esi
cvtsi2sd %esi, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm2, %xmm4
xorpd %xmm3, %xmm3
cmpl %r8d, %esi
jl 0x8e5d
movapd %xmm4, %xmm3
jmp 0x8e5d
xorpd %xmm3, %xmm3
movapd %xmm0, %xmm4
mulsd %xmm3, %xmm4
addsd 0x20(%rdi), %xmm4
movsd %xmm4, 0x20(%rdi)
addsd 0x18(%rdi), %xmm3
movsd %xmm3, 0x18(%rdi)
addq $0x40, %rdi
jmp 0x8e22
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Node::get_value(double) const
double Node::get_value(double parent_visits) const
{
  const double BIAS = 1.0/3000, UCTK = 0.0;
  if (visits) {
    if (rave_visits) {
      double beta = rave_visits/(rave_visits + visits + rave_visits*visits*BIAS);
      return (1.0-beta)*results/visits + beta*rave_results/rave_visits;
    } else {
      return results/visits + UCTK*sqrt(log(parent_visits)/visits);
    }
  } else if (rave_visits) {
      return rave_results/rave_visits;
  }
  return 1.0;   //first player urgency.
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movsd 0x8(%rdi), %xmm1
movsd 0x18(%rdi), %xmm2
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm1
jne 0x8e9e
jnp 0x8efa
ucomisd %xmm3, %xmm2
jne 0x8ea6
jnp 0x8f0d
movapd %xmm1, %xmm0
addsd %xmm2, %xmm0
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
mulsd 0x193a(%rip), %xmm3     # 0xa7f8
addsd %xmm0, %xmm3
unpcklpd %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
divsd %xmm3, %xmm2
movsd 0x1146(%rip), %xmm0     # 0xa018
subsd %xmm2, %xmm0
movupd 0x10(%rbx), %xmm3
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movhpd 0x20(%rbx), %xmm3       # xmm3 = xmm3[0],mem[0]
mulpd %xmm0, %xmm3
divpd %xmm1, %xmm3
movapd %xmm3, %xmm0
unpckhpd %xmm3, %xmm0            # xmm0 = xmm0[1],xmm3[1]
addsd %xmm3, %xmm0
jmp 0x8f53
ucomisd %xmm3, %xmm2
jne 0x8f02
jnp 0x8f36
movsd 0x20(%rbx), %xmm0
divsd %xmm2, %xmm0
jmp 0x8f53
movsd 0x10(%rbx), %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rsp)
callq 0x3190
divsd 0x8(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x8f40
sqrtsd %xmm0, %xmm0
jmp 0x8f49
movsd 0x10da(%rip), %xmm0     # 0xa018
jmp 0x8f53
callq 0x3180
xorpd %xmm1, %xmm1
mulsd %xmm1, %xmm0
addsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Node::select_child() const
Node *Node::select_child() const
{
  double best_value = -1;
  Node *RAVE_child = 0;
  for (Node *next = child; next; next = next->sibling) {
    if (next->get_value(visits) > best_value) {
      best_value = next->get_value(visits);
      RAVE_child = next;
    }
  }
  return RAVE_child;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movsd 0x188e(%rip), %xmm0     # 0xa800
movsd %xmm0, 0x8(%rsp)
xorl %r15d, %r15d
movq (%r14), %r14
testq %r14, %r14
je 0x8fb4
movsd 0x8(%rbx), %xmm0
movq %r14, %rdi
callq 0x8e80
ucomisd 0x8(%rsp), %xmm0
jbe 0x8fae
movsd 0x8(%rbx), %xmm0
movq %r14, %rdi
callq 0x8e80
movsd %xmm0, 0x8(%rsp)
movq %r14, %r15
addq $0x40, %r14
jmp 0x8f7b
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Node::get_best_child() const
Node *Node::get_best_child() const
{
  //return select_child();
  Node *best_child = 0;
  double best_visits = 0;
  for (Node *next = child; next; next = next->sibling) {
    double curr_visits = next->visits + next->rave_visits;
    if (curr_visits > best_visits) {
      best_visits = curr_visits;
      best_child= next;
    }
  }
  return best_child;
}

// Assembly:
addq $0x38, %rdi
xorpd %xmm0, %xmm0
xorl %eax, %eax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x8ff4
movsd 0x8(%rdi), %xmm1
addsd 0x18(%rdi), %xmm1
ucomisd %xmm0, %xmm1
cmovaq %rdi, %rax
maxsd %xmm0, %xmm1
addq $0x40, %rdi
movapd %xmm1, %xmm0
jmp 0x8fcc
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Tree::Tree(int, Goban*)
Tree::Tree(int maxsize, Goban *goban)
{
  active = 0;
  this->maxsize = maxsize;
  this->goban = goban;
  root[0] = new Node[maxsize];
  root[1] = new Node[maxsize];
  root[0]->reset();
  root[1]->reset();
  size[0] = 1;
  size[1] = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
andl $0x0, 0x1c(%rdi)
movl %esi, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movslq %esi, %rax
pushq $0x48
popq %rcx
mulq %rcx
pushq $-0x1
popq %r14
cmovnoq %rax, %r14
movq %r14, %rdi
callq 0x3030
movq %rax, %r15
movq %rax, (%rbx)
movq %r14, %rdi
callq 0x3030
movq %rax, 0x8(%rbx)
andl $0x0, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r15)
movups %xmm0, 0x8(%r15)
movups %xmm0, 0x38(%r15)
andl $0x0, (%rax)
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x38(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Tree::clear()
void Tree::clear()
{
  active = 0;
  root[0]->reset();
  root[1]->reset();
  size[0] = 1;
  size[1] = 1;
}

// Assembly:
andl $0x0, 0x1c(%rdi)
movq (%rdi), %rax
andl $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x38(%rax)
movq 0x8(%rdi), %rax
andl $0x0, (%rax)
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x38(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x10(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Tree::insert(Node*, int, Prior const&)
Node *Tree::insert(Node *parent, int move, const Prior &prior)
{
  if (size[active] < maxsize) {
    Node *child = root[active] + size[active]++;
    child->reset();
    parent->add_child(child);
    child->set_move(move, prior);
    return child;
  } else {
    std::cerr << "WARNING: Out of memory!\n";
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movslq 0x1c(%rdi), %rax
movslq 0x10(%rdi,%rax,4), %rcx
cmpl 0x18(%rdi), %ecx
jge 0x9478
movl %edx, %ebp
movq (%rdi,%rax,8), %r15
leal 0x1(%rcx), %edx
movl %edx, 0x10(%rdi,%rax,4)
imulq $0x48, %rcx, %r12
leaq (%r15,%r12), %r14
andl $0x0, (%r15,%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r15,%r12)
movups %xmm0, 0x18(%r15,%r12)
movups %xmm0, 0x38(%r15,%r12)
movq %rsi, %rdi
movq %r14, %rsi
callq 0x8db4
movl %ebp, (%r15,%r12)
movups (%rbx), %xmm0
movhps %xmm0, 0x18(%r15,%r12)
movlps %xmm0, 0x30(%r15,%r12)
movups %xmm0, 0x20(%r15,%r12)
jmp 0x948e
movq 0x5b71(%rip), %rdi      # 0xeff0
leaq 0x13a1(%rip), %rsi      # 0xa827
callq 0x31e0
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Tree::promote(int)
int Tree::promote(int new_root)
{
  for (Node *n = root[active]->get_child(); n; n = n->get_sibling()) {
    if (n->get_move() == new_root) {
      root[1-active]->copy_values(n);
      copy_recursive(root[1-active], n);
      clear_active();
      active = 1-active;
      return active;
    }
  }
  clear();
  return active;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x1c(%rdi), %rax
movq (%rdi,%rax,8), %r14
addq $0x38, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x956d
cmpl %esi, (%r14)
je 0x957a
addq $0x40, %r14
jmp 0x955a
movq %rbx, %rdi
callq 0x93a6
movl 0x1c(%rbx), %eax
jmp 0x95d1
pushq $0x1
popq %r15
movq %r15, %rcx
subq %rax, %rcx
movq (%rbx,%rcx,8), %rdi
movq %r14, %rsi
callq 0x8d90
movslq 0x1c(%rbx), %rax
subq %rax, %r15
movq (%rbx,%r15,8), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x94fe
movslq 0x1c(%rbx), %rcx
pushq $0x1
popq %rax
movl %eax, 0x10(%rbx,%rcx,4)
movslq 0x1c(%rbx), %rcx
movq (%rbx,%rcx,8), %rcx
andl $0x0, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rcx)
movups %xmm0, 0x18(%rcx)
movups %xmm0, 0x38(%rcx)
subl 0x1c(%rbx), %eax
movl %eax, 0x1c(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Tree::expand(Node*, int const*, int, Prior const*)
int Tree::expand(Node *parent, const int *moves, int nmovs, const Prior priors[])
{
  //if (parent->has_childs()) return 0; //No need to expand, but we check before calling.
  for (int i = 0; i < nmovs; i++) {
    if (insert(parent, moves[i], priors[moves[i]]) == 0) {  //Out of memory.
      return -1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
xorl %edx, %edx
testl %ecx, %ecx
movl $0x0, %ebp
movl %ecx, 0x4(%rsp)
cmovgl %ecx, %ebp
movq %rdx, %rbx
cmpq %rdx, %rbp
je 0x9629
movslq (%r15,%rbx,4), %rdx
movq %rdx, %rcx
shlq $0x4, %rcx
addq %r14, %rcx
movq %r13, %rdi
movq %r12, %rsi
callq 0x940a
leaq 0x1(%rbx), %rdx
testq %rax, %rax
jne 0x95ff
movslq 0x4(%rsp), %rcx
xorl %eax, %eax
cmpq %rcx, %rbx
setl %al
negl %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Tree::print(Node*, int, int) const
void Tree::print(Node *node, int threshold, int depth) const
{
  for (int i = 0; i < depth; i++) std::cerr << "  ";
  std::cerr << "|->";
  node->print(goban->get_size());
  
  Node *childs[MAXSIZE2] = {0};
  int len = 0;
  for (Node *child = node->get_child(); child; child=child->get_sibling()) {
    if (child->get_visits() >= threshold) childs[len++] = child;
  }

  while (true) {
    int best = -1, visits = 0;
    for (int i = 0; i < len; i++) {
      if (childs[i] && childs[i]->get_visits() > visits) {
        best = i;
        visits = childs[best]->get_visits();
      }
    }
    if (best < 0) break;
    if (childs[best]->get_move()) print(childs[best], threshold, depth+1);
    childs[best] = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb58, %rsp            # imm = 0xB58
movl %ecx, %ebx
movl %edx, 0xc(%rsp)
movq %rsi, %r15
movq %rdi, %r14
xorl %ebp, %ebp
testl %ecx, %ecx
cmovgl %ecx, %ebp
movq 0x597d(%rip), %r12      # 0xeff0
leaq 0xe1a(%rip), %r13       # 0xa494
subl $0x1, %ebp
jb 0x968c
movq %r12, %rdi
movq %r13, %rsi
callq 0x31e0
jmp 0x967a
movq 0x595d(%rip), %rdi      # 0xeff0
leaq 0x11a6(%rip), %rsi      # 0xa840
callq 0x31e0
movq 0x20(%r14), %rax
movl 0x8(%rax), %esi
movq %r15, %rdi
callq 0x8ff6
leaq 0x10(%rsp), %rdi
xorl %r12d, %r12d
movl $0xb48, %edx            # imm = 0xB48
xorl %esi, %esi
callq 0x30f0
addq $0x38, %r15
movl 0xc(%rsp), %ebp
cvtsi2sd %ebp, %xmm0
movq (%r15), %r15
testq %r15, %r15
je 0x96f3
movsd 0x8(%r15), %xmm1
ucomisd %xmm0, %xmm1
jb 0x96ed
movslq %r12d, %rax
incl %r12d
movq %r15, 0x10(%rsp,%rax,8)
addq $0x40, %r15
jmp 0x96ce
incl %ebx
xorl %eax, %eax
testl %r12d, %r12d
cmovlel %eax, %r12d
pushq $-0x1
popq %r15
movl %r15d, %ecx
xorl %edx, %edx
cmpq %r12, %rax
je 0x9730
movq 0x10(%rsp,%rax,8), %rsi
testq %rsi, %rsi
je 0x972b
movsd 0x8(%rsi), %xmm0
cvtsi2sd %edx, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x972b
cvttsd2si %xmm0, %edx
movl %eax, %ecx
incq %rax
jmp 0x9707
testl %ecx, %ecx
js 0x9757
movl %ecx, %r13d
movq 0x10(%rsp,%r13,8), %rsi
cmpl $0x0, (%rsi)
je 0x974d
movq %r14, %rdi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x9648
andq $0x0, 0x10(%rsp,%r13,8)
xorl %eax, %eax
jmp 0x9702
addq $0xb58, %rsp            # imm = 0xB58
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/tree.cpp
// Function: Tree::print() const
void Tree::print() const
{
  int threshold = root[active]->get_visits()/30;
  std::string sp = "  ";
  std::cerr << "Active tree: " << active << " " << get_size() <<" nodes.\n";
  print(root[active], threshold, 0);

  Node *best = get_best();
  std::cerr << "#Expected: " << best->get_value(1) << ", visits "
            << best->get_visits() << " PV:\n";

  bool side = !goban->get_side();
  for (Node *n = root[active]->get_best_child(); n; n = n->get_best_child()) {
      side ? std::cerr << "B" :  std::cerr << "W";
      n->print(goban->get_size());
      side = !side;
  }
  std::cerr << "\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movslq 0x1c(%rdi), %rax
movq (%rdi,%rax,8), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0xcff(%rip), %rsi       # 0xa494
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x665e
movq 0x5845(%rip), %rdi      # 0xeff0
leaq 0x1092(%rip), %rsi      # 0xa844
callq 0x31e0
movl 0x1c(%rbx), %esi
movq %rax, %rdi
callq 0x3330
leaq 0xccc(%rip), %rsi       # 0xa495
movq %rax, %rdi
callq 0x31e0
movslq 0x1c(%rbx), %rcx
movl 0x10(%rbx,%rcx,4), %esi
movq %rax, %rdi
callq 0x3330
leaq 0x106a(%rip), %rsi      # 0xa852
movq %rax, %rdi
callq 0x31e0
movsd 0x10(%rsp), %xmm0
divsd 0x100a(%rip), %xmm0     # 0xa808
cvttsd2si %xmm0, %edx
movslq 0x1c(%rbx), %rax
movq (%rbx,%rax,8), %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x9648
movq %rbx, %rdi
callq 0x3d96
movq %rax, %r14
movq 0x57ca(%rip), %rdi      # 0xeff0
leaq 0x102e(%rip), %rsi      # 0xa85b
callq 0x31e0
movq %rax, %r15
movsd 0x7db(%rip), %xmm0      # 0xa018
movq %r14, %rdi
callq 0x8e80
movq %r15, %rdi
callq 0x32e0
leaq 0x1013(%rip), %rsi      # 0xa867
movq %rax, %rdi
callq 0x31e0
movsd 0x8(%r14), %xmm0
movq %rax, %rdi
callq 0x32e0
leaq 0x1000(%rip), %rsi      # 0xa871
movq %rax, %rdi
callq 0x31e0
movq 0x20(%rbx), %rax
movb (%rax), %bpl
movslq 0x1c(%rbx), %rax
movq (%rbx,%rax,8), %r15
leaq 0xfea(%rip), %r12       # 0xa879
leaq 0xfe1(%rip), %r13       # 0xa877
movq 0x5753(%rip), %r14      # 0xeff0
movq %r15, %rdi
callq 0x8fc2
testq %rax, %rax
je 0x98d5
movq %rax, %r15
testb $0x1, %bpl
movq %r13, %rsi
cmovneq %r12, %rsi
movq %r14, %rdi
callq 0x31e0
xorb $0x1, %bpl
movq 0x20(%rbx), %rax
movl 0x8(%rax), %esi
movq %r15, %rdi
callq 0x8ff6
jmp 0x989d
movq 0x5714(%rip), %rdi      # 0xeff0
leaq 0xd41(%rip), %rsi       # 0xa624
callq 0x31e0
leaq 0x18(%rsp), %rdi
callq 0x30c0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9907
jmp 0x9907
jmp 0x9907
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/zobrist.cpp
// Function: Zobrist::Zobrist()
Zobrist::Zobrist()
{
  zob_key = 0;
  zob_side = genrand64_int64();
  for(int i = 0; i < MAXSIZE2; i++){
    zob_points [0][i] = genrand64_int64();
    zob_points [1][i] = genrand64_int64();
    zob_ko[i] = genrand64_int64();
  }
  clear_history();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, (%rdi)
callq 0x9976
movq %rax, 0x8(%rbx)
movl $0x2d4, %r14d           # imm = 0x2D4
cmpq $0x43d, %r14            # imm = 0x43D
je 0x9967
callq 0x9976
movq %rax, -0x1690(%rbx,%r14,8)
callq 0x9976
movq %rax, -0xb48(%rbx,%r14,8)
callq 0x9976
movq %rax, (%rbx,%r14,8)
incq %r14
jmp 0x9936
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9b2c
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/zobrist.cpp
// Function: Zobrist::update(int const*, int)
void Zobrist::update(const int *moves, const int moves_len)
{
  bool side = 0;
  reset();
  for(int i = 0; i < moves_len; i++){
    if(moves[i]) zob_key ^= zob_points[side][moves[i]-1];
    side = !side;
  }
  if(side) zob_key ^= zob_side;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
callq 0x9b52
movq (%rbx), %rax
leaq 0x10(%rbx), %rdx
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
cmpq %rcx, %r14
je 0x9bcb
movslq (%r15,%rcx,4), %rsi
testq %rsi, %rsi
je 0x9bc6
movl %ecx, %edi
andl $0x1, %edi
imulq $0xb48, %rdi, %rdi      # imm = 0xB48
addq %rdx, %rdi
xorq -0x8(%rdi,%rsi,8), %rax
movq %rax, (%rbx)
incq %rcx
jmp 0x9ba1
testb $0x1, %cl
je 0x9bd7
xorq 0x8(%rbx), %rax
movq %rax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/zengfenfei[P]codility/src/FrogRiverOne.cpp
// Function: solution(int, std::vector<int, std::allocator<int>>&)
int solution(int X, vector<int> &A) {
	// write your code in C++11 (g++ 4.8.2)
	vector<bool> hasLeaves(X, false);
	int validLeaves = 0;
	for (unsigned int i = 0; i < A.size(); i++) {
		bool has = hasLeaves[A[i] - 1];
		if (!has) {
			hasLeaves[A[i] - 1] = true;
			validLeaves++;
			if (validLeaves == X) {
				return i;
			}
		}
	}
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movl %edi, -0x30(%rbp)
movslq %edi, %rsi
leaq -0x2a(%rbp), %rdx
movb $0x0, (%rdx)
leaq -0x58(%rbp), %r12
leaq -0x29(%rbp), %rcx
movq %r12, %rdi
callq 0x1374
xorl %r13d, %r13d
xorl %r15d, %r15d
movl %r15d, %r14d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r14, %rcx
jbe 0x12c0
movslq (%rax,%r14,4), %rsi
decq %rsi
movq %r12, %rdi
callq 0x13d4
testq %rdx, (%rax)
jne 0x12bb
movq (%rbx), %rax
movslq (%rax,%r14,4), %rsi
decq %rsi
movq %r12, %rdi
callq 0x13d4
orq %rdx, (%rax)
incl %r13d
cmpl -0x30(%rbp), %r13d
je 0x12c4
incl %r15d
jmp 0x1273
pushq $-0x1
popq %r15
leaq -0x58(%rbp), %rdi
callq 0x13f6
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12e1
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x13f6
movq %rbx, %rdi
callq 0x10f0
// File: /workspace/github_cpp_makefile_star2_O2/zengfenfei[P]codility/src/FrogRiverOne.cpp
// Function: main
int main() {
	vector<int> A(8);
	A[0] = 1;
	A[1] = 3;
	A[2] = 1;
	A[3] = 4;
	A[4] = 2;
	A[5] = 3;
	A[6] = 5;
	A[7] = 4;
	cout << solution(5, A) << '\n';	// 6
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq -0x28(%rbp), %rbx
pushq $0x8
popq %rsi
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x140a
movq (%rbx), %rax
movaps 0xcf5(%rip), %xmm0      # 0x2010
movups %xmm0, (%rax)
movaps 0xcfb(%rip), %xmm0      # 0x2020
movups %xmm0, 0x10(%rax)
pushq $0x5
popq %rdi
movq %rbx, %rsi
callq 0x123c
movq 0x2c9d(%rip), %rdi      # 0x3fd8
movl %eax, %esi
callq 0x10e0
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x10c0
leaq -0x28(%rbp), %rdi
callq 0x15fa
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x15fa
movq %rbx, %rdi
callq 0x10f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/kage08[P]RegexLibrary/Resource.cpp
// Function: NFA::NFA(std::vector<char, std::allocator<char>>&, char)
NFA::NFA(vector<char>& alph, char c){
      if(find(alph.begin(),alph.end(),c)==alph.end() && c!='@'){
        cerr<<"Invalid initialization of simple NFA\n";
        exit(0);
      }


      noStates=2;

      Trans=vector<set<pair<char,uLong> > >(noStates,set<pair<char,uLong> >());
      alphabet=alph;
      addTransition(0,1,c);
      acceptStates.insert(1);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r13
movq %rdi, %r12
leaq 0xe(%rsp), %rax
movb %dl, (%rax)
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
andl $0x0, 0x28(%rdi)
leaq 0x20(%rdi), %r14
andq $0x0, 0x30(%rdi)
leaq 0x28(%rdi), %rcx
movq %rcx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
leaq 0x50(%rdi), %r15
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movq (%rsi), %rdi
movq 0x8(%rsi), %rsi
movq %rax, %rdx
callq 0x4a07
cmpq 0x8(%r13), %rax
jne 0x2554
cmpb $0x40, 0xe(%rsp)
jne 0x25f3
movq $0x2, (%r12)
leaq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x40(%rsp), %rdi
pushq $0x2
popq %rsi
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0x3a30
leaq 0x40(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4984
movq %rbp, %rdi
callq 0x3a86
leaq 0x10(%rsp), %rdi
callq 0x3ca8
movq %r15, %rdi
movq %r13, %rsi
callq 0x3aa8
movsbl 0xe(%rsp), %ecx
pushq $0x1
popq %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2644
leaq 0x10(%rsp), %rsi
movq $0x1, (%rsi)
movq %r14, %rdi
callq 0x4a92
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x89f6(%rip), %rdi      # 0xaff0
leaq 0x4a6f(%rip), %rsi      # 0x7070
callq 0x2160
xorl %edi, %edi
callq 0x21d0
jmp 0x2620
movq %rax, %r12
leaq 0x10(%rsp), %rdi
callq 0x3ca8
jmp 0x2623
jmp 0x2620
movq %rax, %r12
movq %r15, %rdi
callq 0x457e
movq %r14, %rdi
callq 0x3d00
movq %rbx, %rdi
callq 0x3a86
movq %r12, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O2/kage08[P]RegexLibrary/Resource.cpp
// Function: NFA::step(std::set<unsigned long long, std::less<unsigned long long>, std::allocator<unsigned long long>>&, char)
set<uLong> NFA::step(set<uLong>& initS, char alpha){
  set<uLong> finalS;
  if(alpha=='@') finalS=initS;
  for(uLong u:initS){
    set<uLong> temp;
    for(auto pb:Trans[u]){
      if(pb.first==alpha){
        finalS.insert(pb.second);
        temp.insert(pb.second);
      }
    }
    while(!(temp.size()==0)){
      int v=(*(temp.begin()));
      temp.erase(temp.begin());
      for(auto pb:Trans[v]){
        if(pb.first=='@' && finalS.find(pb.second)==finalS.end()){
          temp.insert(pb.second);finalS.insert(pb.second);}
      }
    }
  }
  return finalS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
andl $0x0, 0x8(%rdi)
movq %rdx, %r15
andq $0x0, 0x10(%rdi)
movq %rsi, 0x20(%rsp)
leaq 0x8(%rdi), %rbp
movq %rbp, 0x18(%rdi)
movq %rbp, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movl %ecx, 0xc(%rsp)
cmpb $0x40, %cl
jne 0x26c3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3d58
movq 0x18(%r15), %rax
addq $0x8, %r15
leaq 0x18(%rsp), %r14
leaq 0x38(%rsp), %r12
movq %r15, 0x28(%rsp)
cmpq %r15, %rax
je 0x2800
movq %rax, 0x30(%rsp)
imulq $0x30, 0x20(%rax), %rax
andl $0x0, 0x40(%rsp)
andq $0x0, 0x48(%rsp)
leaq 0x40(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
andq $0x0, 0x60(%rsp)
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rcx
leaq (%rcx,%rax), %r15
addq $0x8, %r15
movq 0x10(%r15), %r13
cmpq %r15, %r13
je 0x27dc
movups 0x20(%r13), %xmm0
movaps %xmm0, 0x10(%rsp)
movl 0xc(%rsp), %eax
cmpb %al, 0x10(%rsp)
jne 0x2759
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
callq 0x4d0c
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
callq 0x4d0c
movq %r13, %rdi
callq 0x21a0
movq %rax, %r13
jmp 0x2722
movq 0x50(%rsp), %rsi
movq 0x20(%rsi), %r15
movq %r12, %rdi
callq 0x4da2
movslq %r15d, %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rcx
imulq $0x30, %rax, %rax
leaq (%rcx,%rax), %r15
addq $0x8, %r15
movq 0x10(%r15), %r13
cmpq %r15, %r13
je 0x27dc
movups 0x20(%r13), %xmm0
movaps %xmm0, 0x10(%rsp)
cmpb $0x40, 0x10(%rsp)
jne 0x27cf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4df0
cmpq %rbp, %rax
jne 0x27cf
movq %r12, %rdi
movq %r14, %rsi
callq 0x4d0c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4d0c
movq %r13, %rdi
callq 0x21a0
movq %rax, %r13
jmp 0x2793
cmpq $0x0, 0x60(%rsp)
jne 0x2766
movq %r12, %rdi
callq 0x3d00
movq 0x30(%rsp), %rdi
callq 0x21a0
movq 0x28(%rsp), %r15
jmp 0x26da
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x282a
jmp 0x281d
jmp 0x281d
jmp 0x281d
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x3d00
movq %rbx, %rdi
callq 0x3d00
movq %r14, %rdi
callq 0x2270
// File: /workspace/github_cpp_makefile_star2_O2/kage08[P]RegexLibrary/Resource.cpp
// Function: operator+(NFA&, NFA&)
NFA operator+(NFA& A, NFA& B){
  NFA C(A.noStates+B.noStates+1,A.alphabet);
  C.addTransition(0,1,'@');
  for(uLong i=0;i<A.noStates;i++){
    for(auto pb: A.Trans[i])
      C.addTransition(i+1,pb.second+1,pb.first);
  }
  C.addTransition(0,A.noStates+1,'@');
  for(uLong i=0;i<B.noStates;i++){
    for(auto pb: B.Trans[i])
      C.addTransition(i+A.noStates+1,pb.second+A.noStates+1,pb.first);
  }
  for(uLong f:A.acceptStates)
    C.acceptStates.insert(f+1);
  for(uLong f: B.acceptStates)
    C.acceptStates.insert(f+1+A.noStates);
  return C;
}

// 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), %rax
movq (%rdx), %rcx
leaq (%rax,%rcx), %rsi
incq %rsi
leaq 0x50(%r15), %rdx
callq 0x23fc
pushq $0x1
popq %rdx
pushq $0x40
popq %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2644
xorl %r12d, %r12d
movq (%r15), %rdx
cmpq %rdx, %r12
jae 0x28bf
movq 0x8(%r15), %rax
imulq $0x30, %r12, %rcx
leaq (%rax,%rcx), %rbp
addq $0x8, %rbp
movq 0x10(%rbp), %r13
incq %r12
cmpq %rbp, %r13
je 0x2877
movsbl 0x20(%r13), %ecx
movq 0x28(%r13), %rdx
incq %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2644
movq %r13, %rdi
callq 0x21a0
movq %rax, %r13
jmp 0x2896
incq %rdx
pushq $0x40
popq %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2644
xorl %r13d, %r13d
cmpq (%r14), %r13
jae 0x2920
movq 0x8(%r14), %rax
imulq $0x30, %r13, %rcx
leaq (%rax,%rcx), %rbp
addq $0x8, %rbp
movq 0x10(%rbp), %r12
incq %r13
cmpq %rbp, %r12
je 0x28d2
movsbl 0x20(%r12), %ecx
movq 0x28(%r12), %rax
movq (%r15), %rdx
leaq (%rdx,%r13), %rsi
addq %rax, %rdx
incq %rdx
movq %rbx, %rdi
callq 0x2644
movq %r12, %rdi
callq 0x21a0
movq %rax, %r12
jmp 0x28ee
movq 0x38(%r15), %rbp
leaq 0x28(%r15), %r13
leaq 0x20(%rbx), %r12
cmpq %r13, %rbp
je 0x2954
movq 0x20(%rbp), %rax
incq %rax
movq %rax, (%rsp)
movq %r12, %rdi
movq %rsp, %rsi
callq 0x4a92
movq %rbp, %rdi
callq 0x21a0
movq %rax, %rbp
jmp 0x292c
movq 0x38(%r14), %rbp
addq $0x28, %r14
movq %rsp, %r13
cmpq %r14, %rbp
je 0x298d
movq 0x20(%rbp), %rax
movq (%r15), %rcx
addq %rcx, %rax
incq %rax
movq %rax, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x4a92
movq %rbp, %rdi
callq 0x21a0
movq %rax, %rbp
jmp 0x295f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29a7
jmp 0x29a7
jmp 0x29a7
jmp 0x29a7
movq %rax, %r14
movq %rbx, %rdi
callq 0x3b6a
movq %r14, %rdi
callq 0x2270