// File: /workspace/github_cpp_makefile_star2_O3/kobanium[P]Ray/src/learn/FactorizationMachines.cpp
// Function: TestingLoop(train_thread_arg_t*)
static void
TestingLoop( train_thread_arg_t *targ )
{
  game_info_t *game = AllocateGame();
  game_info_t *init_game = AllocateGame();

  InitializeBoard(init_game);

  for (int i = TEST_KIFU_START_INDEX; i <= TEST_KIFU_LAST_INDEX; i++) {
    if (i % thread_num == targ->id) {
      const std::string filename = TEST_KIFU_PATH + PATH_SEPARATOR + std::to_string(i) + ".sgf";
      if (i % 1000 == 0) {
        fprintf(stderr, "Test %d.sgf\n", i);
        fflush(stderr);
      }
      CopyGame(game, init_game);
      PlaybackGameForEvaluation(game, filename.c_str());
    }
  }
  
  FreeGame(game);
  FreeGame(init_game);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x9d28, %rsp           # imm = 0x9D28
movq %rdi, 0x78(%rsp)
callq 0x543a6
movq %rax, %r14
callq 0x543a6
movq %rax, 0x50(%rsp)
movq %rax, %rdi
callq 0x543d1
leaq 0x90(%rsp), %r15
movl $0x9c41, %eax           # imm = 0x9C41
movl %eax, %ebp
andl $0x7, %eax
movq 0x78(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x38bea
leaq 0x5c88(%rsp), %rdi
leaq 0x26fdb(%rip), %rsi     # 0x5f68a
leaq 0x3f96a(%rip), %rdx     # 0x78020
callq 0x3a6e0
movl $0xd1b71759, %edx       # imm = 0xD1B71759
movl $0x4, %ebx
movl %ebp, 0xc(%rsp)
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x386f9
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x386fe
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x38700
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x386cb
addl $-0x3, %ebx
jmp 0x38700
addl $-0x2, %ebx
jmp 0x38700
decl %ebx
movl %ebx, %esi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x64b0
movq 0x10(%rsp), %rdi
movl %ebx, %esi
movl 0xc(%rsp), %edx
callq 0x3a768
movq 0x5c88(%rsp), %rcx
movl $0xf, %edi
leaq 0x5c98(%rsp), %rax
cmpq %rax, %rcx
je 0x3874d
movq 0x5c98(%rsp), %rdi
movq 0x5c90(%rsp), %r8
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0x38781
movl $0xf, %edi
leaq 0x20(%rsp), %r9
cmpq %r9, %rsi
je 0x3877c
movq 0x20(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x38790
leaq 0x5c88(%rsp), %rdi
callq 0x60d0
jmp 0x3879e
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6470
movq %r15, 0x80(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x387c7
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x387ce
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x88(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x80(%rsp), %rdi
leaq 0x267b2(%rip), %rsi     # 0x5efaf
callq 0x6800
leaq 0x68(%rsp), %rsi
movq %rsi, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3882a
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x38830
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x38865
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x38881
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x5c88(%rsp), %rdi
leaq 0x5c98(%rsp), %rax
cmpq %rax, %rdi
je 0x388a6
movq 0x5c98(%rsp), %rsi
incq %rsi
callq 0x6410
imull $0x26e978d5, 0xc(%rsp), %eax # imm = 0x26E978D5
rorl $0x3, %eax
cmpl $0x418937, %eax         # imm = 0x418937
jbe 0x38bfc
movq %r14, %rdi
movq 0x50(%rsp), %rsi
callq 0x549d9
movq 0x58(%rsp), %rdi
leaq 0x5c88(%rsp), %rsi
callq 0x4595b
cmpl $0x0, 0x5c8c(%rsp)
jle 0x38bca
xorl %ebx, %ebx
movl $0x1, %ebp
leaq 0x5c88(%rsp), %rdi
movl %ebx, %esi
callq 0x45908
movl %eax, %r13d
movl %ebx, 0x4c(%rsp)
movl 0x43b0(%r14), %r15d
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x5bfc, %edx           # imm = 0x5BFC
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6200
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x59fc0
movl %eax, %ebx
movq %r14, %rdi
movl %ebp, %esi
leaq 0x80(%rsp), %rdx
callq 0x5b56e
cmpl $0x3, %r15d
jl 0x389b8
movl 0x43c8(%r14), %eax
leal -0x2(%r15), %ecx
cmpl %ecx, %eax
jne 0x3898f
movq %r14, %rdi
movl %ebp, %esi
leaq 0x80(%rsp), %rdx
callq 0x5b0d4
movq %r14, %rdi
leaq 0x80(%rsp), %rsi
callq 0x5b4db
jmp 0x389b8
cmpl $0x3, %r15d
setne %cl
addl $-0x3, %r15d
cmpl %r15d, %eax
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x389b8
movq %r14, %rdi
movl %ebp, %esi
leaq 0x80(%rsp), %rdx
callq 0x5b50f
movq %r14, %rdi
xorl %esi, %esi
leaq 0x80(%rsp), %rdx
movl %ebx, %ecx
callq 0x38fef
movsd %xmm0, 0x38(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x389f6
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x18(%rsp)
jmp 0x38a05
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3b174
leaq 0x3dea4(%rip), %rax     # 0x768b0
movl (%rax), %eax
testl %eax, %eax
jle 0x38b00
xorl %r15d, %r15d
leaq 0x1ab28cd0(%rip), %rax  # 0x1ab616f0
movl (%rax,%r15,4), %r12d
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x55478
testb %al, %al
je 0x38ab1
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
leaq 0x80(%rsp), %rcx
callq 0x5b165
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
leaq 0x80(%rsp), %rcx
callq 0x5b391
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
leaq 0x80(%rsp), %rcx
callq 0x5b454
movq %r14, %rdi
movl %r12d, %esi
leaq 0x80(%rsp), %rdx
movl %ebx, %ecx
callq 0x38fef
movsd %xmm0, 0x38(%rsp)
movl %r12d, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
jne 0x38acb
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3b174
jmp 0x38aea
movq $0x0, 0x38(%rsp)
movl %r12d, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x38adb
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x18(%rsp)
jmp 0x38aea
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3b174
incq %r15
leaq 0x3ddbc(%rip), %rax     # 0x768b0
movslq (%rax), %rax
cmpq %rax, %r15
jl 0x38a19
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r12
cmpq %r12, %rbx
je 0x38b45
movq %r12, %rax
subq %rbx, %rax
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3b2b3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3b366
leaq 0x3dd6d(%rip), %rax     # 0x768b0
movl (%rax), %eax
testl %eax, %eax
leaq 0x90(%rsp), %r15
leaq 0x3f9da(%rip), %rdi     # 0x78530
movl 0x4c(%rsp), %ebx
js 0x38b8d
movq $-0x1, %rcx
xorl %edx, %edx
movq 0x10(%rsp), %rsi
cmpl %r13d, 0x8(%rsi,%rdx,4)
jne 0x38b7e
lock
incl (%rdx,%rdi)
leaq 0x3dd34(%rip), %rax     # 0x768b0
movl (%rax), %eax
movslq %eax, %rsi
addq $0x4, %rdx
incq %rcx
cmpq %rsi, %rcx
jl 0x38b65
lock
incl 0x3f988(%rip)           # 0x7851c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x38bab
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x6410
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x55ae8
xorl $0x3, %ebp
incl %ebx
cmpl 0x5c8c(%rsp), %ebx
jl 0x388f0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x38be6
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6410
movl 0xc(%rsp), %ebp
incl %ebp
cmpl $0x11171, %ebp          # imm = 0x11171
movl %ebp, %eax
jne 0x3868e
jmp 0x38c0a
movl 0xc(%rsp), %edi
callq 0x6af4
jmp 0x388bc
movq %r14, %rdi
callq 0x543c1
movq 0x50(%rsp), %rdi
callq 0x543c1
addq $0x9d28, %rsp           # imm = 0x9D28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x38c58
movq %rax, %rbx
jmp 0x38c74
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x38c58
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x38c74
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x5c88(%rsp), %rdi
leaq 0x5c98(%rsp), %rax
cmpq %rax, %rdi
je 0x38cd8
movq 0x5c98(%rsp), %rsi
jmp 0x38cd0
jmp 0x38c97
jmp 0x38ca2
movq %rax, %rbx
jmp 0x38cbc
jmp 0x38ca2
jmp 0x38ca2
jmp 0x38ca2
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x38cbc
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x6410
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x38cd8
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6410
movq %rbx, %rdi
callq 0x6760