// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x270, %rsp            # imm = 0x270
leaq 0xf8(%rsp), %rdi
callq 0x6550
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
callq 0x4a986
leaq 0x56dae(%rip), %rdi     # 0x77280
leaq 0x3cf29(%rip), %rsi     # 0x5d402
callq 0x6640
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x204f5
movb $0x0, -0x1(%rbx,%rax)
leaq 0x3cf06(%rip), %rsi     # 0x5d402
xorl %edi, %edi
callq 0x6640
testq %rax, %rax
je 0x2053a
movq %rax, %rbx
movq %rax, %rdi
callq 0x6160
cmpb $0xa, -0x1(%rbx,%rax)
jne 0x2051f
movb $0x0, -0x1(%rbx,%rax)
movsbl (%rbx), %edi
callq 0x65c0
cmpb $0x77, %al
je 0x20550
movzbl %al, %eax
cmpl $0x62, %eax
jne 0x2053a
movl $0x1, %ebx
jmp 0x20555
leaq 0x3cec3(%rip), %rdi     # 0x5d404
movl $0x1, %esi
callq 0x21a05
jmp 0x206ef
movl $0x2, %ebx
movl %ebx, 0x55ee5(%rip)     # 0x76440
movq 0x56e2e(%rip), %rdi     # 0x77390
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4aa17
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x20585
movq 0x56e14(%rip), %rdi     # 0x77390
movl %ebp, %esi
movl %ebx, %edx
callq 0x55ae8
callq 0x4a4ae
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x21cea
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
callq 0x21fe6
leaq 0x20(%rsp), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x64f0
movq (%r14), %rdi
leaq 0x10(%rsp), %r12
cmpq %r12, %rdi
je 0x205d0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6410
leaq 0x46(%rsp), %rsi
movl %ebp, %edi
callq 0x56441
leaq 0x400d2(%rip), %rsi     # 0x606b5
leaq 0xf8(%rsp), %rdi
movl $0x1, %edx
callq 0x6490
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0xf8(%rsp), %rdi
callq 0x6490
leaq 0x400a2(%rip), %rsi     # 0x606b5
movl $0x1, %edx
movq %rax, %rdi
callq 0x6490
leaq 0x3d57f(%rip), %rsi     # 0x5dba6
leaq 0xf8(%rsp), %rdi
movl $0x5, %edx
callq 0x6490
leaq 0x46(%rsp), %r14
movq %r14, %rdi
callq 0x6160
leaq 0xf8(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x6490
leaq 0x100(%rsp), %rsi
movq %rsp, %rdi
callq 0x6670
movq (%rsp), %rdi
movl $0x1, %esi
callq 0x21a05
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2068d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x56cfc(%rip), %rdi     # 0x77390
xorl $0x3, %ebx
movl %ebx, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4b349
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x206c4
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x6410
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x206e5
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x6410
leaq 0x60(%rsp), %rdi
callq 0x224f4
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x20706
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x5588b(%rip), %rsi     # 0x75f98
leaq 0xf8(%rsp), %rdi
callq 0x61e0
leaq 0x168(%rsp), %rdi
callq 0x60f0
addq $0x270, %rsp            # imm = 0x270
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x20760
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x6410
jmp 0x20760
jmp 0x2075d
jmp 0x2075d
jmp 0x20758
movq %rax, %rbx
jmp 0x2076a
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x222d4
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x20781
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x55810(%rip), %rsi     # 0x75f98
leaq 0xf8(%rsp), %rdi
callq 0x61e0
leaq 0x168(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6760