LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::reset()
void Goban::reset()
{
  side = BLACK;
  ko_point = 0;
#ifdef ZOBRIST
  zobrist.reset();
#endif
  stones_on_board[BLACK] = 0, stones_on_board[WHITE] = 0;
  last_atari[BLACK] = 0, last_atari[WHITE] = 0;
  last_point = 0, last_point2 = 0;
  
  for (int i = 0; i <= size2; i++) {
    if (Group *point = points[i]) {
      point->clear();
    }
    points[i] = 0;
  }
  empty_points.clear();
  for (int j = 0; j < size2; j++) {
    empty_points.add(j+1);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x0, (%rdi)
movl $0x0, 0x4(%rdi)
addq $0xfd7d0, %rdi          # imm = 0xFD7D0
callq 0xab20
xorps %xmm0, %xmm0
movups %xmm0, 0xd63d8(%rbx)
movups %xmm0, 0xd63c8(%rbx)
movl 0xc(%rbx), %eax
testl %eax, %eax
js 0x48f7
movq $-0x1, %r14
movq 0x20(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x488e
callq 0x5ece
movl 0xc(%rbx), %eax
movq $0x0, 0x20(%rbx,%r14,8)
movslq %eax, %rcx
incq %r14
cmpq %rcx, %r14
jl 0x487c
xorl %edx, %edx
movl %edx, 0xfc6d0(%rbx)
movl %edx, 0xfc128(%rbx)
testl %eax, %eax
jle 0x4905
movl $0x1, %ecx
cmpl $0x16a, %edx            # imm = 0x16A
je 0x48e9
leal 0x1(%rdx), %eax
movl %eax, 0xfc6d0(%rbx)
movslq %edx, %rax
movl %ecx, 0xfc128(%rbx,%rax,4)
movslq 0xfc6d0(%rbx), %rax
movl $0x0, 0xfc128(%rbx,%rax,4)
movl 0xc(%rbx), %eax
cmpl %eax, %ecx
jge 0x4905
movl 0xfc6d0(%rbx), %edx
incl %ecx
jmp 0x48b9
xorl %eax, %eax
movl %eax, 0xfc6d0(%rbx)
movl %eax, 0xfc128(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::restore()
void Goban::restore()
{
  reset();
  set_fixed_handicap(handicap);
  for (int i = 0; i < game_history.length(); i++) {
    if (game_history[i]) {
      drop_stone(game_history[i], side);
      side = !side;
    } else {
      side = !side;
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x483c
movl 0x14(%rbx), %esi
movq %rbx, %rdi
callq 0x496e
movl 0xfd7cc(%rbx), %eax
testl %eax, %eax
jle 0x4966
movb (%rbx), %cl
xorl %r14d, %r14d
movl 0xfc6e0(%rbx,%r14,4), %esi
testl %esi, %esi
je 0x4956
movzbl %cl, %edx
andl $0x1, %edx
movq %rbx, %rdi
callq 0x49c4
movb (%rbx), %cl
movl 0xfd7cc(%rbx), %eax
xorb $0x1, %cl
movb %cl, (%rbx)
incq %r14
movslq %eax, %rdx
cmpq %rdx, %r14
jl 0x4934
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::drop_stone(int, bool)
int Goban::drop_stone(int point, bool color)
{
  if (points[point] != 0) print_goban();
  
  PointSet<5> liberties;
  point_liberties(point, liberties);
  
  groups[point].set_up(point, color, liberties);
  points[point] = &(groups[point]);
  remove_empty(point);
  stones_on_board[color]++;
#ifdef ZOBRIST
  zobrist.update(point, color);
  zobrist.toggle_ko(ko_point);
#endif
  ko_point = handle_neighbours(point);
#ifdef ZOBRIST
  zobrist.toggle_ko(ko_point);
#endif
  if (points[point]->get_nliberties() == 0) {    //suicide.
      erase_neighbour(points[point]);
  } else if (points[point]->has_one_liberty()) { //self-atari.
    last_atari[color] = points[point] ;
  }
  last_point2 = last_point;
  last_point = point;
  return point;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %r14
movslq %esi, %r15
cmpq $0x0, 0x18(%rdi,%r15,8)
je 0x49ed
movq %r14, %rdi
callq 0x59de
xorl %eax, %eax
leaq 0x8(%rsp), %r13
movl %eax, 0x1c(%r13)
movl %eax, 0x8(%r13)
leaq 0xb1ed(%rip), %rax      # 0xfbf0
movq %rax, (%r13)
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x5388
imulq $0x970, %r15, %rax      # imm = 0x970
leaq (%r14,%rax), %rbp
addq $0xb68, %rbp            # imm = 0xB68
movzbl %r12b, %r12d
movq %rbp, %rdi
movl %r15d, %esi
movl %r12d, %edx
movq %r13, %rcx
callq 0x5db6
movq %rbp, 0x18(%r14,%r15,8)
movslq 0xfc6d0(%r14), %rax
testq %rax, %rax
jle 0x4a90
xorl %ecx, %ecx
cmpl %ebx, 0xfc128(%r14,%rcx,4)
je 0x4a63
incq %rcx
cmpq %rcx, %rax
jne 0x4a4f
jmp 0x4a90
leal -0x1(%rax), %edx
movl %edx, 0xfc6d0(%r14)
movl 0xfc124(%r14,%rax,4), %eax
movl %eax, 0xfc128(%r14,%rcx,4)
movslq 0xfc6d0(%r14), %rax
movl $0x0, 0xfc128(%r14,%rax,4)
incl 0xd63c8(%r14,%r12,4)
leaq 0xfd7d0(%r14), %r13
movq %r13, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0xab4e
movl 0x4(%r14), %esi
movq %r13, %rdi
callq 0xab4c
movq %r14, %rdi
movl %ebx, %esi
callq 0x4c1e
movl %eax, 0x4(%r14)
movq %r13, %rdi
movl %eax, %esi
callq 0xab4c
movq 0x18(%r14,%r15,8), %rsi
movl 0x96c(%rsi), %eax
cmpl $0x1, %eax
je 0x4aee
testl %eax, %eax
jne 0x4af6
movq %r14, %rdi
callq 0x4d0a
jmp 0x4af6
movq %rsi, 0xd63d0(%r14,%r12,8)
movl 0xd63e0(%r14), %eax
movl %eax, 0xd63e4(%r14)
movl %ebx, 0xd63e0(%r14)
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::set_handicap(int const*)
int Goban::set_handicap(const int handicap[])
{  
  for (int i = 0; i < 9 && handicap[i]; i++) {
    drop_stone(handicap[i], BLACK);
#ifdef ZOBRIST
    zobrist.update(handicap[i], 0);
#endif
    }
  side = 1;
#ifdef ZOBRIST
  zobrist.toggle_side();
#endif
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
leaq 0xfd7d0(%rdi), %rbx
xorl %r12d, %r12d
movl (%r15,%r12,4), %esi
testl %esi, %esi
je 0x4b5d
movq %r14, %rdi
xorl %edx, %edx
callq 0x49c4
movl (%r15,%r12,4), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xab4e
incq %r12
cmpq $0x9, %r12
jne 0x4b34
movb $0x1, (%r14)
movq %rbx, %rdi
callq 0xab4a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::set_size(int)
int Goban::set_size(int newsize)
{
  size = (newsize <= MAXSIZE) ? newsize : size;
  size2 = size*size;
  init_adjacent();
  init_diagonals();
  init_vicinity();
  init_distance();
  init_manhattan();
  clear();
  return size;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $0x14, %esi
jl 0x4b84
movl 0x8(%rbx), %esi
movl %esi, 0x8(%rbx)
imull %esi, %esi
movl %esi, 0xc(%rbx)
movq %rbx, %rdi
callq 0x4172
movq %rbx, %rdi
callq 0x4210
movq %rbx, %rdi
callq 0x42c0
movq %rbx, %rdi
callq 0x43fe
movq %rbx, %rdi
callq 0x4680
movq %rbx, %rdi
callq 0x483c
xorl %eax, %eax
movl %eax, 0x14(%rbx)
movl %eax, 0xfd7cc(%rbx)
movl %eax, 0xfc6e0(%rbx)
movl 0x8(%rbx), %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::handle_neighbours(int)
int Goban::handle_neighbours(int point)
{
  int captured_lone = 0, ncapt_lone = 0;
  GroupSet<4> neighbours;
  int nneigh = neighbour_groups(point, neighbours);
  
  for (int i = 0; i < nneigh; i++) {
    Group *current_neigh = neighbours[i];
    if (current_neigh->get_color() == points[point]->get_color()) {
      merge_neighbour(point, current_neigh);
    } else {
      if (current_neigh->has_one_liberty()) {
        if (current_neigh->get_nstones() == 1) {  
          ncapt_lone++;
          captured_lone = current_neigh->get_stone(0);
        }
        erase_neighbour(current_neigh);
      } else {
        current_neigh->erase_liberties(point);
        if (current_neigh->has_one_liberty()) {
          last_atari[current_neigh->get_color()] = current_neigh;
        }
      }
    }
  }
  if (ncapt_lone == 1 && points[point]->get_nstones()== 1) {
    return captured_lone;  //new ko point.
  } else {
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdx
movl $0x0, 0x30(%rdx)
movq $0x0, (%rdx)
callq 0x533c
testl %eax, %eax
jle 0x4cf8
movslq %ebp, %r12
movl %eax, %r13d
xorl %r14d, %r14d
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq 0x10(%rsp,%r14,8), %r15
movb (%r15), %al
movq 0x18(%rbx,%r12,8), %rcx
cmpb (%rcx), %al
jne 0x4c8a
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x4e28
jmp 0x4cd7
cmpl $0x1, 0x96c(%r15)
jne 0x4cb7
cmpl $0x1, 0x5a8(%r15)
jne 0x4caa
incl 0x8(%rsp)
movl 0x4(%r15), %eax
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4d0a
jmp 0x4cd7
movq %r15, %rdi
movl %ebp, %esi
callq 0x5e7c
cmpl $0x1, 0x96c(%r15)
jne 0x4cd7
movzbl (%r15), %eax
movq %r15, 0xd63d0(%rbx,%rax,8)
incq %r14
cmpq %r14, %r13
jne 0x4c6a
cmpl $0x1, 0x8(%rsp)
movl 0xc(%rsp), %eax
jne 0x4cf8
movq 0x18(%rbx,%r12,8), %rcx
cmpl $0x1, 0x5a8(%rcx)
je 0x4cfa
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::erase_neighbour(Group*)
void Goban::erase_neighbour(Group *neigh)
{
  for (Group::StoneIterator st(neigh);  st; ++st) {
    points[*st] = 0;
    stones_on_board[neigh->get_color()]--;
#ifdef ZOBRIST
    zobrist.update(*st, neigh->get_color());
#endif    
    empty_points.add(*st);

    GroupSet<4> meta_neigh;
    int nmeta = neighbour_groups(*st, meta_neigh);
    for (int k = 0; k < nmeta; k++) {
      meta_neigh[k]->add_liberties(*st);
      if (meta_neigh[k] == last_atari[meta_neigh[k]->get_color()]) {
        last_atari[meta_neigh[k]->get_color()] = 0;
      }
    }
  }
  
  if (neigh == last_atari[neigh->get_color()]) {
    last_atari[neigh->get_color()] = 0;
  }
  neigh->clear();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x4df8
leaq 0x4(%rbx), %r13
leaq 0xfd7d0(%r14), %r15
cltq
movq $0x0, 0x18(%r14,%rax,8)
movzbl (%rbx), %edx
decl 0xd63c8(%r14,%rdx,4)
movl (%r13), %esi
movq %r15, %rdi
callq 0xab4e
movslq 0xfc6d0(%r14), %rax
cmpq $0x16a, %rax            # imm = 0x16A
je 0x4d8e
movl (%r13), %ecx
leal 0x1(%rax), %edx
movl %edx, 0xfc6d0(%r14)
movl %ecx, 0xfc128(%r14,%rax,4)
movslq 0xfc6d0(%r14), %rax
movl $0x0, 0xfc128(%r14,%rax,4)
movl $0x0, 0x30(%rsp)
movq $0x0, (%rsp)
movl (%r13), %esi
movq %r14, %rdi
movq %rsp, %rdx
callq 0x533c
testl %eax, %eax
jle 0x4de8
movl %eax, %ebp
xorl %r12d, %r12d
movq (%rsp,%r12,8), %rdi
movl (%r13), %esi
callq 0x5e32
movq (%rsp,%r12,8), %rcx
movzbl (%rcx), %eax
cmpq 0xd63d0(%r14,%rax,8), %rcx
jne 0x4de0
movq $0x0, 0xd63d0(%r14,%rax,8)
incq %r12
cmpq %r12, %rbp
jne 0x4db6
movl 0x4(%r13), %eax
addq $0x4, %r13
testl %eax, %eax
jne 0x4d34
movzbl (%rbx), %eax
cmpq %rbx, 0xd63d0(%r14,%rax,8)
jne 0x4e11
movq $0x0, 0xd63d0(%r14,%rax,8)
movq %rbx, %rdi
callq 0x5ece
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::merge_neighbour(int, Group*)
void Goban::merge_neighbour(int point, Group *neigh)
{
  Group *group = points[point];
  neigh->erase_liberties(point);
  group->attach_group(neigh);
  for (Group::StoneIterator st(neigh);  st; ++st) {
    points[*st] = group;
  }
  neigh->clear();
  if (neigh == last_atari[neigh->get_color()]) {
    last_atari[neigh->get_color()] = 0;
    //merged group may still be in atari, but this case is handled in 'drop_stone()'.
  }    
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movslq %esi, %rsi
movq 0x18(%rdi,%rsi,8), %r15
movq %rdx, %rdi
callq 0x5e7c
movq %r15, %rdi
movq %r14, %rsi
callq 0x5ee6
movl 0x4(%r14), %eax
testl %eax, %eax
je 0x4e6b
leaq 0x8(%r14), %rcx
cltq
movq %r15, 0x18(%rbx,%rax,8)
movl (%rcx), %eax
addq $0x4, %rcx
testl %eax, %eax
jne 0x4e5a
movq %r14, %rdi
callq 0x5ece
movzbl (%r14), %eax
cmpq %r14, 0xd63d0(%rbx,%rax,8)
jne 0x4e8d
movq $0x0, 0xd63d0(%rbx,%rax,8)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::play_move(int)
int Goban::play_move(int point)  //this move isn't stored in game_history.
{
  if (point) {
    drop_stone(point, side);
  }
  side = !side;
#ifdef ZOBRIST
  zobrist.toggle_side();
  zobrist.record_key();
#endif
  return point;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
testl %esi, %esi
je 0x4eaf
movzbl (%r14), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x49c4
xorb $0x1, (%r14)
addq $0xfd7d0, %r14          # imm = 0xFD7D0
movq %r14, %rdi
callq 0xab4a
movq %r14, %rdi
callq 0xabdc
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::play_move(int, bool)
int Goban::play_move(int point, bool color)
{
  if (side != color) {      //two consecutive moves of the same color are 
    game_history.add(PASS); //represented by a pass inbetween.
  }
#ifdef ZOBRIST
  else zobrist.toggle_side();
#endif
  if (point > 0) {
    if (!is_occupied(point) && is_legal(point, color)) {
      drop_stone(point, color);
    } else {
      return  -1;
    }
  } else {
    ko_point = 0;
  }
  side = !color;
  game_history.add(point);
#ifdef ZOBRIST
  zobrist.record_key();
#endif
  //print_goban();
  return point;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
cmpb %bpl, (%rdi)
jne 0x4ef6
leaq 0xfd7d0(%r14), %rdi
callq 0xab4a
jmp 0x4f28
movslq 0xfd7cc(%r14), %rax
cmpq $0x43b, %rax            # imm = 0x43B
je 0x4f28
leal 0x1(%rax), %ecx
movl %ecx, 0xfd7cc(%r14)
xorl %ecx, %ecx
movl %ecx, 0xfc6e0(%r14,%rax,4)
movslq 0xfd7cc(%r14), %rax
movl %ecx, 0xfc6e0(%r14,%rax,4)
testl %ebx, %ebx
jle 0x4f60
movl %ebx, %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpq $0x0, 0x18(%r14,%rax,8)
jne 0x4fb5
movzbl %bpl, %r12d
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x56e8
testb %al, %al
je 0x4fb5
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x49c4
jmp 0x4f68
movl $0x0, 0x4(%r14)
xorb $0x1, %bpl
movb %bpl, (%r14)
movslq 0xfd7cc(%r14), %rax
cmpq $0x43b, %rax            # imm = 0x43B
je 0x4fa3
leal 0x1(%rax), %ecx
movl %ecx, 0xfd7cc(%r14)
movl %ebx, 0xfc6e0(%r14,%rax,4)
movslq 0xfd7cc(%r14), %rax
movl $0x0, 0xfc6e0(%r14,%rax,4)
addq $0xfd7d0, %r14          # imm = 0xFD7D0
movq %r14, %rdi
callq 0xabdc
movl %ebx, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/goban.cpp
// Function: Goban::set_position(PList const&)
bool Goban::set_position(const PList &moves)
{
  for (int i = 0; i < moves.length(); i++) {
    if (moves[i]) {
      if (!points[moves[i]] && is_legal(moves[i], side)) {
        drop_stone(moves[i], side);
        game_history.add(moves[i]);
        side = !side;
      } else {
        return false;
      }
    } else {
      side = !side;
    }
  #ifdef ZOBRIST
    zobrist.record_key();
  #endif
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x18(%rax)
movb $0x1, %bl
testl %eax, %eax
jle 0x50b1
leaq 0xfd7d0(%r15), %r12
xorl %ebp, %ebp
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *0x10(%rax)
testl %eax, %eax
je 0x508e
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *0x10(%rax)
cltq
cmpq $0x0, 0x18(%r15,%rax,8)
jne 0x50af
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movzbl (%r15), %edx
movq %r15, %rdi
movl %eax, %esi
callq 0x56e8
testb %al, %al
je 0x50af
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movzbl (%r15), %edx
movq %r15, %rdi
movl %eax, %esi
callq 0x49c4
movq (%r14), %rax
movq %r14, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movslq 0xfd7cc(%r15), %rcx
cmpq $0x43b, %rcx            # imm = 0x43B
je 0x508e
leal 0x1(%rcx), %edx
movl %edx, 0xfd7cc(%r15)
movl %eax, 0xfc6e0(%r15,%rcx,4)
movslq 0xfd7cc(%r15), %rax
movl $0x0, 0xfc6e0(%r15,%rax,4)
xorb $0x1, (%r15)
movq %r12, %rdi
callq 0xabdc
incl %ebp
movq (%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
cmpl %eax, %ebp
jl 0x4fec
jmp 0x50b1
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/./group.h
// Function: PointList<362>::remove(int)
void remove(int p)
  {
    for (int j = 0; j < len; j++) {
      if (points[j] == p) {
        points[j] = points[--len];
        points[len] = 0;
        break;
      }
    }
  }

// Assembly:
movslq 0x5b0(%rdi), %rax
testq %rax, %rax
jle 0x5120
xorl %ecx, %ecx
cmpl %esi, 0x8(%rdi,%rcx,4)
je 0x5121
incq %rcx
cmpq %rcx, %rax
jne 0x5112
retq
leal -0x1(%rax), %edx
movl %edx, 0x5b0(%rdi)
movl 0x4(%rdi,%rax,4), %eax
movl %eax, 0x8(%rdi,%rcx,4)
movslq 0x5b0(%rdi), %rax
movl $0x0, 0x8(%rdi,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/./group.h
// Function: PointSet<5>::add(int)
void add(int p)
  {
    if (PointList<S>::len == S) {
    #ifdef DEBUG_INFO
      std::cerr << "long set\n";
    #endif
      return;
    }
    for (int i = 0; i < PointList<S>::len; i++) {
      if (PointList<S>::points[i] == p) return;
    }
    PointList<S>::points[PointList<S>::len++] = p;
    PointList<S>::points[PointList<S>::len] = 0;
  }

// Assembly:
movl 0x1c(%rdi), %eax
cmpq $0x5, %rax
je 0x51a3
testl %eax, %eax
jle 0x518b
xorl %ecx, %ecx
cmpl %esi, 0x8(%rdi,%rcx,4)
je 0x51a3
incq %rcx
cmpq %rcx, %rax
jne 0x517d
cltq
leal 0x1(%rax), %ecx
movl %ecx, 0x1c(%rdi)
movl %esi, 0x8(%rdi,%rax,4)
movslq 0x1c(%rdi), %rax
movl $0x0, 0x8(%rdi,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gobanconst.cpp
// Function: Goban::get_zobrist(int) const
unsigned long long Goban::get_zobrist(int move)const
{
  unsigned long long zob_backup = get_zobrist();
  unsigned long long new_zobrist = set_zobrist(move);
  zobrist.set_key(zob_backup);
  return new_zobrist;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xfd7d0(%rdi), %r15
movq %r15, %rdi
callq 0xab18
movq %rax, %r12
movq %r14, %rdi
movl %ebx, %esi
callq 0x5286
movq %rax, %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0xab1c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gobanconst.cpp
// Function: Goban::set_zobrist(int) const
unsigned long long Goban::set_zobrist(int move) const
{
  if (move) {
    zobrist.update(move, side);
    
    GroupSet<4> neighbours;
    int nneigh = neighbour_groups(move, neighbours);
    
    for (int i = 0; i < nneigh; i++) {
      Group *current_neigh = neighbours[i];
      if (current_neigh->get_color() != side) {
        if (current_neigh->has_one_liberty()) {
          for (Group::StoneIterator st(current_neigh); st; ++st) {
            zobrist.update(*st, current_neigh->get_color());
          }
        }
      }
    }
  }
  zobrist.toggle_side();
  return get_zobrist();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0x5316
movl %esi, %ebp
leaq 0xfd7d0(%rbx), %r14
movzbl (%rbx), %edx
movq %r14, %rdi
callq 0xab4e
movq %rsp, %rdx
movl $0x0, 0x30(%rdx)
movq $0x0, (%rdx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x533c
testl %eax, %eax
jle 0x5316
movl %eax, %r15d
xorl %r12d, %r12d
movq (%rsp,%r12,8), %r13
movb (%rbx), %al
cmpb (%r13), %al
je 0x530e
cmpl $0x1, 0x96c(%r13)
jne 0x530e
movl 0x4(%r13), %esi
testl %esi, %esi
je 0x530e
leaq 0x8(%r13), %rbp
movzbl (%r13), %edx
movq %r14, %rdi
callq 0xab4e
movl (%rbp), %esi
addq $0x4, %rbp
testl %esi, %esi
jne 0x52f6
incq %r12
cmpq %r15, %r12
jne 0x52d4
addq $0xfd7d0, %rbx          # imm = 0xFD7D0
movq %rbx, %rdi
callq 0xab4a
movq %rbx, %rdi
callq 0xab18
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/./group.h
// Function: GroupSet<4>::add(Group*)
bool add(Group *gr)
  {
    if (gr == 0) return false;
    for (int i = 0; i < len; i++) {
      if (groups[i] == gr) {
        multiplicity[i]++;
        return  false;
      }
    }
    multiplicity[len] = 1;
    groups[len++] = gr;
    return true;
  }

// Assembly:
testq %rsi, %rsi
je 0x5d99
movslq 0x30(%rdi), %rax
testq %rax, %rax
jle 0x5d7c
xorl %ecx, %ecx
cmpq %rsi, (%rdi,%rcx,8)
je 0x5d95
incq %rcx
cmpq %rcx, %rax
jne 0x5d6e
movl $0x1, 0x20(%rdi,%rax,4)
movslq 0x30(%rdi), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x30(%rdi)
movq %rsi, (%rdi,%rax,8)
movb $0x1, %al
retq
incl 0x20(%rdi,%rcx,4)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/group.cpp
// Function: Group::add_liberties(int)
int Group::add_liberties(int i)
{
  for (int j = 0; j < nlibs; j++) {
    if (liberties[j] == i) return 0;
  }
  liberties[nlibs++] = i;
  liberties[nlibs] = 0;
  return nlibs;
}

// Assembly:
movslq 0x96c(%rdi), %rcx
testq %rcx, %rcx
jle 0x5e53
xorl %eax, %eax
xorl %edx, %edx
cmpl %esi, 0x5ac(%rdi,%rdx,4)
je 0x5e7b
incq %rdx
cmpq %rdx, %rcx
jne 0x5e42
leal 0x1(%rcx), %eax
movl %eax, 0x96c(%rdi)
movl %esi, 0x5ac(%rdi,%rcx,4)
movslq 0x96c(%rdi), %rax
movl $0x0, 0x5ac(%rdi,%rax,4)
movl 0x96c(%rdi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/group.cpp
// Function: Group::erase_liberties(int)
int Group::erase_liberties(int lib)
{
  for (int j = 0; j < nlibs; j++) {
    if (liberties[j] == lib) {
      liberties[j] = liberties[--nlibs];
      liberties[nlibs]  = 0;
      return nlibs;
    }
  }
  return 0;
}

// Assembly:
movslq 0x96c(%rdi), %rax
testq %rax, %rax
jle 0x5e9b
xorl %ecx, %ecx
cmpl %esi, 0x5ac(%rdi,%rcx,4)
je 0x5e9e
incq %rcx
cmpq %rcx, %rax
jne 0x5e8a
xorl %eax, %eax
retq
leal -0x1(%rax), %edx
movl %edx, 0x96c(%rdi)
movl 0x5a8(%rdi,%rax,4), %eax
movl %eax, 0x5ac(%rdi,%rcx,4)
movslq 0x96c(%rdi), %rax
movl $0x0, 0x5ac(%rdi,%rax,4)
movl 0x96c(%rdi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/group.cpp
// Function: Group::attach_group(Group*)
void Group::attach_group(Group *attached)
{  
  for (int i = 0; i < attached->nsts; i++) {
    this->stones[nsts++] = attached->stones[i];
    this->stones[nsts] = 0;
  }
  for (int i = 0; i < attached->nlibs; i++) {
    this->add_liberties(attached->liberties[i]);
  }
}

// Assembly:
cmpl $0x0, 0x5a8(%rsi)
jle 0x5f29
xorl %eax, %eax
movl 0x4(%rsi,%rax,4), %ecx
movslq 0x5a8(%rdi), %rdx
leal 0x1(%rdx), %r8d
movl %r8d, 0x5a8(%rdi)
movl %ecx, 0x4(%rdi,%rdx,4)
movslq 0x5a8(%rdi), %rcx
movl $0x0, 0x4(%rdi,%rcx,4)
incq %rax
movslq 0x5a8(%rsi), %rcx
cmpq %rcx, %rax
jl 0x5ef1
movl 0x96c(%rsi), %ecx
testl %ecx, %ecx
jle 0x5f92
xorl %eax, %eax
movl 0x5ac(%rsi,%rax,4), %edx
movslq 0x96c(%rdi), %r8
testq %r8, %r8
jle 0x5f5d
xorl %r9d, %r9d
cmpl %edx, 0x5ac(%rdi,%r9,4)
je 0x5f87
incq %r9
cmpq %r9, %r8
jne 0x5f4b
leal 0x1(%r8), %ecx
movl %ecx, 0x96c(%rdi)
movl %edx, 0x5ac(%rdi,%r8,4)
movslq 0x96c(%rdi), %rcx
movl $0x0, 0x5ac(%rdi,%rcx,4)
movl 0x96c(%rsi), %ecx
incq %rax
movslq %ecx, %rdx
cmpq %rdx, %rax
jl 0x5f35
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::GTP_loop()
int GTP::GTP_loop()
{
  
#ifdef LOG
  std::string filename = "log";
  filename.append(PROGVERSION);
  filename.append(".txt");
  engine_log.open(filename);
#endif
  loop = true;
  while (loop && getline(cin, command_string)) {
#ifdef LOG
    engine_log << command_std::string;
    engine_log.flush();
#endif
    parse(command_string);  
    exec();
  }
#ifdef LOG
  engine_log.close();
#endif
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x1, (%rdi)
leaq 0x78(%rdi), %r14
movq 0x9978(%rip), %r15      # 0xffd8
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3320
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x66a8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x66b0
movq %rbx, %rdi
callq 0x6950
cmpb $0x0, (%rbx)
jne 0x6660
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::exec()
int GTP::exec(){
  response = "=";
  response.append(cmd_id);
  
  switch (cmd) {
    case PROTOCOL_VERSION:
      protocol_version();
      break;
    case NAME:
      name();
      break;
    case VERSION:
      version();
      break;
    case KNOWN_COMMAND:
      known_command();
      break;
    case LIST_COMMANDS:
      list_commands();
      break;
    case QUIT:
      quit();
      break;
    case BOARDSIZE:
      boardsize();
      break;
    case CLEAR_BOARD:
      clear_board();
      break;
    case KOMI:
      komi();
      break;
    case PLAY:
      play();
      break;
    case GENMOVE:
      genmove();
      break;
    case SHOWBOARD:
      showboard();
      break;
    case FIXED_HANDICAP:
      fixed_handicap();
      break;
    case LEVEL:
      level();
      break;
    case TIME_SETTINGS:
      time_settings();
      break;
    case TIME_LEFT:
      time_left();
      break;
    case FINAL_SCORE:
      final_score();
      break;
    case FINAL_STATUS_LIST:
      final_status_list();
      break;
    case KGS_TIME_SETTINGS:
      kgs_time_settings();
      break;
    case KGS_GENMOVE_CLEANUP:
      kgs_genmove_cleanup();
      break;
    default:
      unknown_command();
      break;
  }
  response.append("\n\n");
  std::cout << response;
  
#ifdef LOG
  engine_log << response;
  engine_log.flush();
#endif
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x98(%rdi), %r14
movq 0xa0(%rdi), %rdx
leaq 0x4d15(%rip), %rcx      # 0xb681
movl $0x1, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x3270
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdx
movq %r14, %rdi
callq 0x3080
movl 0x4(%rbx), %eax
cmpq $0x13, %rax
ja 0x6a43
leaq 0x4bc0(%rip), %rcx      # 0xb560
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x76a8
jmp 0x6a91
movq %rbx, %rdi
callq 0x7c8c
jmp 0x6a91
movq %rbx, %rdi
callq 0x7afe
jmp 0x6a91
movq %rbx, %rdi
callq 0x7a54
jmp 0x6a91
movq %rbx, %rdi
callq 0x774a
jmp 0x6a91
movq %rbx, %rdi
callq 0x7a60
jmp 0x6a91
movq %rbx, %rdi
callq 0x7896
jmp 0x6a91
movq %rbx, %rdi
callq 0x76d0
jmp 0x6a91
movq %rbx, %rdi
callq 0x7c3a
jmp 0x6a91
movq %rbx, %rdi
callq 0x76e4
jmp 0x6a91
movq %rbx, %rdi
callq 0x783e
jmp 0x6a91
movq %rbx, %rdi
callq 0x76bc
jmp 0x6a91
movq %rbx, %rdi
callq 0x7dd6
jmp 0x6a91
movq %rbx, %rdi
callq 0x7a36
jmp 0x6a91
movq %rbx, %rdi
callq 0x77a2
jmp 0x6a91
movq %rbx, %rdi
callq 0x7ab2
jmp 0x6a91
movq %rbx, %rdi
callq 0x77a6
jmp 0x6a91
movq %rbx, %rdi
callq 0x7b46
jmp 0x6a91
movq %rbx, %rdi
callq 0x796c
jmp 0x6a91
movq %rbx, %rdi
callq 0x785e
jmp 0x6a91
movq %rbx, %rdi
callq 0x7958
leaq 0x4beb(%rip), %rsi      # 0xb683
movq %r14, %rdi
callq 0x3340
movq 0x98(%rbx), %rsi
movq 0xa0(%rbx), %rdx
movq 0x9513(%rip), %rdi      # 0xffc8
callq 0x31f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::char_to_color(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int GTP::char_to_color(std::string &color)
{
  transform(color.begin(), color.end(), color.begin(), ::tolower);
  
  if (!color.compare("white") || !color.compare("w")) return 1;
  else {
    if (!color.compare("black") || !color.compare("b")) return 0;
    else return -1;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0x6b32
movq (%rbx), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x3230
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x6b1c
leaq 0x4b4d(%rip), %rsi      # 0xb686
movq %rbx, %rdi
callq 0x3070
movl $0x1, %ebp
testl %eax, %eax
je 0x6b89
leaq 0x4b3b(%rip), %rsi      # 0xb68c
movq %rbx, %rdi
callq 0x3070
testl %eax, %eax
je 0x6b89
leaq 0x4b2a(%rip), %rsi      # 0xb68e
movq %rbx, %rdi
callq 0x3070
testl %eax, %eax
je 0x6b87
leaq 0x4b1d(%rip), %rsi      # 0xb694
movq %rbx, %rdi
callq 0x3070
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
jmp 0x6b89
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::char_to_coordinate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
int GTP::char_to_coordinate(std::string &coordinate)
{
  int coord;
  transform(coordinate.begin(), coordinate.end(), coordinate.begin(), ::toupper);
  
  if (!coordinate.compare("PASS")) return 0;
  
  std::stringstream auxstream(coordinate.substr(1,2));
  if (auxstream >> coord && coord <= main_goban.get_size()) {
    coord = (coord - 1)*main_goban.get_size();
  } else {
      return -1;
  }
  
  for (int i = 0; i < main_goban.get_size(); i++) {
    if (coordinate[0] == COORDINATES[i]) {
      coord += i+1;
      return coord;
    }
  }
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r15
testq %r15, %r15
je 0x6bd0
movq (%rbx), %r12
xorl %r13d, %r13d
movsbl (%r12,%r13), %edi
callq 0x3330
movb %al, (%r12,%r13)
incq %r13
cmpq %r13, %r15
jne 0x6bba
leaq 0x4abf(%rip), %rsi      # 0xb696
movq %rbx, %rdi
callq 0x3070
testl %eax, %eax
je 0x6c8b
leaq 0x10(%rsp), %r15
movl $0x1, %edx
movl $0x2, %ecx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x31e0
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
movl $0x18, %edx
callq 0x3290
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c2e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x30f0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testb $0x5, 0x20(%rax,%rcx)
jne 0x6c98
movl 0xc(%rsp), %eax
movl 0xc0(%r14), %ecx
cmpl %ecx, %eax
jg 0x6c98
decl %eax
imull %ecx, %eax
movl %eax, 0xc(%rsp)
testl %ecx, %ecx
jle 0x6c98
movq (%rbx), %rdx
movb (%rdx), %sil
xorl %edx, %edx
leaq 0x4935(%rip), %rdi      # 0xb5b0
cmpb (%rdx,%rdi), %sil
je 0x6c8f
incq %rdx
cmpq %rdx, %rcx
jne 0x6c7b
jmp 0x6c98
xorl %ebp, %ebp
jmp 0x6cb6
leal (%rax,%rdx), %ebp
incl %ebp
movl %ebp, 0xc(%rsp)
movq 0x9311(%rip), %rsi      # 0xffb0
leaq 0x30(%rsp), %rdi
callq 0x3140
leaq 0xb0(%rsp), %rdi
callq 0x3090
movl %ebp, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x92dc(%rip), %rsi      # 0xffb0
leaq 0x30(%rsp), %rdi
callq 0x3140
leaq 0xb0(%rsp), %rdi
callq 0x3090
jmp 0x6d0b
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6d0b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3300
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::print_coordinate(int)
void GTP::print_coordinate(int coord)
{
  if (coord == -1) {
    response.append("resign");
  } else {
    coord_to_char(coord, response, main_goban.get_size());
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
leaq 0x98(%rdi), %rbx
cmpl $-0x1, %esi
je 0x6e3c
testl %esi, %esi
je 0x6e45
decl %esi
movl %esi, %eax
cltd
idivl 0xc0(%rdi)
movl %eax, %ebp
movl %edx, %r15d
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x28(%rsp), %rdi
callq 0x3120
leaq 0x38(%rsp), %r14
movslq %r15d, %rax
leaq 0x4834(%rip), %rcx      # 0xb5b0
movb (%rax,%rcx), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x31f0
leaq 0x28(%rsp), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x3210
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3080
movq 0x28(%rsp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x32e0
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x32f0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3210
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3080
movq 0x91b2(%rip), %rsi      # 0xffb0
leaq 0x28(%rsp), %rdi
callq 0x3140
leaq 0xa8(%rsp), %rdi
callq 0x3090
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e2c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4858(%rip), %rsi      # 0xb69b
jmp 0x6e4c
leaq 0x4866(%rip), %rsi      # 0xb6b2
movq %rbx, %rdi
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3340
movq %rax, %rbx
jmp 0x6e89
movq %rax, %rbx
movq 0x913e(%rip), %rsi      # 0xffb0
leaq 0x28(%rsp), %rdi
callq 0x3140
leaq 0xa8(%rsp), %rdi
callq 0x3090
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6ea0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3300
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::perft(int)
void GTP::perft(int max)
{
  clock_t t = clock();
  go_engine.perft(max);
  t = clock() - t;
  float ts = (float)t/CLOCKS_PER_SEC;
  std::cerr << "Finish " << ts << ":" << max/ts << "pps.\n";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
callq 0x3100
movq %rax, %r15
addq $0xffaa8, %r14          # imm = 0xFFAA8
movq %r14, %rdi
movl %ebx, %esi
callq 0x3dfc
callq 0x3100
subq %r15, %rax
cvtsi2ss %rax, %xmm0
divss 0x414c(%rip), %xmm0     # 0xb030
movss %xmm0, 0xc(%rsp)
movq 0x90ff(%rip), %r14      # 0xfff0
leaq 0x47aa(%rip), %rsi      # 0xb6a2
movl $0x7, %edx
movq %r14, %rdi
callq 0x31f0
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movq %r14, %rdi
callq 0x32a0
movq %rax, %r14
leaq 0x478a(%rip), %rsi      # 0xb6aa
movl $0x1, %edx
movq %rax, %rdi
callq 0x31f0
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
divss 0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x32a0
leaq 0x475f(%rip), %rsi      # 0xb6ac
movl $0x5, %edx
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x31f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtpcommands.cpp
// Function: GTP::known_command()
void GTP::known_command()
{
  for(int i = 0; i < NCOMMANDS; i++){
    if(!cmd_args[0].compare(COMMANDS[i])){
      response.append("true");
    }
  }
  response.append("false");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x1000c0(%rdi), %r12
leaq 0x98(%rdi), %rbx
xorl %r13d, %r13d
leaq 0x3ff3(%rip), %r15      # 0xb6fb
movq 0x48(%r14), %rdi
leaq (%r12,%r13), %rsi
callq 0x3040
testl %eax, %eax
jne 0x7724
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3340
addq $0x20, %r13
cmpq $0x280, %r13            # imm = 0x280
jne 0x7708
leaq 0x3fc8(%rip), %rsi      # 0xb700
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtpcommands.cpp
// Function: GTP::boardsize()
void GTP::boardsize()
{
  if(cmd_args.size() > 0){
    if(cmd_int_args[0] != main_goban.set_size(cmd_int_args[0])){
      response[0] = '?';
      response.append("unacceptable size");
    } else {
      go_engine.reset();
    }
  } else {
    response[0] = '?';
    response.append("syntax error");
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x50(%rdi), %rax
cmpq 0x48(%rdi), %rax
je 0x7804
movq 0x60(%rbx), %rax
movss (%rax), %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0xb8(%rbx), %rdi
cvttss2si %xmm0, %esi
callq 0x4b78
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x77ea
jnp 0x7829
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3f04(%rip), %rsi      # 0xb706
jmp 0x781c
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3efc(%rip), %rsi      # 0xb718
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x3340
addq $0xffaa8, %rbx          # imm = 0xFFAA8
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x36a4
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtpcommands.cpp
// Function: GTP::play()
void GTP::play()
{
  int color, coord;
  if(cmd_args.size() > 1){
    color = char_to_color(cmd_args[0]);
    coord = char_to_coordinate(cmd_args[1]);
    
    if(color > -1 && coord > -1){
      //Check legality.
      if(main_goban.play_move(coord, color) == -1){
        response[0] = '?';
        response.append("illegal move");
      } else {
        go_engine.report_move(coord);
      }
    } else {
      response[0] = '?';
      response.append("invalid color or coordinate");
    }
  } else {
    response[0] = '?';
    response.append("syntax error");
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rsi
movq 0x50(%rdi), %rax
subq %rsi, %rax
cmpq $0x21, %rax
jb 0x7900
movq %rbx, %rdi
callq 0x6b02
movl %eax, %r14d
movq 0x48(%rbx), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x6b94
movl %eax, %ebp
orl %r14d, %eax
js 0x791a
leaq 0xb8(%rbx), %rdi
xorl %edx, %edx
testl %r14d, %r14d
setne %dl
movl %ebp, %esi
callq 0x4ed4
cmpl $-0x1, %eax
je 0x7934
addq $0xffad0, %rbx          # imm = 0xFFAD0
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xa38c
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3e00(%rip), %rsi      # 0xb718
jmp 0x794c
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3e00(%rip), %rsi      # 0xb732
jmp 0x794c
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3dd9(%rip), %rsi      # 0xb725
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3340
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtpcommands.cpp
// Function: GTP::genmove()
void GTP::genmove()
{
  if(cmd_args.size() > 0){
    bool color = char_to_color(cmd_args[0]);
    if(color != main_goban.get_side()){
      main_goban.play_move(0, !color);
      go_engine.report_move(0);
    }
    int move = go_engine.generate_move(early_pass);
    main_goban.play_move(move, color);
    go_engine.report_move(move);
    print_coordinate(move);
  } else {
    response[0] = '?';
    response.append("syntax error");
  }
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %rsi
cmpq %rsi, 0x50(%rdi)
je 0x7a0b
movq %rbx, %rdi
callq 0x6b02
movl %eax, %ebp
testl %eax, %eax
setne %al
leaq 0xb8(%rbx), %r14
cmpb 0xb8(%rbx), %al
je 0x79c1
xorl %edx, %edx
testl %ebp, %ebp
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x4ed4
leaq 0xffad0(%rbx), %rdi
xorl %esi, %esi
callq 0xa38c
xorl %r15d, %r15d
testl %ebp, %ebp
setne %r15b
leaq 0xffaa8(%rbx), %rdi
movzbl 0x1(%rbx), %esi
callq 0x38ce
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
movl %r15d, %edx
callq 0x4ed4
leaq 0xffad0(%rbx), %rdi
movl %ebp, %esi
callq 0xa38c
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6d14
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3cf5(%rip), %rsi      # 0xb718
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtpcommands.cpp
// Function: GTP::kgs_time_settings()
void GTP::kgs_time_settings()
{
  if (cmd_int_args.size() > 3
      && (!cmd_args[0].compare("byoyomi")
          || !cmd_args[0].compare("canadian"))) {
    go_engine.set_times(cmd_int_args[1], cmd_int_args[2], cmd_int_args[3]);
  } else if (cmd_int_args.size() > 1 && !cmd_args[0].compare("absolute")) {
    go_engine.set_times(cmd_int_args[1], 0, 0);
  } else if (cmd_int_args.size() > 0 && !cmd_args[0].compare("none")) {
    go_engine.set_times(30, 0, 0); //To be adjusted.
  } else {
    response[0] = '?';
    response.append("syntax error");
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rcx
movq 0x68(%rdi), %rax
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0xd, %rdx
jb 0x7b94
movq 0x48(%rbx), %rdi
leaq 0x3bf5(%rip), %rsi      # 0xb75e
callq 0x3070
testl %eax, %eax
je 0x7bf0
movq 0x48(%rbx), %rdi
leaq 0x3be9(%rip), %rsi      # 0xb766
callq 0x3070
testl %eax, %eax
je 0x7bf0
movq 0x60(%rbx), %rcx
movq 0x68(%rbx), %rax
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x5, %rdx
jb 0x7bb6
movq 0x48(%rbx), %rdi
leaq 0x3bca(%rip), %rsi      # 0xb76f
callq 0x3070
movq 0x60(%rbx), %rcx
testl %eax, %eax
je 0x7c20
movq 0x68(%rbx), %rax
cmpq %rcx, %rax
je 0x7bcf
movq 0x48(%rbx), %rdi
leaq 0x3bb2(%rip), %rsi      # 0xb778
callq 0x3070
testl %eax, %eax
je 0x7c0f
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3b31(%rip), %rsi      # 0xb718
movq %rbx, %rdi
popq %rbx
jmp 0x3340
movq 0x60(%rbx), %rax
cvttss2si 0x4(%rax), %esi
cvttss2si 0x8(%rax), %edx
addq $0xffaa8, %rbx          # imm = 0xFFAA8
cvttss2si 0xc(%rax), %ecx
movq %rbx, %rdi
jmp 0x7c33
addq $0xffaa8, %rbx          # imm = 0xFFAA8
movq %rbx, %rdi
movl $0x1e, %esi
jmp 0x7c2f
addq $0xffaa8, %rbx          # imm = 0xFFAA8
cvttss2si 0x4(%rcx), %esi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rbx
jmp 0x3700
nop
// File: /workspace/github_cpp_makefile_star2_O3/antoniogarro[P]Hara/gtpcommands.cpp
// Function: GTP::final_score()
void GTP::final_score()
{
  std::stringstream auxstream;
  float score = go_engine.score(0);
  
  if (score > 0) {
    auxstream << score;
    response.append("B+");
    response.append(auxstream.str());
  } else {
    auxstream << -score;
    response.append("W+");
    response.append(auxstream.str());
  }

}

// Assembly:
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3120
leaq 0xffaa8(%rbx), %rdi
xorl %esi, %esi
callq 0x3cd6
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
leaq 0x38(%rsp), %rdi
jbe 0x7cfe
cvtss2sd %xmm0, %xmm0
callq 0x32a0
addq $0x98, %rbx
leaq 0x3aaa(%rip), %rsi      # 0xb77d
movq %rbx, %rdi
callq 0x3340
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3280
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3080
jmp 0x7d45
xorps 0x33fb(%rip), %xmm0     # 0xb100
cvtss2sd %xmm0, %xmm0
callq 0x32a0
addq $0x98, %rbx
leaq 0x3a64(%rip), %rsi      # 0xb780
movq %rbx, %rdi
callq 0x3340
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x3280
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x3080
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7d60
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x8249(%rip), %rsi      # 0xffb0
leaq 0x28(%rsp), %rdi
callq 0x3140
leaq 0xa8(%rsp), %rdi
callq 0x3090
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
retq
jmp 0x7d89
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7db0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
jmp 0x7db0
jmp 0x7dad
jmp 0x7dad
movq %rax, %rbx
movq 0x81f9(%rip), %rsi      # 0xffb0
leaq 0x28(%rsp), %rdi
callq 0x3140
leaq 0xa8(%rsp), %rdi
callq 0x3090
movq %rbx, %rdi
callq 0x3300
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x18(%rax)
xorl %r13d, %r13d
testl %eax, %eax
je 0x815d
callq 0x3050
movl %eax, %ebx
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
movl %eax, %ecx
movl %ebx, %eax
cltd
idivl %ecx
movl %edx, %ebx
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
movl %ebx, 0xc(%rsp)
cmpl %eax, %ebx
jge 0x8107
movq 0x10(%rsp), %rax
leaq (%r12,%rax), %rbp
movl 0xc(%rsp), %ebx
movq (%r15), %rax
movq %r15, %rdi
movl %ebx, %esi
callq *0x10(%rax)
movl %eax, %r13d
movq %r14, %rax
testb $0x1, %r14b
je 0x80e7
movq (%rbp), %rax
movq -0x1(%rax,%r14), %rax
movzbl (%r12), %edx
movq %rbp, %rdi
movl %r13d, %esi
callq *%rax
testb %al, %al
jne 0x815d
incl %ebx
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
cmpl %eax, %ebx
jl 0x80c7
movl $0x0, %r13d
cmpl $0x0, 0xc(%rsp)
jle 0x815d
addq %r12, 0x10(%rsp)
xorl %ebx, %ebx
movq (%r15), %rax
movq %r15, %rdi
movl %ebx, %esi
callq *0x10(%rax)
movl %eax, %r13d
movq %r14, %rax
testb $0x1, %r14b
je 0x813f
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq -0x1(%rax,%r14), %rax
movzbl (%r12), %edx
movq 0x10(%rsp), %rdi
movl %r13d, %esi
callq *%rax
testb %al, %al
jne 0x815d
incl %ebx
cmpl %ebx, 0xc(%rsp)
jne 0x811b
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
callq 0x567c
testb %al, %al
jne 0x81fd
movzbl %bpl, %ebp
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x56e8
testb %al, %al
je 0x81fd
xorl %r15d, %r15d
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x8ee4
cmpl $0x1, %eax
je 0x8200
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x8228
movl %eax, %r15d
xorb $0x1, %r15b
jmp 0x8200
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x5b0, %rsp            # imm = 0x5B0
movq %rdi, %rbx
callq 0x84f4
testl %eax, %eax
je 0x8404
movq %rbx, %rdi
movl %eax, %esi
addq $0x5b0, %rsp            # imm = 0x5B0
popq %rbx
popq %r14
popq %r15
jmp 0x4e94
movl 0xd63e0(%rbx), %esi
testl %esi, %esi
je 0x84c4
xorl %r15d, %r15d
movq %rsp, %r14
movl %r15d, 0x5ac(%r14)
movl %r15d, 0x8(%r14)
leaq 0x78c6(%rip), %rax      # 0xfcf0
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x85d6
leaq -0x2a1(%rip), %rdx      # 0x819e
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x8060
testl %eax, %eax
jne 0x84dc
movq %rsp, %r14
movl %r15d, 0x5ac(%r14)
movl %r15d, 0x8(%r14)
movl 0xd63e0(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x86b2
leaq -0x2dc(%rip), %rdx      # 0x819e
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x8060
testl %eax, %eax
jne 0x84dc
xorl %eax, %eax
movq %rsp, %r14
movl %eax, 0x5ac(%r14)
movl %eax, 0x8(%r14)
movl 0xd63e0(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8718
leaq -0x315(%rip), %rdx      # 0x819e
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x8060
testl %eax, %eax
jne 0x84dc
leaq 0xfc120(%rbx), %rsi
leaq -0x362(%rip), %rdx      # 0x8170
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x8060
movq %rbx, %rdi
movl %eax, %esi
callq 0x4e94
addq $0x5b0, %rsp            # imm = 0x5B0
popq %rbx
popq %r14
popq %r15
retq
nop