// File: /workspace/github_cpp_makefile_star2_O1/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 0x53e60
movq %rax, %r14
callq 0x53e60
movq %rax, 0x50(%rsp)
movq %rax, %rdi
callq 0x53e8b
leaq 0x90(%rsp), %r15
movl $0x9c41, %eax           # imm = 0x9C41
movl %eax, %ebp
andl $0x7, %eax
movq 0x78(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x38d1a
leaq 0x5c88(%rsp), %rdi
leaq 0x26e43(%rip), %rsi     # 0x5f62a
leaq 0x3e832(%rip), %rdx     # 0x77020
callq 0x3a852
movl $0xd1b71759, %edx       # imm = 0xD1B71759
movl $0x4, %ebx
movl %ebp, 0xc(%rsp)
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x38831
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x38836
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x38838
movl %eax, %ecx
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x38803
addl $-0x3, %ebx
jmp 0x38838
addl $-0x2, %ebx
jmp 0x38838
decl %ebx
movl %ebx, %esi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x64c0
movq 0x10(%rsp), %rdi
movl %ebx, %esi
movl 0xc(%rsp), %edx
callq 0x3a8da
movq 0x5c88(%rsp), %rcx
movl $0xf, %esi
leaq 0x5c98(%rsp), %rax
cmpq %rax, %rcx
je 0x38885
movq 0x5c98(%rsp), %rsi
movq 0x5c90(%rsp), %r8
movq 0x18(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x388b6
movl $0xf, %esi
leaq 0x20(%rsp), %rdi
cmpq %rdi, 0x10(%rsp)
je 0x388b1
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x388ca
movq 0x10(%rsp), %rsi
leaq 0x5c88(%rsp), %rdi
callq 0x60d0
jmp 0x388d8
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6480
movq %r15, 0x80(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x38901
movq %rdx, 0x80(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x90(%rsp)
jmp 0x38908
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 0x26618(%rip), %rsi     # 0x5ef4f
callq 0x6810
leaq 0x68(%rsp), %rsi
movq %rsi, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x38964
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x3896a
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 0x3899f
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6420
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x389bb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6420
movq 0x5c88(%rsp), %rdi
leaq 0x5c98(%rsp), %rax
cmpq %rax, %rdi
je 0x389e0
movq 0x5c98(%rsp), %rsi
incq %rsi
callq 0x6420
imull $0x26e978d5, 0xc(%rsp), %eax # imm = 0x26E978D5
rorl $0x3, %eax
cmpl $0x418937, %eax         # imm = 0x418937
jbe 0x38d2c
movq %r14, %rdi
movq 0x50(%rsp), %rsi
callq 0x5432c
movq 0x58(%rsp), %rdi
leaq 0x5c88(%rsp), %rsi
callq 0x4562f
cmpl $0x0, 0x5c8c(%rsp)
jle 0x38cfa
xorl %ebx, %ebx
movl $0x1, %ebp
leaq 0x5c88(%rsp), %rdi
movl %ebx, %esi
callq 0x455dc
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 0x6210
movq %r14, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x596f8
movl %eax, %ebx
movq %r14, %rdi
movl %ebp, %esi
leaq 0x80(%rsp), %rdx
callq 0x5acd4
cmpl $0x3, %r15d
jl 0x38ac7
leal -0x2(%r15), %eax
cmpl %eax, 0x43c8(%r14)
jne 0x38ac7
movq %r14, %rdi
movl %ebp, %esi
leaq 0x80(%rsp), %rdx
callq 0x5a812
movq %r14, %rdi
leaq 0x80(%rsp), %rsi
callq 0x5ac41
jmp 0x38aec
cmpl $0x4, %r15d
jl 0x38aec
addl $-0x3, %r15d
cmpl %r15d, 0x43c8(%r14)
jne 0x38aec
movq %r14, %rdi
movl %ebp, %esi
leaq 0x80(%rsp), %rdx
callq 0x5ac75
movq %r14, %rdi
xorl %esi, %esi
leaq 0x80(%rsp), %rdx
movl %ebx, %ecx
callq 0x3913f
movsd %xmm0, 0x38(%rsp)
movl $0x0, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x38b2a
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x18(%rsp)
jmp 0x38b39
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3b302
leaq 0x3cd70(%rip), %rax     # 0x758b0
cmpl $0x0, (%rax)
jle 0x38c33
xorl %r15d, %r15d
leaq 0x1ab27b9d(%rip), %rax  # 0x1ab606f0
movl (%rax,%r15,4), %r12d
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x54a9c
testb %al, %al
je 0x38be4
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
leaq 0x80(%rsp), %rcx
callq 0x5a8a3
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
leaq 0x80(%rsp), %rcx
callq 0x5aaf7
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
leaq 0x80(%rsp), %rcx
callq 0x5abba
movq %r14, %rdi
movl %r12d, %esi
leaq 0x80(%rsp), %rdx
movl %ebx, %ecx
callq 0x3913f
movsd %xmm0, 0x38(%rsp)
movl %r12d, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
jne 0x38bfe
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3b302
jmp 0x38c1d
movq $0x0, 0x38(%rsp)
movl %r12d, 0x40(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x38c0e
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x18(%rsp)
jmp 0x38c1d
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x3b302
incq %r15
leaq 0x3cc89(%rip), %rax     # 0x758b0
movslq (%rax), %rax
cmpq %rax, %r15
jl 0x38b4c
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r12
cmpq %r12, %rbx
je 0x38c6f
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 0x3b441
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3b4f4
leaq 0x3cc3a(%rip), %rax     # 0x758b0
cmpl $0x0, (%rax)
leaq 0x90(%rsp), %r15
movl 0x4c(%rsp), %ebx
js 0x38cbd
movq $-0x1, %rax
xorl %ecx, %ecx
movq 0x10(%rsp), %rdx
cmpl %r13d, 0x8(%rdx,%rcx,4)
jne 0x38ca7
leaq 0x3e88d(%rip), %rdx     # 0x77530
lock
incl (%rcx,%rdx)
leaq 0x3cc02(%rip), %rdx     # 0x758b0
movslq (%rdx), %rdx
addq $0x4, %rcx
incq %rax
cmpq %rdx, %rax
jl 0x38c90
lock
incl 0x3e858(%rip)           # 0x7751c
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x38cdb
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x6420
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x55134
xorl $0x3, %ebp
incl %ebx
cmpl 0x5c8c(%rsp), %ebx
jl 0x38a2a
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x38d16
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6420
movl 0xc(%rsp), %ebp
incl %ebp
cmpl $0x11171, %ebp          # imm = 0x11171
movl %ebp, %eax
jne 0x387c6
jmp 0x38d3a
movl 0xc(%rsp), %edi
callq 0x6b1f
jmp 0x389f6
movq %r14, %rdi
callq 0x53e7b
movq 0x50(%rsp), %rdi
callq 0x53e7b
addq $0x9d28, %rsp           # imm = 0x9D28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x38da4
movq %rax, %rbx
movq 0x80(%rsp), %rdi
cmpq %r15, %rdi
je 0x38d88
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x6420
jmp 0x38d88
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x38da4
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x6420
movq 0x5c88(%rsp), %rdi
leaq 0x5c98(%rsp), %rax
cmpq %rax, %rdi
je 0x38e08
movq 0x5c98(%rsp), %rsi
jmp 0x38e00
jmp 0x38dc7
jmp 0x38dd2
movq %rax, %rbx
jmp 0x38dec
jmp 0x38dd2
jmp 0x38dd2
jmp 0x38dd2
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x38dec
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x6420
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x38e08
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6420
movq %rbx, %rdi
callq 0x6770