LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4d3f
movzbl (%r14), %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x484a
xorb $0x1, (%r14)
addq $0xfd7d0, %r14          # imm = 0xFD7D0
movq %r14, %rdi
callq 0xaebc
movq %r14, %rdi
callq 0xaf4e
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4d86
leaq 0xfd7d0(%r14), %rdi
callq 0xaebc
jmp 0x4db8
movslq 0xfd7cc(%r14), %rax
cmpq $0x43b, %rax            # imm = 0x43B
je 0x4db8
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 0x4df0
movl %ebx, %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpq $0x0, 0x18(%r14,%rax,8)
jne 0x4e45
movzbl %bpl, %r12d
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x5626
testb %al, %al
je 0x4e45
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x484a
jmp 0x4df8
movl $0x0, 0x4(%r14)
xorb $0x1, %bpl
movb %bpl, (%r14)
movslq 0xfd7cc(%r14), %rax
cmpq $0x43b, %rax            # imm = 0x43B
je 0x4e33
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 0xaf4e
movl %ebx, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x18(%rax)
testl %eax, %eax
setle %r12b
jle 0x4f43
leaq 0xfd7d0(%r14), %r15
xorl %ebp, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
testl %eax, %eax
je 0x4f20
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
cltq
cmpq $0x0, 0x18(%r14,%rax,8)
jne 0x4f43
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movzbl (%r14), %edx
movq %r14, %rdi
movl %eax, %esi
callq 0x5626
testb %al, %al
je 0x4f43
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movzbl (%r14), %edx
movq %r14, %rdi
movl %eax, %esi
callq 0x484a
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movslq 0xfd7cc(%r14), %rcx
cmpq $0x43b, %rcx            # imm = 0x43B
je 0x4f20
leal 0x1(%rcx), %edx
movl %edx, 0xfd7cc(%r14)
movl %eax, 0xfc6e0(%r14,%rcx,4)
movslq 0xfd7cc(%r14), %rax
movl $0x0, 0xfc6e0(%r14,%rax,4)
xorb $0x1, (%r14)
movq %r15, %rdi
callq 0xaf4e
incl %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpl %eax, %ebp
setge %r12b
jl 0x4e7e
andb $0x1, %r12b
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4fb8
xorl %ecx, %ecx
cmpl %esi, 0x8(%rdi,%rcx,4)
je 0x4fb9
incq %rcx
cmpq %rcx, %rax
jne 0x4faa
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_O1/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 0x5055
testl %eax, %eax
setg %cl
jle 0x503d
cmpl %esi, 0x8(%rdi)
je 0x5039
leaq -0x1(%rax), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x503d
leaq 0x1(%rdx), %r8
cmpl %esi, 0xc(%rdi,%rdx,4)
movq %r8, %rdx
jne 0x5021
cmpq %rax, %r8
setb %cl
testb %cl, %cl
jne 0x5055
movslq %eax, %rcx
incl %eax
movl %eax, 0x1c(%rdi)
movl %esi, 0x8(%rdi,%rcx,4)
movslq 0x1c(%rdi), %rax
movl $0x0, 0x8(%rdi,%rax,4)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xae8a
movq %rax, %r12
movq %r14, %rdi
movl %ebx, %esi
callq 0x515a
movq %rax, %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0xae8e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x51ea
movl %esi, %ebp
leaq 0xfd7d0(%rbx), %r14
movzbl (%rbx), %edx
movq %r14, %rdi
callq 0xaec0
movq %rsp, %rdx
movl $0x0, 0x30(%rdx)
movq $0x0, (%rdx)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5210
testl %eax, %eax
jle 0x51ea
movl %eax, %r15d
xorl %r12d, %r12d
movq (%rsp,%r12,8), %r13
movb (%rbx), %al
cmpb (%r13), %al
je 0x51e2
cmpl $0x1, 0x96c(%r13)
jne 0x51e2
movl 0x4(%r13), %esi
testl %esi, %esi
je 0x51e2
leaq 0x8(%r13), %rbp
movzbl (%r13), %edx
movq %r14, %rdi
callq 0xaec0
movl (%rbp), %esi
addq $0x4, %rbp
testl %esi, %esi
jne 0x51ca
incq %r12
cmpq %r15, %r12
jne 0x51a8
addq $0xfd7d0, %rbx          # imm = 0xFD7D0
movq %rbx, %rdi
callq 0xaebc
movq %rbx, %rdi
callq 0xae8a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5d68
movslq 0x30(%rdi), %rax
testq %rax, %rax
setg %cl
jle 0x5d6b
cmpq %rsi, (%rdi)
je 0x5d5e
leaq -0x1(%rax), %rcx
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x5d6b
leaq 0x1(%r8), %rdx
cmpq %rsi, 0x8(%rdi,%r8,8)
movq %rdx, %r8
jne 0x5d43
cmpq %rax, %rdx
setb %cl
jmp 0x5d60
xorl %edx, %edx
incl 0x20(%rdi,%rdx,4)
testb %cl, %cl
je 0x5d6b
xorl %eax, %eax
retq
movslq 0x30(%rdi), %rax
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
// File: /workspace/github_cpp_makefile_star2_O1/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)
xorl %ebp, %ebp
movl %ebp, 0x8(%rdi)
movl %ebp, 0x96c(%rdi)
movq (%rcx), %rax
movq %rcx, %rdi
callq *0x18(%rax)
testl %eax, %eax
jle 0x5e8d
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
movl $0x0, 0x5ac(%r14,%rax,4)
incl %ebp
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
cmpl %eax, %ebp
jl 0x5e47
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
setg %dl
jle 0x5ed0
cmpl %esi, 0x5ac(%rdi)
je 0x5eca
leaq -0x1(%rcx), %rax
xorl %edx, %edx
cmpq %rdx, %rax
je 0x5ed0
leaq 0x1(%rdx), %r8
cmpl %esi, 0x5b0(%rdi,%rdx,4)
movq %r8, %rdx
jne 0x5eaf
cmpq %rcx, %r8
setb %dl
xorl %eax, %eax
testb %dl, %dl
jne 0x5ef8
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
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5f19
xorl %ecx, %ecx
cmpl %esi, 0x5ac(%rdi,%rcx,4)
je 0x5f1c
incq %rcx
cmpq %rcx, %rax
jne 0x5f08
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_O1/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 0x5fa7
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 0x5f6f
cmpl $0x0, 0x96c(%rsi)
jle 0x6022
xorl %eax, %eax
movl 0x5ac(%rsi,%rax,4), %ecx
movslq 0x96c(%rdi), %rdx
testq %rdx, %rdx
jle 0x5fef
cmpl %ecx, 0x5ac(%rdi)
je 0x6013
leaq -0x1(%rdx), %r8
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x5fef
leaq 0x1(%r9), %r10
cmpl %ecx, 0x5b0(%rdi,%r9,4)
movq %r10, %r9
jne 0x5fd4
cmpq %rdx, %r10
jb 0x6013
leal 0x1(%rdx), %r8d
movl %r8d, 0x96c(%rdi)
movl %ecx, 0x5ac(%rdi,%rdx,4)
movslq 0x96c(%rdi), %rcx
movl $0x0, 0x5ac(%rdi,%rcx,4)
incq %rax
movslq 0x96c(%rsi), %rcx
cmpq %rcx, %rax
jl 0x5fb2
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x98da(%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 0x6746
movq %rbx, %rdi
movq %r14, %rsi
callq 0x674e
movq %rbx, %rdi
callq 0x69ee
cmpb $0x0, (%rbx)
jne 0x66fe
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4c17(%rip), %rcx      # 0xb621
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 0x6ae1
leaq 0x4ac2(%rip), %rcx      # 0xb500
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x7770
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7d48
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7bc6
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7b1c
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7812
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7b28
jmp 0x6b2f
movq %rbx, %rdi
callq 0x795e
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7798
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7cf6
jmp 0x6b2f
movq %rbx, %rdi
callq 0x77ac
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7906
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7784
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7e92
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7afe
jmp 0x6b2f
movq %rbx, %rdi
callq 0x786a
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7b7a
jmp 0x6b2f
movq %rbx, %rdi
callq 0x786e
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7c0e
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7a34
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7926
jmp 0x6b2f
movq %rbx, %rdi
callq 0x7a20
leaq 0x4aed(%rip), %rsi      # 0xb623
movq %r14, %rdi
callq 0x3340
movq 0x98(%rbx), %rsi
movq 0xa0(%rbx), %rdx
movq 0x9475(%rip), %rdi      # 0xffc8
callq 0x31f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6bd0
movq (%rbx), %r15
xorl %r12d, %r12d
movsbl (%r15,%r12), %edi
callq 0x3230
movb %al, (%r15,%r12)
incq %r12
cmpq %r12, %r14
jne 0x6bba
leaq 0x4a4f(%rip), %rsi      # 0xb626
movq %rbx, %rdi
callq 0x3070
movl $0x1, %ebp
testl %eax, %eax
je 0x6c27
leaq 0x4a3d(%rip), %rsi      # 0xb62c
movq %rbx, %rdi
callq 0x3070
testl %eax, %eax
je 0x6c27
leaq 0x4a2c(%rip), %rsi      # 0xb62e
movq %rbx, %rdi
callq 0x3070
testl %eax, %eax
je 0x6c25
leaq 0x4a1f(%rip), %rsi      # 0xb634
movq %rbx, %rdi
callq 0x3070
xorl %ebp, %ebp
negl %eax
sbbl %ebp, %ebp
jmp 0x6c27
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6c6e
movq (%rbx), %r12
xorl %r13d, %r13d
movsbl (%r12,%r13), %edi
callq 0x3330
movb %al, (%r12,%r13)
incq %r13
cmpq %r13, %r15
jne 0x6c58
leaq 0x49c1(%rip), %rsi      # 0xb636
movq %rbx, %rdi
callq 0x3070
testl %eax, %eax
je 0x6d29
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 0x6ccc
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 0x6d36
movl 0xc(%rsp), %eax
movl 0xc0(%r14), %ecx
cmpl %ecx, %eax
jg 0x6d36
decl %eax
imull %ecx, %eax
movl %eax, 0xc(%rsp)
testl %ecx, %ecx
jle 0x6d36
movq (%rbx), %rdx
movb (%rdx), %sil
xorl %edx, %edx
leaq 0x4837(%rip), %rdi      # 0xb550
cmpb (%rdx,%rdi), %sil
je 0x6d2d
incq %rdx
cmpq %rdx, %rcx
jne 0x6d19
jmp 0x6d36
xorl %ebp, %ebp
jmp 0x6d54
leal (%rax,%rdx), %ebp
incl %ebp
movl %ebp, 0xc(%rsp)
movq 0x9273(%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 0x923e(%rip), %rsi      # 0xffb0
leaq 0x30(%rsp), %rdi
callq 0x3140
leaq 0xb0(%rsp), %rdi
callq 0x3090
jmp 0x6da9
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6da9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3300
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6eda
testl %esi, %esi
je 0x6ee3
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 0x4736(%rip), %rcx      # 0xb550
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 0x9114(%rip), %rsi      # 0xffb0
leaq 0x28(%rsp), %rdi
callq 0x3140
leaq 0xa8(%rsp), %rdi
callq 0x3090
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6eca
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 0x475a(%rip), %rsi      # 0xb63b
jmp 0x6eea
leaq 0x4768(%rip), %rsi      # 0xb652
movq %rbx, %rdi
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3340
movq %rax, %rbx
jmp 0x6f27
movq %rax, %rbx
movq 0x90a0(%rip), %rsi      # 0xffb0
leaq 0x28(%rsp), %rdi
callq 0x3140
leaq 0xa8(%rsp), %rdi
callq 0x3090
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f3e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
movq %rbx, %rdi
callq 0x3300
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3e18
callq 0x3100
subq %r15, %rax
cvtsi2ss %rax, %xmm0
divss 0x40ae(%rip), %xmm0     # 0xb030
movss %xmm0, 0xc(%rsp)
movq 0x9061(%rip), %r14      # 0xfff0
leaq 0x46ac(%rip), %rsi      # 0xb642
movl $0x7, %edx
movq %r14, %rdi
callq 0x31f0
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
movq %r14, %rdi
callq 0x32a0
movq %rax, %r14
leaq 0x468c(%rip), %rsi      # 0xb64a
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 0x4661(%rip), %rsi      # 0xb64c
movl $0x5, %edx
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x31f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3edb(%rip), %r15      # 0xb6ab
movq 0x48(%r14), %rdi
leaq (%r12,%r13), %rsi
callq 0x3040
testl %eax, %eax
jne 0x77ec
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3340
addq $0x20, %r13
cmpq $0x280, %r13            # imm = 0x280
jne 0x77d0
leaq 0x3eb0(%rip), %rsi      # 0xb6b0
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x78cc
movq 0x60(%rbx), %rax
movss (%rax), %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0xb8(%rbx), %rdi
cvttss2si %xmm0, %esi
callq 0x49fe
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x78b2
jnp 0x78f1
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3dec(%rip), %rsi      # 0xb6b6
jmp 0x78e4
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3de4(%rip), %rsi      # 0xb6c8
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_O1/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 0x79c8
movq %rbx, %rdi
callq 0x6ba0
movl %eax, %r14d
movq 0x48(%rbx), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x6c32
movl %eax, %ebp
orl %r14d, %eax
js 0x79e2
leaq 0xb8(%rbx), %rdi
xorl %edx, %edx
testl %r14d, %r14d
setne %dl
movl %ebp, %esi
callq 0x4d64
cmpl $-0x1, %eax
je 0x79fc
addq $0xffad0, %rbx          # imm = 0xFFAD0
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0xa6b4
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3ce8(%rip), %rsi      # 0xb6c8
jmp 0x7a14
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3ce8(%rip), %rsi      # 0xb6e2
jmp 0x7a14
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3cc1(%rip), %rsi      # 0xb6d5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x3340
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7ad3
movq %rbx, %rdi
callq 0x6ba0
movl %eax, %ebp
testl %eax, %eax
setne %al
leaq 0xb8(%rbx), %r14
cmpb 0xb8(%rbx), %al
je 0x7a89
xorl %edx, %edx
testl %ebp, %ebp
sete %dl
movq %r14, %rdi
xorl %esi, %esi
callq 0x4d64
leaq 0xffad0(%rbx), %rdi
xorl %esi, %esi
callq 0xa6b4
xorl %r15d, %r15d
testl %ebp, %ebp
setne %r15b
leaq 0xffaa8(%rbx), %rdi
movzbl 0x1(%rbx), %esi
callq 0x38f4
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
movl %r15d, %edx
callq 0x4d64
leaq 0xffad0(%rbx), %rdi
movl %ebp, %esi
callq 0xa6b4
movq %rbx, %rdi
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x6db2
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3bdd(%rip), %rsi      # 0xb6c8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3340
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x68(%rdi), %rax
subq 0x60(%rdi), %rax
cmpq $0xd, %rax
jb 0x7c48
movq 0x48(%rbx), %rdi
leaq 0x3ae3(%rip), %rsi      # 0xb70e
callq 0x3070
testl %eax, %eax
je 0x7ca9
movq 0x48(%rbx), %rdi
leaq 0x3ad7(%rip), %rsi      # 0xb716
callq 0x3070
testl %eax, %eax
je 0x7ca9
movq 0x68(%rbx), %rax
subq 0x60(%rbx), %rax
cmpq $0x5, %rax
jb 0x7c6a
movq 0x48(%rbx), %rdi
leaq 0x3abe(%rip), %rsi      # 0xb71f
callq 0x3070
testl %eax, %eax
je 0x7cd9
movq 0x68(%rbx), %rax
cmpq 0x60(%rbx), %rax
je 0x7c88
movq 0x48(%rbx), %rdi
leaq 0x3aa9(%rip), %rsi      # 0xb728
callq 0x3070
testl %eax, %eax
je 0x7cc8
movq 0x98(%rbx), %rax
addq $0x98, %rbx
movb $0x3f, (%rax)
leaq 0x3a28(%rip), %rsi      # 0xb6c8
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 0x7cf0
addq $0xffaa8, %rbx          # imm = 0xFFAA8
movq %rbx, %rdi
movl $0x1e, %esi
jmp 0x7cec
movq 0x60(%rbx), %rax
addq $0xffaa8, %rbx          # imm = 0xFFAA8
cvttss2si 0x4(%rax), %esi
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rbx
jmp 0x3700
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3cf6
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
leaq 0x38(%rsp), %rdi
jbe 0x7dba
cvtss2sd %xmm0, %xmm0
callq 0x32a0
addq $0x98, %rbx
leaq 0x399e(%rip), %rsi      # 0xb72d
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 0x7e01
xorps 0x38cf(%rip), %xmm0     # 0xb690
cvtss2sd %xmm0, %xmm0
callq 0x32a0
addq $0x98, %rbx
leaq 0x3958(%rip), %rsi      # 0xb730
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 0x7e1c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
movq 0x818d(%rip), %rsi      # 0xffb0
leaq 0x28(%rsp), %rdi
callq 0x3140
leaq 0xa8(%rsp), %rdi
callq 0x3090
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
retq
jmp 0x7e45
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7e6c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31d0
jmp 0x7e6c
jmp 0x7e69
jmp 0x7e69
movq %rax, %rbx
movq 0x813d(%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_O1/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 $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x18(%rax)
xorl %ecx, %ecx
testl %eax, %eax
je 0x8234
movq %rbx, 0x18(%rsp)
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, %ebp
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
cmpl %eax, %ebp
setl %r13b
movl %ebp, 0xc(%rsp)
jge 0x81d1
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq (%r15), %rax
movq %r15, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movl %eax, %ebx
movq %r14, %rax
testb $0x1, %r14b
je 0x81a3
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq -0x1(%rax,%r14), %rax
movq 0x10(%rsp), %rcx
movzbl (%rcx), %edx
movq 0x20(%rsp), %rdi
movl %ebx, %esi
callq *%rax
testb %al, %al
cmovnel %ebx, %r12d
jne 0x81d1
incl %ebp
movq (%r15), %rax
movq %r15, %rdi
callq *0x18(%rax)
cmpl %eax, %ebp
setl %r13b
jl 0x8180
jmp 0x81d1
testb $0x1, %r13b
je 0x81dc
movl %r12d, %ecx
jmp 0x8234
cmpl $0x0, 0xc(%rsp)
movl $0x0, %ecx
jle 0x8234
movq 0x18(%rsp), %r13
addq 0x10(%rsp), %r13
xorl %ebp, %ebp
movq (%r15), %rax
movq %r15, %rdi
movl %ebp, %esi
callq *0x10(%rax)
movl %eax, %ebx
movq %r14, %rax
testb $0x1, %r14b
je 0x8213
movq (%r13), %rax
movq -0x1(%rax,%r14), %rax
movq 0x10(%rsp), %rcx
movzbl (%rcx), %edx
movq %r13, %rdi
movl %ebx, %esi
callq *%rax
testb %al, %al
cmovnel %ebx, %r12d
jne 0x81d7
incl %ebp
cmpl %ebp, 0xc(%rsp)
jne 0x81f4
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5586
testb %al, %al
jne 0x82d3
movzbl %bpl, %ebp
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x5626
testb %al, %al
je 0x82d3
xorl %r15d, %r15d
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x90a8
cmpl $0x1, %eax
je 0x82d6
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x82fe
movl %eax, %r15d
xorb $0x1, %r15b
jmp 0x82d6
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::play_heavy()
int Goban::play_heavy()
{
  if (int move = last_atari_heuristic()) {
    return play_move(move);
  }

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

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x5b0, %rsp            # imm = 0x5B0
movq %rdi, %rbx
callq 0x864a
movl %eax, %r14d
testl %eax, %eax
je 0x84fb
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4d24
movl %eax, %ebp
jmp 0x84fb
testl %r14d, %r14d
jne 0x863b
movl 0xd63e0(%rbx), %esi
testl %esi, %esi
je 0x8617
xorl %eax, %eax
movq %rsp, %r14
movl %eax, 0x5ac(%r14)
movl %eax, 0x8(%r14)
leaq 0x77f7(%rip), %rax      # 0xfd20
movq %rax, (%r14)
movq %rbx, %rdi
movq %r14, %rdx
callq 0x873c
leaq -0x2ca(%rip), %rdx      # 0x8274
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x810c
movl %eax, %r14d
testl %eax, %eax
je 0x855f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4d24
movl %eax, %ebp
xorl %eax, %eax
testl %r14d, %r14d
jne 0x8613
movq %rsp, %r14
movl %eax, 0x5ac(%r14)
movl %eax, 0x8(%r14)
movl 0xd63e0(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x881a
leaq -0x31c(%rip), %rdx      # 0x8274
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x810c
movl %eax, %r14d
testl %eax, %eax
je 0x85b1
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4d24
movl %eax, %ebp
xorl %eax, %eax
testl %r14d, %r14d
jne 0x8613
movq %rsp, %r14
movl %eax, 0x5ac(%r14)
movl %eax, 0x8(%r14)
movl 0xd63e0(%rbx), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8880
leaq -0x36a(%rip), %rdx      # 0x8274
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x810c
movl %eax, %r14d
testl %eax, %eax
je 0x85ff
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4d24
movl %eax, %ebp
xorl %eax, %eax
testl %r14d, %r14d
jne 0x8613
movl %eax, 0x5ac(%rsp)
movl %eax, 0x8(%rsp)
movb $0x1, %al
testb %al, %al
je 0x863b
leaq 0xfc120(%rbx), %rsi
leaq -0x3df(%rip), %rdx      # 0x8246
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x810c
movq %rbx, %rdi
movl %eax, %esi
callq 0x4d24
movl %eax, %ebp
movl %ebp, %eax
addq $0x5b0, %rsp            # imm = 0x5B0
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::last_atari_heuristic() const
int Goban::last_atari_heuristic() const
{
  if (Group *group = last_atari[!side]) {
    int move = group->get_liberty(0);
    if (is_legal(move, side) &&
        !is_self_atari(move, side) &&
        gains_liberties(move, group)) {
      return move;
    }
  }
  
  PointList<MAXSIZE2> save;
  if (last_atari[side]) {
    atari_escapes(last_atari[side], save);
    if (int move = random_choose(save, &Goban::heavy_policy)) {
      return move;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x5b0, %rsp            # imm = 0x5B0
movq %rdi, %r14
movzbl (%rdi), %eax
movl %eax, %ecx
xorl $0x1, %ecx
movq 0xd63d0(%rdi,%rcx,8), %r15
movb $0x1, %r12b
testq %r15, %r15
je 0x86d0
movl 0x5ac(%r15), %ebx
movzbl %al, %edx
movq %r14, %rdi
movl %ebx, %esi
callq 0x5626
testb %al, %al
je 0x86d0
movzbl (%r14), %edx
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x90a8
cmpl $0x1, %eax
je 0x86d0
movl 0x96c(%r15), %ebp
movzbl (%r15), %edx
movq %r14, %rdi
movl %ebx, %esi
xorl %ecx, %ecx
movl %ebp, %r8d
movq %r15, %r9
callq 0x90a8
cmpl %ebp, %eax
jle 0x86d0
xorl %r12d, %r12d
jmp 0x86d0
testb %r12b, %r12b
je 0x8729
leaq 0x76a4(%rip), %rax      # 0xfd80
movq %rax, (%rsp)
xorl %eax, %eax
movl %eax, 0x5ac(%rsp)
movl %eax, 0x8(%rsp)
movzbl (%r14), %eax
movq 0xd63d0(%r14,%rax,8), %rsi
testq %rsi, %rsi
je 0x8727
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0x8936
leaq -0x49f(%rip), %rdx      # 0x8274
movq %r14, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x810c
testl %eax, %eax
cmovnel %eax, %ebx
jne 0x8729
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x5b0, %rsp            # imm = 0x5B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::save_heuristic(int, PList&) const
void Goban::save_heuristic(int point, PList &list) const
{
  if (points[point] && points[point]->get_nliberties() == 2) {
    for (int i = 0; i < 2; i++) {
      int lib = points[point]->get_liberty(i);
      if (gains_liberties(lib, points[point])) {
        list.add(lib);
      }
    }
  }
  GroupSet<4> neigh;
  int nneigh = neighbour_groups(point, neigh);
  for (int j = 0; j < nneigh; j++) {
    if (neigh[j]->get_color() == side && neigh[j]->get_nliberties() == 2) { // <2?
      atari_escapes(neigh[j], list);
    }
  }
/*TODO!!!
  for (int i = 0; i < 8; i++) {
    if (int v = vicinity[point][i]) {
      if (points[v] != 0 && points[v]->get_color() == side && points[v]->get_nliberties() == 1) {
        atari_escapes(points[v], list);
      }
    }
  }
*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movl %esi, 0xc(%rsp)
movslq %esi, %r13
movq 0x18(%rdi,%r13,8), %rax
testq %rax, %rax
je 0x87ba
cmpl $0x2, 0x96c(%rax)
jne 0x87ba
xorl %ebp, %ebp
movq 0x18(%r14,%r13,8), %r9
testq %r9, %r9
je 0x877f
movl 0x96c(%r9), %r12d
jmp 0x8785
movl $0x1, %r12d
movl 0x5ac(%r9,%rbp,4), %r15d
movzbl (%r9), %edx
movq %r14, %rdi
movl %r15d, %esi
xorl %ecx, %ecx
movl %r12d, %r8d
callq 0x90a8
cmpl %r12d, %eax
jle 0x87b1
movq (%rbx), %rax
movq %rbx, %rdi
movl %r15d, %esi
callq *(%rax)
incq %rbp
cmpq $0x1, %rbp
je 0x876c
leaq 0x10(%rsp), %rdx
movl $0x0, 0x30(%rdx)
movq $0x0, (%rdx)
movq %r14, %rdi
movl 0xc(%rsp), %esi
callq 0x5210
testl %eax, %eax
jle 0x880b
movl %eax, %r15d
xorl %r12d, %r12d
movq 0x10(%rsp,%r12,8), %rsi
movb (%r14), %al
cmpb (%rsi), %al
jne 0x8803
cmpl $0x2, 0x96c(%rsi)
jne 0x8803
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8936
incq %r12
cmpq %r12, %r15
jne 0x87e3
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::pattern_heuristic(int, PList&) const
void Goban::pattern_heuristic(int point, PList &list) const
{
  for (int i = 0; i < 8; i++) {
    if (int v = vicinity[point][i]) {
      if (points[v] == 0 && match_mogo_pattern(v, side)) {
        list.add(v);
      }
    }
  }
}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %rax
shlq $0x6, %rax
leaq (%rax,%rdi), %r12
addq $0xd9c78, %r12          # imm = 0xD9C78
xorl %r13d, %r13d
movslq (%r12,%r13,4), %rax
movq 0x18(%r14,%rax,8), %r9
testq %r9, %r9
je 0x88f1
movb (%r9), %al
cmpb %al, (%r14)
je 0x88f1
movl 0x96c(%r9), %r15d
cmpl $0x1, %r15d
jne 0x88f1
movl 0x5ac(%r9), %ebp
movzbl %al, %edx
movq %r14, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
movl %r15d, %r8d
callq 0x90a8
cmpl %r15d, %eax
jle 0x88f1
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
callq *(%rax)
incq %r13
cmpq $0x8, %r13
jne 0x88a6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::gains_liberties(int, Group const*) const
bool Goban::gains_liberties(int point, const Group *group) const
{
  int curr_liberties = 1;
  if (group) curr_liberties = group->get_nliberties();
  int nlibs = total_liberties(point, group->get_color(), 0, curr_liberties, group);
  return nlibs > curr_liberties;
}

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5b8, %rsp            # imm = 0x5B8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x5ac(%rsi), %esi
testl %esi, %esi
je 0x89a5
leaq 0x5b0(%r14), %r12
testq %r14, %r14
je 0x896f
movl 0x96c(%r14), %ebp
jmp 0x8974
movl $0x1, %ebp
movzbl (%r14), %edx
movq %r15, %rdi
xorl %ecx, %ecx
movl %ebp, %r8d
movq %r14, %r9
callq 0x90a8
cmpl %ebp, %eax
jle 0x8999
movl -0x4(%r12), %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl (%r12), %esi
addq $0x4, %r12
testl %esi, %esi
jne 0x8961
leaq 0x10(%rsp), %r8
movl $0x0, 0x5a0(%r8)
movq $0x0, (%r8)
movzbl (%r14), %edx
movl 0x96c(%r14), %ecx
xorl $0x1, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x5372
testl %eax, %eax
jle 0x8a3d
movl %eax, %eax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
movq 0x10(%rsp,%r13,8), %r12
movl 0x5ac(%r12), %esi
testl %esi, %esi
je 0x8a33
addq $0x5b0, %r12            # imm = 0x5B0
movl 0x96c(%r14), %ebp
movzbl (%r14), %edx
movq %r15, %rdi
xorl %ecx, %ecx
movl %ebp, %r8d
movq %r14, %r9
callq 0x90a8
cmpl %ebp, %eax
jle 0x8a27
movl -0x4(%r12), %esi
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movl (%r12), %esi
addq $0x4, %r12
testl %esi, %esi
jne 0x89fb
incq %r13
cmpq 0x8(%rsp), %r13
jne 0x89e3
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
addq $0x5b8, %rsp            # imm = 0x5B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/antoniogarro[P]Hara/heuristics.cpp
// Function: Goban::nakade_heuristic(int, PList&) const
void Goban::nakade_heuristic(int point, PList &list) const
{
  for (int i = 0; i < 8; i++) {
    if (int v = vicinity[point][i]) {
      if (points[v] == 0 && (creates_eyes(v, 0) > 1 || creates_eyes(v, 1) > 1)) {
        list.add(v);
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movslq %esi, %rax
shlq $0x6, %rax
leaq (%rax,%rdi), %r12
addq $0xd9c78, %r12          # imm = 0xD9C78
xorl %r13d, %r13d
movslq (%r12,%r13,4), %r15
testq %r15, %r15
je 0x8abf
cmpq $0x0, 0x18(%r14,%r15,8)
jne 0x8abf
movq %r14, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x8ad2
cmpl $0x1, %eax
jg 0x8ab4
movq %r14, %rdi
movl %r15d, %esi
movl $0x1, %edx
callq 0x8ad2
cmpl $0x2, %eax
jl 0x8abf
movq (%rbx), %rax
movq %rbx, %rdi
movl %r15d, %esi
callq *(%rax)
incq %r13
cmpq $0x8, %r13
jne 0x8a7c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq