// File: /workspace/github_cpp_makefile_star2_O1/kobanium[P]Ray/src/util/Command.cpp
// Function: AnalyzeCommand(int, char**)
void
AnalyzeCommand( int argc, char **argv )
{
  int n, size;
  
  for (int i = 1; i < argc; i++){
    n = COMMAND_MAX + 1;
    for (int j = 0; j < COMMAND_MAX; j++){
      if (!strcmp(argv[i], command[j].c_str())){
        n = j;
      }
    }

    switch (n) {
      case COMMAND_PLAYOUT:
        // プレイアウト数固定の探索の設定
        SetPlayout(atoi(argv[++i]));
        SetSearchSetting(SearchTimeStrategy::ConstantPlayoutMode);
        break;
      case COMMAND_TIME:
        // 持ち時間の設定
        SetTime(atof(argv[++i]));
        SetSearchSetting(SearchTimeStrategy::TimeControlMode);
        break;
      case COMMAND_SIZE:
        // 碁盤の大きさの設定
        size = atoi(argv[++i]);
        if (pure_board_size != size &&
            size > 0 && size <= PURE_BOARD_SIZE) {
          SetBoardSize(size);
          SetParameter();
        }
        break;
      case COMMAND_CONST_TIME:
        // 1手あたりの思考時間を固定した探索の設定
        SetConstThinkingTime(atof(argv[++i]));
        SetSearchSetting(SearchTimeStrategy::ConstantTimeMode);
        break;
      case COMMAND_THREAD:
        // 探索スレッド数の設定
        SetThread(atoi(argv[++i]));
        break;
      case COMMAND_KOMI:
        // コミの設定
        SetKomi(atof(argv[++i]));
        break;
      case COMMAND_HANDICAP:
        // 置き石の個数の設定
        SetConstHandicapNum(atoi(argv[++i]));
        SetHandicapNum(0);
        break;
      case COMMAND_REUSE_SUBTREE:
        // 探索結果の再利用の設定
        SetReuseSubtree(true);
        break;
      case COMMAND_PONDERING :
        // 予測読みの設定
        SetReuseSubtree(true);
        SetPonderingMode(true);
        break;
      case COMMAND_TREE_SIZE:
        // UCTのノードの個数の設定
        SetHashSize(static_cast<unsigned int>(atoi(argv[++i])));
        break;
      case COMMAND_SUPERKO:
        // 超劫のh判定の設定
        SetSuperKo(true);
        break;
      case COMMAND_RESIGN_THRESHOLD:
        SetResignThreshold(atof(argv[++i]));
        break;
      case COMMAND_CGOS_MODE:
        SetCaptureAllMode(true);
        break;
      case COMMAND_NO_DEBUG:
        // デバッグメッセージを出力しない設定
        SetDebugMessageMode(false);
        break;
      default:
        for (int j = 0; j < COMMAND_MAX; j++){
          fprintf(stderr, "%-22s : %s\n", command[j].c_str(), errmessage[j].c_str());
        }
        exit(1);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, (%rsp)
movl %edi, 0x8(%rsp)
cmpl $0x2, %edi
jl 0x23deb
movl $0x1, %r12d
movslq %r12d, %r14
movq (%rsp), %rax
movq (%rax,%r14,8), %r13
movl $0xf, %r15d
leaq 0x527b7(%rip), %rbp     # 0x763c0
xorl %ebx, %ebx
movq (%rbp), %rsi
movq %r13, %rdi
callq 0x6590
testl %eax, %eax
cmovel %ebx, %r15d
incq %rbx
addq $0x20, %rbp
cmpq $0xe, %rbx
jne 0x23c0b
cmpl $0xd, %r15d
ja 0x23dfa
movl %r15d, %eax
leaq 0x3a11a(%rip), %rcx     # 0x5dd58
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6640
movl %eax, %edi
callq 0x4d0bd
movl $0x0, 0x14(%rsp)
leaq 0x14(%rsp), %rdi
jmp 0x23d72
movl $0x1, %edi
callq 0x53954
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6640
movl %eax, %edi
callq 0x4a250
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6510
callq 0x4cea4
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6640
movl %eax, %edi
callq 0x55e44
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6640
leaq 0x51bc2(%rip), %rcx     # 0x758b4
cmpl %eax, (%rcx)
sete %cl
leal -0x1(%rax), %edx
cmpl $0x13, %edx
setae %dl
orb %cl, %dl
jne 0x23ddd
movl %eax, %edi
callq 0x5395c
callq 0x4a25f
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6510
callq 0x4d115
movl $0x1, 0xc(%rsp)
leaq 0xc(%rsp), %rdi
jmp 0x23d72
movl $0x1, %edi
callq 0x4a257
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6510
callq 0x4d10c
movl $0x2, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x4d0ac
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6510
callq 0x53df3
jmp 0x23ddd
movl $0x1, %edi
callq 0x4ce9c
jmp 0x23ddd
leal 0x1(%r14), %r12d
movq (%rsp), %rax
movq 0x8(%rax,%r14,8), %rdi
callq 0x6640
movl %eax, %edi
callq 0x56314
xorl %edi, %edi
callq 0x5631b
jmp 0x23ddd
xorl %edi, %edi
callq 0x1d0ac
jmp 0x23ddd
movl $0x1, %edi
callq 0x4a257
movl $0x1, %edi
callq 0x4a248
incl %r12d
cmpl 0x8(%rsp), %r12d
jl 0x23bf1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x693e
nop