LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/nikolausmayer[P]SimplePlot/./Sparkline.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> Sparkline::Sparkline<float>(std::vector<float, std::allocator<float>> const&, unsigned long, unsigned long, bool, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, float, float)
std::string Sparkline( const std::vector<T>& data,
                         size_t this_many_lines_high=1,
                         size_t this_many_characters_wide=0,
                         bool enclose_in_box=false,
                         bool print_colored=true,
                         std::string title="",
                         T minv=std::numeric_limits<T>::max(),
                         T maxv=std::numeric_limits<T>::min()
                       )
  {
    /// TODO The standard guarantees that vector elements are
    /// stored contiguously, but does that hold for all compiler
    /// and language versions (VERY young issue; May 2014)?
    /// (www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#69)
    const T* const ptr = &data[0];
    return Sparkline( ptr,
                      (size_t)data.size(),
                      this_many_lines_high,
                      this_many_characters_wide,
                      enclose_in_box,
                      print_colored,
                      title,
                      minv,
                      maxv );
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movq %r9, 0x10(%rsp)
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
movq 0x70(%rsp), %rax
movq (%rsi), %r13
movq 0x8(%rsi), %r14
subq %r13, %r14
sarq $0x2, %r14
leaq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x2200
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %r15, %r8
movl %ebp, %r9d
movss 0x8(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
leaq 0x18(%rsp), %rax
pushq %rax
pushq 0x18(%rsp)
callq 0x34dd
popq %rax
popq %rcx
leaq 0x18(%rsp), %rdi
callq 0x22d8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x22d8
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/nikolausmayer[P]SimplePlot/./Sparkline.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> Sparkline::Sparkline<float>(std::vector<float, std::allocator<float>> const&, Sparkline::Configuration<float> const&)
std::string Sparkline( const std::vector<T>& data,
                         const Configuration<T>& config
                       )
  {
    return Sparkline( data,
                      config.this_many_lines_high,
                      config.this_many_characters_wide,
                      config.enclose_in_box,
                      config.print_colored,
                      config.title,
                      config.minv,
                      config.maxv 
                    );
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
movq (%rdx), %r12
movq 0x8(%rdx), %r13
movzbl 0x10(%rdx), %ebp
movzbl 0x11(%rdx), %r15d
leaq 0x18(%rdx), %rsi
leaq 0x18(%rsp), %rdi
callq 0x2200
movss 0x38(%r14), %xmm0
movss 0x3c(%r14), %xmm1
leaq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
movl %ebp, %r8d
movl %r15d, %r9d
callq 0x3e05
leaq 0x18(%rsp), %rdi
callq 0x22d8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x22d8
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/common/Message.cpp
// Function: PrintStringID(game_info_t const*)
void
PrintStringID( const game_info_t *game )
{
  if (!debug_message) return;

  std::cerr << "    ";
  for (int i = 1, y = board_start; y <= board_end; y++, i++) {
    std::cerr << "   " << gogui_x[i];
  }
  std::cerr << std::endl;

  for (int i = 1, y = board_start; y <= board_end; y++, i++) {
    std::cerr << std::setw(3) << (pure_board_size + 1 - i) << ":";
    for (int x = board_start; x <= board_end; x++) {
      const int pos = x + y * board_size;
      if (game->string[game->string_id[pos]].flag) {
        std::cerr << " " << std::setw(3) << game->string_id[pos];
      } else {
        std::cerr << "   -";
      }
    }
    std::cerr << std::endl;
  }
  std::cerr << std::endl;
}

// Assembly:
cmpb $0x1, 0x51aad(%rip)     # 0x61430
jne 0xf9eb
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x51656(%rip), %rdi     # 0x60ff0
leaq 0x34aaa(%rip), %rsi     # 0x4444b
callq 0x63c0
leaq 0x51f13(%rip), %rax     # 0x618c0
movl (%rax), %ebp
leaq 0x349eb(%rip), %r12     # 0x443a1
leaq 0x34a8f(%rip), %r15     # 0x4444c
leaq 0x51f00(%rip), %rax     # 0x618c4
cmpl (%rax), %ebp
jg 0xf9ec
movq 0x51621(%rip), %rdi     # 0x60ff0
movq %r15, %rsi
callq 0x63c0
movsbl (%r12), %esi
movq %rax, %rdi
callq 0x6480
incl %ebp
incq %r12
jmp 0xf9bd
retq
movq 0x515fd(%rip), %rdi     # 0x60ff0
callq 0x6190
leaq 0x51ec1(%rip), %rax     # 0x618c0
movl (%rax), %ebp
leaq 0x9620(%rbx), %r15
pushq $0x1
popq %rcx
leaq 0x51eaa(%rip), %r12     # 0x618bc
leaq 0x51eab(%rip), %rax     # 0x618c4
cmpl (%rax), %ebp
jg 0xfb07
movq 0x515c8(%rip), %rdi     # 0x60ff0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x3, 0x10(%rdi,%rax)
leaq 0x51e75(%rip), %rax     # 0x618b4
movl (%rax), %esi
movl %ecx, (%rsp)
subl %ecx, %esi
incl %esi
callq 0x6700
movq %rax, %rdi
leaq 0x3463f(%rip), %rsi     # 0x44096
callq 0x63c0
leaq 0x51e5d(%rip), %rax     # 0x618c0
movslq (%rax), %r13
movl %ebp, 0x4(%rsp)
movslq %ebp, %rbp
leaq 0x51e50(%rip), %rax     # 0x618c4
cmpl (%rax), %r13d
jg 0xfaeb
movslq (%r12), %r14
imulq %rbp, %r14
addq %r13, %r14
movslq 0x95720(%rbx,%r14,4), %rax
imulq $0x7c8, %rax, %rax      # imm = 0x7C8
cmpb $0x1, 0x7c4(%r15,%rax)
jne 0xfad3
movq 0x5154b(%rip), %rdi     # 0x60ff0
leaq 0x349a2(%rip), %rsi     # 0x4444e
callq 0x63c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x3, 0x10(%rax,%rcx)
movl 0x95720(%rbx,%r14,4), %esi
movq %rax, %rdi
callq 0x6700
jmp 0xfae6
movq 0x51516(%rip), %rdi     # 0x60ff0
leaq 0x34617(%rip), %rsi     # 0x440f8
callq 0x63c0
incq %r13
jmp 0xfa6d
movq 0x514fe(%rip), %rdi     # 0x60ff0
callq 0x6190
movl 0x4(%rsp), %ebp
incl %ebp
movl (%rsp), %ecx
incl %ecx
jmp 0xfa12
movq 0x514e2(%rip), %rdi     # 0x60ff0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6190
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/common/Message.cpp
// Function: PrintStringNext(game_info_t const*)
void
PrintStringNext( const game_info_t *game )
{
  if (!debug_message) return;

  std::cerr << "    ";
  for (int i = 1, y = board_start; y <= board_end; y++, i++) {
    std::cerr << "   " << gogui_x[i];
  }
  std::cerr << std::endl;

  for (int i = 1, y = board_start; y <= board_end; y++, i++) {
    std::cerr << std::setw(3) << (pure_board_size + 1 - i);
    for (int x = board_start; x <= board_end; x++) {
      const int pos = x + y * board_size;
      if (game->string[game->string_id[pos]].flag) {
        if (game->string_next[pos] != STRING_END) {
          std::cerr << std::setw(3) << game->string_next[pos];
        } else {
          std::cerr << " END";
        }
      } else {
        std::cerr << "   -";
      }
    }
    std::cerr << std::endl;
  }
  std::cerr << std::endl;
}

// Assembly:
cmpb $0x1, 0x51908(%rip)     # 0x61430
jne 0xfb8f
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x514b1(%rip), %r14     # 0x60ff0
leaq 0x34905(%rip), %rsi     # 0x4444b
movq %r14, %rdi
callq 0x63c0
leaq 0x51d6b(%rip), %rax     # 0x618c0
movl (%rax), %ebp
leaq 0x34843(%rip), %r12     # 0x443a1
leaq 0x348e7(%rip), %r15     # 0x4444c
leaq 0x51d58(%rip), %rax     # 0x618c4
cmpl (%rax), %ebp
jg 0xfb90
movq %r14, %rdi
movq %r15, %rsi
callq 0x63c0
movsbl (%r12), %esi
movq %rax, %rdi
callq 0x6480
incl %ebp
incq %r12
jmp 0xfb65
retq
movq %r14, %rdi
callq 0x6190
leaq 0x51d21(%rip), %rax     # 0x618c0
movl (%rax), %ebp
leaq 0x9620(%rbx), %r13
pushq $0x1
popq %rcx
leaq 0x51d0a(%rip), %r15     # 0x618bc
leaq 0x51d0b(%rip), %rax     # 0x618c4
cmpl (%rax), %ebp
jg 0xfc8b
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x3, 0x10(%r14,%rax)
leaq 0x51cdc(%rip), %rax     # 0x618b4
movl (%rax), %esi
movl %ecx, (%rsp)
subl %ecx, %esi
incl %esi
movq %r14, %rdi
callq 0x6700
leaq 0x51cd0(%rip), %rax     # 0x618c0
movslq (%rax), %r12
movl %ebp, 0x4(%rsp)
movslq %ebp, %rbp
leaq 0x51cc3(%rip), %rax     # 0x618c4
cmpl (%rax), %r12d
jg 0xfc73
movslq (%r15), %rax
imulq %rbp, %rax
addq %r12, %rax
movslq 0x95720(%rbx,%rax,4), %rcx
imulq $0x7c8, %rcx, %rcx      # imm = 0x7C8
cmpb $0x1, 0x7c4(%r13,%rcx)
jne 0xfc45
movl 0x96200(%rbx,%rax,4), %esi
cmpl $0x2b7, %esi            # imm = 0x2B7
jne 0xfc56
movq %r14, %rdi
leaq 0x344ba(%rip), %rsi     # 0x440fd
jmp 0xfc4f
movq %r14, %rdi
leaq 0x344a9(%rip), %rsi     # 0x440f8
callq 0x63c0
jmp 0xfc6e
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x3, 0x10(%r14,%rax)
movq %r14, %rdi
callq 0x6700
incq %r12
jmp 0xfbfa
movq %r14, %rdi
callq 0x6190
movl 0x4(%rsp), %ebp
incl %ebp
movl (%rsp), %ecx
incl %ecx
jmp 0xfbb2
movq 0x5135e(%rip), %rdi     # 0x60ff0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6190
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/common/Message.cpp
// Function: PrintPoint(int)
void
PrintPoint( const int pos )
{
  if (!debug_message) return;

  if (pos == PASS) {
    std::cerr << "PASS" << std::endl;
  } else if (pos == RESIGN) {
    std::cerr << "RESIGN" << std::endl;
  } else {
    std::cerr << GOGUI_X(pos) << GOGUI_Y(pos) << std::endl;
  }
}

// Assembly:
cmpb $0x1, 0x50ed9(%rip)     # 0x61430
jne 0x10578
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $-0x1, %edi
je 0x10579
testl %ebx, %ebx
jne 0x1058e
movq 0x50a81(%rip), %rdi     # 0x60ff0
leaq 0x33bab(%rip), %rsi     # 0x44121
jmp 0x10587
retq
movq 0x50a70(%rip), %rdi     # 0x60ff0
leaq 0x33c52(%rip), %rsi     # 0x441d9
callq 0x63c0
jmp 0x105d5
leaq 0x51327(%rip), %r14     # 0x618bc
movl %ebx, %eax
cltd
idivl (%r14)
movslq %edx, %rax
leaq 0x33dfb(%rip), %rcx     # 0x443a0
movsbl -0x4(%rax,%rcx), %esi
movq 0x50a3f(%rip), %rdi     # 0x60ff0
callq 0x6480
movq %rax, %rdi
leaq 0x512f4(%rip), %rax     # 0x618b4
movl (%rax), %ecx
movl %ebx, %eax
cltd
idivl (%r14)
negl %eax
leal (%rcx,%rax), %esi
addl $0x5, %esi
callq 0x6700
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6190
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/common/Message.cpp
// Function: PrintResignThresholdIsTooLarge(double)
void
PrintResignThresholdIsTooLarge( const double threshold )
{
  std::ostringstream oss;

  oss << "Resign threshold = " << threshold << " is too large.\n";
  oss << "Resign threshold must be larger than or equal to 0.0, smaller than or equal to 1.0.\n";
  oss << "Ignore this setting.\n";
  std::cerr << oss.str() << std::flush;
}

// Assembly:
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movsd %xmm0, (%rsp)
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x6530
leaq 0x33adf(%rip), %rsi     # 0x44238
movq %rbx, %rdi
callq 0x63c0
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x6670
leaq 0x33ad7(%rip), %rsi     # 0x4424c
movq %rax, %rdi
callq 0x63c0
leaq 0x33ad8(%rip), %rsi     # 0x4425c
leaq 0x28(%rsp), %rdi
callq 0x63c0
leaq 0x33b1c(%rip), %rsi     # 0x442b1
leaq 0x28(%rsp), %rdi
callq 0x63c0
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6640
movq 0x5083b(%rip), %rdi     # 0x60ff0
leaq 0x8(%rsp), %rsi
callq 0x6350
movq %rax, %rdi
callq 0x6280
leaq 0x8(%rsp), %rdi
callq 0x6838
leaq 0x28(%rsp), %rdi
callq 0x60a0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
retq
jmp 0x107f5
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6838
jmp 0x107f8
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x60a0
movq %rbx, %rdi
callq 0x6740
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/common/Message.cpp
// Function: PrintResignThresholdIsTooSmall(double)
void
PrintResignThresholdIsTooSmall( const double threshold )
{
  std::ostringstream oss;

  oss << "Resign threshold = " << threshold << " is too small.\n";
  oss << "Resign threshold is set to 0.0.\n";
  oss << "Ray never resigns.\n";
  std::cerr << oss.str() << std::flush;
}

// Assembly:
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movsd %xmm0, (%rsp)
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x6530
leaq 0x33a0d(%rip), %rsi     # 0x44238
movq %rbx, %rdi
callq 0x63c0
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x6670
leaq 0x33a80(%rip), %rsi     # 0x442c7
movq %rax, %rdi
callq 0x63c0
leaq 0x33a81(%rip), %rsi     # 0x442d7
leaq 0x28(%rsp), %rdi
callq 0x63c0
leaq 0x33a91(%rip), %rsi     # 0x442f8
leaq 0x28(%rsp), %rdi
callq 0x63c0
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6640
movq 0x50769(%rip), %rdi     # 0x60ff0
leaq 0x8(%rsp), %rsi
callq 0x6350
movq %rax, %rdi
callq 0x6280
leaq 0x8(%rsp), %rdi
callq 0x6838
leaq 0x28(%rsp), %rdi
callq 0x60a0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
retq
jmp 0x108c7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6838
jmp 0x108ca
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x60a0
movq %rbx, %rdi
callq 0x6740
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/common/Message.cpp
// Function: PrintRate(game_info_t const*, int)
void
PrintRate( const game_info_t *game, const int color )
{
  std::ostringstream oss;

  oss << "Sum : " << game->sum_rate[color - 1] << "\n";

  for (int y = board_start; y <= board_end; y++) {
    oss << std::setw(6) << game->sum_rate_row[color - 1][y] << " | ";
    for (int x = board_start; x <= board_end; x++) {
      const int pos = POS(x, y);
      oss << std::setw(5) << game->rate[color - 1][pos] << " ";
    }
    oss << "\n";
  }

  std::cerr << oss.str() << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %esi, %ebx
movq %rdi, %r12
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x6530
leaq 0x33558(%rip), %rsi     # 0x4434d
movq %r14, %rdi
callq 0x63c0
movslq %ebx, %r14
movq 0x9dea0(%r12,%r14,8), %rsi
movq %rax, %rdi
callq 0x6100
leaq 0x367be(%rip), %rsi     # 0x475d5
movq %rax, %rdi
callq 0x63c0
decq %r14
leaq 0x50a97(%rip), %rax     # 0x618c0
movslq (%rax), %r15
leaq 0x9dcd8(%r12), %rax
addq $0x9a848, %r12          # imm = 0x9A848
leaq 0x50a82(%rip), %r13     # 0x618c4
imulq $0xe8, %r14, %rcx
addq %rax, %rcx
movq %rcx, (%rsp)
leaq 0x30(%rsp), %rbx
imulq $0x1a48, %r14, %r14     # imm = 0x1A48
addq %r12, %r14
leaq 0x335e8(%rip), %r12     # 0x4444e
movslq (%r13), %rax
cmpq %rax, %r15
jg 0x10f17
movq 0x30(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x6, 0x40(%rsp,%rax)
movq (%rsp), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x6100
movq %rax, %rdi
leaq 0x334b5(%rip), %rsi     # 0x44354
callq 0x63c0
leaq 0x50a15(%rip), %rax     # 0x618c0
movslq (%rax), %rbp
movq %r15, 0x8(%rsp)
movslq %r15d, %r15
cmpl (%r13), %ebp
jg 0x10efb
leaq 0x509f9(%rip), %rax     # 0x618bc
movslq (%rax), %rax
imulq %r15, %rax
movq 0x30(%rsp), %rcx
movq -0x18(%rcx), %rcx
movq $0x5, 0x40(%rsp,%rcx)
addq %rbp, %rax
movq (%r14,%rax,8), %rsi
movq %rbx, %rdi
callq 0x6100
movq %rax, %rdi
movq %r12, %rsi
callq 0x63c0
incq %rbp
jmp 0x10eb6
movq %rbx, %rdi
leaq 0x366d0(%rip), %rsi     # 0x475d5
callq 0x63c0
movq 0x8(%rsp), %r15
incq %r15
jmp 0x10e66
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x6640
movq 0x500c3(%rip), %rdi     # 0x60ff0
leaq 0x10(%rsp), %rsi
callq 0x6350
movq %rax, %rdi
callq 0x6190
leaq 0x10(%rsp), %rdi
callq 0x6838
leaq 0x30(%rsp), %rdi
callq 0x60a0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10f7a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6838
jmp 0x10f7d
jmp 0x10f7a
jmp 0x10f7a
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x60a0
movq %rbx, %rdi
callq 0x6740
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_main()
void
GTP_main( void )
{
  game = AllocateGame();
  InitializeBoard(game);

  while (fgets(input, sizeof(input), stdin) != NULL) {
    char *command;
    bool nocommand = true;
    command_id = -1;

    if (isdigit(input[0])) {
      char buf[BUF_SIZE];
      STRCPY(buf, BUF_SIZE, input);
      char *strid = STRTOK(buf, DELIM, &next_token);
      command_id = atoi(strid);
      command = STRTOK(nullptr, DELIM, &next_token);
      int offset = command - buf;
      STRCPY(input_copy, BUF_SIZE, input + offset);
    } else {
      STRCPY(input_copy, BUF_SIZE, input);
      command = STRTOK(input, DELIM, &next_token);
    }
    CHOMP(command);

    for (const GTP_command_t& cmd : gtpcmd) {
      if (!strcmp(command, cmd.command)) {
        (*cmd.function)();
        nocommand = false;
        break;
      }
    }

    if (nocommand) {
      std::cout << err_command << std::endl << std::endl;
    }

    fflush(stdin);
    fflush(stdout);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
callq 0x3b148
movq %rax, 0x50de3(%rip)     # 0x62390
movq %rax, %rdi
callq 0x3b173
movq 0x4f9d4(%rip), %rbp     # 0x60f90
leaq 0x50bbd(%rip), %rbx     # 0x62180
leaq 0x33608(%rip), %r15     # 0x44bd2
leaq 0x4ed2f(%rip), %r12     # 0x60300
movq (%rbp), %rdx
movq %rbx, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x6630
testq %rax, %rax
je 0x116e6
orl $-0x1, 0x50d96(%rip)    # 0x62388
movsbl 0x50b87(%rip), %eax     # 0x62180
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x1164c
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6380
movq %r14, %rdi
movq %r15, %rsi
callq 0x6610
movq %rax, %rdi
callq 0x6600
movl %eax, 0x50d60(%rip)     # 0x62388
xorl %edi, %edi
movq %r15, %rsi
callq 0x6610
movq %rax, %r13
subl %r14d, %eax
movslq %eax, %rsi
addq %rbx, %rsi
leaq 0x50c3b(%rip), %rdi     # 0x62280
callq 0x6380
jmp 0x11669
leaq 0x50c2d(%rip), %rdi     # 0x62280
movq %rbx, %rsi
callq 0x6380
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6610
movq %rax, %r13
movq %r13, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rax,%r13)
jne 0x1167f
movb $0x0, -0x1(%r13,%rax)
xorl %r14d, %r14d
cmpq $0x708, %r14            # imm = 0x708
je 0x116a6
leaq (%r12,%r14), %rsi
movq %r13, %rdi
callq 0x6570
addq $0x48, %r14
testl %eax, %eax
jne 0x11682
callq *-0x8(%r14,%r12)
jmp 0x116c9
movq 0x4f903(%rip), %rdi     # 0x60fb0
leaq 0x3350c(%rip), %rsi     # 0x44bc0
callq 0x63c0
movq %rax, %rdi
callq 0x6190
movq %rax, %rdi
callq 0x6190
movq (%rbp), %rdi
callq 0x6490
movq 0x4f877(%rip), %rax     # 0x60f50
movq (%rax), %rdi
callq 0x6490
jmp 0x115d1
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_boardsize()
static void
GTP_boardsize( void )
{
  char *command;
  int size;
  char buf[1024];

  StopPondering();

  command = STRTOK(NULL, DELIM, &next_token);

#if defined (_WIN32)
  sscanf_s(command, "%d", &size);
  sprintf_s(buf, 1024, " ");
#else
  sscanf(command, "%d", &size);
  snprintf(buf, 1024, " ");
#endif

  if (pure_board_size != size &&
      size <= PURE_BOARD_SIZE && size > 0) {
    SetBoardSize(size);
    SetParameter();
    SetNeighbor();
    InitializeNakadeHash();
  }

  FreeGame(game);
  game = AllocateGame();
  InitializeBoard(game);
  InitializeSearchSetting();
  InitializeUctHash();

  GTP_response(blank, true);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
callq 0x32ecd
leaq 0x334c9(%rip), %rsi     # 0x44bd2
xorl %edi, %edi
callq 0x6610
leaq 0x332d5(%rip), %rsi     # 0x449ec
leaq 0xc(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x63b0
leaq 0x50184(%rip), %rax     # 0x618b4
movl (%rbx), %edi
cmpl %edi, (%rax)
sete %al
leal -0x1(%rdi), %ecx
cmpl $0x13, %ecx
setae %cl
orb %al, %cl
jne 0x11758
callq 0x3ac8c
callq 0x32c3f
callq 0x2f7b0
callq 0x3f508
movq 0x50c31(%rip), %rdi     # 0x62390
callq 0x3b163
callq 0x3b148
movq %rax, 0x50c20(%rip)     # 0x62390
movq %rax, %rdi
callq 0x3b173
callq 0x32df4
callq 0x3d090
leaq 0x33427(%rip), %rdi     # 0x44bb0
pushq $0x1
popq %rsi
callq 0x12a66
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_clearboard()
static void
GTP_clearboard( void )
{
  StopPondering();

  player_color = S_BLACK;
  SetHandicapNum(0);
  FreeGame(game);
  game = AllocateGame();
  InitializeBoard(game);
  InitializeSearchSetting();
  InitializeUctHash();

  GTP_response(blank, true);
}

// Assembly:
pushq %rax
callq 0x32ecd
movl $0x1, 0x4fa6b(%rip)     # 0x61440
xorl %edi, %edi
callq 0x3d2b3
movq 0x509ad(%rip), %rdi     # 0x62390
callq 0x3b163
callq 0x3b148
movq %rax, 0x5099c(%rip)     # 0x62390
movq %rax, %rdi
callq 0x3b173
callq 0x32df4
callq 0x3d090
leaq 0x331a3(%rip), %rdi     # 0x44bb0
pushq $0x1
popq %rsi
popq %rax
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_finalscore()
static void
GTP_finalscore( void )
{
  char buf[10];

  StopPondering();

  double score = UctAnalyze(game, S_BLACK) - komi[0];

#if defined(_WIN32)  
  if (abs(score) < 0.1) {
    sprintf_s(buf, 10, "0");
  } else if (score > 0) {
    sprintf_s(buf, 10, "B+%.1lf", score);
  } else {
    sprintf_s(buf, 10, "W+%.1lf", -score);
  }
#else
  if (abs(score) < 0.1) {
    snprintf(buf, 10, "0");
  } else if (score > 0) {
    snprintf(buf, 10, "B+%.1lf", score);
  } else {
    snprintf(buf, 10, "W+%.1lf", -score);
  }
#endif

  GTP_response(buf, true);
}

// Assembly:
subq $0x18, %rsp
callq 0x32ecd
movq 0x5096a(%rip), %rdi     # 0x62390
pushq $0x1
popq %rsi
callq 0x33b3e
cvtsi2sd %eax, %xmm0
leaq 0x1aae64d7(%rip), %rax  # 0x1aaf7f10
subsd (%rax), %xmm0
cvttsd2si %xmm0, %eax
testl %eax, %eax
je 0x11a58
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x11a61
leaq 0x330b2(%rip), %rdx     # 0x44b08
jmp 0x11a70
movw $0x30, 0xe(%rsp)
jmp 0x11a7f
xorpd 0x325c7(%rip), %xmm0    # 0x44030
leaq 0x330a0(%rip), %rdx     # 0x44b10
leaq 0xe(%rsp), %rdi
pushq $0xa
popq %rsi
movb $0x1, %al
callq 0x6660
leaq 0xe(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x12a66
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_genmove()
static void
GTP_genmove( void )
{
  char *command;
  char c;
  char pos[10];
  int color;
  int point = PASS;

  StopPondering();

  command = STRTOK(input_copy, DELIM, &next_token);
  
  CHOMP(command);

  command = STRTOK(NULL, DELIM, &next_token);
  if (command == NULL){
    GTP_response(err_genmove, true);
    return;
  }
  CHOMP(command);
  c = static_cast<char>(tolower(static_cast<int>(command[0])));
  if (c == 'w') {
    color = S_WHITE;
  } else if (c == 'b') {
    color = S_BLACK;
  } else {
    GTP_response(err_genmove, true);
    return;
  }

  player_color = color;
  
  point = UctSearchGenmove(game, color, -1);
  if (point != RESIGN) {
    PutStone(game, point, color);
  }
  
  IntegerToString(point, pos);
  
  GTP_response(pos, true);

  UctSearchPondering(game, GetOppositeColor(color), -1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
callq 0x32ecd
leaq 0x50397(%rip), %rdi     # 0x62280
leaq 0x32ce2(%rip), %rsi     # 0x44bd2
callq 0x6610
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x11f0c
movb $0x0, -0x1(%rbx,%rax)
leaq 0x32cbf(%rip), %rsi     # 0x44bd2
xorl %edi, %edi
callq 0x6610
testq %rax, %rax
je 0x11f4e
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x11f36
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65a0
cmpb $0x77, %al
je 0x11f65
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x11f4e
pushq $0x1
jmp 0x11f67
leaq 0x32c7f(%rip), %rdi     # 0x44bd4
pushq $0x1
popq %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x12a66
pushq $0x2
popq %rbx
movl %ebx, 0x4f4d2(%rip)     # 0x61440
movq 0x5041b(%rip), %rdi     # 0x62390
pushq $-0x1
popq %rdx
movl %ebx, %esi
callq 0x32f59
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x11f96
movq 0x50403(%rip), %rdi     # 0x62390
movl %ebp, %esi
movl %ebx, %edx
callq 0x3c2f8
leaq 0x6(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
callq 0x3cc92
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x12a66
movq 0x503d9(%rip), %rdi     # 0x62390
xorl $0x3, %ebx
pushq $-0x1
popq %rdx
movl %ebx, %esi
callq 0x337f8
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_kgs_genmove_cleanup()
static void
GTP_kgs_genmove_cleanup( void )
{
  char *command;
  char c;
  char pos[10];
  int color;
  int point = PASS;

  StopPondering();
 
  command = STRTOK(input_copy, DELIM, &next_token);
  
  CHOMP(command);
  if (!strcmp("genmove_black", command)) {
    color = S_BLACK;
  } else if (!strcmp("genmove_white", command)) {
    color = S_WHITE;
  } else {
    command = STRTOK(NULL, DELIM, &next_token);
    if (command == NULL){
      GTP_response(err_genmove, false);
      return;
    }
    CHOMP(command);
    c = static_cast<char>(tolower(static_cast<int>(command[0])));
    if (c == 'w') {
      color = S_WHITE;
    } else if (c == 'b') {
      color = S_BLACK;
    } else {
      GTP_response(err_genmove, false);
      return;
    }
  }
  
  player_color = color;
  
  point = UctSearchGenmoveCleanUp(game, color);
  if (point != RESIGN) {
    PutStone(game, point, color);
  }
  
  IntegerToString(point, pos);
  
  GTP_response(pos, true);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
callq 0x32ecd
leaq 0x50261(%rip), %rdi     # 0x62280
leaq 0x32bac(%rip), %rsi     # 0x44bd2
callq 0x6610
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x12042
movb $0x0, -0x1(%rbx,%rax)
leaq 0x32ae4(%rip), %rdi     # 0x44b2d
movq %rbx, %rsi
callq 0x6570
pushq $0x1
popq %rbp
testl %eax, %eax
je 0x120af
leaq 0x32adc(%rip), %rdi     # 0x44b3b
movq %rbx, %rsi
callq 0x6570
pushq $0x2
popq %rbx
testl %eax, %eax
je 0x120b1
leaq 0x32b5d(%rip), %rsi     # 0x44bd2
xorl %edi, %edi
callq 0x6610
testq %rax, %rax
je 0x120ff
movq %rax, %r14
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%r14,%rax)
jne 0x1209a
movb $0x0, -0x1(%r14,%rax)
movsbl (%r14), %edi
callq 0x65a0
cmpb $0x77, %al
je 0x120b1
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x120ff
movl %ebp, %ebx
movl %ebx, 0x4f389(%rip)     # 0x61440
movq 0x502d2(%rip), %rdi     # 0x62390
movl %ebx, %esi
callq 0x33e81
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x120dc
movq 0x502bd(%rip), %rdi     # 0x62390
movl %ebp, %esi
movl %ebx, %edx
callq 0x3c2f8
leaq 0x6(%rsp), %rbx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x3cc92
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x12a66
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x32ace(%rip), %rdi     # 0x44bd4
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_knowncommand()
static void
GTP_knowncommand( void )
{
  char *command;
  
  command = STRTOK(NULL, DELIM, &next_token);
  
  if (command == NULL){
    GTP_response("known_command command", false);
    return;
  }
  CHOMP(command);
  for (const auto& cmd : gtpcmd) {
    if (!strcmp(command, cmd.command)) {
      GTP_response("true", true);
      return;
    }
  }
  GTP_response("false", false);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x32ab1(%rip), %rsi     # 0x44bd2
xorl %edi, %edi
callq 0x6610
testq %rax, %rax
je 0x12177
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x12144
movb $0x0, -0x1(%rbx,%rax)
xorl %r14d, %r14d
leaq 0x4e1b2(%rip), %r15     # 0x60300
cmpq $0x708, %r14            # imm = 0x708
je 0x12180
leaq (%r15,%r14), %rsi
movq %rbx, %rdi
callq 0x6570
addq $0x48, %r14
testl %eax, %eax
jne 0x1214e
leaq 0x329ed(%rip), %rdi     # 0x44b5f
pushq $0x1
popq %rsi
jmp 0x12189
leaq 0x329cb(%rip), %rdi     # 0x44b49
jmp 0x12187
leaq 0x329dd(%rip), %rdi     # 0x44b64
xorl %esi, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_komi()
static void
GTP_komi( void )
{
  char* c_komi;

  StopPondering();

  c_komi = STRTOK(NULL, DELIM, &next_token);

  if (c_komi != NULL) {
    SetKomi(atof(c_komi));
    PrintKomiValue();
    GTP_response(blank, true);
  } else {
    GTP_response(err_komi, false);
  }
}

// Assembly:
pushq %rax
callq 0x32ecd
leaq 0x32a32(%rip), %rsi     # 0x44bd2
xorl %edi, %edi
callq 0x6610
testq %rax, %rax
je 0x121ce
movq %rax, %rdi
callq 0x64d0
callq 0x3b0f3
callq 0x105e4
leaq 0x329eb(%rip), %rdi     # 0x44bb0
pushq $0x1
popq %rsi
popq %rax
jmp 0x12a66
leaq 0x32b5b(%rip), %rdi     # 0x44d30
xorl %esi, %esi
popq %rax
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_listcommands()
static void
GTP_listcommands( void )
{
  char list[2048];
  int i;

  i = 0;
  for (const auto& cmd : gtpcmd) {
    list[i++] = '\n';
    for (unsigned int k = 0; k < strlen(cmd.command); k++){
      list[i++] = cmd.command[k];
    }
  }
  list[i++] = '\0';

  GTP_response(list, true);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
xorl %r14d, %r14d
leaq 0x4e109(%rip), %r15     # 0x60300
xorl %eax, %eax
movslq %eax, %r12
cmpq $0x708, %r14            # imm = 0x708
je 0x12240
leaq (%r15,%r14), %rbx
leaq (%rsp,%r12), %r13
incq %r13
movb $0xa, -0x1(%r13)
movq %rbx, %rdi
callq 0x6150
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x12233
movl %ecx, %edx
movb (%rbx,%rdx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
jmp 0x1221f
addq $0x48, %r14
leaq (%r12,%rcx), %rax
incq %rax
jmp 0x121f9
movb $0x0, (%rsp,%r12)
movq %rsp, %rdi
pushq $0x1
popq %rsi
callq 0x12a66
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_lz_analyze()
void GTP_lz_analyze( void )
{
  char *command;
  int color = S_EMPTY, centi_second = 100;

  StopPondering();

  command = STRTOK(input_copy, DELIM, &next_token);
  CHOMP(command);

  ParseAnalysisTag(color, centi_second);

  bool old_pondering_mode = pondering_mode;
  SetPonderingMode(true);

  if (color == S_EMPTY) {
    color = player_color;
  } else {
    player_color = color;
  }

  if (command_id >= 0) {
    std::cout << "=" << command_id << " " << std::endl;
  } else {
    std::cout << "= " << std::endl;
  }

  UctSearchPondering(game, color, centi_second);

  while (!InputPending()) {
    std::this_thread::yield();
  }

  StopPondering();
  SetPonderingMode(old_pondering_mode);

  std::cout << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
andl $0x0, 0xc(%rsp)
movl $0x64, 0x8(%rsp)
callq 0x32ecd
leaq 0x4fdda(%rip), %rdi     # 0x62280
leaq 0x32725(%rip), %rsi     # 0x44bd2
callq 0x6610
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x124c9
movb $0x0, -0x1(%rbx,%rax)
leaq 0xc(%rsp), %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x12b0e
leaq 0x1aab445a(%rip), %rax  # 0x1aac693c
movb (%rax), %bpl
pushq $0x1
popq %rdi
callq 0x32c28
movl (%rbx), %ebx
testl %ebx, %ebx
je 0x124fb
movl %ebx, 0x4ef47(%rip)     # 0x61440
jmp 0x12501
movl 0x4ef3f(%rip), %ebx     # 0x61440
cmpl $0x0, 0x4fe80(%rip)     # 0x62388
js 0x12537
movq 0x4ea9f(%rip), %rdi     # 0x60fb0
leaq 0x324d7(%rip), %rsi     # 0x449ef
callq 0x63c0
movl 0x4fe65(%rip), %esi     # 0x62388
movq %rax, %rdi
callq 0x6700
leaq 0x326a0(%rip), %rsi     # 0x44bd2
movq %rax, %rdi
jmp 0x12545
movq 0x4ea72(%rip), %rdi     # 0x60fb0
leaq 0x31d04(%rip), %rsi     # 0x44249
callq 0x63c0
movq %rax, %rdi
callq 0x6190
movq 0x4fe37(%rip), %rdi     # 0x62390
movl 0x8(%rsp), %edx
movl %ebx, %esi
callq 0x337f8
pushq $0x1
popq %rbx
leaq 0x28(%rsp), %r14
leaq 0x10(%rsp), %r15
xorl %eax, %eax
cmpq $0x10, %rax
je 0x12584
andq $0x0, 0x28(%rsp,%rax,8)
incq %rax
jmp 0x12573
orb $0x1, 0x28(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movl %ebx, %edi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r15, %r8
callq 0x63a0
testb $0x1, 0x28(%rsp)
jne 0x125b0
callq 0x65c0
jmp 0x12571
callq 0x32ecd
movzbl %bpl, %edi
callq 0x32c28
movq 0x4e9eb(%rip), %rdi     # 0x60fb0
callq 0x6190
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_lz_genmove_analyze()
static void
GTP_lz_genmove_analyze( void )
{
  char *command;
  char pos[10];
  int color = S_EMPTY, centi_second = 100;
  int point = PASS;

  StopPondering();

  command = STRTOK(input_copy, DELIM, &next_token);
  CHOMP(command);

  ParseAnalysisTag(color, centi_second);

  if (color == S_EMPTY) {
    color = player_color;
  } else {
    player_color = color;
  }

  if (command_id >= 0) {
    std::cout << "=" << command_id << " " << std::endl;
  } else {
    std::cout << "= " << std::endl;
  }

  point = UctSearchGenmove(game, color, centi_second);

  if (point != RESIGN) {
    PutStone(game, point, color);
  }
  IntegerToString(point, pos);
  std::cout << "play " << pos << std::endl << std::endl;

  UctSearchPondering(game, GetOppositeColor(color), -1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
andl $0x0, 0x10(%rsp)
movl $0x64, 0xc(%rsp)
callq 0x32ecd
leaq 0x4fc87(%rip), %rdi     # 0x62280
leaq 0x325d2(%rip), %rsi     # 0x44bd2
callq 0x6610
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x1261c
movb $0x0, -0x1(%rbx,%rax)
leaq 0x10(%rsp), %rbx
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x12b0e
movl (%rbx), %ebx
testl %ebx, %ebx
je 0x1263c
movl %ebx, 0x4ee06(%rip)     # 0x61440
jmp 0x12642
movl 0x4edfe(%rip), %ebx     # 0x61440
cmpl $0x0, 0x4fd3f(%rip)     # 0x62388
js 0x12678
movq 0x4e95e(%rip), %rdi     # 0x60fb0
leaq 0x32396(%rip), %rsi     # 0x449ef
callq 0x63c0
movl 0x4fd24(%rip), %esi     # 0x62388
movq %rax, %rdi
callq 0x6700
leaq 0x3255f(%rip), %rsi     # 0x44bd2
movq %rax, %rdi
jmp 0x12686
movq 0x4e931(%rip), %rdi     # 0x60fb0
leaq 0x31bc3(%rip), %rsi     # 0x44249
callq 0x63c0
movq %rax, %rdi
callq 0x6190
movq 0x4fcf6(%rip), %rdi     # 0x62390
movl 0xc(%rsp), %edx
movl %ebx, %esi
callq 0x32f59
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x126bc
movq 0x4fcdd(%rip), %rdi     # 0x62390
movl %ebp, %esi
movl %ebx, %edx
callq 0x3c2f8
leaq 0x16(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
callq 0x3cc92
movq 0x4e8de(%rip), %rdi     # 0x60fb0
leaq 0x3231b(%rip), %rsi     # 0x449f4
callq 0x63c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x63c0
movq %rax, %rdi
callq 0x6190
movq %rax, %rdi
callq 0x6190
movq 0x4fc90(%rip), %rdi     # 0x62390
xorl $0x3, %ebx
pushq $-0x1
popq %rdx
movl %ebx, %esi
callq 0x337f8
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_play()
static void
GTP_play( void )
{
  char *command;
  char c;
  int color, pos = 0;

  StopPondering();

  command = STRTOK(input_copy, DELIM, &next_token);

  command = STRTOK(NULL, DELIM, &next_token);
  if (command == NULL){
    GTP_response(err_play, false);
    return;
  }
  CHOMP(command);
  c = static_cast<char>(tolower(static_cast<int>(command[0])));
  if (c == 'w') {
    color = S_WHITE;
  } else{
    color = S_BLACK;
  }

  command = STRTOK(NULL, DELIM, &next_token);
  
  CHOMP(command);
  if (command == NULL){
    GTP_response(err_play, false);
    return;
  } else {
    pos = StringToInteger(command);
  }

  if (pos != RESIGN) {
    PutStone(game, pos, color);
  }
  
  GTP_response(blank, true);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
callq 0x32ecd
leaq 0x4fb4b(%rip), %rdi     # 0x62280
leaq 0x32496(%rip), %rbx     # 0x44bd2
movq %rbx, %rsi
callq 0x6610
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6610
testq %rax, %rax
je 0x127cf
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x1276a
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65a0
xorl %ebx, %ebx
cmpb $0x77, %al
sete %bpl
leaq 0x32451(%rip), %rsi     # 0x44bd2
xorl %edi, %edi
callq 0x6610
movq %rax, %r14
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%r14,%rax)
jne 0x127a1
movb $0x0, -0x1(%r14,%rax)
movq %r14, %rdi
callq 0x3cbe4
cmpl $-0x1, %eax
je 0x127c3
movb %bpl, %bl
incl %ebx
movq 0x4fbd6(%rip), %rdi     # 0x62390
movl %eax, %esi
movl %ebx, %edx
callq 0x3c2f8
leaq 0x323e6(%rip), %rdi     # 0x44bb0
pushq $0x1
popq %rsi
jmp 0x127d8
leaq 0x3256a(%rip), %rdi     # 0x44d40
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_set_free_handicap()
static void
GTP_set_free_handicap( void )
{
  char *command;
  int pos, num = 0;

  StopPondering();
  
  while (1){
    command = STRTOK(NULL, DELIM, &next_token);

    if (command == NULL){
      SetHandicapNum(num);
      SetKomi(0.5);
      GTP_response(blank, true);
      return;
    }
    
    pos = StringToInteger(command);
    
    if (pos > 0 && pos < board_max && IsLegal(game, pos, S_BLACK)) {
      PutStone(game, pos, S_BLACK);
      num++;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
callq 0x32ecd
xorl %ebx, %ebx
leaq 0x323b5(%rip), %r14     # 0x44bd2
leaq 0x4f094(%rip), %r12     # 0x618b8
pushq $0x1
popq %rbp
xorl %edi, %edi
movq %r14, %rsi
callq 0x6610
testq %rax, %rax
je 0x12875
movq %rax, %rdi
callq 0x3cbe4
testl %eax, %eax
jle 0x12827
movl %eax, %r15d
cmpl (%r12), %eax
jge 0x12827
movq 0x4fb3e(%rip), %rdi     # 0x62390
movl %r15d, %esi
movl %ebp, %edx
callq 0x3bc4c
testb %al, %al
je 0x12827
movq 0x4fb29(%rip), %rdi     # 0x62390
movl %r15d, %esi
movl %ebp, %edx
callq 0x3c2f8
incl %ebx
jmp 0x12827
movl %ebx, %edi
callq 0x3d2b3
movsd 0x3178c(%rip), %xmm0    # 0x44010
callq 0x3b0f3
leaq 0x32320(%rip), %rdi     # 0x44bb0
pushq $0x1
popq %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_timeleft()
static void
GTP_timeleft( void )
{
  char *str1, *str2;

  str1 = STRTOK(NULL, DELIM, &next_token);
  str2 = STRTOK(NULL, DELIM, &next_token);
  
  if (str1[0] == 'B' || str1[0] == 'b'){
    SetCurrentRemainingTime(S_BLACK, atof(str2));
  } else if (str1[0] == 'W' || str1[0] == 'w'){
    SetCurrentRemainingTime(S_WHITE, atof(str2));
  }
  
  fprintf(stderr, "%f\n", GetRemainingTime(S_BLACK));
  fprintf(stderr, "%f\n", GetRemainingTime(S_WHITE));
  GTP_response(blank, true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x32307(%rip), %rbx     # 0x44bd2
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6610
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6610
movzbl (%r14), %ecx
pushq $0x1
popq %rbx
cmpl $0x42, %ecx
je 0x12900
cmpl $0x77, %ecx
je 0x128fd
cmpl $0x62, %ecx
je 0x12900
cmpl $0x57, %ecx
jne 0x1290f
pushq $0x2
popq %rbx
movq %rax, %rdi
callq 0x64d0
movl %ebx, %edi
callq 0x35876
movq 0x4e6a2(%rip), %r15     # 0x60fb8
movq (%r15), %rbx
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0x35886
leaq 0x32278(%rip), %r14     # 0x44ba2
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x6590
movq (%r15), %rbx
pushq $0x2
popq %rdi
callq 0x35886
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x6590
leaq 0x3225a(%rip), %rdi     # 0x44bb0
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_timesettings()
static void
GTP_timesettings( void )
{
  char *str1, *str2, *str3;
  double main_time, byoyomi, stone;

  str1 = STRTOK(NULL, DELIM, &next_token);
  str2 = STRTOK(NULL, DELIM, &next_token);
  str3 = STRTOK(NULL, DELIM, &next_token);

  main_time = atoi(str1);
  byoyomi = atoi(str2);
  stone = atoi(str3);

  std::cerr << main_time << "," << byoyomi << "," << stone << std::endl;

  SetTimeSettings(main_time, byoyomi, stone);
  InitializeSearchSetting();
  
  GTP_response(blank, true);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
leaq 0x32258(%rip), %rbx     # 0x44bd2
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6610
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6610
movq %rax, %r15
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6610
movq %rax, %r12
movq %r14, %rdi
callq 0x6600
movl %eax, %ebx
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
callq 0x6600
movl %eax, %ebp
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r12, %rdi
callq 0x6600
movl %eax, %r14d
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x4e60b(%rip), %rdi     # 0x60ff0
movsd 0x8(%rsp), %xmm0
callq 0x6670
leaq 0x320d6(%rip), %r15     # 0x44acd
movq %rax, %rdi
movq %r15, %rsi
callq 0x63c0
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6670
movq %rax, %rdi
movq %r15, %rsi
callq 0x63c0
movq %rax, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x6670
movq %rax, %rdi
callq 0x6190
movl %ebx, %edi
movl %ebp, %esi
movl %r14d, %edx
callq 0x35976
callq 0x32df4
leaq 0x32167(%rip), %rdi     # 0x44bb0
pushq $0x1
popq %rsi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x12a66
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_response(char const*, bool)
static void
GTP_response( const char *res, const bool success )
{
  if (success){
    if (command_id >= 0) {
      std::cout << "=" << command_id << " " << res << std::endl << std::endl;
    } else {
      std::cout << "= " << res << std::endl << std::endl;
    }
  } else {
    std::cout << "? ";
    if (res != NULL) {
      std::cout << res;
    }
    std::cout << std::endl << std::endl;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x12aa7
cmpl $0x0, 0x4f910(%rip)     # 0x62388
js 0x12ad6
movq 0x4e52f(%rip), %rdi     # 0x60fb0
leaq 0x31f67(%rip), %rsi     # 0x449ef
callq 0x63c0
movl 0x4f8f5(%rip), %esi     # 0x62388
movq %rax, %rdi
callq 0x6700
leaq 0x32130(%rip), %rsi     # 0x44bd2
movq %rax, %rdi
jmp 0x12ae4
movq 0x4e502(%rip), %r14     # 0x60fb0
leaq 0x31f3c(%rip), %rsi     # 0x449f1
movq %r14, %rdi
callq 0x63c0
testq %rbx, %rbx
je 0x12af7
movq 0x4e4e7(%rip), %r14     # 0x60fb0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x63c0
jmp 0x12af7
movq 0x4e4d3(%rip), %rdi     # 0x60fb0
leaq 0x31765(%rip), %rsi     # 0x44249
callq 0x63c0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x63c0
movq %rax, %r14
movq %r14, %rdi
callq 0x6190
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6190
// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/./include/mcts/AnalysisData.hpp
// Function: PrincipalVariationData::PrincipalVariationData(uct_node_t const&, int, int)
PrincipalVariationData( const uct_node_t &root, const int child_index, const int depth_limit = 100 )
    : move(root.child[child_index].pos), playout_win_rate(CalculateWinningRate(root.child[child_index])),
      prior(root.child[child_index].rate), visits(root.child[child_index].move_count.load()), pv_depth_limit(depth_limit)
  {
    const child_node_t &child = root.child[child_index];

    pv.push_back(ParsePoint(child.pos));

    int index = child.index;

    while (pv.size() < pv_depth_limit && index != NOT_EXPANDED) {
      const uct_node_t &node = GetNode(index);
      const child_node_t *children = node.child;
      const int num_children = node.child_num;

      if (node.move_count == 0) {
        break;
      }

      int max_count = children[PASS_INDEX].move_count;
      int max_index = PASS_INDEX;

      for (int i = 1; i < num_children; i++) {
        if (children[i].move_count > max_count) {
          max_count = children[i].move_count;
          max_index = i;
        }
      }

      pv.push_back(ParsePoint(children[max_index].pos));
      index= children[max_index].index;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movq %rdi, %r14
movslq %edx, %rax
imulq $0x1c, %rax, %rax
leaq (%rsi,%rax), %r15
addq $0x1c, %r15
movswl (%r15), %eax
movl %eax, (%rdi)
movq %r15, %rdi
callq 0x328e6
movsd %xmm0, 0x8(%r14)
cvtss2sd 0x14(%r15), %xmm0
movsd %xmm0, 0x10(%r14)
movl 0x4(%r15), %eax
movl %eax, 0x18(%r14)
movl %ebx, 0x1c(%r14)
leaq 0x20(%r14), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
andq $0x0, 0x30(%r14)
movswl (%r15), %esi
leaq 0x8(%rsp), %rdi
callq 0x3cd06
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x13506
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6838
pushq $0x1
popq %r13
movq 0x28(%r14), %rax
subq 0x20(%r14), %rax
sarq $0x5, %rax
movl 0x1c(%r14), %ecx
cmpq %rcx, %rax
jae 0x13226
movl 0x10(%r15), %edi
cmpl $-0x1, %edi
je 0x13226
callq 0x32c00
movslq 0x18(%rax), %rcx
movl 0x8(%rax), %edx
testl %edx, %edx
je 0x13226
leaq 0x1c(%rax), %r15
movl 0x20(%rax), %edx
addq $0x3c, %rax
xorl %edi, %edi
movq %r13, %rsi
cmpq %rcx, %rsi
jge 0x131f7
movl (%rax), %r8d
cmpl %edx, %r8d
jle 0x131ee
movl (%rax), %edx
movl %esi, %edi
incq %rsi
addq $0x1c, %rax
jmp 0x131dd
movslq %edi, %rax
imulq $0x1c, %rax, %rbp
movswl (%r15,%rbp), %esi
movq %r12, %rdi
callq 0x3cd06
movq %rbx, %rdi
movq %r12, %rsi
callq 0x13506
addq %rbp, %r15
movq %r12, %rdi
callq 0x6838
jmp 0x1319f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1323b
jmp 0x1324a
jmp 0x1324a
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x6838
jmp 0x1324d
movq %rax, %r14
movq %rbx, %rdi
callq 0x134e4
movq %r14, %rdi
callq 0x6740
nop