LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::random_choose(PList const&, bool (Goban::*)(int, bool) const) const
int Goban::random_choose(const PList &list, bool(Goban::*Policy)(int, bool) const) const
{
  if (list.length() == 0) return 0;
  int first_choice = rand() % list.length();
  for (int i = first_choice; i < list.length(); i++) {
    int point = list[i];
    if ((this->*Policy)(point, side)) {
      return point;
    }
  }
  for (int i = 0; i < first_choice; i++) {
    int point = list[i];
    if ((this->*Policy)(point, side)) {
      return point;
    }
  }
  return PASS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
cmpl $0x0, %eax
jne 0xe29e
movl $0x0, -0x4(%rbp)
jmp 0xe425
callq 0x3090
movl %eax, -0x5c(%rbp)
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, %ecx
movl -0x5c(%rbp), %eax
cltd
idivl %ecx
movl %edx, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, %ecx
movl -0x60(%rbp), %eax
cmpl %ecx, %eax
jge 0xe36d
movq -0x28(%rbp), %rdi
movl -0x40(%rbp), %esi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq -0x58(%rbp), %rcx
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x68(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0xe32b
movq -0x70(%rbp), %rcx
movq -0x68(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x78(%rbp)
jmp 0xe333
movq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x68(%rbp), %rdi
movq -0x58(%rbp), %rcx
movq -0x78(%rbp), %rax
movl -0x44(%rbp), %esi
movb (%rcx), %cl
andb $0x1, %cl
movzbl %cl, %edx
callq *%rax
testb $0x1, %al
jne 0xe352
jmp 0xe35d
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xe425
jmp 0xe35f
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xe2c1
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0xe41e
movq -0x28(%rbp), %rdi
movl -0x48(%rbp), %esi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq -0x58(%rbp), %rcx
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x30(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x80(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0xe3d6
movq -0x88(%rbp), %rcx
movq -0x80(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x90(%rbp)
jmp 0xe3e4
movq -0x88(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x80(%rbp), %rdi
movq -0x58(%rbp), %rcx
movq -0x90(%rbp), %rax
movl -0x4c(%rbp), %esi
movb (%rcx), %cl
andb $0x1, %cl
movzbl %cl, %edx
callq *%rax
testb $0x1, %al
jne 0xe406
jmp 0xe40e
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xe425
jmp 0xe410
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xe374
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::heavy_policy(int, bool) const
bool Goban::heavy_policy(int point, bool side) const
{  
  if (is_virtual_eye(point, side)) return false;
  if (!is_legal(point, side)) return false;
  if (is_self_atari(point, side)) return false;
  if (fast_ladder(point,side)) return false;
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl -0x14(%rbp), %esi
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x8050
testb $0x1, %al
jne 0xe4e4
jmp 0xe4ea
movb $0x0, -0x1(%rbp)
jmp 0xe54c
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x8140
testb $0x1, %al
jne 0xe508
movb $0x0, -0x1(%rbp)
jmp 0xe54c
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0xe560
testb $0x1, %al
jne 0xe522
jmp 0xe528
movb $0x0, -0x1(%rbp)
jmp 0xe54c
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0xe5b0
testb $0x1, %al
jne 0xe542
jmp 0xe548
movb $0x0, -0x1(%rbp)
jmp 0xe54c
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x630, %rsp            # imm = 0x630
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x618(%rbp)
callq 0xeb00
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xe90f
movq -0x618(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x6e80
movl %eax, -0x4(%rbp)
jmp 0xeae8
movq -0x618(%rbp), %rax
cmpl $0x0, 0xd63e0(%rax)
je 0xead9
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x620(%rbp)
callq 0x10ee0
movq -0x620(%rbp), %rdx
movq -0x618(%rbp), %rdi
movl 0xd63e0(%rdi), %esi
callq 0xec60
movq -0x618(%rbp), %rdi
leaq -0x4ad(%rip), %rax      # 0xe4b0
movq %rax, -0x5e0(%rbp)
movq $0x0, -0x5d8(%rbp)
movq -0x5e0(%rbp), %rdx
movq -0x5d8(%rbp), %rcx
leaq -0x5c8(%rbp), %rsi
callq 0xe250
movl %eax, -0x5cc(%rbp)
cmpl $0x0, -0x5cc(%rbp)
je 0xe9b2
movq -0x618(%rbp), %rdi
movl -0x5cc(%rbp), %esi
callq 0x6e80
movl %eax, -0x4(%rbp)
jmp 0xeae8
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x628(%rbp)
callq 0x10f20
movq -0x628(%rbp), %rdx
movq -0x618(%rbp), %rdi
movl 0xd63e0(%rdi), %esi
callq 0xeda0
movq -0x618(%rbp), %rdi
leaq -0x53c(%rip), %rax      # 0xe4b0
movq %rax, -0x5f8(%rbp)
movq $0x0, -0x5f0(%rbp)
movq -0x5f8(%rbp), %rdx
movq -0x5f0(%rbp), %rcx
leaq -0x5c8(%rbp), %rsi
callq 0xe250
movl %eax, -0x5e4(%rbp)
cmpl $0x0, -0x5e4(%rbp)
je 0xea41
movq -0x618(%rbp), %rdi
movl -0x5e4(%rbp), %esi
callq 0x6e80
movl %eax, -0x4(%rbp)
jmp 0xeae8
leaq -0x5c8(%rbp), %rdi
movq %rdi, -0x630(%rbp)
callq 0x10f20
movq -0x630(%rbp), %rdx
movq -0x618(%rbp), %rdi
movl 0xd63e0(%rdi), %esi
callq 0xee40
movq -0x618(%rbp), %rdi
leaq -0x5cb(%rip), %rax      # 0xe4b0
movq %rax, -0x610(%rbp)
movq $0x0, -0x608(%rbp)
movq -0x610(%rbp), %rdx
movq -0x608(%rbp), %rcx
leaq -0x5c8(%rbp), %rsi
callq 0xe250
movl %eax, -0x5fc(%rbp)
cmpl $0x0, -0x5fc(%rbp)
je 0xeacd
movq -0x618(%rbp), %rdi
movl -0x5fc(%rbp), %esi
callq 0x6e80
movl %eax, -0x4(%rbp)
jmp 0xeae8
leaq -0x5c8(%rbp), %rdi
callq 0x10f20
movq -0x618(%rbp), %rdi
callq 0xe880
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x630, %rsp            # imm = 0x630
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x5f0, %rsp            # imm = 0x5F0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x5f0(%rbp)
movb (%rax), %cl
xorb $-0x1, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movq 0xd63d0(%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xeba2
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x10f40
movq -0x5f0(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movb (%rdi), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x8140
testb $0x1, %al
jne 0xeb62
jmp 0xeba0
movq -0x5f0(%rbp), %rdi
movl -0x1c(%rbp), %esi
movb (%rdi), %al
andb $0x1, %al
movzbl %al, %edx
callq 0xe560
testb $0x1, %al
jne 0xeba0
movq -0x5f0(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0xef20
testb $0x1, %al
jne 0xeb95
jmp 0xeba0
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xec46
jmp 0xeba2
leaq -0x5d0(%rbp), %rdi
callq 0x10f60
movq -0x5f0(%rbp), %rax
movb (%rax), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpq $0x0, 0xd63d0(%rax,%rcx,8)
je 0xec3f
movq -0x5f0(%rbp), %rdi
movzbl (%rdi), %eax
andl $0x1, %eax
movq 0xd63d0(%rdi,%rax,8), %rsi
leaq -0x5d0(%rbp), %rdx
callq 0xefa0
movq -0x5f0(%rbp), %rdi
leaq -0x747(%rip), %rax      # 0xe4b0
movq %rax, -0x5e8(%rbp)
movq $0x0, -0x5e0(%rbp)
movq -0x5e8(%rbp), %rdx
movq -0x5e0(%rbp), %rcx
leaq -0x5d0(%rbp), %rsi
callq 0xe250
movl %eax, -0x5d4(%rbp)
cmpl $0x0, -0x5d4(%rbp)
je 0xec3d
movl -0x5d4(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xec46
jmp 0xec3f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x5f0, %rsp            # imm = 0x5F0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x18(%rax,%rcx,8)
je 0xecf9
movq -0x68(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rdi
callq 0x7380
cmpl $0x2, %eax
jne 0xecf9
movl $0x0, -0x1c(%rbp)
cmpl $0x2, -0x1c(%rbp)
jge 0xecf7
movq -0x68(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x18(%rax,%rcx,8), %rdi
movl -0x1c(%rbp), %esi
callq 0x10f40
movq -0x68(%rbp), %rdi
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %esi
movslq -0xc(%rbp), %rax
movq 0x18(%rdi,%rax,8), %rdx
callq 0xef20
testb $0x1, %al
jne 0xecde
jmp 0xecea
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %esi
movq (%rdi), %rax
callq *(%rax)
jmp 0xecec
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xeca5
jmp 0xecf9
leaq -0x58(%rbp), %rdi
callq 0x73c0
movq -0x68(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x58(%rbp), %rdx
callq 0x7a10
movl %eax, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0xed8f
movl -0x60(%rbp), %esi
leaq -0x58(%rbp), %rdi
callq 0x73e0
movq %rax, %rdi
callq 0x7400
movq -0x68(%rbp), %rcx
andb $0x1, %al
movzbl %al, %eax
movb (%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xed82
movl -0x60(%rbp), %esi
leaq -0x58(%rbp), %rdi
callq 0x73e0
movq %rax, %rdi
callq 0x7380
cmpl $0x2, %eax
jne 0xed82
movl -0x60(%rbp), %esi
leaq -0x58(%rbp), %rdi
callq 0x73e0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0xefa0
jmp 0xed84
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0xed1c
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0xee31
movq -0x28(%rbp), %rax
addq $0xd9c78, %rax          # imm = 0xD9C78
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0xee24
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpq $0x0, 0x18(%rax,%rcx,8)
jne 0xee22
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
movb (%rdi), %al
andb $0x1, %al
movzbl %al, %edx
callq 0xf2b0
testb $0x1, %al
jne 0xee16
jmp 0xee22
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %esi
movq (%rdi), %rax
callq *(%rax)
jmp 0xee24
jmp 0xee26
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xedc2
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0xef0c
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0xd9c78, %rcx          # imm = 0xD9C78
movslq -0xc(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movslq -0x1c(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xeefc
movq -0x28(%rbp), %rdi
callq 0x7400
movq -0x38(%rbp), %rcx
andb $0x1, %al
movzbl %al, %eax
movb (%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0xeefc
movq -0x28(%rbp), %rdi
callq 0x73a0
testb $0x1, %al
jne 0xeeca
jmp 0xeefc
movq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x10f40
movq -0x38(%rbp), %rdi
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0xef20
testb $0x1, %al
jne 0xeeee
jmp 0xeefa
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq (%rdi), %rax
callq *(%rax)
jmp 0xeefc
jmp 0xeefe
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xee62
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x1, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xef55
movq -0x18(%rbp), %rdi
callq 0x7380
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7400
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x1c(%rbp), %r8d
movq -0x18(%rbp), %r9
movzbl %al, %edx
andl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x105b0
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setg %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x600, %rsp            # imm = 0x600
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x5e0(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x10fd0
leaq -0x20(%rbp), %rdi
callq 0x74a0
testb $0x1, %al
jne 0xefde
jmp 0xf02e
leaq -0x20(%rbp), %rdi
callq 0x74c0
movq -0x5e0(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rdx
callq 0xef20
testb $0x1, %al
jne 0xefff
jmp 0xf021
movq -0x18(%rbp), %rax
movq %rax, -0x5e8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x74c0
movq -0x5e8(%rbp), %rdi
movl %eax, %esi
movq (%rdi), %rax
callq *(%rax)
jmp 0xf023
leaq -0x20(%rbp), %rdi
callq 0x74e0
jmp 0xefcf
leaq -0x5c8(%rbp), %rdi
callq 0x110c0
movq -0x10(%rbp), %rax
movq %rax, -0x5f8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7400
xorb $-0x1, %al
movb %al, -0x5e9(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7380
movq -0x5e0(%rbp), %rdi
movq -0x5f8(%rbp), %rsi
movl %eax, %ecx
movb -0x5e9(%rbp), %al
movzbl %al, %edx
andl $0x1, %edx
leaq -0x5c8(%rbp), %r8
callq 0x7ca0
movl %eax, -0x5cc(%rbp)
movl $0x0, -0x5d0(%rbp)
movl -0x5d0(%rbp), %eax
cmpl -0x5cc(%rbp), %eax
jge 0xf14b
movl -0x5d0(%rbp), %esi
leaq -0x5c8(%rbp), %rdi
callq 0x110e0
movq %rax, %rsi
leaq -0x5d8(%rbp), %rdi
callq 0x10fd0
leaq -0x5d8(%rbp), %rdi
callq 0x74a0
testb $0x1, %al
jne 0xf0dc
jmp 0xf135
leaq -0x5d8(%rbp), %rdi
callq 0x74c0
movq -0x5e0(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rdx
callq 0xef20
testb $0x1, %al
jne 0xf100
jmp 0xf125
movq -0x18(%rbp), %rax
movq %rax, -0x600(%rbp)
leaq -0x5d8(%rbp), %rdi
callq 0x74c0
movq -0x600(%rbp), %rdi
movl %eax, %esi
movq (%rdi), %rax
callq *(%rax)
jmp 0xf127
leaq -0x5d8(%rbp), %rdi
callq 0x74e0
jmp 0xf0ca
jmp 0xf137
movl -0x5d0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5d0(%rbp)
jmp 0xf097
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x600, %rsp            # imm = 0x600
popq %rbp
retq
nop
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0xf201
movq -0x28(%rbp), %rax
addq $0xd9c78, %rax          # imm = 0xD9C78
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0xf1f4
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
cmpq $0x0, 0x18(%rax,%rcx,8)
jne 0xf1f2
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
xorl %edx, %edx
callq 0xf210
cmpl $0x1, %eax
jg 0xf1e6
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
movl $0x1, %edx
callq 0xf210
cmpl $0x1, %eax
jle 0xf1f2
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %esi
movq (%rdi), %rax
callq *(%rax)
jmp 0xf1f4
jmp 0xf1f6
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf182
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0xd63e8, %rax          # imm = 0xD63E8
movslq -0xc(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0xf2a6
movq -0x20(%rbp), %rdi
movq %rdi, %rax
addq $0xd63e8, %rax          # imm = 0xD63E8
movslq -0xc(%rbp), %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
movb -0xd(%rbp), %al
movl -0xc(%rbp), %ecx
andb $0x1, %al
movzbl %al, %edx
callq 0x7f30
testb $0x1, %al
jne 0xf290
jmp 0xf299
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf29b
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf23c
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x1059e
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
shll $0x2, %ecx
cmpl %ecx, %eax
jge 0x10591
movq -0x30(%rbp), %rdi
movq %rdi, %rax
addq $0xdfca0, %rax          # imm = 0xDFCA0
movslq -0x14(%rbp), %rcx
imulq $0x140, %rcx, %rcx      # imm = 0x140
addq %rcx, %rax
movslq -0x1c(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movslq -0x20(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
callq 0x7560
testb $0x1, %al
jne 0x1057e
jmp 0x10584
movb $0x1, -0x1(%rbp)
jmp 0x105a2
jmp 0x10586
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x10530
jmp 0x10593
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x10521
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl -0x14(%rbp), %esi
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x10ac0
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x10b90
movb $0x0, -0x1(%rbp)
jmp 0x10c1d
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movb -0x15(%rbp), %al
xorb $-0x1, %al
movzbl %al, %edx
andl $0x1, %edx
xorl %r8d, %r8d
movl %r8d, %r9d
movq %r9, %rcx
callq 0x105b0
cmpl $0x2, %eax
jge 0x10bbb
movb $0x0, -0x1(%rbp)
jmp 0x10c1d
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movb -0x15(%rbp), %al
xorb $-0x1, %al
movzbl %al, %edx
andl $0x1, %edx
callq 0xf210
cmpl $0x0, %eax
je 0x10bf9
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
movb -0x15(%rbp), %al
xorb $-0x1, %al
movzbl %al, %edx
andl $0x1, %edx
callq 0xf210
cmpl $0x0, %eax
jne 0x10bf9
movb $0x0, -0x1(%rbp)
jmp 0x10c1d
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x10c30
testb $0x1, %al
jne 0x10c13
jmp 0x10c19
movb $0x0, -0x1(%rbp)
jmp 0x10c1d
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl -0x14(%rbp), %esi
movzbl -0x15(%rbp), %edx
andl $0x1, %edx
callq 0x10e20
movq -0x30(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %esi
movzbl -0x15(%rbp), %edx
andl $0x1, %edx
callq 0x7d20
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x3, %eax
ja 0x10ccb
movq -0x28(%rbp), %rax
leaq 0x3ac8(%rip), %rcx      # 0x14754
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x1, -0x1(%rbp)
jmp 0x10cd5
cmpl $0x3, -0x1c(%rbp)
jne 0x10ca7
movb $0x1, -0x1(%rbp)
jmp 0x10cd5
jmp 0x10cd1
cmpl $0x4, -0x1c(%rbp)
je 0x10cb5
cmpl $0x3, -0x1c(%rbp)
jne 0x10cbb
movb $0x1, -0x1(%rbp)
jmp 0x10cd5
jmp 0x10cd1
cmpl $0x4, -0x1c(%rbp)
jne 0x10cc9
movb $0x1, -0x1(%rbp)
jmp 0x10cd5
jmp 0x10cd1
movb $0x0, -0x1(%rbp)
jmp 0x10cd5
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x7460
leaq -0x20(%rbp), %rdi
callq 0x74a0
testb $0x1, %al
jne 0x10d21
jmp 0x10e0c
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0xd63e8, %rax          # imm = 0xD63E8
movq %rax, -0x38(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x74c0
movl %eax, %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq -0x28(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x10dee
movq -0x30(%rbp), %rax
addq $0xd63e8, %rax          # imm = 0xD63E8
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x74c0
movq -0x40(%rbp), %rcx
movl %eax, %edx
movq -0x30(%rbp), %rax
movslq %edx, %rdx
imulq $0x14, %rdx, %rdx
addq %rdx, %rcx
movslq -0x28(%rbp), %rdx
movslq (%rcx,%rdx,4), %rcx
movq 0x18(%rax,%rcx,8), %rax
cmpq -0x10(%rbp), %rax
je 0x10dd5
movq -0x30(%rbp), %rax
addq $0xd63e8, %rax          # imm = 0xD63E8
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x74c0
movl %eax, %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
imulq $0x14, %rcx, %rcx
addq %rcx, %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
jne 0x10dde
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x10de0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x10d2f
movl -0x24(%rbp), %eax
cmpl -0x18(%rbp), %eax
jle 0x10dfc
movl -0x24(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x10dfe
leaq -0x20(%rbp), %rdi
callq 0x74e0
jmp 0x10d0f
movl -0x18(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x70, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
andb $0x1, %al
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x73c0
movq -0x70(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x48(%rbp), %rdx
callq 0x7a10
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jge 0x10eca
movl -0x54(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0x73e0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x7400
andb $0x1, %al
movzbl %al, %eax
movb -0xd(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x10ebd
movq -0x70(%rbp), %rdi
movq -0x60(%rbp), %rsi
movl -0xc(%rbp), %edx
callq 0x10ce0
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x50(%rbp), %eax
jle 0x10ebb
movl -0x64(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0x10ebd
jmp 0x10ebf
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x10e67
movl -0x50(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: antoniogarro[P]Hara/main.cpp
// Function: main
int main()
{

  //srand(unsigned(time(NULL)));
  init_genrand64(16669666165875248481ULL);

  GTP gtp;
  //gtp.perft(100000);
  gtp.GTP_loop();
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100360, %rsp         # imm = 0x100360
movl $0x0, -0x4(%rbp)
movabsq $-0x18a972f11aa8729f, %rdi # imm = 0xE7568D0EE5578D61
callq 0x112b0
leaq -0x100348(%rbp), %rdi
movq %rdi, -0x100360(%rbp)
callq 0x8f80
movq -0x100360(%rbp), %rdi
callq 0x98e0
jmp 0x11262
movl $0x0, -0x4(%rbp)
leaq -0x100348(%rbp), %rdi
callq 0x11350
movl -0x4(%rbp), %eax
addq $0x100360, %rsp         # imm = 0x100360
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x100350(%rbp)
movl %eax, -0x100354(%rbp)
leaq -0x100348(%rbp), %rdi
callq 0x11350
movq -0x100350(%rbp), %rdi
callq 0x3410
nopl (%rax,%rax)
// File: antoniogarro[P]Hara/tree.cpp
// Function: Node::reset()
void Node::reset()
{
  child = 0;
  sibling = 0;
  visits = 0;
  results = 0;
  rave_visits = 0;
  rave_results = 0;
  move = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq $0x0, 0x40(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x10(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rax)
movl $0x0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x38(%rax)
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rcx
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rcx
movsd 0x10(%rcx), %xmm0
movsd %xmm0, 0x10(%rax)
movq -0x10(%rbp), %rcx
movsd 0x18(%rcx), %xmm0
movsd %xmm0, 0x18(%rax)
movq -0x10(%rbp), %rcx
movsd 0x20(%rcx), %xmm0
movsd %xmm0, 0x20(%rax)
movq -0x10(%rbp), %rcx
movsd 0x28(%rcx), %xmm0
movsd %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rcx
movsd 0x30(%rcx), %xmm0
movsd %xmm0, 0x30(%rax)
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
popq %rbp
retq
nop
// File: antoniogarro[P]Hara/tree.cpp
// Function: Node::add_child(Node*)
void Node::add_child(Node *child)
{
  if (!this->child)  this->child = child;
  else {
    Node *next;
    for (next = this->child; next->sibling; next = next->sibling) {
    }
    next->sibling = child;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, 0x38(%rax)
jne 0x11e49
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x38(%rax)
jmp 0x11e7c
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x11e70
jmp 0x11e62
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x11e55
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x40(%rax)
popq %rbp
retq
nop
// File: antoniogarro[P]Hara/tree.cpp
// Function: Node::set_move(int, Prior const&)
void Node::set_move(int mv, const Prior &prior)
{
  move = mv;
  rave_results = prior.prior;
  rave_visits = prior.equiv;
  prior_results = prior.prior;
  prior_visits = prior.equiv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x20(%rax)
movq -0x18(%rbp), %rcx
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x18(%rax)
movq -0x18(%rbp), %rcx
movsd (%rcx), %xmm0
movsd %xmm0, 0x30(%rax)
movq -0x18(%rbp), %rcx
movsd 0x8(%rcx), %xmm0
movsd %xmm0, 0x28(%rax)
popq %rbp
retq
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x11fce
cvtsi2sdl -0xc(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
movl -0x20(%rbp), %edx
movb -0x19(%rbp), %al
xorps %xmm0, %xmm0
andb $0x1, %al
movzbl %al, %ecx
callq 0x131d0
movaps %xmm0, %xmm2
movsd -0x38(%rbp), %xmm0
movq -0x30(%rbp), %rax
movsd 0x20(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rax)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movl (%rax), %esi
movl -0x20(%rbp), %edx
movb -0x19(%rbp), %al
xorps %xmm0, %xmm0
andb $0x1, %al
movzbl %al, %ecx
callq 0x131d0
movq -0x30(%rbp), %rax
addsd 0x18(%rax), %xmm0
movsd %xmm0, 0x18(%rax)
movq -0x30(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x11f42
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movsd 0x27cf(%rip), %xmm0     # 0x147d0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x12023
jp 0x12023
jmp 0x120e2
movq -0x38(%rbp), %rax
movsd 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x12039
jp 0x12039
jmp 0x120a0
movq -0x38(%rbp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x18(%rax), %xmm2
addsd 0x8(%rax), %xmm2
movsd 0x18(%rax), %xmm1
mulsd 0x8(%rax), %xmm1
movsd 0x2772(%rip), %xmm3     # 0x147d0
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0x1fa9(%rip), %xmm0     # 0x14020
subsd -0x30(%rbp), %xmm0
mulsd 0x10(%rax), %xmm0
divsd 0x8(%rax), %xmm0
movsd -0x30(%rbp), %xmm1
mulsd 0x20(%rax), %xmm1
divsd 0x18(%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x1211c
movq -0x38(%rbp), %rax
movsd 0x10(%rax), %xmm0
divsd 0x8(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x3200
movq -0x38(%rbp), %rax
divsd 0x8(%rax), %xmm0
callq 0x31e0
movsd -0x40(%rbp), %xmm1
xorps %xmm2, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x1211c
movq -0x38(%rbp), %rax
movsd 0x18(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x120f8
jp 0x120f8
jmp 0x1210d
movq -0x38(%rbp), %rax
movsd 0x20(%rax), %xmm0
divsd 0x18(%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x1211c
jmp 0x1210f
movsd 0x1f09(%rip), %xmm0     # 0x14020
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movsd 0x268c(%rip), %xmm0     # 0x147d8
movsd %xmm0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x121b0
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movsd 0x8(%rax), %xmm0
callq 0x11fe0
ucomisd -0x10(%rbp), %xmm0
jbe 0x121a0
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
movsd 0x8(%rax), %xmm0
callq 0x11fe0
movsd %xmm0, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x121a2
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x12161
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, -0x10(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x12230
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x20(%rbp), %rax
addsd 0x18(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0x12220
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x12222
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x121e4
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, 0x1c(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x20(%rax)
movslq -0xc(%rbp), %rax
movl $0x48, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movslq -0xc(%rbp), %rax
movl $0x48, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq (%rax), %rdi
callq 0x11d50
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x11d50
movq -0x20(%rbp), %rax
movl $0x1, 0x10(%rax)
movl $0x1, 0x14(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x0, 0x1c(%rax)
movq (%rax), %rdi
callq 0x11d50
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x11d50
movq -0x10(%rbp), %rax
movl $0x1, 0x10(%rax)
movl $0x1, 0x14(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movslq 0x1c(%rcx), %rax
movl 0x10(%rcx,%rax,4), %eax
cmpl 0x18(%rcx), %eax
jge 0x12a07
movq -0x38(%rbp), %rdx
movslq 0x1c(%rdx), %rax
movq (%rdx,%rax,8), %rax
movslq 0x1c(%rdx), %rsi
movl 0x10(%rdx,%rsi,4), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x10(%rdx,%rsi,4)
movslq %ecx, %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x11d50
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x11e20
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
callq 0x11e80
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x12a22
movq 0x85e2(%rip), %rdi      # 0x1aff0
leaq 0x1dea(%rip), %rsi      # 0x147ff
callq 0x3270
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: antoniogarro[P]Hara/tree.cpp
// Function: Tree::insert(Node*, Node const*)
Node *Tree::insert(Node *parent, const Node *orig)
{
  if (size[1-active] < maxsize) {
    Node *child = root[1-active] + size[1-active]++;
    child->copy_values(orig);
    parent->add_child(child);
    return child;
  } else {
    std::cerr << "WARNING: Out of memory!\n";
    return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movl $0x1, %eax
subl 0x1c(%rcx), %eax
cltq
movl 0x10(%rcx,%rax,4), %eax
cmpl 0x18(%rcx), %eax
jge 0x12abb
movq -0x30(%rbp), %rdx
movl $0x1, %eax
subl 0x1c(%rdx), %eax
cltq
movq (%rdx,%rax,8), %rax
movl $0x1, %ecx
subl 0x1c(%rdx), %ecx
movslq %ecx, %rsi
movl 0x10(%rdx,%rsi,4), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x10(%rdx,%rsi,4)
movslq %ecx, %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x11da0
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x11e20
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x12ad6
movq 0x852e(%rip), %rdi      # 0x1aff0
leaq 0x1d36(%rip), %rsi      # 0x147ff
callq 0x3270
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movslq 0x1c(%rax), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x13330
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x12c05
movq -0x20(%rbp), %rdi
callq 0x4740
cmpl -0x14(%rbp), %eax
jne 0x12bf4
movq -0x28(%rbp), %rax
movl $0x1, %ecx
subl 0x1c(%rax), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
callq 0x11da0
movq -0x28(%rbp), %rdi
movl $0x1, %eax
subl 0x1c(%rdi), %eax
cltq
movq (%rdi,%rax,8), %rsi
movq -0x20(%rbp), %rdx
callq 0x12ae0
movq -0x28(%rbp), %rdi
callq 0x12950
movq -0x28(%rbp), %rax
movl $0x1, %ecx
subl 0x1c(%rax), %ecx
movl %ecx, 0x1c(%rax)
movl 0x1c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x12c18
jmp 0x12bf6
movq -0x20(%rbp), %rdi
callq 0x13350
movq %rax, -0x20(%rbp)
jmp 0x12b88
movq -0x28(%rbp), %rdi
callq 0x12900
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x12cad
movq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movslq -0x34(%rbp), %r8
movslq (%rax,%r8,4), %rax
shlq $0x4, %rax
addq %rax, %rcx
callq 0x12980
cmpq $0x0, %rax
jne 0x12ca0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x12cb4
jmp 0x12ca2
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x12c5a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)