// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/gtp/Gtp.cpp
// Function: GTP_cgos_genmove_analyze()
static void
GTP_cgos_genmove_analyze( void )
{
  std::ostringstream oss;
  std::string analyze_data;
  char pos[10];
  char *command;
  char c;
  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);

  }
  CgosAnalyzeData data(GetRootNode(), color);
  analyze_data = data.GetJsonData();

  IntegerToString(point, pos);

  oss << "\n";
  oss << analyze_data << "\n";
  oss << "play " << pos;
  
  GTP_response(oss.str().c_str(), true);

  UctSearchPondering(game, GetOppositeColor(color), -1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x270, %rsp            # imm = 0x270
leaq 0xf8(%rsp), %rdi
callq 0x6530
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
callq 0x32ecd
leaq 0x50ab4(%rip), %rdi     # 0x62280
leaq 0x333ff(%rip), %rsi     # 0x44bd2
callq 0x6610
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x117ef
movb $0x0, -0x1(%rbx,%rax)
leaq 0x333dc(%rip), %rsi     # 0x44bd2
xorl %edi, %edi
callq 0x6610
testq %rax, %rax
je 0x11831
movq %rax, %rbx
movq %rax, %rdi
callq 0x6150
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x11819
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65a0
cmpb $0x77, %al
je 0x11845
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x11831
pushq $0x1
jmp 0x11847
leaq 0x3339c(%rip), %rdi     # 0x44bd4
pushq $0x1
popq %rsi
callq 0x12a66
jmp 0x1195c
pushq $0x2
popq %rbx
movl %ebx, 0x4fbf2(%rip)     # 0x61440
movq 0x50b3b(%rip), %rdi     # 0x62390
pushq $-0x1
popq %rdx
movl %ebx, %esi
callq 0x32f59
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x11876
movq 0x50b23(%rip), %rdi     # 0x62390
movl %ebp, %esi
movl %ebx, %edx
callq 0x3c2f8
callq 0x32c12
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x12c92
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x12ecc
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x64c0
movq %r14, %rdi
callq 0x6838
leaq 0x6(%rsp), %rsi
movl %ebp, %edi
callq 0x3cc92
leaq 0x35d0f(%rip), %rsi     # 0x475d5
leaq 0xf8(%rsp), %rdi
callq 0x63c0
leaq 0xf8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6350
leaq 0x35ce9(%rip), %rsi     # 0x475d5
movq %rax, %rdi
callq 0x63c0
leaq 0x330f9(%rip), %rsi     # 0x449f4
leaq 0xf8(%rsp), %rdi
callq 0x63c0
leaq 0x6(%rsp), %rsi
movq %rax, %rdi
callq 0x63c0
leaq 0x100(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x6640
movq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x12a66
leaq 0x10(%rsp), %rdi
callq 0x6838
movq 0x50a4b(%rip), %rdi     # 0x62390
xorl $0x3, %ebx
pushq $-0x1
popq %rdx
movl %ebx, %esi
callq 0x337f8
leaq 0x50(%rsp), %rdi
callq 0x130ee
leaq 0x30(%rsp), %rdi
callq 0x6838
leaq 0xf8(%rsp), %rdi
callq 0x60a0
addq $0x270, %rsp            # imm = 0x270
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6838
jmp 0x1199c
jmp 0x11999
jmp 0x11999
jmp 0x11994
movq %rax, %rbx
jmp 0x119a6
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x130ee
leaq 0x30(%rsp), %rdi
callq 0x6838
leaq 0xf8(%rsp), %rdi
callq 0x60a0
movq %rbx, %rdi
callq 0x6740