LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: kobanium[P]Ray/src/sgf/SgfExtractor.cpp
// Function: GetMove(SGF_record_t*, char const*, int)
static int
GetMove( SGF_record_t *kifu, const char *sgf_text, const int cursor )
{
  int tmp_cursor = 0;

  if (cursor + 3 < 100000){
    if (kifu->moves == 0) {
      if (sgf_text[cursor] == 'B') {
        kifu->start_color = S_BLACK;
      } else {
        kifu->start_color = S_WHITE;
      }
    }
  
    if (sgf_text[cursor + 2] == ']') {
      kifu->move_x[kifu->moves] = PASS;
      kifu->move_y[kifu->moves] = PASS;
      tmp_cursor = 2;
    } else {
      kifu->move_x[kifu->moves] = ParsePosition(sgf_text[cursor + 2]);
      kifu->move_y[kifu->moves] = ParsePosition(sgf_text[cursor + 3]);
      tmp_cursor = 4;
      while ((cursor + tmp_cursor < 100000) && (sgf_text[cursor + tmp_cursor] != ']')) tmp_cursor++;        
    }

    kifu->moves++;
  }

  return cursor + tmp_cursor;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x3, %eax
cmpl $0x186a0, %eax          # imm = 0x186A0
jge 0x82ae5
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x829ee
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x42, %eax
jne 0x829e2
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
jmp 0x829ec
movq -0x8(%rbp), %rax
movl $0x2, (%rax)
jmp 0x829ee
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
jne 0x82a3b
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movl $0x0, 0x8(%rax,%rcx,4)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movl $0x0, 0xc88(%rax,%rcx,4)
movl $0x2, -0x18(%rbp)
jmp 0x82ad8
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x82b60
movl %eax, %edx
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movl %edx, 0x8(%rax,%rcx,4)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edi
callq 0x82b60
movl %eax, %edx
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
movl %edx, 0xc88(%rax,%rcx,4)
movl $0x4, -0x18(%rbp)
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl $0x186a0, %ecx          # imm = 0x186A0
movb %al, -0x19(%rbp)
jge 0x82ac2
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x82acb
jmp 0x82ad6
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x82a95
jmp 0x82ad8
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/sgf/SgfExtractor.cpp
// Function: SkipData(char const*, int)
static int
SkipData( const char *sgf_text, const int cursor )
{
  int tmp_cursor = 3;
  
  while ((cursor + tmp_cursor < 100000) &&
         (sgf_text[cursor + tmp_cursor] != ']')) {
    tmp_cursor++;
  }
  
  return cursor + tmp_cursor;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x3, -0x10(%rbp)
movl -0xc(%rbp), %ecx
addl -0x10(%rbp), %ecx
xorl %eax, %eax
cmpl $0x186a0, %ecx          # imm = 0x186A0
movb %al, -0x11(%rbp)
jge 0x82b3f
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5d, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x82b48
jmp 0x82b53
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x82b12
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: kobanium[P]Ray/src/sgf/SgfExtractor.cpp
// Function: ParsePosition(char)
static int
ParsePosition( const char c )
{
  switch (c) {
    case 'a': return 1;
    case 'b': return 2;
    case 'c': return 3;
    case 'd': return 4;
    case 'e': return 5;
    case 'f': return 6;
    case 'g': return 7;
    case 'h': return 8;
    case 'i': return 9;
    case 'j': return 10;
    case 'k': return 11;
    case 'l': return 12;
    case 'm': return 13;
    case 'n': return 14;
    case 'o': return 15;
    case 'p': return 16;
    case 'q': return 17;
    case 'r': return 18;
    case 's': return 19;
    default : return PASS;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x5(%rbp)
movsbl -0x5(%rbp), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x12, %eax
ja 0x82c4e
movq -0x10(%rbp), %rax
leaq 0x2c475(%rip), %rcx     # 0xaf000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0x82c55
movl $0x2, -0x4(%rbp)
jmp 0x82c55
movl $0x3, -0x4(%rbp)
jmp 0x82c55
movl $0x4, -0x4(%rbp)
jmp 0x82c55
movl $0x5, -0x4(%rbp)
jmp 0x82c55
movl $0x6, -0x4(%rbp)
jmp 0x82c55
movl $0x7, -0x4(%rbp)
jmp 0x82c55
movl $0x8, -0x4(%rbp)
jmp 0x82c55
movl $0x9, -0x4(%rbp)
jmp 0x82c55
movl $0xa, -0x4(%rbp)
jmp 0x82c55
movl $0xb, -0x4(%rbp)
jmp 0x82c55
movl $0xc, -0x4(%rbp)
jmp 0x82c55
movl $0xd, -0x4(%rbp)
jmp 0x82c55
movl $0xe, -0x4(%rbp)
jmp 0x82c55
movl $0xf, -0x4(%rbp)
jmp 0x82c55
movl $0x10, -0x4(%rbp)
jmp 0x82c55
movl $0x11, -0x4(%rbp)
jmp 0x82c55
movl $0x12, -0x4(%rbp)
jmp 0x82c55
movl $0x13, -0x4(%rbp)
jmp 0x82c55
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: kobanium[P]Ray/src/mcts/Rating.cpp
// Function: SetNeighbor()
void
SetNeighbor( void )
{
  neighbor[ 0] = -2 * board_size;
  neighbor[ 1] = - board_size - 1;
  neighbor[ 2] = - board_size;
  neighbor[ 3] = - board_size + 1;
  neighbor[ 4] = -2;
  neighbor[ 5] = -1;
  neighbor[ 6] = 0;
  neighbor[ 7] = 1;
  neighbor[ 8] = 2;
  neighbor[ 9] = board_size - 1;
  neighbor[10] = board_size;
  neighbor[11] = board_size + 1;
  neighbor[12] = 2 * board_size;

  SetCrossPosition();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x64de1(%rip), %rax     # 0xe7a4c
imull $0xfffffffe, (%rax), %eax # imm = 0xFFFFFFFE
movl %eax, 0x691e9(%rip)     # 0xebe60
xorl %eax, %eax
leaq 0x64dcc(%rip), %rcx     # 0xe7a4c
subl (%rcx), %eax
subl $0x1, %eax
movl %eax, 0x691d9(%rip)     # 0xebe64
xorl %eax, %eax
leaq 0x64db8(%rip), %rcx     # 0xe7a4c
subl (%rcx), %eax
movl %eax, 0x691cc(%rip)     # 0xebe68
xorl %eax, %eax
leaq 0x64da7(%rip), %rcx     # 0xe7a4c
subl (%rcx), %eax
addl $0x1, %eax
movl %eax, 0x691bc(%rip)     # 0xebe6c
movl $0xfffffffe, 0x691b6(%rip) # imm = 0xFFFFFFFE
movl $0xffffffff, 0x691b0(%rip) # imm = 0xFFFFFFFF
movl $0x0, 0x691aa(%rip)     # 0xebe78
movl $0x1, 0x691a4(%rip)     # 0xebe7c
movl $0x2, 0x6919e(%rip)     # 0xebe80
leaq 0x64d63(%rip), %rax     # 0xe7a4c
movl (%rax), %eax
subl $0x1, %eax
movl %eax, 0x69190(%rip)     # 0xebe84
leaq 0x64d51(%rip), %rax     # 0xe7a4c
movl (%rax), %eax
movl %eax, 0x69185(%rip)     # 0xebe88
leaq 0x64d42(%rip), %rax     # 0xe7a4c
movl (%rax), %eax
addl $0x1, %eax
movl %eax, 0x69177(%rip)     # 0xebe8c
leaq 0x64d30(%rip), %rax     # 0xe7a4c
movl (%rax), %eax
shll %eax
movl %eax, 0x6916a(%rip)     # 0xebe90
callq 0xa07c0
popq %rbp
retq
nopl (%rax)
// File: kobanium[P]Ray/src/mcts/Rating.cpp
// Function: Neighbor12(int, int*, int*, int*)
static void
Neighbor12( const int previous_move, int distance_2[], int distance_3[], int distance_4[] )
{
  // 着手距離2の座標
  distance_2[0] = previous_move + neighbor[ 2];
  distance_2[1] = previous_move + neighbor[ 5];
  distance_2[2] = previous_move + neighbor[ 7];
  distance_2[3] = previous_move + neighbor[10];

  // 着手距離3の座標
  distance_3[0] = previous_move + neighbor[ 1];
  distance_3[1] = previous_move + neighbor[ 3];
  distance_3[2] = previous_move + neighbor[ 9];
  distance_3[3] = previous_move + neighbor[11];

  // 着手距離4の座標
  distance_4[0] = previous_move + neighbor[ 0];
  distance_4[1] = previous_move + neighbor[ 4];
  distance_4[2] = previous_move + neighbor[ 8];
  distance_4[3] = previous_move + neighbor[12];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x4(%rbp), %ecx
addl 0x6841c(%rip), %ecx     # 0xebe68
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x4(%rbp), %ecx
addl 0x68419(%rip), %ecx     # 0xebe74
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
addl 0x68411(%rip), %ecx     # 0xebe7c
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x4(%rbp), %ecx
addl 0x6840d(%rip), %ecx     # 0xebe88
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x4(%rbp), %ecx
addl 0x683d9(%rip), %ecx     # 0xebe64
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0x4(%rbp), %ecx
addl 0x683d2(%rip), %ecx     # 0xebe6c
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
addl 0x683da(%rip), %ecx     # 0xebe84
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x4(%rbp), %ecx
addl 0x683d2(%rip), %ecx     # 0xebe8c
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movl -0x4(%rbp), %ecx
addl 0x68396(%rip), %ecx     # 0xebe60
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x4(%rbp), %ecx
addl 0x68397(%rip), %ecx     # 0xebe70
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4(%rbp), %ecx
addl 0x68397(%rip), %ecx     # 0xebe80
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x4(%rbp), %ecx
addl 0x68397(%rip), %ecx     # 0xebe90
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/Rating.cpp
// Function: LoadParameter(char const*, float*, int)
static void
LoadParameter( const char *filename, float params[], 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, "%e", &params[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;
    exit(1);
  }
  for (int i = 0; i < array_size; i++) {
    if (fscanf(fp, "%e", &params[i]) == EOF) {
      std::cerr << "Read Error : " << filename << std::endl;
      exit(1);
    }
  }
#endif
  fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x285cd(%rip), %rsi     # 0xad52b
callq 0x7680
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x84fb5
movq 0x6207b(%rip), %rdi     # 0xe6ff0
leaq 0x28184(%rip), %rsi     # 0xad100
callq 0x7530
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x7530
movq %rax, %rdi
leaq 0x27164(%rip), %rsi     # 0xac0fb
callq 0x7530
movq %rax, %rdi
movq 0x61fc2(%rip), %rsi     # 0xe6f68
callq 0x75b0
movl $0x1, %edi
callq 0x76a0
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8502f
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
movslq -0x24(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdx
leaq 0x2a103(%rip), %rsi     # 0xaf0e1
movb $0x0, %al
callq 0x7a00
cmpl $-0x1, %eax
jne 0x85022
movq 0x61fff(%rip), %rdi     # 0xe6ff0
leaq 0x2811a(%rip), %rsi     # 0xad112
callq 0x7530
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x7530
movq %rax, %rdi
movq 0x61f55(%rip), %rsi     # 0xe6f68
callq 0x75b0
movl $0x1, %edi
callq 0x76a0
jmp 0x85024
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x84fbc
movq -0x20(%rbp), %rdi
callq 0x7540
addq $0x30, %rsp
popq %rbp
retq
nop
// File: kobanium[P]Ray/src/mcts/Rating.cpp
// Function: LoadMD2Parameter(char const*, float*)
static void
LoadMD2Parameter( const char *filename, float params[] )
{
  FILE *fp;
  int index;
  float rate;
  unsigned int transp[16];

  for (int i = 0; i < MD2_MAX; i++) {
    params[i] = -1.0;
  }
#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);
  }
  while (fscanf_s(fp, "%d%e", &index, &rate) != EOF) {
    MD2Transpose16(static_cast<unsigned int>(index), transp);
    for (int i = 0; i < 16; i++) {
      params[transp[i]] = rate;
    }
  }
#else
  fp = fopen(filename, "r");
  if (fp == NULL) {
    std::cerr << "can not open -" << filename << "-" << std::endl;
    exit(1);
  }
  while (fscanf(fp, "%d%e", &index, &rate) != EOF) {
    MD2Transpose16(static_cast<unsigned int>(index), transp);
    for (int i = 0; i < 16; i++) {
      params[transp[i]] = rate;
    }
  }
#endif
  fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x64(%rbp)
cmpl $0x1000000, -0x64(%rbp) # imm = 0x1000000
jge 0x85080
movq -0x10(%rbp), %rax
movslq -0x64(%rbp), %rcx
movss 0x2a060(%rip), %xmm0    # 0xaf0d0
movss %xmm0, (%rax,%rcx,4)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x85057
movq -0x8(%rbp), %rdi
leaq 0x284a0(%rip), %rsi     # 0xad52b
callq 0x7680
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x850e2
movq 0x61f4e(%rip), %rdi     # 0xe6ff0
leaq 0x28057(%rip), %rsi     # 0xad100
callq 0x7530
movq %rax, %rdi
movq -0x8(%rbp), %rsi
callq 0x7530
movq %rax, %rdi
leaq 0x27037(%rip), %rsi     # 0xac0fb
callq 0x7530
movq %rax, %rdi
movq 0x61e95(%rip), %rsi     # 0xe6f68
callq 0x75b0
movl $0x1, %edi
callq 0x76a0
jmp 0x850e4
movq -0x18(%rbp), %rdi
leaq 0x29ff0(%rip), %rsi     # 0xaf0df
leaq -0x1c(%rbp), %rdx
leaq -0x20(%rbp), %rcx
movb $0x0, %al
callq 0x7a00
cmpl $-0x1, %eax
je 0x8513f
movl -0x1c(%rbp), %edi
leaq -0x60(%rbp), %rsi
callq 0x93060
movl $0x0, -0x68(%rbp)
cmpl $0x10, -0x68(%rbp)
jge 0x8513d
movss -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x68(%rbp), %rcx
movl -0x60(%rbp,%rcx,4), %ecx
movss %xmm0, (%rax,%rcx,4)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x85116
jmp 0x850e4
movq -0x18(%rbp), %rdi
callq 0x7540
addq $0x70, %rsp
popq %rbp
retq
nop
// File: kobanium[P]Ray/src/mcts/Rating.cpp
// Function: CalculateTacticalFeatures(unsigned char*)
inline double
CalculateTacticalFeatures( unsigned char *features )
{
  double rate =
    sim_capture[features[CAPTURE]] *
    sim_save_extension[features[SAVE_EXTENSION]] *
    sim_atari[features[ATARI]] *
    sim_extension[features[EXTENSION]] *
    sim_dame[features[DAME]] *
    sim_throw_in[features[THROW_IN]];

  return rate;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x4066d58(%rip), %rax   # 0x40ebec0
movss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0x4066d92(%rip), %rax   # 0x40ebf10
mulss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, %ecx
leaq 0x4066d9c(%rip), %rax   # 0x40ebf30
mulss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movzbl 0x3(%rax), %eax
movl %eax, %ecx
leaq 0x4066db6(%rip), %rax   # 0x40ebf60
mulss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movzbl 0x4(%rax), %eax
movl %eax, %ecx
leaq 0x4066db4(%rip), %rax   # 0x40ebf74
mulss (%rax,%rcx,4), %xmm0
movq -0x8(%rbp), %rax
movzbl 0x5(%rax), %eax
movl %eax, %ecx
leaq 0x4066daa(%rip), %rax   # 0x40ebf80
mulss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
popq %rbp
retq
nopl (%rax,%rax)
// File: kobanium[P]Ray/src/mcts/UctRating.cpp
// Function: Gamma(std::vector<fm_t*, std::allocator<fm_t*>>&)
static double
Gamma( std::vector<fm_t*> &params )
{
  double gamma = 1.0;

  for (const fm_t *param : params) {
    gamma *= param->w;
  }
  
  return gamma;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movsd 0x25684(%rip), %xmm0    # 0xac008
movsd %xmm0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x87500
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x87530
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x87560
testb $0x1, %al
jne 0x869be
jmp 0x869eb
leaq -0x20(%rbp), %rdi
callq 0x875a0
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsd (%rax), %xmm0
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x875c0
jmp 0x869ab
movsd -0x10(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/UctRating.cpp
// Function: Theta(std::vector<fm_t*, std::allocator<fm_t*>>&, int, int)
static double
Theta( std::vector<fm_t*> &t, const int i, const int j )
{
  const double inv = 1.0 / static_cast<double>(BTFM_DIMENSION);
  double theta = 0.0;

  for (int k = 0; k < BTFM_DIMENSION; k++) {
    theta += t[i]->v[k] * t[j]->v[k];
  }

  return theta * inv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movsd 0x27526(%rip), %xmm0    # 0xadf40
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x5, -0x24(%rbp)
jge 0x86a8f
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0x87610
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movsd 0x8(%rax,%rcx,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rsi
callq 0x87610
movsd -0x30(%rbp), %xmm0
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
movsd 0x8(%rax,%rcx,8), %xmm2
movsd -0x20(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x86a2e
movsd 0x274a9(%rip), %xmm0    # 0xadf40
mulsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/MCTSNode.cpp
// Function: InitializeNode(uct_node_t&, int, int)
void
InitializeNode( uct_node_t &node, const int pm1, const int pm2 )
{
  node.previous_move1 = pm1;
  node.previous_move2 = pm2;
  node.move_count = 0;
  node.win = 0;
  node.virtual_loss = 0;
  node.width = 0;
  node.child_num = 0;
  std::fill_n(node.seki, BOARD_MAX, false);
  std::fill_n(node.ownership, BOARD_MAX, 0.0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rdi
addq $0x27b4, %rdi           # imm = 0x27B4
movb $0x0, -0x11(%rbp)
movl $0x349, %esi            # imm = 0x349
leaq -0x11(%rbp), %rdx
callq 0x884f0
movq -0x8(%rbp), %rdi
addq $0x2b00, %rdi           # imm = 0x2B00
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x349, %esi            # imm = 0x349
leaq -0x20(%rbp), %rdx
callq 0x88540
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: kobanium[P]Ray/src/mcts/MCTSNode.cpp
// Function: InitializeCandidate(child_node_t&, int&, int, bool)
void
InitializeCandidate( child_node_t &child, int &child_num, const int pos, const bool ladder )
{
  child.pos = pos;
  child.move_count = 0;
  child.win = 0;
  child.virtual_loss = 0;
  child.index = NOT_EXPANDED;
  child.rate = 0.0;
  child.pw = false;
  child.open = false;
  child.ladder = ladder;

  child_num++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
andb $0x1, %al
movb %al, -0x15(%rbp)
movl -0x14(%rbp), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x14(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x19(%rax)
movb -0x15(%rbp), %cl
movq -0x8(%rbp), %rax
andb $0x1, %cl
movb %cl, 0x1a(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: kobanium[P]Ray/src/mcts/MCTSNode.cpp
// Function: UpdateResult(uct_node_t&, child_node_t&, int)
void
UpdateResult( uct_node_t &node, child_node_t &child, const int result )
{
  node.win += result;
  node.move_count++;
  node.virtual_loss--;

  child.win += result;
  child.move_count++;
  child.virtual_loss--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %esi
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
callq 0x88590
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x6c350
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
xorl %esi, %esi
callq 0x885c0
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdi
addq $0xc, %rdi
callq 0x88590
movq -0x10(%rbp), %rdi
addq $0x4, %rdi
xorl %esi, %esi
callq 0x6c350
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0x885c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/MCTSNode.cpp
// Function: ReuseRootCandidateWithoutLadderMove(uct_node_t&, bool const*)
void
ReuseRootCandidateWithoutLadderMove( uct_node_t &node, const bool ladder[] )
{
  const int child_num = node.child_num;
  child_node_t *child = node.child;

  for (int i = 0; i < child_num; i++) {
    const int pos = child[i].pos;

    child[i].rate = 0.0;
    child[i].pw = false;
    child[i].open = false;
    if (ladder[pos]) {
      node.move_count -= child[i].move_count;
      node.win -= child[i].win;
      child[i].move_count = 0;
      child[i].win = 0;
    }

    child[i].ladder = ladder[pos];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
addq $0x1c, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8824d
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movswl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x14(%rax)
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x18(%rax)
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x19(%rax)
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x8821f
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
addq $0x4, %rdi
callq 0x25780
movl %eax, %esi
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x88670
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
addq $0xc, %rdi
callq 0x25780
movl %eax, %esi
movq -0x8(%rbp), %rdi
addq $0xc, %rdi
callq 0x88670
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
addq $0x4, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
addq $0xc, %rdi
xorl %esi, %esi
callq 0x88450
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rdx
imulq $0x1c, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x1a(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x8812d
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/MCTSNode.cpp
// Function: CalculatePassWinningPercentage(uct_node_t const&)
double
CalculatePassWinningPercentage( const uct_node_t &node )
{
  const child_node_t &pass_child = node.child[PASS_INDEX];

  if (pass_child.move_count != 0) {
    return static_cast<double>(pass_child.win) / pass_child.move_count;
  } else {
    return 0.0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x1c, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x4, %rdi
callq 0x25780
cmpl $0x0, %eax
je 0x882c1
movq -0x18(%rbp), %rdi
addq $0xc, %rdi
callq 0x25780
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x4, %rdi
callq 0x25780
movsd -0x20(%rbp), %xmm0
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x882c9
xorps %xmm0, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/MCTSNode.cpp
// Function: UpdateOwnership(uct_node_t&, game_info_t*, int)
void
UpdateOwnership( uct_node_t &node, game_info_t *game, const int current_color )
{
  const char *board = game->board;

  for (int i = 0; i < pure_board_max; i++) {
    const int pos = onboard_pos[i];
    int color = board[pos];

    if (color == S_EMPTY) color = territory[Pat3(game->pat, pos)];

    if (color == current_color) {
      node.ownership[pos] += 1.0;
    } else if (color == S_EMPTY) {
      node.ownership[pos] += 0.5;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x43f8, %rax           # imm = 0x43F8
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
leaq 0x5f6be(%rip), %rcx     # 0xe7a40
cmpl (%rcx), %eax
jge 0x8843b
movslq -0x24(%rbp), %rcx
leaq 0x1ab4a4db(%rip), %rax  # 0x1abd2870
movl (%rax,%rcx,4), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x883d5
movq -0x10(%rbp), %rdi
addq $0x4748, %rdi           # imm = 0x4748
movl -0x28(%rbp), %esi
callq 0x93d30
movl %eax, %eax
movl %eax, %ecx
leaq 0x1ab18492(%rip), %rax  # 0x1aba0860
movzbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x88401
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsd 0x23c1b(%rip), %xmm0    # 0xac008
addsd 0x2b00(%rax,%rcx,8), %xmm0
movsd %xmm0, 0x2b00(%rax,%rcx,8)
jmp 0x8842b
cmpl $0x0, -0x2c(%rbp)
jne 0x88429
movq -0x8(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsd 0x23bf9(%rip), %xmm0    # 0xac010
addsd 0x2b00(%rax,%rcx,8), %xmm0
movsd %xmm0, 0x2b00(%rax,%rcx,8)
jmp 0x8842b
jmp 0x8842d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x88378
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: kobanium[P]Ray/src/mcts/ucb/UCBEvaluation.cpp
// Function: CalculateUCB1Value(child_node_t const&, int)
double
CalculateUCB1Value( const child_node_t &child, const int total_visits )
{
  const int move_count = child.move_count + child.virtual_loss.load();
  const double exploitation_term = static_cast<double>(child.win) / move_count;
  const double exploration_term = std::sqrt(2.0 * std::log(total_visits) / move_count);

  return exploitation_term + ucb_c * exploration_term;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
callq 0x25780
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movl $0x5, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x25b00
movl %eax, -0x3c(%rbp)
jmp 0x8886c
movl -0x3c(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x50(%rbp)
decl %eax
subl $0x2, %eax
jb 0x88896
jmp 0x88881
movl -0x50(%rbp), %eax
subl $0x5, %eax
je 0x888a1
jmp 0x8888b
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x888b4
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x888b4
movq -0x48(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x888b4
movq %rax, %rdi
callq 0x25ac0
movl -0x4c(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
callq 0x25780
cvtsi2sd %eax, %xmm0
cvtsi2sdl -0x28(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x24(%rbp), %edi
callq 0x88df0
movaps %xmm0, %xmm1
movsd 0x26031(%rip), %xmm0    # 0xae920
mulsd %xmm1, %xmm0
cvtsi2sdl -0x28(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x7400
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm1
movsd 0x5f0d5(%rip), %xmm0    # 0xe79e8
movsd -0x38(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/ucb/UCBEvaluation.cpp
// Function: CalculateUCB1TunedValue(child_node_t const&, int)
double
CalculateUCB1TunedValue( const child_node_t &child, const int total_visits )
{
  const int move_count = child.move_count + child.virtual_loss.load();
  const double p = static_cast<double>(child.win) / move_count;
  const double div = std::log(total_visits) / move_count;
  const double v = p - p * p + std::sqrt(2.0 * div);

  return p + std::sqrt(div * ((0.25 < v) ? 0.25 : v));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x20(%rbp)
movl %esi, -0x24(%rbp)
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
callq 0x25780
movl %eax, -0x54(%rbp)
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x8(%rbp)
movl $0x5, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x25b00
movl %eax, -0x44(%rbp)
jmp 0x8897f
movl -0x44(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x58(%rbp)
decl %eax
subl $0x2, %eax
jb 0x889a9
jmp 0x88994
movl -0x58(%rbp), %eax
subl $0x5, %eax
je 0x889b4
jmp 0x8899e
movq -0x50(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x889c7
movq -0x50(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x889c7
movq -0x50(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x889c7
movq %rax, %rdi
callq 0x25ac0
movl -0x54(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
callq 0x25780
cvtsi2sd %eax, %xmm0
cvtsi2sdl -0x28(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x24(%rbp), %edi
callq 0x88df0
cvtsi2sdl -0x28(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
movsd -0x30(%rbp), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movsd 0x25ee0(%rip), %xmm0    # 0xae920
mulsd -0x38(%rbp), %xmm0
callq 0x7400
movaps %xmm0, %xmm1
movsd -0x70(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x40(%rbp), %xmm0
movsd 0x266c4(%rip), %xmm1    # 0xaf140
ucomisd %xmm1, %xmm0
jbe 0x88a91
movsd 0x266b6(%rip), %xmm0    # 0xaf140
movsd %xmm0, -0x78(%rbp)
jmp 0x88a9b
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x60(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
mulsd %xmm1, %xmm0
callq 0x7400
movaps %xmm0, %xmm1
movsd -0x68(%rbp), %xmm0
addsd %xmm1, %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/UctSearch.cpp
// Function: SetParameter()
void
SetParameter( void )
{
  if (pure_board_size < 11) {
    expand_threshold = EXPAND_THRESHOLD_9;
  } else if (pure_board_size < 16) {
    expand_threshold = EXPAND_THRESHOLD_13;
  } else {
    expand_threshold = EXPAND_THRESHOLD_19;
  }

  SetTimeManagementParameter();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x5eb89(%rip), %rax     # 0xe7a44
cmpl $0xb, (%rax)
jge 0x88ecc
movl $0x14, 0x5eb3a(%rip)    # 0xe7a04
jmp 0x88ef0
leaq 0x5eb71(%rip), %rax     # 0xe7a44
cmpl $0x10, (%rax)
jge 0x88ee4
movl $0x19, 0x5eb22(%rip)    # 0xe7a04
jmp 0x88eee
movl $0x28, 0x5eb16(%rip)    # 0xe7a04
jmp 0x88ef0
callq 0x8f690
popq %rbp
retq
nopw (%rax,%rax)
// File: kobanium[P]Ray/src/mcts/UctSearch.cpp
// Function: InitializeSearchSetting()
void
InitializeSearchSetting( void )
{
  // Ownerの初期化
  for (int i = 0; i < board_max; i++){
    owner[i] = 50;
    owner_index[i] = 5;
    candidates[i] = true;
  }

  // 乱数の初期化
  std::random_device rand;
  for (int i = 0; i < THREAD_MAX; i++) {
    mt[i].seed(rand());
  }


  SetTimeManagementParameter();
  InitializeTimeSetting();

  pondered = false;
  pondering_stop = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x13b0, %rsp           # imm = 0x13B0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x5e8ac(%rip), %rcx     # 0xe7a48
cmpl (%rcx), %eax
jge 0x891e4
movslq -0x4(%rbp), %rcx
leaq 0x1aaeb0d5(%rip), %rax  # 0x1ab74280
movsd 0x25fb5(%rip), %xmm0    # 0xaf168
movsd %xmm0, (%rax,%rcx,8)
movslq -0x4(%rbp), %rcx
leaq 0x1aaecb0d(%rip), %rax  # 0x1ab75cd0
movl $0x5, (%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x1aaed82b(%rip), %rax  # 0x1ab76a00
movb $0x1, (%rax,%rcx)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x89192
leaq -0x1390(%rbp), %rdi
callq 0x630a0
movl $0x0, -0x1394(%rbp)
cmpl $0x40, -0x1394(%rbp)
jge 0x89281
movslq -0x1394(%rbp), %rax
imulq $0x9c8, %rax, %rcx      # imm = 0x9C8
leaq 0x1aac38a8(%rip), %rax  # 0x1ab4cac0
addq %rcx, %rax
movq %rax, -0x13b0(%rbp)
leaq -0x1390(%rbp), %rdi
callq 0x63140
movl %eax, -0x13a8(%rbp)
jmp 0x89236
movq -0x13b0(%rbp), %rdi
movl -0x13a8(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x63600
jmp 0x8924e
jmp 0x89250
movl -0x1394(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1394(%rbp)
jmp 0x891fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13a0(%rbp)
movl %eax, -0x13a4(%rbp)
leaq -0x1390(%rbp), %rdi
callq 0x635d0
jmp 0x892b2
callq 0x8f690
jmp 0x89288
callq 0x8f1b0
jmp 0x8928f
movb $0x0, 0x1aaedab3(%rip)  # 0x1ab76d49
movb $0x1, 0x1aaedaad(%rip)  # 0x1ab76d4a
leaq -0x1390(%rbp), %rdi
callq 0x635d0
addq $0x13b0, %rsp           # imm = 0x13B0
popq %rbp
retq
movq -0x13a0(%rbp), %rdi
callq 0x79b0
nop
// File: kobanium[P]Ray/src/mcts/UctSearch.cpp
// Function: StopPondering()
void
StopPondering( void )
{
  if (!pondering_mode) {
    return ;
  }

  if (ponder) {
    pondering_stop = true;
    for (int i = 0; i < threads; i++) {
      worker[i]->join();
      delete worker[i];
    }
    ponder = false;
    pondered = true;
    PrintPonderingCount(GetPoCount());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testb $0x1, 0x1aac37ed(%rip)  # 0x1ab4cabc
jne 0x892d6
jmp 0x89367
testb $0x1, 0x1aaeda6e(%rip)  # 0x1ab76d4b
je 0x89367
movb $0x1, 0x1aaeda60(%rip)  # 0x1ab76d4a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x5e706(%rip), %eax     # 0xe7a00
jge 0x8934d
movslq -0x4(%rbp), %rcx
leaq 0x1aaeda49(%rip), %rax  # 0x1ab76d50
movq (%rax,%rcx,8), %rdi
callq 0x7940
movslq -0x4(%rbp), %rcx
leaq 0x1aaeda35(%rip), %rax  # 0x1ab76d50
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x89340
movq -0x10(%rbp), %rdi
callq 0x66080
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x7560
jmp 0x89342
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x892f1
movb $0x0, 0x1aaed9f7(%rip)  # 0x1ab76d4b
movb $0x1, 0x1aaed9ee(%rip)  # 0x1ab76d49
callq 0x8f8a0
movl %eax, %edi
callq 0x22280
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: kobanium[P]Ray/src/mcts/UctSearch.cpp
// Function: CorrectDescendentNodes(std::vector<int, std::allocator<int>>&, int)
static void
CorrectDescendentNodes( std::vector<int> &indexes, int index )
{
  child_node_t *uct_child = uct_node[index].child;
  const int child_num = uct_node[index].child_num;

  indexes.push_back(index);

  for (int i = 0; i < child_num; i++) {
    if (uct_child[i].index != NOT_EXPANDED) {
      CorrectDescendentNodes(indexes, uct_child[i].index);
    }
  }   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0x1aac188a(%rip), %rax  # 0x1ab4cab0
movslq -0xc(%rbp), %rcx
imulq $0x4548, %rcx, %rcx     # imm = 0x4548
addq %rcx, %rax
addq $0x1c, %rax
movq %rax, -0x18(%rbp)
movq 0x1aac186d(%rip), %rax  # 0x1ab4cab0
movslq -0xc(%rbp), %rcx
imulq $0x4548, %rcx, %rcx     # imm = 0x4548
addq %rcx, %rax
movl 0x18(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
leaq -0xc(%rbp), %rsi
callq 0x8d120
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x8b2b0
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x10(%rax)
je 0x8b2a3
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
imulq $0x1c, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %esi
callq 0x8b210
jmp 0x8b2a5
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8b26b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/UctSearch.cpp
// Function: GetExpandThreshold(game_info_t const*)
static int
GetExpandThreshold( const game_info_t *game )
{
  if (game->moves > 2 &&
      game->record[game->moves - 1].pos == PASS &&
      game->record[game->moves - 2].pos == PASS) {
    return INT_MAX - 1;
  } else {
    return expand_threshold;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x43b0(%rax)
jle 0x8c400
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x43b0(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0x8c400
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x43b0(%rcx), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0x8c400
movl $0x7ffffffe, -0x4(%rbp) # imm = 0x7FFFFFFE
jmp 0x8c409
movl 0x5b5fe(%rip), %eax     # 0xe7a04
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: kobanium[P]Ray/src/mcts/UctSearch.cpp
// Function: Statistic(game_info_t*, int)
static void
Statistic( game_info_t *game, int winner )
{
  const char *board = game->board;

  for (int i = 0; i < pure_board_max; i++) {
    const int pos = onboard_pos[i];
    int color = board[pos];

    if (color == S_EMPTY) {
      color = territory[Pat3(game->pat, pos)];
    }

    std::atomic_fetch_add(&statistic[pos].colors[color], 1);
    if (color == winner) {
      std::atomic_fetch_add(&statistic[pos].colors[static_cast<int>(StatisticInformation::Win)], 1);
    }
  }
  std::atomic_fetch_add(&statistic_count, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x43f8, %rax           # imm = 0x43F8
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
leaq 0x5b602(%rip), %rcx     # 0xe7a40
cmpl (%rcx), %eax
jge 0x8c4f0
movslq -0x1c(%rbp), %rcx
leaq 0x1ab4641f(%rip), %rax  # 0x1abd2870
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movslq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x8c491
movq -0x8(%rbp), %rdi
addq $0x4748, %rdi           # imm = 0x4748
movl -0x20(%rbp), %esi
callq 0x93d30
movl %eax, %eax
movl %eax, %ecx
leaq 0x1ab143d6(%rip), %rax  # 0x1aba0860
movzbl (%rax,%rcx), %eax
movl %eax, -0x24(%rbp)
movslq -0x20(%rbp), %rax
leaq 0x1aaeaab4(%rip), %rdi  # 0x1ab76f50
shlq $0x4, %rax
addq %rax, %rdi
movslq -0x24(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movl $0x1, %esi
callq 0x8e7c0
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jne 0x8c4e0
movslq -0x20(%rbp), %rax
leaq 0x1aaeaa85(%rip), %rdi  # 0x1ab76f50
shlq $0x4, %rax
addq %rax, %rdi
addq $0xc, %rdi
movl $0x1, %esi
callq 0x8e7c0
jmp 0x8c4e2
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8c434
leaq 0x1aaedee9(%rip), %rdi  # 0x1ab7a3e0
movl $0x1, %esi
callq 0x8e7c0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: kobanium[P]Ray/src/mcts/UctSearch.cpp
// Function: RateComp(void const*, void const*)
static int
RateComp( const void *a, const void *b )
{
  rate_order_t *ro1 = (rate_order_t *)a;
  rate_order_t *ro2 = (rate_order_t *)b;
  if (ro1->rate < ro2->rate) {
    return 1;
  } else if (ro1->rate > ro2->rate) {
    return -1;
  } else {
    return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm1
movq -0x28(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x8ce7d
movl $0x1, -0x4(%rbp)
jmp 0x8cea1
movq -0x20(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x28(%rbp), %rax
ucomisd 0x8(%rax), %xmm0
jbe 0x8ce9a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8cea1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/MoveSelection.cpp
// Function: SetResignThreshold(double)
void
SetResignThreshold( const double threshold )
{
  if (threshold <= 0.0) {
    PrintResignThresholdIsTooSmall(threshold);
    resign_threshold = 0.0;
  } else if (threshold > 1.0) {
    PrintResignThresholdIsTooLarge(threshold);
  } else {
    resign_threshold = threshold;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd %xmm0, -0x8(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x8(%rbp), %xmm0
jb 0x8ec9e
movsd -0x8(%rbp), %xmm0
callq 0x22530
xorps %xmm0, %xmm0
movsd %xmm0, 0x58d74(%rip)    # 0xe7a10
jmp 0x8eccc
movsd -0x8(%rbp), %xmm0
movsd 0x1d35d(%rip), %xmm1    # 0xac008
ucomisd %xmm1, %xmm0
jbe 0x8ecbd
movsd -0x8(%rbp), %xmm0
callq 0x223e0
jmp 0x8ecca
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x58d46(%rip)    # 0xe7a10
jmp 0x8eccc
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/MoveSelection.cpp
// Function: SelectMaxVisitChild(uct_node_t const&)
int
SelectMaxVisitChild( const uct_node_t &root )
{
  const child_node_t *child = root.child;
  int select_index = PASS_INDEX;
  int max_count = child[PASS_INDEX].move_count;

  for (int i = 1; i < root.child_num; i++) {
    if (child[i].move_count > max_count) {
      select_index = i;
      max_count = child[i].move_count;
    }
  }

  return select_index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1c, %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
addq $0x4, %rdi
callq 0x25780
movl %eax, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x8ed6d
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
addq $0x4, %rdi
callq 0x25780
cmpl -0x18(%rbp), %eax
jle 0x8ed60
movl -0x1c(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movslq -0x1c(%rbp), %rax
imulq $0x1c, %rax, %rax
addq %rax, %rdi
addq $0x4, %rdi
callq 0x25780
movl %eax, -0x18(%rbp)
jmp 0x8ed62
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x8ed16
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/SearchManager.cpp
// Function: InitializeTimeSetting()
void
InitializeTimeSetting( void )
{
  for (int i = 0; i < S_MAX; i++) {
    remaining_time[i] = default_remaining_time;
  }

  switch (search_setting) {
    case SearchTimeStrategy::ConstantPlayoutMode:
      time_limit = 10000.0;
      po_info.num = playout;
      extend_time = false;
      break;
    case SearchTimeStrategy::ConstantTimeMode:
      time_limit = const_thinking_time;
      po_info.num = 10000000;
      extend_time = false;
      break;
    case SearchTimeStrategy::TimeControlMode:
    case SearchTimeStrategy::TimeControlWithByoYomiMode:
      time_limit = CalculateNextTimeLimit(S_EMPTY, -1);
      po_info.num = static_cast<int>(PLAYOUT_SPEED * time_limit);
      extend_time = true;
      break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x4, -0x4(%rbp)
jge 0x8f1e8
movsd 0x5885b(%rip), %xmm0    # 0xe7a28
movslq -0x4(%rbp), %rcx
leaq 0x1aaee038(%rip), %rax  # 0x1ab7d210
movsd %xmm0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x8f1bf
movl 0x5882a(%rip), %eax     # 0xe7a18
movl %eax, -0x8(%rbp)
testl %eax, %eax
je 0x8f20e
jmp 0x8f1f7
movl -0x8(%rbp), %eax
subl $0x1, %eax
je 0x8f235
jmp 0x8f201
movl -0x8(%rbp), %eax
addl $-0x2, %eax
subl $0x2, %eax
jb 0x8f258
jmp 0x8f28d
movsd 0x1ce0a(%rip), %xmm0    # 0xac020
movsd %xmm0, 0x1aaedfda(%rip) # 0x1ab7d1f8
cvttsd2si 0x587fa(%rip), %eax # 0xe7a20
movl %eax, 0x1aaedfd8(%rip)  # 0x1ab7d204
movb $0x0, 0x1aaedfcd(%rip)  # 0x1ab7d200
jmp 0x8f28d
movsd 0x587f3(%rip), %xmm0    # 0xe7a30
movsd %xmm0, 0x1aaedfb3(%rip) # 0x1ab7d1f8
movl $0x989680, 0x1aaedfb5(%rip) # imm = 0x989680
movb $0x0, 0x1aaedfaa(%rip)  # 0x1ab7d200
jmp 0x8f28d
xorl %edi, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8f2a0
movsd %xmm0, 0x1aaedf8c(%rip) # 0x1ab7d1f8
movsd 0x1fe54(%rip), %xmm0    # 0xaf0c8
mulsd 0x1aaedf7c(%rip), %xmm0 # 0x1ab7d1f8
cvttsd2si %xmm0, %eax
movl %eax, 0x1aaedf7e(%rip)  # 0x1ab7d204
movb $0x1, 0x1aaedf73(%rip)  # 0x1ab7d200
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kobanium[P]Ray/src/mcts/SearchManager.cpp
// Function: SetTimeSettings(int, int, int)
void
SetTimeSettings( const int main_time, const int byoyomi, const int stones )
{
  if (search_setting == SearchTimeStrategy::ConstantPlayoutMode ||
      search_setting == SearchTimeStrategy::ConstantTimeMode ) {
    return ;
  }

  if (main_time == 0) {
    const_thinking_time = static_cast<double>(byoyomi) * 0.85;
    search_setting = SearchTimeStrategy::ConstantTimeMode;
    std::cerr << "Const Thinking Time Mode" << std::endl;
  } else {
    if (byoyomi == 0) {
      default_remaining_time = main_time;
      search_setting = SearchTimeStrategy::TimeControlMode;
      std::cerr << "Time Setting Mode" << std::endl;
    } else {
      default_remaining_time = main_time;
      const_thinking_time = static_cast<double>(byoyomi) / stones;
      search_setting = SearchTimeStrategy::TimeControlWithByoYomiMode;
      std::cerr << "Time Setting Mode (byoyomi)" << std::endl;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
cmpl $0x0, 0x586f0(%rip)     # 0xe7a18
je 0x8f333
cmpl $0x1, 0x586e7(%rip)     # 0xe7a18
jne 0x8f338
jmp 0x8f41a
cmpl $0x0, -0x4(%rbp)
jne 0x8f388
cvtsi2sdl -0x8(%rbp), %xmm0
movsd 0x1ff7d(%rip), %xmm1    # 0xaf2c8
mulsd %xmm1, %xmm0
movsd %xmm0, 0x586d9(%rip)    # 0xe7a30
movl $0x1, 0x586b7(%rip)     # 0xe7a18
movq 0x57c88(%rip), %rdi     # 0xe6ff0
leaq 0x1ff79(%rip), %rsi     # 0xaf2e8
callq 0x7530
movq %rax, %rdi
movq 0x57bea(%rip), %rsi     # 0xe6f68
callq 0x75b0
jmp 0x8f41a
cmpl $0x0, -0x8(%rbp)
jne 0x8f3c9
cvtsi2sdl -0x4(%rbp), %xmm0
movsd %xmm0, 0x5868d(%rip)    # 0xe7a28
movl $0x2, 0x58673(%rip)     # 0xe7a18
movq 0x57c44(%rip), %rdi     # 0xe6ff0
leaq 0x1ff4e(%rip), %rsi     # 0xaf301
callq 0x7530
movq %rax, %rdi
movq 0x57ba6(%rip), %rsi     # 0xe6f68
callq 0x75b0
jmp 0x8f418
cvtsi2sdl -0x4(%rbp), %xmm0
movsd %xmm0, 0x58652(%rip)    # 0xe7a28
cvtsi2sdl -0x8(%rbp), %xmm0
cvtsi2sdl -0xc(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x58644(%rip)    # 0xe7a30
movl $0x3, 0x58622(%rip)     # 0xe7a18
movq 0x57bf3(%rip), %rdi     # 0xe6ff0
leaq 0x1ff0f(%rip), %rsi     # 0xaf313
callq 0x7530
movq %rax, %rdi
movq 0x57b55(%rip), %rsi     # 0xe6f68
callq 0x75b0
jmp 0x8f41a
addq $0x10, %rsp
popq %rbp
retq
// File: kobanium[P]Ray/src/mcts/SearchManager.cpp
// Function: SetTimeManagementParameter()
void
SetTimeManagementParameter( void )
{
  if (!time_c_changed) {
    if (pure_board_size < 11) {
      time_c = TIME_C_9;
    } else if (pure_board_size < 16) {
      time_c = TIME_C_13;
    } else {
      time_c = TIME_C_19;
    }
  }

  if (!time_maxply_changed) {
    if (pure_board_size < 11) {
      time_maxply = TIME_MAXPLY_9;
    } else if (pure_board_size < 16) {
      time_maxply = TIME_MAXPLY_13;
    } else {
      time_maxply = TIME_MAXPLY_19;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testb $0x1, 0x1aaedb95(%rip)  # 0x1ab7d230
jne 0x8f6db
leaq 0x583a0(%rip), %rax     # 0xe7a44
cmpl $0xb, (%rax)
jge 0x8f6b5
movl $0x14, 0x58385(%rip)    # 0xe7a38
jmp 0x8f6d9
leaq 0x58388(%rip), %rax     # 0xe7a44
cmpl $0x10, (%rax)
jge 0x8f6cd
movl $0x1e, 0x5836d(%rip)    # 0xe7a38
jmp 0x8f6d7
movl $0x3c, 0x58361(%rip)    # 0xe7a38
jmp 0x8f6d9
jmp 0x8f6db
testb $0x1, 0x1aaedb4f(%rip)  # 0x1ab7d231
jne 0x8f722
leaq 0x58359(%rip), %rax     # 0xe7a44
cmpl $0xb, (%rax)
jge 0x8f6fc
movl $0x0, 0x58342(%rip)     # 0xe7a3c
jmp 0x8f720
leaq 0x58341(%rip), %rax     # 0xe7a44
cmpl $0x10, (%rax)
jge 0x8f714
movl $0x1e, 0x5832a(%rip)    # 0xe7a3c
jmp 0x8f71e
movl $0x50, 0x5831e(%rip)    # 0xe7a3c
jmp 0x8f720
jmp 0x8f722
popq %rbp
retq
nopw %cs:(%rax,%rax)