LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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, %ebp
movq %rdi, %r14
movl %esi, 0x4(%rsp)
movslq %esi, %r15
cmpq $0x0, 0x18(%rdi,%r15,8)
je 0x4728
movq %r14, %rdi
callq 0x557c
leaq 0x8(%rsp), %r13
andl $0x0, 0x1c(%r13)
andl $0x0, 0x8(%r13)
leaq 0xa4ba(%rip), %rax      # 0xebf8
movq %rax, (%r13)
movq %r14, %rdi
movl %r15d, %esi
movq %r13, %rdx
callq 0x500a
imulq $0x970, %r15, %rax      # imm = 0x970
leaq (%r14,%rax), %rbx
addq $0xb68, %rbx            # imm = 0xB68
movzbl %bpl, %r12d
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
movq %r13, %rcx
callq 0x5900
movq %rbx, 0x18(%r14,%r15,8)
leaq 0xfc120(%r14), %rdi
movl %r15d, %esi
callq 0x4d7e
incl 0xd63c8(%r14,%r12,4)
leaq 0xfd7d0(%r14), %rbx
movq %rbx, %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x9b60
movl 0x4(%r14), %esi
movq %rbx, %rdi
callq 0x9b5e
movq %r14, %rdi
movl %r15d, %esi
callq 0x48d0
movl %eax, 0x4(%r14)
movq %rbx, %rdi
movl %eax, %esi
callq 0x9b5e
movq 0x18(%r14,%r15,8), %rsi
movl 0x96c(%rsi), %eax
cmpl $0x1, %eax
je 0x47eb
testl %eax, %eax
jne 0x47f3
movq %r14, %rdi
callq 0x49bc
jmp 0x47f3
movq %rsi, 0xd63d0(%r14,%r12,8)
movl 0xd63e0(%r14), %eax
movl %eax, 0xd63e4(%r14)
movl 0x4(%rsp), %eax
movl %eax, 0xd63e0(%r14)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/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
cmpq $0x9, %r12
je 0x485f
movl (%r15,%r12,4), %esi
testl %esi, %esi
je 0x485f
movq %r14, %rdi
xorl %edx, %edx
callq 0x46fe
movl (%r15,%r12,4), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x9b60
incq %r12
jmp 0x4834
movb $0x1, (%r14)
movq %rbx, %rdi
callq 0x9b5c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4886
movl 0x8(%rbx), %esi
movl %esi, 0x8(%rbx)
imull %esi, %esi
movl %esi, 0xc(%rbx)
movq %rbx, %rdi
callq 0x410e
movq %rbx, %rdi
callq 0x41a6
movq %rbx, %rdi
callq 0x4258
movq %rbx, %rdi
callq 0x438e
movq %rbx, %rdi
callq 0x43d0
movq %rbx, %rdi
callq 0x40f0
movl 0x8(%rbx), %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
leaq 0x10(%rsp), %rdx
andl $0x0, 0x30(%rdx)
movq %rdi, %rbx
andq $0x0, (%rdx)
callq 0x4fc8
movl %eax, %r15d
movslq %ebp, %r13
xorl %r14d, %r14d
testl %eax, %eax
cmovlel %r14d, %r15d
movl $0x0, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
cmpq %r14, %r15
je 0x4991
movq 0x10(%rsp,%r14,8), %r12
movb (%r12), %al
movq 0x18(%rbx,%r13,8), %rcx
cmpb (%rcx), %al
jne 0x493a
movq %rbx, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x4ac4
jmp 0x498c
cmpl $0x1, 0x96c(%r12)
jne 0x496a
cmpl $0x1, 0x5a8(%r12)
jne 0x495d
incl 0x8(%rsp)
movl 0x4(%r12), %eax
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x49bc
jmp 0x498c
movq %r12, %rdi
movl %ebp, %esi
callq 0x59c2
cmpl $0x1, 0x96c(%r12)
jne 0x498c
movzbl (%r12), %eax
movq %r12, 0xd63d0(%rbx,%rax,8)
incq %r14
jmp 0x4914
cmpl $0x1, 0x8(%rsp)
movl 0xc(%rsp), %eax
jne 0x49aa
movq 0x18(%rbx,%r13,8), %rcx
cmpl $0x1, 0x5a8(%rcx)
je 0x49ac
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_O2/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, %rbp
movq %rdi, %r14
leaq 0xfd7d0(%rdi), %r15
movq %rsi, %rbx
movslq 0x4(%rbx), %rax
testq %rax, %rax
je 0x4a95
addq $0x4, %rbx
andq $0x0, 0x18(%r14,%rax,8)
movzbl (%rbp), %edx
decl 0xd63c8(%r14,%rdx,4)
movl (%rbx), %esi
movq %r15, %rdi
callq 0x9b60
movslq 0xfc6d0(%r14), %rax
cmpq $0x16a, %rax            # imm = 0x16A
je 0x4a3a
movl (%rbx), %ecx
leal 0x1(%rax), %edx
movl %edx, 0xfc6d0(%r14)
movl %ecx, 0xfc128(%r14,%rax,4)
movslq 0xfc6d0(%r14), %rax
andl $0x0, 0xfc128(%r14,%rax,4)
andl $0x0, 0x30(%rsp)
andq $0x0, (%rsp)
movl (%rbx), %esi
movq %r14, %rdi
movq %rsp, %rdx
callq 0x4fc8
movl %eax, %r13d
testl %eax, %eax
movl $0x0, %eax
cmovlel %eax, %r13d
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x49da
movq (%rsp,%r12,8), %rdi
movl (%rbx), %esi
callq 0x5970
movq (%rsp,%r12,8), %rcx
movzbl (%rcx), %eax
cmpq 0xd63d0(%r14,%rax,8), %rcx
jne 0x4a90
andq $0x0, 0xd63d0(%r14,%rax,8)
incq %r12
jmp 0x4a62
movzbl (%rbp), %eax
cmpq %rbp, 0xd63d0(%r14,%rax,8)
jne 0x4aac
andq $0x0, 0xd63d0(%r14,%rax,8)
movq %rbp, %rdi
callq 0x5a1c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/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 0x59c2
movq %r15, %rdi
movq %r14, %rsi
callq 0x5a30
leaq 0x4(%r14), %rax
movslq (%rax), %rcx
testq %rcx, %rcx
je 0x4b01
movq %r15, 0x18(%rbx,%rcx,8)
addq $0x4, %rax
jmp 0x4aee
movq %r14, %rdi
callq 0x5a1c
movzbl (%r14), %eax
cmpq %r14, 0xd63d0(%rbx,%rax,8)
jne 0x4b20
andq $0x0, 0xd63d0(%rbx,%rax,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4b41
movzbl (%r14), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x46fe
xorb $0x1, (%r14)
addq $0xfd7d0, %r14          # imm = 0xFD7D0
movq %r14, %rdi
callq 0x9b5c
movq %r14, %rdi
callq 0x9bde
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4b88
leaq 0xfd7d0(%r14), %rdi
callq 0x9b5c
jmp 0x4bba
movslq 0xfd7cc(%r14), %rax
cmpq $0x43b, %rax            # imm = 0x43B
je 0x4bba
leal 0x1(%rax), %ecx
movl %ecx, 0xfd7cc(%r14)
andl $0x0, 0xfc6e0(%r14,%rax,4)
movslq 0xfd7cc(%r14), %rax
andl $0x0, 0xfc6e0(%r14,%rax,4)
testl %ebx, %ebx
jle 0x4bf0
movl %ebx, %eax
pushq $-0x1
popq %r15
cmpq $0x0, 0x18(%r14,%rax,8)
jne 0x4c3f
movzbl %bpl, %r12d
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x5300
testb %al, %al
je 0x4c3f
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x46fe
jmp 0x4bf5
andl $0x0, 0x4(%r14)
xorb $0x1, %bpl
movb %bpl, (%r14)
movslq 0xfd7cc(%r14), %rax
cmpq $0x43b, %rax            # imm = 0x43B
je 0x4c2d
leal 0x1(%rax), %ecx
movl %ecx, 0xfd7cc(%r14)
movl %ebx, 0xfc6e0(%r14,%rax,4)
movslq 0xfd7cc(%r14), %rax
andl $0x0, 0xfc6e0(%r14,%rax,4)
addq $0xfd7d0, %r14          # imm = 0xFD7D0
movq %r14, %rdi
callq 0x9bde
movl %ebx, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rdi, %r14
leaq 0xfd7d0(%rdi), %r15
xorl %ebp, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movl %eax, %r12d
cmpl %eax, %ebp
jge 0x4d29
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
testl %eax, %eax
je 0x4d16
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
cltq
cmpq $0x0, 0x18(%r14,%rax,8)
jne 0x4d29
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movzbl (%r14), %edx
movq %r14, %rdi
movl %eax, %esi
callq 0x5300
testb %al, %al
je 0x4d29
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movzbl (%r14), %edx
movq %r14, %rdi
movl %eax, %esi
callq 0x46fe
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movslq 0xfd7cc(%r14), %rcx
cmpq $0x43b, %rcx            # imm = 0x43B
je 0x4d16
leal 0x1(%rcx), %edx
movl %edx, 0xfd7cc(%r14)
movl %eax, 0xfc6e0(%r14,%rcx,4)
movslq 0xfd7cc(%r14), %rax
andl $0x0, 0xfc6e0(%r14,%rax,4)
xorb $0x1, (%r14)
movq %r15, %rdi
callq 0x9bde
incl %ebp
jmp 0x4c63
cmpl %r12d, %ebp
setge %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x4dc1
leaq 0x1(%rcx), %r8
cmpl %esi, 0x8(%rdi,%rcx,4)
movq %r8, %rcx
jne 0x4d91
leal -0x1(%rax), %ecx
movl %ecx, 0x5b0(%rdi)
movl 0x4(%rdi,%rax,4), %eax
movl %eax, 0x4(%rdi,%r8,4)
movslq 0x5b0(%rdi), %rax
andl $0x0, 0x8(%rdi,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
movslq 0x1c(%rdi), %rax
cmpq $0x5, %rax
je 0x4e14
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x4e15
leaq 0x1(%rcx), %r8
cmpl %esi, 0x8(%rdi,%rcx,4)
movq %r8, %rcx
jne 0x4e02
retq
leal 0x1(%rax), %ecx
movl %ecx, 0x1c(%rdi)
movl %esi, 0x8(%rdi,%rax,4)
movslq 0x1c(%rdi), %rax
andl $0x0, 0x8(%rdi,%rax,4)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x9b4a
movq %rax, %r12
movq %r14, %rdi
movl %ebx, %esi
callq 0x4f1a
movq %rax, %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x9b4e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4fa2
movl %esi, %ebp
leaq 0xfd7d0(%rbx), %r14
movzbl (%rbx), %edx
movq %r14, %rdi
callq 0x9b60
movq %rsp, %rdx
andl $0x0, 0x30(%rdx)
andq $0x0, (%rdx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x4fc8
movl %eax, %r15d
xorl %r12d, %r12d
testl %eax, %eax
cmovlel %r12d, %r15d
cmpq %r15, %r12
je 0x4fa2
movq (%rsp,%r12,8), %r13
movb (%rbx), %al
cmpb (%r13), %al
je 0x4f9d
cmpl $0x1, 0x96c(%r13)
jne 0x4f9d
leaq 0x4(%r13), %rbp
movl (%rbp), %esi
testl %esi, %esi
je 0x4f9d
movzbl (%r13), %edx
movq %r14, %rdi
callq 0x9b60
addq $0x4, %rbp
jmp 0x4f83
incq %r12
jmp 0x4f64
addq $0xfd7d0, %rbx          # imm = 0xFD7D0
movq %rbx, %rdi
callq 0x9b5c
movq %rbx, %rdi
callq 0x9b4a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/./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:
xorl %eax, %eax
testq %rsi, %rsi
je 0x5874
movslq 0x30(%rdi), %rcx
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
cmpq %rax, %rdx
je 0x5875
leaq 0x1(%rax), %r8
cmpq %rsi, (%rdi,%rax,8)
movq %r8, %rax
jne 0x585b
incl 0x1c(%rdi,%r8,4)
xorl %eax, %eax
retq
movl $0x1, 0x20(%rdi,%rcx,4)
movslq 0x30(%rdi), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x30(%rdi)
movq %rsi, (%rdi,%rax,8)
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/group.cpp
// Function: Group::set_up(int, bool, PList const&)
void Group::set_up(int point, bool new_color, const PList &new_liberties)
{
  color = new_color;
  nsts = 0;
  stones[nsts++] = point;
  stones[nsts] = 0;
  nlibs = 0;
  for (int i = 0; i < new_liberties.length(); i++) {
    liberties[nlibs++] = new_liberties[i];
    liberties[nlibs] = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
movb %dl, (%rdi)
movl $0x1, 0x5a8(%rdi)
movl %esi, 0x4(%rdi)
andl $0x0, 0x8(%rdi)
andl $0x0, 0x96c(%rdi)
xorl %ebp, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpl %eax, %ebp
jge 0x596b
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movslq 0x96c(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x96c(%r14)
movl %eax, 0x5ac(%r14,%rcx,4)
movslq 0x96c(%r14), %rax
andl $0x0, 0x5ac(%r14,%rax,4)
incl %ebp
jmp 0x5926
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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), %rax
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x599b
leaq 0x1(%rcx), %r8
cmpl %esi, 0x5ac(%rdi,%rcx,4)
movq %r8, %rcx
jne 0x5983
xorl %eax, %eax
retq
leal 0x1(%rax), %ecx
movl %ecx, 0x96c(%rdi)
movl %esi, 0x5ac(%rdi,%rax,4)
movslq 0x96c(%rdi), %rax
andl $0x0, 0x5ac(%rdi,%rax,4)
movl 0x96c(%rdi), %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %rcx
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
xorl %r9d, %r9d
cmpq %r9, %rdx
je 0x5a1b
leaq 0x1(%r9), %r8
cmpl %esi, 0x5ac(%rdi,%r9,4)
movq %r8, %r9
jne 0x59d8
leal -0x1(%rcx), %eax
movl %eax, 0x96c(%rdi)
movl 0x5a8(%rdi,%rcx,4), %eax
movl %eax, 0x5a8(%rdi,%r8,4)
movslq 0x96c(%rdi), %rax
andl $0x0, 0x5ac(%rdi,%rax,4)
movl 0x96c(%rdi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
movslq 0x5a8(%rbx), %rcx
cmpq %rcx, %rax
jge 0x5a75
movl 0x4(%rbx,%rax,4), %ecx
movslq 0x5a8(%r14), %rdx
leal 0x1(%rdx), %esi
movl %esi, 0x5a8(%r14)
movl %ecx, 0x4(%r14,%rdx,4)
movslq 0x5a8(%r14), %rcx
andl $0x0, 0x4(%r14,%rcx,4)
incq %rax
jmp 0x5a3d
xorl %r15d, %r15d
movslq 0x96c(%rbx), %rax
cmpq %rax, %r15
jge 0x5a99
movl 0x5ac(%rbx,%r15,4), %esi
movq %r14, %rdi
callq 0x5970
incq %r15
jmp 0x5a78
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
movb $0x1, %al
movq 0x90b0(%rip), %r15      # 0xefd8
testb $0x1, %al
je 0x5f5c
movq %r15, %rdi
movq %r14, %rsi
callq 0x3050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5f5c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5f64
movq %rbx, %rdi
callq 0x6144
movb (%rbx), %al
jmp 0x5f28
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int GTP::parse(const std::string &command_str)
{  
  std::stringstream auxstream(command_str);
  std::string auxstring;
  float auxint;
  int id;
  cmd_args.clear();
  cmd_int_args.clear();
  
  //TODO: findfirstof(#) and eliminate
  //TODO: handle empty lines
  
  auxstream >> auxstring;
  std::stringstream tempstream(auxstring);
  
  if (tempstream >> id) {
    //TODO:handle negative IDs??
    cmd_id = auxstring;
    cmd_id.append(" ");
    auxstream >> cmd_name;
  } else {
    cmd_id = " ";
    cmd_name = auxstring;
  }
  
  cmd = string_to_cmd(cmd_name);
  
  while (auxstream.good()) {
    auxstream >> auxstring;
    cmd_args.insert(cmd_args.end(), auxstring);
    
    tempstream.clear(); //!!!!
    tempstream.str(auxstring);
    tempstream >> auxint;
    cmd_int_args.insert(cmd_int_args.end(), auxint);
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rdi, %rbx
leaq 0x38(%rsp), %rdi
pushq $0x18
popq %rdx
callq 0x32d0
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x48(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x66bc
movq 0x60(%rbx), %rax
cmpq %rax, 0x68(%rbx)
je 0x5fb2
movq %rax, 0x68(%rbx)
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3240
leaq 0x1c0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x18
popq %rdx
callq 0x32d0
leaq 0x1c0(%rsp), %r15
leaq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x3100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq 0x8(%rbx), %r14
testb $0x5, 0x20(%rax,%rcx)
je 0x601c
leaq 0x4491(%rip), %rsi      # 0xa495
movq %r14, %rdi
callq 0x3380
leaq 0x28(%rbx), %rdi
leaq 0x10(%rsp), %rsi
callq 0x30e0
jmp 0x6046
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x30e0
leaq 0x4465(%rip), %rsi      # 0xa495
movq %r14, %rdi
callq 0x3370
leaq 0x28(%rbx), %rsi
leaq 0x38(%rsp), %rdi
callq 0x3240
leaq 0x28(%rbx), %rsi
movq %rbx, %rdi
callq 0x629c
leaq 0x60(%rbx), %r12
movl %eax, 0x4(%rbx)
leaq 0x38(%rsp), %rbp
leaq 0x10(%rsp), %r14
leaq 0x34(%rsp), %r13
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x58(%rsp,%rax)
jne 0x60d6
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3240
movq 0x50(%rbx), %rsi
movq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x66c4
movq 0x1c0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
callq 0x3320
leaq 0x1d8(%rsp), %rdi
movq %r14, %rsi
callq 0x32a0
movq %r15, %rdi
movq %r13, %rsi
callq 0x33a0
movq 0x68(%rbx), %rsi
movq %r12, %rdi
movq %r13, %rdx
callq 0x675c
jmp 0x6068
leaq 0x1c0(%rsp), %rdi
callq 0x3160
leaq 0x10(%rsp), %rdi
callq 0x30c0
leaq 0x38(%rsp), %rdi
callq 0x3160
xorl %eax, %eax
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x610d
movq %rax, %rbx
jmp 0x6128
jmp 0x6118
jmp 0x6118
jmp 0x6118
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
callq 0x3160
leaq 0x10(%rsp), %rdi
callq 0x30c0
leaq 0x38(%rsp), %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
leaq 0x98(%rdi), %rbx
leaq 0x44c8(%rip), %rsi      # 0xa621
movq %rbx, %rdi
callq 0x3380
leaq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x3390
movl 0x4(%r14), %eax
cmpq $0x13, %rax
ja 0x6225
leaq 0x437e(%rip), %rcx      # 0xa500
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
callq 0x6d14
jmp 0x6273
movq %r14, %rdi
callq 0x72ee
jmp 0x6273
movq %r14, %rdi
callq 0x7166
jmp 0x6273
movq %r14, %rdi
callq 0x70bc
jmp 0x6273
movq %r14, %rdi
callq 0x6db8
jmp 0x6273
movq %r14, %rdi
callq 0x70c8
jmp 0x6273
movq %r14, %rdi
callq 0x6efe
jmp 0x6273
movq %r14, %rdi
callq 0x6d3c
jmp 0x6273
movq %r14, %rdi
callq 0x729c
jmp 0x6273
movq %r14, %rdi
callq 0x6d50
jmp 0x6273
movq %r14, %rdi
callq 0x6ea6
jmp 0x6273
movq %r14, %rdi
callq 0x6d28
jmp 0x6273
movq %r14, %rdi
callq 0x73e2
jmp 0x6273
movq %r14, %rdi
callq 0x709e
jmp 0x6273
movq %r14, %rdi
callq 0x6e0e
jmp 0x6273
movq %r14, %rdi
callq 0x711a
jmp 0x6273
movq %r14, %rdi
callq 0x6e12
jmp 0x6273
movq %r14, %rdi
callq 0x71ae
jmp 0x6273
movq %r14, %rdi
callq 0x6fd4
jmp 0x6273
movq %r14, %rdi
callq 0x6ec6
jmp 0x6273
movq %r14, %rdi
callq 0x6fc0
leaq 0x43a9(%rip), %rsi      # 0xa623
movq %rbx, %rdi
callq 0x3370
movq 0x8d3f(%rip), %rdi      # 0xefc8
movq %rbx, %rsi
callq 0x31c0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/gtp.cpp
// Function: GTP::string_to_cmd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int GTP::string_to_cmd(const std::string &command_str)
{
  for (int cmd = 0; cmd < NCOMMANDS; cmd++) {
    if (!command_str.compare(COMMANDS[cmd])) {
      return cmd;
    }
  }
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x1000c0, %r14         # imm = 0x1000C0
xorl %r15d, %r15d
pushq $-0x1
popq %rbp
cmpq $0x14, %r15
je 0x62d7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3040
testl %eax, %eax
je 0x62d4
incq %r15
addq $0x20, %r14
jmp 0x62b6
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 (%rsi), %r14
movq 0x8(%rsi), %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x6311
movsbl (%r14,%r12), %edi
callq 0x3280
movb %al, (%r14,%r12)
incq %r12
jmp 0x62f9
leaq 0x430e(%rip), %rsi      # 0xa626
movq %rbx, %rdi
callq 0x3080
pushq $0x1
popq %rbp
testl %eax, %eax
je 0x6366
leaq 0x42fe(%rip), %rsi      # 0xa62c
movq %rbx, %rdi
callq 0x3080
testl %eax, %eax
je 0x6366
leaq 0x42ed(%rip), %rsi      # 0xa62e
movq %rbx, %rdi
callq 0x3080
testl %eax, %eax
je 0x6364
leaq 0x42e0(%rip), %rsi      # 0xa634
movq %rbx, %rdi
callq 0x3080
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
jmp 0x6366
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 (%rsi), %r15
movq 0x8(%rsi), %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x63ab
movsbl (%r15,%r13), %edi
callq 0x3360
movb %al, (%r15,%r13)
incq %r13
jmp 0x6393
leaq 0x4284(%rip), %rsi      # 0xa636
movq %rbx, %rdi
callq 0x3080
testl %eax, %eax
je 0x644e
leaq 0x10(%rsp), %r15
pushq $0x1
popq %rdx
pushq $0x2
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3210
leaq 0x30(%rsp), %rdi
pushq $0x18
popq %rdx
movq %r15, %rsi
callq 0x32d0
leaq 0x10(%rsp), %rdi
callq 0x30c0
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x3100
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
pushq $-0x1
popq %rbp
testb $0x5, 0x20(%rax,%rcx)
jne 0x645b
movl 0xc(%rsp), %eax
movl 0xc0(%r14), %ecx
cmpl %ecx, %eax
jg 0x645b
decl %eax
imull %ecx, %eax
movl %eax, 0xc(%rsp)
movq (%rbx), %rsi
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
leaq 0x4115(%rip), %rdi      # 0xa550
cmpq %rdx, %rcx
je 0x645b
movb (%rsi), %r8b
cmpb (%rdx,%rdi), %r8b
je 0x6452
incq %rdx
jmp 0x643b
xorl %ebp, %ebp
jmp 0x6465
leal (%rax,%rdx), %ebp
incl %ebp
movl %ebp, 0xc(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x3160
movl %ebp, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3160
jmp 0x6495
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
leaq 0x98(%rdi), %rbx
cmpl $-0x1, %esi
je 0x657b
testl %esi, %esi
je 0x6584
decl %esi
movl %esi, %eax
cltd
idivl 0xc0(%rdi)
movl %eax, %ebp
movl %edx, %r15d
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x20(%rsp), %rdi
callq 0x3130
leaq 0x30(%rsp), %r14
movslq %r15d, %rax
leaq 0x4053(%rip), %rcx      # 0xa550
movsbl (%rax,%rcx), %esi
movq %r14, %rdi
callq 0x3220
leaq 0x20(%rsp), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x3240
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3390
movq 0x20(%rsp), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x3320
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x3330
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x3240
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3390
leaq 0x20(%rsp), %rdi
callq 0x3160
movq %rsp, %rdi
callq 0x30c0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x40b9(%rip), %rsi      # 0xa63b
jmp 0x658b
leaq 0x40c7(%rip), %rsi      # 0xa652
movq %rbx, %rdi
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3370
movq %rax, %rbx
jmp 0x65b2
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3160
movq %rsp, %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3110
movq %rax, %r15
addq $0xffaa8, %r14          # imm = 0xFFAA8
movq %r14, %rdi
movl %ebx, %esi
callq 0x3ce6
callq 0x3110
subq %r15, %rax
cvtsi2ss %rax, %xmm0
divss 0x3a32(%rip), %xmm0     # 0xa030
movss %xmm0, 0xc(%rsp)
movq 0x89e5(%rip), %rdi      # 0xeff0
leaq 0x4030(%rip), %rsi      # 0xa642
callq 0x31e0
movq %rax, %rdi
movss 0xc(%rsp), %xmm0
callq 0x3150
leaq 0x401e(%rip), %rsi      # 0xa64a
movq %rax, %rdi
callq 0x31e0
cvtsi2ss %ebx, %xmm0
divss 0xc(%rsp), %xmm0
movq %rax, %rdi
callq 0x3150
leaq 0x3fff(%rip), %rsi      # 0xa64c
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x31e0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3937(%rip), %r15      # 0xa6ab
cmpq $0x280, %r13            # imm = 0x280
je 0x6d9f
movq 0x48(%r14), %rdi
leaq (%r12,%r13), %rsi
callq 0x3040
testl %eax, %eax
jne 0x6d99
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3370
addq $0x20, %r13
jmp 0x6d74
leaq 0x390a(%rip), %rsi      # 0xa6b0
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3370
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6e6d
movq 0x60(%rbx), %rax
movss (%rax), %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0xb8(%rbx), %rdi
cvttss2si %xmm0, %esi
callq 0x487a
cvtsi2ss %eax, %xmm0
movss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x6e53
jnp 0x6e92
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x384b(%rip), %rsi      # 0xa6b6
jmp 0x6e85
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3843(%rip), %rsi      # 0xa6c8
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x3370
addq $0xffaa8, %rbx          # imm = 0xFFAA8
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x36a8
// File: /workspace/github_cpp_makefile_star2_O2/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 0x6f68
movq %rbx, %rdi
callq 0x62e4
movl %eax, %r14d
movq 0x48(%rbx), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x6372
movl %eax, %ebp
orl %r14d, %eax
js 0x6f82
leaq 0xb8(%rbx), %rdi
xorl %edx, %edx
testl %r14d, %r14d
setne %dl
movl %ebp, %esi
callq 0x4b66
cmpl $-0x1, %eax
je 0x6f9c
addq $0xffad0, %rbx          # imm = 0xFFAD0
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x9546
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3748(%rip), %rsi      # 0xa6c8
jmp 0x6fb4
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3748(%rip), %rsi      # 0xa6e2
jmp 0x6fb4
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3721(%rip), %rsi      # 0xa6d5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3370
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7073
movq %rbx, %rdi
callq 0x62e4
movl %eax, %ebp
testl %eax, %eax
setne %al
leaq 0xb8(%rbx), %r14
cmpb 0xb8(%rbx), %al
je 0x7029
xorl %edx, %edx
testl %ebp, %ebp
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x4b66
leaq 0xffad0(%rbx), %rdi
xorl %esi, %esi
callq 0x9546
xorl %r15d, %r15d
testl %ebp, %ebp
setne %r15b
leaq 0xffaa8(%rbx), %rdi
movzbl 0x1(%rbx), %esi
callq 0x3872
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
movl %r15d, %edx
callq 0x4b66
leaq 0xffad0(%rbx), %rdi
movl %ebp, %esi
callq 0x9546
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x649e
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x363d(%rip), %rsi      # 0xa6c8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3370
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x71fc
movq 0x48(%rbx), %rdi
leaq 0x353d(%rip), %rsi      # 0xa70e
callq 0x3080
testl %eax, %eax
je 0x7258
movq 0x48(%rbx), %rdi
leaq 0x3531(%rip), %rsi      # 0xa716
callq 0x3080
testl %eax, %eax
je 0x7258
movq 0x60(%rbx), %rcx
movq 0x68(%rbx), %rax
movq %rax, %rdx
subq %rcx, %rdx
cmpq $0x5, %rdx
jb 0x721e
movq 0x48(%rbx), %rdi
leaq 0x3512(%rip), %rsi      # 0xa71f
callq 0x3080
movq 0x60(%rbx), %rcx
testl %eax, %eax
je 0x7283
movq 0x68(%rbx), %rax
cmpq %rcx, %rax
je 0x7237
movq 0x48(%rbx), %rdi
leaq 0x34fa(%rip), %rsi      # 0xa728
callq 0x3080
testl %eax, %eax
je 0x7277
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3479(%rip), %rsi      # 0xa6c8
movq %rbx, %rdi
popq %rbx
jmp 0x3370
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 0x7296
addq $0xffaa8, %rbx          # imm = 0xFFAA8
pushq $0x1e
popq %rsi
jmp 0x728f
addq $0xffaa8, %rbx          # imm = 0xFFAA8
cvttss2si 0x4(%rcx), %esi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rbx
jmp 0x36e0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3130
leaq 0xffaa8(%rbx), %rdi
xorl %esi, %esi
callq 0x3be2
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
leaq 0x38(%rsp), %rdi
jbe 0x7357
callq 0x3150
addq $0x98, %rbx
leaq 0x33fc(%rip), %rsi      # 0xa72d
movq %rbx, %rdi
callq 0x3370
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x32c0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3390
jmp 0x739b
movaps 0x3332(%rip), %xmm1     # 0xa690
xorps %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x3150
addq $0x98, %rbx
leaq 0x33b9(%rip), %rsi      # 0xa730
movq %rbx, %rdi
callq 0x3370
leaq 0x40(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x32c0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x3390
leaq 0x8(%rsp), %rdi
callq 0x30c0
leaq 0x28(%rsp), %rdi
callq 0x3160
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
retq
jmp 0x73ba
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30c0
jmp 0x73d0
jmp 0x73cd
jmp 0x73cd
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3160
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/gtpcommands.cpp
// Function: GTP::final_status_list()
void GTP::final_status_list()
{
  if (cmd_args.size() > 0 && !cmd_args[0].compare("dead")) {
    std::vector<int> list;
    go_engine.score(&list);
    //TODO: support 'alive' status.
    for(std::vector<int>::iterator it = list.begin(); it != list.end(); ++it){
      coord_to_char(*it, response, main_goban.get_size());
      response.append("\n");
    }
  } else {
    response[0] = '?';
    response.append("syntax error");
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %r15
movq 0x48(%rdi), %rdi
cmpq %rdi, 0x50(%r15)
je 0x7410
leaq 0x332c(%rip), %rsi      # 0xa733
callq 0x3080
testl %eax, %eax
je 0x7441
movq 0x98(%r15), %rax
addq $0x98, %r15
movb $0x3f, (%rax)
leaq 0x32a0(%rip), %rsi      # 0xa6c8
movq %r15, %rdi
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3370
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0xffaa8(%r15), %rdi
callq 0x3be2
movq (%rsp), %rbx
leaq 0x98(%r15), %r14
leaq 0x20(%rsp), %r12
cmpq 0x8(%rsp), %rbx
je 0x7561
movl (%rbx), %eax
testl %eax, %eax
je 0x753a
decl %eax
cltd
movq %r15, %rbp
idivl 0xc0(%r15)
movl %eax, %r13d
movl %edx, %r15d
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
andq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x3130
movslq %r15d, %rax
leaq 0x3284(%rip), %rcx      # 0xa740
movsbl (%rax,%rcx), %esi
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x3220
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x3240
movq %r14, %rdi
movq %r12, %rsi
callq 0x3390
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0x40(%rsp), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x3320
incl %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x3330
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x3240
movq %r14, %rdi
movq %r12, %rsi
callq 0x3390
leaq 0x40(%rsp), %rdi
callq 0x3160
movq %r12, %rdi
callq 0x30c0
movq %rbp, %r15
jmp 0x7549
movq %r14, %rdi
leaq 0x310e(%rip), %rsi      # 0xa652
callq 0x3370
movq %r14, %rdi
leaq 0x30d1(%rip), %rsi      # 0xa624
callq 0x3370
addq $0x4, %rbx
jmp 0x746b
movq %rsp, %rdi
callq 0x75ae
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7582
movq %rax, %rbx
jmp 0x7594
movq %rax, %rbx
jmp 0x759e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3160
leaq 0x20(%rsp), %rdi
callq 0x30c0
movq %rsp, %rdi
callq 0x75ae
movq %rbx, %rdi
callq 0x3340
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x18(%rax)
testl %eax, %eax
je 0x76a0
callq 0x3060
movl %eax, %ebp
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
movl %eax, %ecx
movl %ebp, %eax
cltd
idivl %ecx
movl %edx, %ebp
addq %r12, %rbx
movl %edx, 0x4(%rsp)
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
cmpl %eax, %ebp
jge 0x7655
movq (%r15), %rax
movq %r15, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movl %eax, %r13d
movq %r14, %rax
testb $0x1, %r14b
je 0x7640
movq (%rbx), %rax
movq -0x1(%rax,%r14), %rax
movzbl (%r12), %edx
movq %rbx, %rdi
movl %r13d, %esi
callq *%rax
incl %ebp
testb %al, %al
je 0x7614
jmp 0x76a3
xorl %eax, %eax
movl 0x4(%rsp), %ecx
testl %ecx, %ecx
cmovlel %eax, %ecx
movl %ecx, 0x4(%rsp)
xorl %ebp, %ebp
cmpl %ebp, 0x4(%rsp)
je 0x76a0
movq (%r15), %rax
movq %r15, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movl %eax, %r13d
movq %r14, %rax
testb $0x1, %r14b
je 0x768b
movq (%rbx), %rax
movq -0x1(%rax,%r14), %rax
movzbl (%r12), %edx
movq %rbx, %rdi
movl %r13d, %esi
callq *%rax
incl %ebp
testb %al, %al
je 0x7666
jmp 0x76a3
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/antoniogarro[P]Hara/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 %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
callq 0x5294
testb %al, %al
jne 0x771c
movzbl %bpl, %ebp
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x5300
testb %al, %al
je 0x771c
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x7734
testb %al, %al
je 0x7723
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x774c
xorb $0x1, %al
jmp 0x771e
nop