LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x56bb4(%rip), %rbx     # 0x5d402
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6640
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6640
movzbl (%r14), %ecx
pushq $0x1
popq %rbx
cmpl $0x42, %ecx
je 0x6883
cmpl $0x77, %ecx
je 0x6880
cmpl $0x62, %ecx
je 0x6883
cmpl $0x57, %ecx
jne 0x6892
pushq $0x2
popq %rbx
movq %rax, %rdi
callq 0x6500
movl %ebx, %edi
callq 0x4d456
movq 0x6f717(%rip), %r15     # 0x75fb0
movq (%r15), %rbx
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0x4d466
leaq 0x574a7(%rip), %r14     # 0x5dd54
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x65b0
movq (%r15), %rbx
pushq $0x2
popq %rdi
callq 0x4d466
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x65b0
leaq 0x56b07(%rip), %rdi     # 0x5d3e0
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
cmpb $0x1, 0x57c1e(%rip)     # 0x76430
jne 0x1e8fd
movl %edi, %ebx
cmpl $-0x1, %edi
je 0x1e838
testl %ebx, %ebx
jne 0x1e881
movq 0x577be(%rip), %rbx     # 0x75fe8
leaq 0x3e8f0(%rip), %rsi     # 0x5d121
movl $0x4, %edx
jmp 0x1e84b
movq 0x577a9(%rip), %rbx     # 0x75fe8
leaq 0x3e993(%rip), %rsi     # 0x5d1d9
movl $0x6, %edx
movq %rbx, %rdi
callq 0x6490
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6290
leaq 0x58034(%rip), %r14     # 0x768bc
movl %ebx, %eax
cltd
idivl (%r14)
movslq %edx, %rax
leaq 0x3eb08(%rip), %rcx     # 0x5d3a0
movb -0x4(%rax,%rcx), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movq 0x5773e(%rip), %rdi     # 0x75fe8
movl $0x1, %edx
callq 0x6490
movq %rax, %rdi
leaq 0x57ff6(%rip), %rax     # 0x768b4
movl (%rax), %ecx
movl %ebx, %eax
cltd
idivl (%r14)
negl %eax
leal (%rcx,%rax), %esi
addl $0x5, %esi
callq 0x6730
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6550
leaq 0x3e6bf(%rip), %rsi     # 0x5d238
movl $0x13, %edx
movq %rbx, %rdi
callq 0x6490
leaq 0x28(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x6690
leaq 0x3e6b0(%rip), %rsi     # 0x5d24c
movl $0xf, %edx
movq %rax, %rdi
callq 0x6490
leaq 0x3e6ac(%rip), %rsi     # 0x5d25c
leaq 0x28(%rsp), %rdi
movl $0x54, %edx
callq 0x6490
leaq 0x3e6eb(%rip), %rsi     # 0x5d2b1
leaq 0x28(%rsp), %rdi
movl $0x15, %edx
callq 0x6490
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6670
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x573f3(%rip), %rdi     # 0x75fe8
callq 0x6490
movq %rax, %rdi
callq 0x6290
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ec1d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x57374(%rip), %rsi     # 0x75f98
leaq 0x28(%rsp), %rdi
callq 0x61e0
leaq 0x98(%rsp), %rdi
callq 0x60f0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
retq
jmp 0x1ec66
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ec69
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6410
jmp 0x1ec69
movq %rax, %rbx
movq 0x57328(%rip), %rsi     # 0x75f98
leaq 0x28(%rsp), %rdi
callq 0x61e0
leaq 0x98(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6760
// File: /workspace/github_cpp_makefile_star2_O3/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 0x6550
leaq 0x3e588(%rip), %rsi     # 0x5d238
movl $0x13, %edx
movq %rbx, %rdi
callq 0x6490
leaq 0x28(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x6690
leaq 0x3e5f4(%rip), %rsi     # 0x5d2c7
movl $0xf, %edx
movq %rax, %rdi
callq 0x6490
leaq 0x3e5f0(%rip), %rsi     # 0x5d2d7
leaq 0x28(%rsp), %rdi
movl $0x20, %edx
callq 0x6490
leaq 0x3e5fb(%rip), %rsi     # 0x5d2f8
leaq 0x28(%rsp), %rdi
movl $0x13, %edx
callq 0x6490
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6670
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x572bc(%rip), %rdi     # 0x75fe8
callq 0x6490
movq %rax, %rdi
callq 0x6290
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ed54
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x5723d(%rip), %rsi     # 0x75f98
leaq 0x28(%rsp), %rdi
callq 0x61e0
leaq 0x98(%rsp), %rdi
callq 0x60f0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
retq
jmp 0x1ed9d
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1eda0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6410
jmp 0x1eda0
movq %rax, %rbx
movq 0x571f1(%rip), %rsi     # 0x75f98
leaq 0x28(%rsp), %rdi
callq 0x61e0
leaq 0x98(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6760
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a986
leaq 0x3cffd(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6640
leaq 0x3d78b(%rip), %rsi     # 0x5db9e
leaq 0xc(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x63d0
leaq 0x56488(%rip), %rax     # 0x768b4
movl (%rbx), %edi
cmpl %edi, (%rax)
sete %al
leal -0x1(%rdi), %ecx
cmpl $0x13, %ecx
setae %cl
orb %al, %cl
jne 0x20454
callq 0x53d6c
callq 0x4a4db
callq 0x463bc
callq 0x58fe8
movq 0x56f35(%rip), %rdi     # 0x77390
callq 0x543c1
callq 0x543a6
movq %rax, 0x56f24(%rip)     # 0x77390
movq %rax, %rdi
callq 0x543d1
callq 0x4a849
callq 0x56a78
leaq 0x3cf5b(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
callq 0x21a05
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a986
movl $0x1, 0x55c86(%rip)     # 0x76440
xorl %edi, %edi
callq 0x56cd3
movq 0x56bc8(%rip), %rdi     # 0x77390
callq 0x543c1
callq 0x543a6
movq %rax, 0x56bb7(%rip)     # 0x77390
movq %rax, %rdi
callq 0x543d1
callq 0x4a849
callq 0x56a78
leaq 0x3cbee(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
popq %rax
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a986
movq 0x56b83(%rip), %rdi     # 0x77390
movl $0x1, %esi
callq 0x4b6c1
cvtsi2sd %eax, %xmm0
leaq 0x1aaec6ee(%rip), %rax  # 0x1ab0cf10
subsd (%rax), %xmm0
cvttsd2si %xmm0, %eax
testl %eax, %eax
je 0x20841
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2084a
leaq 0x3d47b(%rip), %rdx     # 0x5dcba
jmp 0x20859
movw $0x30, 0xe(%rsp)
jmp 0x2086a
xorpd 0x3c7de(%rip), %xmm0    # 0x5d030
leaq 0x3d469(%rip), %rdx     # 0x5dcc2
leaq 0xe(%rsp), %rdi
movl $0xa, %esi
movb $0x1, %al
callq 0x6680
leaq 0xe(%rsp), %rdi
movl $0x1, %esi
callq 0x21a05
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a986
leaq 0x56552(%rip), %rdi     # 0x77280
leaq 0x3c6cd(%rip), %rsi     # 0x5d402
callq 0x6640
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x20d51
movb $0x0, -0x1(%rbx,%rax)
leaq 0x3c6aa(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6640
testq %rax, %rax
je 0x20d96
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x20d7b
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65c0
cmpb $0x77, %al
je 0x20daf
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x20d96
movl $0x1, %ebx
jmp 0x20db4
leaq 0x3c667(%rip), %rdi     # 0x5d404
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21a05
movl $0x2, %ebx
movl %ebx, 0x55686(%rip)     # 0x76440
movq 0x565cf(%rip), %rdi     # 0x77390
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4aa17
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x20de4
movq 0x565b5(%rip), %rdi     # 0x77390
movl %ebp, %esi
movl %ebx, %edx
callq 0x55ae8
leaq 0x6(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
callq 0x56441
movq %r14, %rdi
movl $0x1, %esi
callq 0x21a05
movq 0x56589(%rip), %rdi     # 0x77390
xorl $0x3, %ebx
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4b349
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a986
leaq 0x5640b(%rip), %rdi     # 0x77280
leaq 0x3c586(%rip), %rsi     # 0x5d402
callq 0x6640
movq %rax, %r14
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%r14,%rax)
jne 0x20e9a
movb $0x0, -0x1(%r14,%rax)
leaq 0x3ce3e(%rip), %rdi     # 0x5dcdf
movq %r14, %rsi
callq 0x6580
movl $0x1, %ebx
testl %eax, %eax
je 0x20f14
leaq 0x3ce34(%rip), %rdi     # 0x5dced
movq %r14, %rsi
callq 0x6580
movl $0x2, %ebx
testl %eax, %eax
je 0x20f14
leaq 0x3c531(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6640
testq %rax, %rax
je 0x20f64
movq %rax, %r14
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%r14,%rax)
jne 0x20efa
movb $0x0, -0x1(%r14,%rax)
movsbl (%r14), %edi
callq 0x65c0
cmpb $0x77, %al
je 0x20f14
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x20f64
movl $0x1, %ebx
movl %ebx, 0x55526(%rip)     # 0x76440
movq 0x5646f(%rip), %rdi     # 0x77390
movl %ebx, %esi
callq 0x4ba38
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x20f3f
movq 0x5645a(%rip), %rdi     # 0x77390
movl %ebp, %esi
movl %ebx, %edx
callq 0x55ae8
leaq 0x6(%rsp), %rbx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x56441
movq %rbx, %rdi
movl $0x1, %esi
callq 0x21a05
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3c499(%rip), %rdi     # 0x5d404
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3c47c(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6640
testq %rax, %rax
je 0x20fd9
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x20fa9
movb $0x0, -0x1(%rbx,%rax)
xorl %r14d, %r14d
leaq 0x5433d(%rip), %r15     # 0x752f0
leaq (%r15,%r14), %rsi
movq %rbx, %rdi
callq 0x6580
testl %eax, %eax
je 0x20fe4
addq $0x48, %r14
cmpq $0x708, %r14            # imm = 0x708
jne 0x20fb3
leaq 0x3cd3f(%rip), %rdi     # 0x5dd16
jmp 0x20fe0
leaq 0x3cd1b(%rip), %rdi     # 0x5dcfb
xorl %esi, %esi
jmp 0x20ff0
leaq 0x3cd26(%rip), %rdi     # 0x5dd11
movl $0x1, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a986
leaq 0x3c3fb(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6640
testq %rax, %rax
je 0x21037
movq %rax, %rdi
callq 0x6500
callq 0x54351
callq 0x1e905
leaq 0x3c3b4(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
popq %rax
jmp 0x21a05
leaq 0x3c522(%rip), %rdi     # 0x5d560
xorl %esi, %esi
popq %rax
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
subq $0x800, %rsp            # imm = 0x800
xorl %ebx, %ebx
leaq 0x54295(%rip), %r14     # 0x752f0
xorl %r15d, %r15d
leaq (%r14,%r15), %rdi
movslq %ebx, %rbx
movb $0xa, (%rsp,%rbx)
callq 0x6160
incl %ebx
testq %rax, %rax
je 0x21096
movslq %ebx, %rcx
leaq (%rsp,%rcx), %rdx
xorl %ecx, %ecx
leaq (%r15,%rcx), %rsi
movb (%r14,%rsi), %sil
movb %sil, (%rdx,%rcx)
incq %rcx
movl %ecx, %esi
cmpq %rsi, %rax
ja 0x2107e
addl %ecx, %ebx
addq $0x48, %r15
cmpq $0x708, %r15            # imm = 0x708
jne 0x2105e
movslq %ebx, %rax
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
movl $0x1, %esi
callq 0x21a05
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl $0x0, 0x8(%rsp)
movl $0x64, 0x4(%rsp)
callq 0x4a986
leaq 0x55d28(%rip), %rdi     # 0x77280
leaq 0x3bea3(%rip), %rsi     # 0x5d402
callq 0x6640
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x2157b
movb $0x0, -0x1(%rbx,%rax)
leaq 0x8(%rsp), %rbx
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x21b50
movl (%rbx), %ebx
testl %ebx, %ebx
je 0x2159b
movl %ebx, 0x54ea7(%rip)     # 0x76440
jmp 0x215a1
movl 0x54e9f(%rip), %ebx     # 0x76440
cmpl $0x0, 0x55de0(%rip)     # 0x77388
js 0x215e7
movq 0x549f7(%rip), %r14     # 0x75fa8
leaq 0x3c5e9(%rip), %rsi     # 0x5dba1
movl $0x1, %edx
movq %r14, %rdi
callq 0x6490
movl 0x55dbd(%rip), %esi     # 0x77388
movq %r14, %rdi
callq 0x6730
movq %rax, %r14
leaq 0x3be25(%rip), %rsi     # 0x5d402
movl $0x1, %edx
movq %rax, %rdi
jmp 0x215fd
movq 0x549ba(%rip), %r14     # 0x75fa8
leaq 0x3bc54(%rip), %rsi     # 0x5d249
movl $0x2, %edx
movq %r14, %rdi
callq 0x6490
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movq 0x55d60(%rip), %rdi     # 0x77390
movl 0x4(%rsp), %edx
movl %ebx, %esi
callq 0x4aa17
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x21652
movq 0x55d47(%rip), %rdi     # 0x77390
movl %ebp, %esi
movl %ebx, %edx
callq 0x55ae8
leaq 0xe(%rsp), %r15
movl %ebp, %edi
movq %r15, %rsi
callq 0x56441
movq 0x54940(%rip), %r14     # 0x75fa8
leaq 0x3c537(%rip), %rsi     # 0x5dba6
movl $0x5, %edx
movq %r14, %rdi
callq 0x6490
movq %r15, %rdi
callq 0x6160
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x6490
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movq 0x55ca6(%rip), %rdi     # 0x77390
xorl $0x3, %ebx
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4b349
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a986
leaq 0x55b5b(%rip), %rdi     # 0x77280
leaq 0x3bcd6(%rip), %rbx     # 0x5d402
movq %rbx, %rsi
callq 0x6640
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6640
testq %rax, %rax
je 0x217c1
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x2175a
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65c0
xorl %ebx, %ebx
cmpb $0x77, %al
sete %bpl
leaq 0x3bc91(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6640
movq %rax, %r14
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%r14,%rax)
jne 0x21791
movb $0x0, -0x1(%r14,%rax)
movq %r14, %rdi
callq 0x563ac
cmpl $-0x1, %eax
je 0x217b3
movb %bpl, %bl
incl %ebx
movq 0x55be6(%rip), %rdi     # 0x77390
movl %eax, %esi
movl %ebx, %edx
callq 0x55ae8
leaq 0x3bc26(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
jmp 0x217ca
leaq 0x3bda8(%rip), %rdi     # 0x5d570
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
pushq %rax
callq 0x4a986
leaq 0x3bbf2(%rip), %rsi     # 0x5d402
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x6640
testq %rax, %rax
je 0x2187c
xorl %ebx, %ebx
leaq 0x55091(%rip), %r15     # 0x768b8
leaq 0x3bbd4(%rip), %r14     # 0x5d402
movq %rax, %rdi
callq 0x563ac
testl %eax, %eax
jle 0x2186d
movl %eax, %ebp
cmpl (%r15), %eax
jge 0x2186d
movq 0x55b48(%rip), %rdi     # 0x77390
movl %ebp, %esi
movl $0x1, %edx
callq 0x55478
testb %al, %al
je 0x2186d
movq 0x55b31(%rip), %rdi     # 0x77390
movl %ebp, %esi
movl $0x1, %edx
callq 0x55ae8
incl %ebx
xorl %edi, %edi
movq %r14, %rsi
callq 0x6640
testq %rax, %rax
jne 0x2182e
movl %ebx, %edi
callq 0x56cd3
movsd 0x3b785(%rip), %xmm0    # 0x5d010
callq 0x54351
leaq 0x3bb49(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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 0x3bb25(%rip), %rbx     # 0x5d402
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6640
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6640
movq %rax, %r15
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6640
movq %rax, %r12
movq %r14, %rdi
callq 0x6630
movl %eax, %ebx
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
callq 0x6630
movl %eax, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r12, %rdi
callq 0x6630
movl %eax, %r14d
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x5469a(%rip), %rdi     # 0x75fe8
movsd 0x8(%rsp), %xmm0
callq 0x6690
movq %rax, %r15
leaq 0x3c31c(%rip), %r12     # 0x5dc7f
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x6490
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x6490
movq %r15, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x6690
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movl %ebx, %edi
movl %ebp, %esi
movl %r14d, %edx
callq 0x4d550
callq 0x4a849
leaq 0x3b9fc(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21a05
// File: /workspace/github_cpp_makefile_star2_O3/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, %r14
testl %esi, %esi
je 0x21a71
cmpl $0x0, 0x55971(%rip)     # 0x77388
js 0x21aa2
movq 0x54584(%rip), %rbx     # 0x75fa8
leaq 0x3c176(%rip), %rsi     # 0x5dba1
movl $0x1, %edx
movq %rbx, %rdi
callq 0x6490
movl 0x5594a(%rip), %esi     # 0x77388
movq %rbx, %rdi
callq 0x6730
movq %rax, %rbx
leaq 0x3b9b2(%rip), %rsi     # 0x5d402
movl $0x1, %edx
movq %rax, %rdi
callq 0x6490
testq %r14, %r14
jne 0x21ac2
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
jmp 0x21aec
movq 0x54530(%rip), %rbx     # 0x75fa8
leaq 0x3c124(%rip), %rsi     # 0x5dba3
movl $0x2, %edx
movq %rbx, %rdi
callq 0x6490
testq %r14, %r14
je 0x21af8
movq %r14, %rdi
callq 0x6160
movq 0x54508(%rip), %rbx     # 0x75fa8
jmp 0x21aca
movq 0x544ff(%rip), %rbx     # 0x75fa8
leaq 0x3b799(%rip), %rsi     # 0x5d249
movl $0x2, %edx
movq %rbx, %rdi
callq 0x6490
testq %r14, %r14
je 0x21ada
movq %r14, %rdi
callq 0x6160
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x6490
jmp 0x21af8
movq 0x544c7(%rip), %rbx     # 0x75fa8
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x6700
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6290
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/util/Utility.cpp
// Function: InputTxtFLT(char const*, float*, int)
void
InputTxtFLT( const char *filename, float *ap, const int array_size )
{
  FILE *fp;
#if defined (_WIN32)
  errno_t err;

  err = fopen_s(&fp, filename, "r");
  if (err != 0) {
    std::cerr << "can not open -" << filename << "-" << std::endl;
    exit(1);
  }
  for (int i = 0; i < array_size; i++) {
    if (fscanf_s(fp, "%f", &ap[i]) == EOF) {
      std::cerr << "Read Error : " << filename << std::endl;
    }
  }
#else
  fp = fopen(filename, "r");
  if (fp == NULL) {
    std::cerr << "can not open -" << filename << "-" << std::endl;
  }
  for (int i = 0; i < array_size; i++) {
    if (fscanf(fp, "%f", &ap[i]) == EOF) {
      std::cerr << "Read Error : " << filename << std::endl;
      exit(1);
    }
  }
#endif
  fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3a77e(%rip), %rsi     # 0x5e483
callq 0x64d0
movq %rax, %r15
testq %rax, %rax
jne 0x23da7
movq 0x522cb(%rip), %r12     # 0x75fe8
leaq 0x3a334(%rip), %rsi     # 0x5e058
movl $0xe, %edx
movq %r12, %rdi
callq 0x6490
testq %rbx, %rbx
je 0x23d52
movq %rbx, %rdi
callq 0x6160
movq 0x522a3(%rip), %rdi     # 0x75fe8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x6490
jmp 0x23d6b
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x6700
leaq 0x39389(%rip), %rsi     # 0x5d0fb
movl $0x1, %edx
movq %r12, %rdi
callq 0x6490
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
testl %ebp, %ebp
jle 0x23dd3
movl %ebp, %r13d
leaq 0x3a2b2(%rip), %r12     # 0x5e067
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x67a0
cmpl $-0x1, %eax
je 0x23de9
addq $0x4, %r14
decq %r13
jne 0x23db5
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x63f0
movq 0x521f8(%rip), %rdi     # 0x75fe8
leaq 0x3a273(%rip), %rsi     # 0x5e06a
callq 0x63e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x63e0
movq %rax, %rdi
callq 0x6190
movl $0x1, %edi
callq 0x64e0
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/util/Utility.cpp
// Function: InputTxtDBL(char const*, double*, int)
void
InputTxtDBL( const char *filename, double *ap, const int array_size )
{
  FILE *fp;
#if defined (_WIN32)
  errno_t err;

  err = fopen_s(&fp, filename, "r");
  if (err != 0) {
    std::cerr << "can not open -" << filename << "-" << std::endl;
  }
  for (int i = 0; i < array_size; i++) {
    if (fscanf_s(fp, "%lf", &ap[i]) == EOF) {
      std::cerr << "Read Error : " << filename << std::endl;
    }
  }
#else
  fp = fopen(filename, "r");
  if (fp == NULL) {
    std::cerr << "can not open -" << filename << "-" << std::endl;
  }
  for (int i = 0; i < array_size; i++) {
    if (fscanf(fp, "%lf", &ap[i]) == EOF) {
      std::cerr << "Read Error : " << filename << std::endl;
    }
  }
#endif
  fclose(fp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3a650(%rip), %rsi     # 0x5e483
callq 0x64d0
movq %rax, %r15
testq %rax, %rax
jne 0x23ed5
movq 0x5219d(%rip), %r12     # 0x75fe8
leaq 0x3a206(%rip), %rsi     # 0x5e058
movl $0xe, %edx
movq %r12, %rdi
callq 0x6490
testq %r14, %r14
je 0x23e80
movq %r14, %rdi
callq 0x6160
movq 0x52175(%rip), %rdi     # 0x75fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x6490
jmp 0x23e99
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x6700
leaq 0x3925b(%rip), %rsi     # 0x5d0fb
movl $0x1, %edx
movq %r12, %rdi
callq 0x6490
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
testl %ebp, %ebp
jle 0x23f81
movl %ebp, %ebp
leaq 0x39df5(%rip), %r12     # 0x5dcdb
movq 0x520fb(%rip), %r13     # 0x75fe8
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x67a0
cmpl $-0x1, %eax
jne 0x23f74
movl $0xd, %edx
movq %r13, %rdi
leaq 0x3a159(%rip), %rsi     # 0x5e06a
callq 0x6490
testq %r14, %r14
je 0x23f33
movq %r14, %rdi
callq 0x6160
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x6490
jmp 0x23f4c
movq (%r13), %rax
movq -0x18(%rax), %rax
leaq (%rax,%r13), %rdi
movl 0x20(%r13,%rax), %esi
orl $0x1, %esi
callq 0x6700
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r13, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
addq $0x8, %rbx
decq %rbp
jne 0x23eed
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x63f0
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/util/Utility.cpp
// Function: JoinStrings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, char const*)
std::string
JoinStrings( const std::vector<std::string> &str_vec, const char *delimiter = 0 )
{
  std::string result;

  if (!str_vec.empty()) {
    result += str_vec[0];
    for (decltype(str_vec.size()) i = 1, c = str_vec.size(); i < c; i++) {
      if (delimiter) result += delimiter;
      result += str_vec[i];
    }
  }
  return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq (%rsi), %rax
cmpq 0x8(%rsi), %rax
je 0x2401c
movq %rdx, %r14
movq %rsi, %r15
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x60d0
movq 0x8(%r15), %r13
subq (%r15), %r13
sarq $0x5, %r13
cmpq $0x2, %r13
jb 0x2401c
decq %r13
movl $0x28, %ebp
testq %r14, %r14
je 0x23fff
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6800
movq (%r15), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
movq %rbx, %rdi
callq 0x60d0
addq $0x20, %rbp
decq %r13
jne 0x23fef
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24030
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x24047
movq (%r12), %rsi
incq %rsi
callq 0x6410
movq %r14, %rdi
callq 0x6760
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/util/Utility.cpp
// Function: SplitString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::vector<std::string>
SplitString( const std::string &str, const std::string pattern )
{
  std::vector<std::string> result;
  std::regex reg{pattern};

  std::copy(std::sregex_token_iterator{str.begin(), str.end(), reg, -1},
            std::sregex_token_iterator{},
            std::back_inserter(result));

  return result;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
movl $0x10, %edx
callq 0x241dc
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rcx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x243e0
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rsi
movups %xmm0, 0x59(%rsi)
movaps %xmm0, 0x50(%rsi)
movaps %xmm0, 0x40(%rsi)
movaps %xmm0, 0x30(%rsi)
movaps %xmm0, 0x20(%rsi)
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movaps %xmm0, 0x70(%rsi)
movb $0x0, 0x80(%rsi)
leaq 0x28(%rsp), %rdi
movq %rbx, %rdx
callq 0x2423f
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x240fc
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x6410
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x24119
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6410
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x24130
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6410
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x24147
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x6410
leaq 0x8(%rsp), %rdi
callq 0x244c4
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x24492
leaq 0x28(%rsp), %rdi
callq 0x24492
jmp 0x2417e
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x244c4
jmp 0x2418d
movq %rax, %r14
movq %rbx, %rdi
callq 0x227a2
movq %r14, %rdi
callq 0x6760
nop
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/learn/FactorizationMachines.cpp
// Function: InitializeWeights(std::vector<btfm_t, std::allocator<btfm_t>>&, int, std::mersenne_twister_engine<unsigned long, 64ul, 312ul, 156ul, 31ul, 13043109905998158313ul, 29ul, 6148914691236517205ul, 17ul, 8202884508482404352ul, 37ul, 18444473444759240704ul, 43ul, 6364136223846793005ul>&, std::normal_distribution<double>&, int&)
static void
InitializeWeights( std::vector<btfm_t> &data, const int size, std::mt19937_64 &mt, std::normal_distribution<> &dist, int &data_id )
{
  data.resize(size);

  for (btfm_t &datum : data) {
    datum.w = 1.0;
    for (int k = 0; k < FM_DIMENSION; k++) {
      datum.v[k] = exp(dist(mt));
    }
    datum.id = data_id++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
movslq %esi, %rsi
callq 0x39f74
movq (%r12), %r13
movq 0x8(%r12), %r12
cmpq %r12, %r13
je 0x36b54
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%r13)
movl $0x1, %ebp
movq %r14, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3a1aa
callq 0x6770
movsd %xmm0, (%r13,%rbp,8)
incq %rbp
cmpq $0x6, %rbp
jne 0x36b1a
movl (%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movl %eax, 0x210(%r13)
addq $0x218, %r13            # imm = 0x218
jmp 0x36b02
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/learn/FactorizationMachines.cpp
// Function: CorrectTacticalFeature(std::vector<btfm_t*, std::allocator<btfm_t*>>*, std::map<int, btfm_t*, std::less<int>, std::allocator<std::pair<int const, btfm_t*>>>&, std::vector<btfm_t, std::allocator<btfm_t>>&, unsigned int const*, UCT_ALL_FEATURE, int)
static void
CorrectTacticalFeature( std::vector<btfm_t*> feature_list[],
                        std::map<int, btfm_t*> &feature_map,
                        std::vector<btfm_t> &feature,
                        const unsigned int tactical_features[],
                        const UCT_ALL_FEATURE feature_index,
                        const int pos )
{
  if (tactical_features[UctFeatureIndex(pos, feature_index)] > 0) {
    feature_list[pos].push_back(&feature[tactical_features[UctFeatureIndex(pos, feature_index)]]);
    const int id = feature[tactical_features[UctFeatureIndex(pos, feature_index)]].id;
    if (!feature_map.count(id)) {
      feature_map[id] = &feature[tactical_features[UctFeatureIndex(pos, feature_index)]];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
leal (,%r9,8), %eax
subl %r9d, %eax
addl %r8d, %eax
movslq %eax, %r12
movl (%rcx,%r12,4), %eax
testq %rax, %rax
je 0x38d93
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
movslq %r9d, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdi,%rcx,8), %rdi
imulq $0x218, %rax, %rax      # imm = 0x218
addq (%rdx), %rax
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
callq 0x3a83c
movl (%r15,%r12,4), %eax
movq (%r14), %r14
imulq $0x218, %rax, %rax      # imm = 0x218
movl 0x210(%r14,%rax), %ecx
movl %ecx, 0xc(%rsp)
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x38d80
leaq 0x8(%rbx), %rdi
movq %rdi, %rsi
xorl %r8d, %r8d
cmpl %ecx, 0x20(%rdx)
setl %r8b
cmovgeq %rdx, %rsi
movq 0x10(%rdx,%r8,8), %rdx
testq %rdx, %rdx
jne 0x38d5e
cmpq %rdi, %rsi
je 0x38d80
cmpl 0x20(%rsi), %ecx
jge 0x38d93
addq %rax, %r14
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a7d6
movq %r14, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/learn/FactorizationMachines.cpp
// Function: CorrectMoveDistanceFeature(std::vector<btfm_t*, std::allocator<btfm_t*>>*, std::map<int, btfm_t*, std::less<int>, std::allocator<std::pair<int const, btfm_t*>>>&, std::vector<btfm_t, std::allocator<btfm_t>>&, int, int, int)
static void
CorrectMoveDistanceFeature( std::vector<btfm_t*> feature_list[],
                            std::map<int, btfm_t*> &feature_map,
                            std::vector<btfm_t> &move_distance_feature,
                            const int pos,
                            const int previous_move,
                            const int shift )
{
  if (previous_move != PASS) {
    int distance = DIS(previous_move, pos);
    if (distance > MOVE_DISTANCE_MAX - 1) {
      distance = MOVE_DISTANCE_MAX - 1;
    }
    distance += shift;
    feature_list[pos].push_back(&move_distance_feature[distance]);
    const int id = move_distance_feature[distance].id;
    if (!feature_map.count(id)) {
      feature_map[id] = &move_distance_feature[distance];
    }
  }
}

// Assembly:
testl %r8d, %r8d
je 0x38e82
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movslq %r8d, %rax
leaq 0x1aad4ebf(%rip), %rdx  # 0x1ab0dc80
movl (%rdx,%rax,4), %esi
movslq %ecx, %rcx
subl (%rdx,%rcx,4), %esi
movl %esi, %edx
negl %edx
cmovsl %esi, %edx
leaq 0x1aad5bd8(%rip), %rsi  # 0x1ab0e9b0
movl (%rsi,%rax,4), %eax
subl (%rsi,%rcx,4), %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
imulq $0x4c, %rdx, %rax
addq 0x3d180(%rip), %rax     # 0x75f70
movl (%rax,%rsi,4), %eax
cmpl $0xf, %eax
movl $0xf, %edx
cmovll %eax, %edx
addl %r9d, %edx
leaq (%rcx,%rcx,2), %rax
leaq (%rdi,%rax,8), %rdi
movslq %edx, %rax
imulq $0x218, %rax, %r15      # imm = 0x218
movq (%r14), %rax
addq %r15, %rax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
callq 0x3a83c
movq (%r14), %r14
movl 0x210(%r14,%r15), %eax
movl %eax, 0x4(%rsp)
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x38e66
leaq 0x8(%rbx), %rsi
movq %rsi, %rdx
xorl %edi, %edi
cmpl %eax, 0x20(%rcx)
setl %dil
cmovgeq %rcx, %rdx
movq 0x10(%rcx,%rdi,8), %rcx
testq %rcx, %rcx
jne 0x38e45
cmpq %rsi, %rdx
je 0x38e66
cmpl 0x20(%rdx), %eax
jge 0x38e79
addq %r15, %r14
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a7d6
movq %r14, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/learn/FactorizationMachines.cpp
// Function: OutputFMAdd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, btfm_t&)
static void
OutputFMAdd( std::string filename, btfm_t &t )
{
  std::ofstream ofs(filename, std::ios::app);

  if (ofs.fail()) {
    std::cerr << "cannot open " << filename << std::endl;
    return;
  }

  ofs << std::scientific << t.w;
  for (int j = 0; j < FM_DIMENSION; j++) {
    ofs << " " << std::scientific << t.v[j];
  }
  ofs << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x6810
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rsp,%rax)
je 0x38f00
movq 0x3d128(%rip), %rdi     # 0x75fe8
leaq 0x26204(%rip), %rsi     # 0x5f0cb
movl $0xc, %edx
callq 0x6490
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x3d109(%rip), %rdi     # 0x75fe8
callq 0x6490
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63c0
jmp 0x38f86
movl $0xfffffefb, %ebp       # imm = 0xFFFFFEFB
movl 0x18(%rsp,%rax), %ecx
andl %ebp, %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x18(%rsp,%rax)
movsd (%r14), %xmm0
movq %rsp, %rdi
callq 0x6690
movl $0x1, %r12d
leaq 0x246d1(%rip), %r15     # 0x5d600
movq %rsp, %rbx
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6490
movq (%rsp), %rax
movq -0x18(%rax), %rax
movl 0x18(%rsp,%rax), %ecx
andl %ebp, %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x18(%rsp,%rax)
movsd (%r14,%r12,8), %xmm0
movq %rbx, %rdi
callq 0x6690
incq %r12
cmpq $0x6, %r12
jne 0x38f32
movq (%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movq 0x3cfc8(%rip), %rax     # 0x75f68
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0x6330
leaq 0xf8(%rsp), %rdi
callq 0x60f0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38fdc
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6600
movq %rbx, %rdi
callq 0x6760
// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/learn/MinorizationMaximization.cpp
// Function: InitializeLearningData(std::vector<std::vector<mm_t, std::allocator<mm_t>>, std::allocator<std::vector<mm_t, std::allocator<mm_t>>>>&, int, int)
static void
InitializeLearningData( std::vector<std::vector<mm_t> > &data, const int threads, const int data_size )
{
  data.resize(threads);

  for (std::vector<mm_t> &vec : data) {
    vec.resize(data_size);
    for (mm_t &datum : vec) {
      datum.gamma = 1.0;
      datum.w = 0;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x8, %esi
callq 0x417a4
movq (%r14), %rbx
movq 0x8(%r14), %r15
cmpq %r15, %rbx
je 0x40089
movslq %ebp, %r14
movabsq $0x3ff0000000000000, %r12 # imm = 0x3FF0000000000000
movq %rbx, %rdi
movq %r14, %rsi
callq 0x417e0
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x40080
movq %r12, 0x18(%rax)
movl $0x0, (%rax)
addq $0x20, %rax
jmp 0x4006b
addq $0x18, %rbx
cmpq %r15, %rbx
jne 0x40059
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq