LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x56b8b(%rip), %rbx     # 0x5d402
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6650
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6650
movzbl (%r14), %ecx
pushq $0x1
popq %rbx
cmpl $0x42, %ecx
je 0x68ac
cmpl $0x77, %ecx
je 0x68a9
cmpl $0x62, %ecx
je 0x68ac
cmpl $0x57, %ecx
jne 0x68bb
pushq $0x2
popq %rbx
movq %rax, %rdi
callq 0x6510
movl %ebx, %edi
callq 0x4d11e
movq 0x6e6ee(%rip), %r15     # 0x74fb0
movq (%r15), %rbx
pushq $0x1
popq %rbp
movl %ebp, %edi
callq 0x4d12e
leaq 0x5747e(%rip), %r14     # 0x5dd54
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x65c0
movq (%r15), %rbx
pushq $0x2
popq %rdi
callq 0x4d12e
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x65c0
leaq 0x56ade(%rip), %rdi     # 0x5d3e0
movl %ebp, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x56a01(%rip)     # 0x75430
jne 0x1eaf9
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
cmpl $-0x1, %edi
je 0x1ea59
testl %ebx, %ebx
jne 0x1ea76
movq 0x5659d(%rip), %rbx     # 0x74fe8
leaq 0x3e6cf(%rip), %rsi     # 0x5d121
movl $0x4, %edx
jmp 0x1ea6c
movq 0x56588(%rip), %rbx     # 0x74fe8
leaq 0x3e772(%rip), %rsi     # 0x5d1d9
movl $0x6, %edx
movq %rbx, %rdi
callq 0x64a0
jmp 0x1eacb
leaq 0x56e3f(%rip), %r14     # 0x758bc
movl %ebx, %eax
cltd
idivl (%r14)
movslq %edx, %rax
leaq 0x3e913(%rip), %rcx     # 0x5d3a0
movb -0x4(%rax,%rcx), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movq 0x56549(%rip), %rdi     # 0x74fe8
movl $0x1, %edx
callq 0x64a0
movq %rax, %rdi
leaq 0x56e01(%rip), %rax     # 0x758b4
movl (%rax), %ecx
movl %ebx, %eax
cltd
idivl (%r14)
negl %eax
leal (%rcx,%rax), %esi
addl $0x5, %esi
callq 0x6740
movq %rax, %rbx
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6560
leaq 0x3e4ca(%rip), %rsi     # 0x5d238
movl $0x13, %edx
movq %rbx, %rdi
callq 0x64a0
leaq 0x28(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x66a0
leaq 0x3e4bb(%rip), %rsi     # 0x5d24c
movl $0xf, %edx
movq %rax, %rdi
callq 0x64a0
leaq 0x3e4b7(%rip), %rsi     # 0x5d25c
leaq 0x28(%rsp), %rdi
movl $0x54, %edx
callq 0x64a0
leaq 0x3e4f6(%rip), %rsi     # 0x5d2b1
leaq 0x28(%rsp), %rdi
movl $0x15, %edx
callq 0x64a0
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6680
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x561fe(%rip), %rdi     # 0x74fe8
callq 0x64a0
movq %rax, %rdi
callq 0x62a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ee12
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6420
movq 0x5617f(%rip), %rsi     # 0x74f98
leaq 0x28(%rsp), %rdi
callq 0x61f0
leaq 0x98(%rsp), %rdi
callq 0x60f0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
retq
jmp 0x1ee5b
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ee5e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6420
jmp 0x1ee5e
movq %rax, %rbx
movq 0x56133(%rip), %rsi     # 0x74f98
leaq 0x28(%rsp), %rdi
callq 0x61f0
leaq 0x98(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6770
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6560
leaq 0x3e393(%rip), %rsi     # 0x5d238
movl $0x13, %edx
movq %rbx, %rdi
callq 0x64a0
leaq 0x28(%rsp), %rdi
movsd (%rsp), %xmm0
callq 0x66a0
leaq 0x3e3ff(%rip), %rsi     # 0x5d2c7
movl $0xf, %edx
movq %rax, %rdi
callq 0x64a0
leaq 0x3e3fb(%rip), %rsi     # 0x5d2d7
leaq 0x28(%rsp), %rdi
movl $0x20, %edx
callq 0x64a0
leaq 0x3e406(%rip), %rsi     # 0x5d2f8
leaq 0x28(%rsp), %rdi
movl $0x13, %edx
callq 0x64a0
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x6680
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x560c7(%rip), %rdi     # 0x74fe8
callq 0x64a0
movq %rax, %rdi
callq 0x62a0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ef49
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6420
movq 0x56048(%rip), %rsi     # 0x74f98
leaq 0x28(%rsp), %rdi
callq 0x61f0
leaq 0x98(%rsp), %rdi
callq 0x60f0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
retq
jmp 0x1ef92
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ef95
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x6420
jmp 0x1ef95
movq %rax, %rbx
movq 0x55ffc(%rip), %rsi     # 0x74f98
leaq 0x28(%rsp), %rdi
callq 0x61f0
leaq 0x98(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6770
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
leaq 0x3cddd(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6650
leaq 0x3d56b(%rip), %rsi     # 0x5db9e
leaq 0xc(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x63e0
leaq 0x55268(%rip), %rax     # 0x758b4
movl (%rbx), %edi
cmpl %edi, (%rax)
sete %al
leal -0x1(%rdi), %ecx
cmpl $0x13, %ecx
setae %cl
orb %al, %cl
jne 0x20674
callq 0x5395c
callq 0x4a25f
callq 0x46178
callq 0x586c0
movq 0x55d15(%rip), %rdi     # 0x76390
callq 0x53e7b
callq 0x53e60
movq %rax, 0x55d04(%rip)     # 0x76390
movq %rax, %rdi
callq 0x53e8b
callq 0x4a4e1
callq 0x560d0
leaq 0x3cd3b(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
callq 0x21c1a
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
movl $0x1, 0x54a66(%rip)     # 0x75440
xorl %edi, %edi
callq 0x5631b
movq 0x559a8(%rip), %rdi     # 0x76390
callq 0x53e7b
callq 0x53e60
movq %rax, 0x55997(%rip)     # 0x76390
movq %rax, %rdi
callq 0x53e8b
callq 0x4a4e1
callq 0x560d0
leaq 0x3c9ce(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
popq %rax
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
movq 0x55963(%rip), %rdi     # 0x76390
movl $0x1, %esi
callq 0x4b371
cvtsi2sd %eax, %xmm0
leaq 0x1aaeb4ce(%rip), %rax  # 0x1ab0bf10
subsd (%rax), %xmm0
cvttsd2si %xmm0, %eax
testl %eax, %eax
je 0x20a61
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x20a6a
leaq 0x3d25b(%rip), %rdx     # 0x5dcba
jmp 0x20a79
movw $0x30, 0xe(%rsp)
jmp 0x20a8a
xorpd 0x3c5be(%rip), %xmm0    # 0x5d030
leaq 0x3d249(%rip), %rdx     # 0x5dcc2
leaq 0xe(%rsp), %rdi
movl $0xa, %esi
movb $0x1, %al
callq 0x6690
leaq 0xe(%rsp), %rdi
movl $0x1, %esi
callq 0x21c1a
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
leaq 0x55373(%rip), %rdi     # 0x76280
leaq 0x3c4ee(%rip), %rsi     # 0x5d402
callq 0x6650
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x20f30
movb $0x0, -0x1(%rbx,%rax)
leaq 0x3c4cb(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6650
testq %rax, %rax
je 0x20f75
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x20f5a
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65d0
cmpb $0x77, %al
je 0x20f8e
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x20f75
movl $0x1, %ebx
jmp 0x20f93
leaq 0x3c488(%rip), %rdi     # 0x5d404
movl $0x1, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21c1a
movl $0x2, %ebx
movl %ebx, 0x544a7(%rip)     # 0x75440
movq 0x553f0(%rip), %rdi     # 0x76390
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4a6af
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x20fc3
movq 0x553d6(%rip), %rdi     # 0x76390
movl %ebp, %esi
movl %ebx, %edx
callq 0x55134
leaq 0x6(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
callq 0x55a79
movq %r14, %rdi
movl $0x1, %esi
callq 0x21c1a
movq 0x553aa(%rip), %rdi     # 0x76390
xorl $0x3, %ebx
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4afec
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
leaq 0x5522c(%rip), %rdi     # 0x76280
leaq 0x3c3a7(%rip), %rsi     # 0x5d402
callq 0x6650
movq %rax, %r14
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%r14,%rax)
jne 0x21079
movb $0x0, -0x1(%r14,%rax)
leaq 0x3cc5f(%rip), %rdi     # 0x5dcdf
movq %r14, %rsi
callq 0x6590
movl $0x1, %ebx
testl %eax, %eax
je 0x210f3
leaq 0x3cc55(%rip), %rdi     # 0x5dced
movq %r14, %rsi
callq 0x6590
movl $0x2, %ebx
testl %eax, %eax
je 0x210f3
leaq 0x3c352(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6650
testq %rax, %rax
je 0x21143
movq %rax, %r14
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%r14,%rax)
jne 0x210d9
movb $0x0, -0x1(%r14,%rax)
movsbl (%r14), %edi
callq 0x65d0
cmpb $0x77, %al
je 0x210f3
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x21143
movl $0x1, %ebx
movl %ebx, 0x54347(%rip)     # 0x75440
movq 0x55290(%rip), %rdi     # 0x76390
movl %ebx, %esi
callq 0x4b6e4
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x2111e
movq 0x5527b(%rip), %rdi     # 0x76390
movl %ebp, %esi
movl %ebx, %edx
callq 0x55134
leaq 0x6(%rsp), %rbx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x55a79
movq %rbx, %rdi
movl $0x1, %esi
callq 0x21c1a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3c2ba(%rip), %rdi     # 0x5d404
xorl %esi, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3c29d(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6650
testq %rax, %rax
je 0x211b8
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x21188
movb $0x0, -0x1(%rbx,%rax)
xorl %r14d, %r14d
leaq 0x5311e(%rip), %r15     # 0x742b0
leaq (%r15,%r14), %rsi
movq %rbx, %rdi
callq 0x6590
testl %eax, %eax
je 0x211c3
addq $0x48, %r14
cmpq $0x708, %r14            # imm = 0x708
jne 0x21192
leaq 0x3cb60(%rip), %rdi     # 0x5dd16
jmp 0x211bf
leaq 0x3cb3c(%rip), %rdi     # 0x5dcfb
xorl %esi, %esi
jmp 0x211cf
leaq 0x3cb47(%rip), %rdi     # 0x5dd11
movl $0x1, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
leaq 0x3c21c(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6650
testq %rax, %rax
je 0x21216
movq %rax, %rdi
callq 0x6510
callq 0x53df3
callq 0x1eafa
leaq 0x3c1d5(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
popq %rax
jmp 0x21c1a
leaq 0x3c343(%rip), %rdi     # 0x5d560
xorl %esi, %esi
popq %rax
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x53076(%rip), %r14     # 0x742b0
xorl %r15d, %r15d
leaq (%r14,%r15), %rdi
movslq %ebx, %rbx
movb $0xa, (%rsp,%rbx)
callq 0x6160
incl %ebx
testq %rax, %rax
je 0x21275
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 0x2125d
addl %ecx, %ebx
addq $0x48, %r15
cmpq $0x708, %r15            # imm = 0x708
jne 0x2123d
movslq %ebx, %rax
movb $0x0, (%rsp,%rax)
movq %rsp, %rdi
movl $0x1, %esi
callq 0x21c1a
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, 0x4(%rsp)
movl $0x64, 0x8(%rsp)
callq 0x4a61e
leaq 0x54b24(%rip), %rdi     # 0x76280
leaq 0x3bc9f(%rip), %rsi     # 0x5d402
callq 0x6650
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x2177f
movb $0x0, -0x1(%rbx,%rax)
leaq 0x4(%rsp), %rbx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x21d65
movl (%rbx), %eax
testl %eax, %eax
je 0x2179f
movl %eax, 0x53ca3(%rip)     # 0x75440
jmp 0x217a9
movl 0x53c9b(%rip), %eax     # 0x75440
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x54bd8(%rip)     # 0x76388
js 0x217ef
movq 0x537ef(%rip), %rbx     # 0x74fa8
leaq 0x3c3e1(%rip), %rsi     # 0x5dba1
movl $0x1, %edx
movq %rbx, %rdi
callq 0x64a0
movl 0x54bb5(%rip), %esi     # 0x76388
movq %rbx, %rdi
callq 0x6740
movq %rax, %rbx
leaq 0x3bc1d(%rip), %rsi     # 0x5d402
movl $0x1, %edx
movq %rax, %rdi
jmp 0x21805
movq 0x537b2(%rip), %rbx     # 0x74fa8
leaq 0x3ba4c(%rip), %rsi     # 0x5d249
movl $0x2, %edx
movq %rbx, %rdi
callq 0x64a0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
movq 0x54b58(%rip), %rdi     # 0x76390
movl 0x4(%rsp), %ebx
movl 0x8(%rsp), %edx
movl %ebx, %esi
callq 0x4a6af
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x2185e
movq 0x54b3b(%rip), %rdi     # 0x76390
movl %ebp, %esi
movl %ebx, %edx
callq 0x55134
leaq 0xe(%rsp), %r15
movl %ebp, %edi
movq %r15, %rsi
callq 0x55a79
movq 0x53734(%rip), %r14     # 0x74fa8
leaq 0x3c32b(%rip), %rsi     # 0x5dba6
movl $0x5, %edx
movq %r14, %rdi
callq 0x64a0
movq %r15, %rdi
callq 0x6160
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x64a0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
movq 0x54a9a(%rip), %rdi     # 0x76390
xorl $0x3, %ebx
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4afec
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
leaq 0x5494f(%rip), %rdi     # 0x76280
leaq 0x3baca(%rip), %rbx     # 0x5d402
movq %rbx, %rsi
callq 0x6650
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6650
testq %rax, %rax
je 0x219d6
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x2196a
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65d0
xorl %ebx, %ebx
cmpb $0x77, %al
sete %bpl
leaq 0x3ba81(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6650
movq %rax, %r14
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%r14,%rax)
jne 0x219a1
movb $0x0, -0x1(%r14,%rax)
testq %r14, %r14
je 0x219d6
movq %r14, %rdi
callq 0x559e4
cmpl $-0x1, %eax
je 0x219c8
movb %bpl, %bl
incl %ebx
movq 0x549d1(%rip), %rdi     # 0x76390
movl %eax, %esi
movl %ebx, %edx
callq 0x55134
leaq 0x3ba11(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
jmp 0x219df
leaq 0x3bb93(%rip), %rdi     # 0x5d570
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a61e
leaq 0x3b9dd(%rip), %rsi     # 0x5d402
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x6650
testq %rax, %rax
je 0x21a91
xorl %ebx, %ebx
leaq 0x53e7c(%rip), %r15     # 0x758b8
leaq 0x3b9bf(%rip), %r14     # 0x5d402
movq %rax, %rdi
callq 0x559e4
testl %eax, %eax
jle 0x21a82
movl %eax, %ebp
cmpl (%r15), %eax
jge 0x21a82
movq 0x54933(%rip), %rdi     # 0x76390
movl %ebp, %esi
movl $0x1, %edx
callq 0x54a9c
testb %al, %al
je 0x21a82
movq 0x5491c(%rip), %rdi     # 0x76390
movl %ebp, %esi
movl $0x1, %edx
callq 0x55134
incl %ebx
xorl %edi, %edi
movq %r14, %rsi
callq 0x6650
testq %rax, %rax
jne 0x21a43
movl %ebx, %edi
callq 0x5631b
movsd 0x3b570(%rip), %xmm0    # 0x5d010
callq 0x53df3
leaq 0x3b934(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3b910(%rip), %rbx     # 0x5d402
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6650
movq %rax, %r14
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6650
movq %rax, %r15
xorl %edi, %edi
movq %rbx, %rsi
callq 0x6650
movq %rax, %r12
movq %r14, %rdi
callq 0x6640
movl %eax, %ebx
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
callq 0x6640
movl %eax, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%rsp)
movq %r12, %rdi
callq 0x6640
movl %eax, %r14d
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x53485(%rip), %rdi     # 0x74fe8
movsd 0x8(%rsp), %xmm0
callq 0x66a0
movq %rax, %r15
leaq 0x3c107(%rip), %r12     # 0x5dc7f
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x64a0
movq %r15, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x66a0
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x64a0
movq %r15, %rdi
movsd 0x18(%rsp), %xmm0
callq 0x66a0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
movl %ebx, %edi
movl %ebp, %esi
movl %r14d, %edx
callq 0x4d21c
callq 0x4a4e1
leaq 0x3b7e7(%rip), %rdi     # 0x5d3e0
movl $0x1, %esi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x21c1a
// File: /workspace/github_cpp_makefile_star2_O1/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 0x21c86
cmpl $0x0, 0x5475c(%rip)     # 0x76388
js 0x21cb7
movq 0x5336f(%rip), %rbx     # 0x74fa8
leaq 0x3bf61(%rip), %rsi     # 0x5dba1
movl $0x1, %edx
movq %rbx, %rdi
callq 0x64a0
movl 0x54735(%rip), %esi     # 0x76388
movq %rbx, %rdi
callq 0x6740
movq %rax, %rbx
leaq 0x3b79d(%rip), %rsi     # 0x5d402
movl $0x1, %edx
movq %rax, %rdi
callq 0x64a0
testq %r14, %r14
jne 0x21cd7
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
jmp 0x21d01
movq 0x5331b(%rip), %rbx     # 0x74fa8
leaq 0x3bf0f(%rip), %rsi     # 0x5dba3
movl $0x2, %edx
movq %rbx, %rdi
callq 0x64a0
testq %r14, %r14
je 0x21d0d
movq %r14, %rdi
callq 0x6160
movq 0x532f3(%rip), %rbx     # 0x74fa8
jmp 0x21cdf
movq 0x532ea(%rip), %rbx     # 0x74fa8
leaq 0x3b584(%rip), %rsi     # 0x5d249
movl $0x2, %edx
movq %rbx, %rdi
callq 0x64a0
testq %r14, %r14
je 0x21cef
movq %r14, %rdi
callq 0x6160
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x64a0
jmp 0x21d0d
movq 0x532b2(%rip), %rbx     # 0x74fa8
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x6710
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x62a0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3a5fa(%rip), %rsi     # 0x5e483
callq 0x64e0
movq %rax, %r15
testq %rax, %rax
jne 0x23f2b
movq 0x51147(%rip), %r12     # 0x74fe8
leaq 0x3a1b0(%rip), %rsi     # 0x5e058
movl $0xe, %edx
movq %r12, %rdi
callq 0x64a0
testq %rbx, %rbx
je 0x23ed6
movq %rbx, %rdi
callq 0x6160
movq 0x5111f(%rip), %rdi     # 0x74fe8
movq %rbx, %rsi
movq %rax, %rdx
callq 0x64a0
jmp 0x23eef
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x6710
leaq 0x39205(%rip), %rsi     # 0x5d0fb
movl $0x1, %edx
movq %r12, %rdi
callq 0x64a0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
testl %ebp, %ebp
jle 0x23f57
movl %ebp, %r13d
leaq 0x3a12e(%rip), %r12     # 0x5e067
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x67b0
cmpl $-0x1, %eax
je 0x23f6d
addq $0x4, %r14
decq %r13
jne 0x23f39
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6400
movq 0x51074(%rip), %rdi     # 0x74fe8
leaq 0x3a0ef(%rip), %rsi     # 0x5e06a
callq 0x63f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x63f0
movq %rax, %rdi
callq 0x61a0
movl $0x1, %edi
callq 0x64f0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3a4cc(%rip), %rsi     # 0x5e483
callq 0x64e0
movq %rax, %r15
testq %rax, %rax
jne 0x24059
movq 0x51019(%rip), %r12     # 0x74fe8
leaq 0x3a082(%rip), %rsi     # 0x5e058
movl $0xe, %edx
movq %r12, %rdi
callq 0x64a0
testq %r14, %r14
je 0x24004
movq %r14, %rdi
callq 0x6160
movq 0x50ff1(%rip), %rdi     # 0x74fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x64a0
jmp 0x2401d
movq (%r12), %rax
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x6710
leaq 0x390d7(%rip), %rsi     # 0x5d0fb
movl $0x1, %edx
movq %r12, %rdi
callq 0x64a0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r12, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
testl %ebp, %ebp
jle 0x24105
movl %ebp, %ebp
leaq 0x39c71(%rip), %r12     # 0x5dcdb
movq 0x50f77(%rip), %r13     # 0x74fe8
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x67b0
cmpl $-0x1, %eax
jne 0x240f8
movl $0xd, %edx
movq %r13, %rdi
leaq 0x39fd5(%rip), %rsi     # 0x5e06a
callq 0x64a0
testq %r14, %r14
je 0x240b7
movq %r14, %rdi
callq 0x6160
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x64a0
jmp 0x240d0
movq (%r13), %rax
movq -0x18(%rax), %rax
leaq (%rax,%r13), %rdi
movl 0x20(%r13,%rax), %esi
orl $0x1, %esi
callq 0x6710
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r13, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
addq $0x8, %rbx
decq %rbp
jne 0x24071
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6400
// File: /workspace/github_cpp_makefile_star2_O1/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 0x241a0
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 0x241a0
decq %r13
movl $0x28, %ebp
testq %r14, %r14
je 0x24183
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6810
movq (%r15), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
movq %rbx, %rdi
callq 0x60d0
addq $0x20, %rbp
decq %r13
jne 0x24173
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x241b4
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x241cb
movq (%r12), %rsi
incq %rsi
callq 0x6420
movq %r14, %rdi
callq 0x6770
// File: /workspace/github_cpp_makefile_star2_O1/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 0x24360
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 0x24564
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 0x243c3
movq 0xf0(%rsp), %rdi
testq %rdi, %rdi
je 0x24280
movq 0x100(%rsp), %rsi
subq %rdi, %rsi
callq 0x6420
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2429d
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x6420
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x242b4
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x6420
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x242cb
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x6420
leaq 0x8(%rsp), %rdi
callq 0x2464c
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
callq 0x2461a
leaq 0x28(%rsp), %rdi
callq 0x2461a
jmp 0x24302
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x2464c
jmp 0x24311
movq %rax, %r14
movq %rbx, %rdi
callq 0x229b8
movq %r14, %rdi
callq 0x6770
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3a0c6
movq (%r12), %r13
movq 0x8(%r12), %r12
cmpq %r12, %r13
je 0x36d6b
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%r13)
movl $0x1, %ebp
movq %r14, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x3a2f4
callq 0x6780
movsd %xmm0, (%r13,%rbp,8)
incq %rbp
cmpq $0x6, %rbp
jne 0x36d31
movl (%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
movl %eax, 0x210(%r13)
addq $0x218, %r13            # imm = 0x218
jmp 0x36d19
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x38ed3
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 0x3a9ac
movl (%r15,%r12,4), %eax
movq (%r14), %r14
imulq $0x218, %rax, %rax      # imm = 0x218
movl 0x210(%r14,%rax), %edx
movl %edx, 0xc(%rsp)
movq 0x10(%rbx), %rdi
leaq 0x8(%rbx), %rcx
movq %rcx, %rsi
testq %rdi, %rdi
je 0x38ea9
movq %rcx, %rsi
xorl %r8d, %r8d
cmpl %edx, 0x20(%rdi)
setl %r8b
cmovgeq %rdi, %rsi
movq 0x10(%rdi,%r8,8), %rdi
testq %rdi, %rdi
jne 0x38e91
movq %rcx, %rdi
cmpq %rcx, %rsi
je 0x38ebb
cmpl 0x20(%rsi), %edx
cmovlq %rcx, %rsi
movq %rsi, %rdi
cmpq %rcx, %rdi
jne 0x38ed3
addq %rax, %r14
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a948
movq %r14, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x38fd2
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movslq %r8d, %rax
leaq 0x1aad3d7f(%rip), %rdx  # 0x1ab0cc80
movl (%rdx,%rax,4), %esi
movslq %ecx, %rcx
subl (%rdx,%rcx,4), %esi
movl %esi, %edx
negl %edx
cmovsl %esi, %edx
leaq 0x1aad4a98(%rip), %rsi  # 0x1ab0d9b0
movl (%rsi,%rax,4), %eax
subl (%rsi,%rcx,4), %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
imulq $0x4c, %rdx, %rax
addq 0x3c040(%rip), %rax     # 0x74f70
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 0x3a9ac
movq (%r14), %r14
movl 0x210(%r14,%r15), %ecx
movl %ecx, 0x4(%rsp)
movq 0x10(%rbx), %rsi
leaq 0x8(%rbx), %rax
movq %rax, %rdx
testq %rsi, %rsi
je 0x38f9f
movq %rax, %rdx
xorl %edi, %edi
cmpl %ecx, 0x20(%rsi)
setl %dil
cmovgeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x38f88
movq %rax, %rsi
cmpq %rax, %rdx
je 0x38fb1
cmpl 0x20(%rdx), %ecx
cmovlq %rax, %rdx
movq %rdx, %rsi
cmpq %rax, %rsi
jne 0x38fc9
addq %r15, %r14
leaq 0x4(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a948
movq %r14, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x6820
movq (%r15), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rsp,%rax)
je 0x39050
movq 0x3bfd8(%rip), %rdi     # 0x74fe8
leaq 0x26054(%rip), %rsi     # 0x5f06b
movl $0xc, %edx
callq 0x64a0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x3bfb9(%rip), %rdi     # 0x74fe8
callq 0x64a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63d0
jmp 0x390d6
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 0x66a0
movl $0x1, %r12d
leaq 0x24581(%rip), %r15     # 0x5d600
movq %rsp, %rbx
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x64a0
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 0x66a0
incq %r12
cmpq $0x6, %r12
jne 0x39082
movq (%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
movq 0x3be78(%rip), %rax     # 0x74f68
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0x6340
leaq 0xf8(%rsp), %rdi
callq 0x60f0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3912c
movq %rax, %rbx
movq %rsp, %rdi
callq 0x6610
movq %rbx, %rdi
callq 0x6770
// File: /workspace/github_cpp_makefile_star2_O1/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 0x414f0
movq (%r14), %rbx
movq 0x8(%r14), %r15
cmpq %r15, %rbx
je 0x3fd94
movslq %ebp, %r14
movabsq $0x3ff0000000000000, %r12 # imm = 0x3FF0000000000000
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4152c
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x3fd8b
movq %r12, 0x18(%rax)
movl $0x0, (%rax)
addq $0x20, %rax
jmp 0x3fd76
addq $0x18, %rbx
cmpq %r15, %rbx
jne 0x3fd64
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq