// File: /workspace/github_cpp_makefile_star2_O2/kobanium[P]Ray/src/learn/MovePredictionTest.cpp
// Function: PredictionTestWorker(int)
static void
PredictionTestWorker( const int thread_id )
{
  game_info_t *game = AllocateGame();
  game_info_t *init_game = AllocateGame();

  InitializeBoard(init_game);
  
  for (int i = KIFU_START; i <= KIFU_END; i++) {
    if (i % TEST_WORKER_THREADS == thread_id) {
      CopyGame(game, init_game);

      const std::string filename = KIFU_PATH + PATH_SEPARATOR + std::to_string(i) + ".sgf";

      if (i % 1000 == 0) {
        std::cerr << filename << std::endl;
      }
      CheckMovePrediction(game, filename.c_str());
    }
  }

  FreeGame(game);
  FreeGame(init_game);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4c78, %rsp           # imm = 0x4C78
movl %edi, 0x14(%rsp)
callq 0x3b148
movq %rax, %r12
callq 0x3b148
movq %rax, 0x18(%rsp)
movq %rax, %rdi
callq 0x3b173
movl $0x9c41, %ecx           # imm = 0x9C41
leaq 0x80(%rsp), %rbp
leaq 0x30(%rsp), %r13
leaq 0x35098(%rip), %r14     # 0x618b0
leaq 0x20(%rsp), %rbx
leaq 0x1ab1fecc(%rip), %r15  # 0x1ab4c6f0
movq %r12, 0x58(%rsp)
cmpl $0x11171, %ecx          # imm = 0x11171
je 0x2ca99
movl %ecx, %eax
andl $0x7, %eax
cmpl 0x14(%rsp), %eax
jne 0x2ca92
movq %r12, %rdi
movq 0x18(%rsp), %rsi
movl %ecx, 0x8(%rsp)
callq 0x3b5f2
movq %rbp, %rdi
leaq 0x1a4dd(%rip), %rsi     # 0x46d3c
leaq 0x3880a(%rip), %rdx     # 0x65070
callq 0x26ac5
movq %r13, %rdi
movl 0x8(%rsp), %esi
callq 0x26b3b
leaq 0xbd8(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x26a5e
leaq 0x60(%rsp), %rdi
leaq 0xbd8(%rsp), %rbp
movq %rbp, %rsi
leaq 0x196fe(%rip), %rdx     # 0x45f9f
callq 0x25e13
movq %rbp, %rdi
callq 0x6838
movq %r13, %rdi
callq 0x6838
leaq 0x80(%rsp), %rdi
callq 0x6838
movl 0x8(%rsp), %eax
xorl %edx, %edx
movl $0x3e8, %ecx            # imm = 0x3E8
divl %ecx
testl %edx, %edx
jne 0x2c8ed
movq 0x34715(%rip), %rdi     # 0x60ff0
leaq 0x60(%rsp), %rsi
callq 0x6350
movq %rax, %rdi
callq 0x6190
movq 0x60(%rsp), %rdi
movq %rdi, 0x50(%rsp)
leaq 0xbd8(%rsp), %rsi
callq 0x2ee83
xorl %esi, %esi
pushq $0x1
popq %rax
movl %eax, 0xc(%rsp)
leaq 0xbd8(%rsp), %rdi
cmpl 0xbdc(%rsp), %esi
jge 0x2ca7c
movl %esi, 0x10(%rsp)
callq 0x2ee30
movl %eax, %ebp
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movq %r12, %rdi
movl 0xc(%rsp), %esi
leaq 0x80(%rsp), %rdx
callq 0x3224e
movslq (%r14), %rax
movsd 0x80(%rsp,%rax,8), %xmm0
movsd %xmm0, 0x20(%rsp)
andl $0x0, 0x28(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2783e
xorl %r12d, %r12d
movslq (%r14), %rax
cmpq %rax, %r12
jge 0x2c9a6
movl (%r15,%r12,4), %eax
movsd 0x80(%rsp,%r12,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2783e
incq %r12
jmp 0x2c976
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x279d3
movq 0x58(%rsp), %r12
movl (%r14), %edx
xorl %eax, %eax
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %esi, %esi
movslq %edx, %rdi
cmpq %rdi, %rcx
jg 0x2ca1c
xorl %edi, %edi
movq 0x30(%rsp), %r9
testq %rax, %rax
je 0x2c9f1
movsd (%r9,%rax), %xmm0
ucomisd -0x10(%r9,%rax), %xmm0
jne 0x2c9f1
jp 0x2c9f1
incl %r8d
movl %r8d, %edi
cmpl %ebp, 0x8(%r9,%rax)
jne 0x2ca10
movl %ecx, %edx
subl %edi, %edx
movslq %edx, %rdx
leaq 0x3868a(%rip), %rsi     # 0x65090
lock
incl (%rsi,%rdx,4)
movl (%r14), %edx
movb $0x1, %sil
incq %rcx
addq $0x10, %rax
movl %edi, %r8d
jmp 0x2c9c6
testb $0x1, %sil
jne 0x2ca56
movq 0x345c7(%rip), %rdi     # 0x60ff0
movq 0x50(%rsp), %rsi
callq 0x63c0
movq %rax, %rdi
leaq 0x17a11(%rip), %rsi     # 0x4444e
callq 0x63c0
movq %rax, %rdi
movl 0x10(%rsp), %esi
callq 0x6700
movq %rax, %rdi
callq 0x6190
movq %r12, %rdi
movl %ebp, %esi
movl 0xc(%rsp), %edx
callq 0x3c2f8
xorl $0x3, 0xc(%rsp)
movq %r13, %rdi
callq 0x28024
movl 0x10(%rsp), %esi
incl %esi
jmp 0x2c90d
leaq 0x60(%rsp), %rdi
callq 0x6838
movl 0x8(%rsp), %ecx
leaq 0x80(%rsp), %rbp
incl %ecx
jmp 0x2c829
movq %r12, %rdi
callq 0x3b163
movq 0x18(%rsp), %rdi
callq 0x3b163
addq $0x4c78, %rsp           # imm = 0x4C78
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2cae1
movq %rax, %rbx
leaq 0xbd8(%rsp), %rdi
callq 0x6838
jmp 0x2cad7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x6838
leaq 0x80(%rsp), %rdi
jmp 0x2cb0a
jmp 0x2caed
movq %rax, %rbx
jmp 0x2cb05
jmp 0x2caf8
jmp 0x2caf8
jmp 0x2caf8
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x28024
leaq 0x60(%rsp), %rdi
callq 0x6838
movq %rbx, %rdi
callq 0x6740
nop