// File: /workspace/github_cpp_makefile_star2_O2/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, 0x58(%rsp)
callq 0x3b148
movq %rax, %r14
callq 0x3b148
movq %rax, 0x28(%rsp)
movq %rax, %rdi
callq 0x3b173
movl $0x9c41, %edx           # imm = 0x9C41
leaq 0x5c88(%rsp), %r15
leaq 0x30(%rsp), %rbx
cmpl $0x11171, %edx          # imm = 0x11171
je 0x24fd8
movl %edx, %eax
andl $0x7, %eax
movq 0x58(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x24fa6
movq %r15, %rdi
leaq 0x219c6(%rip), %rsi     # 0x4667a
movq %rbx, %r12
movl %edx, %ebx
leaq 0x3e360(%rip), %rdx     # 0x63020
callq 0x26ac5
movq %r12, %rdi
movl %ebx, 0x8(%rsp)
movl %ebx, %esi
callq 0x26b3b
leaq 0x80(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x26a5e
movq %r12, %rbx
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
leaq 0x212a4(%rip), %rdx     # 0x45f9f
callq 0x25e13
movq %r13, %rdi
callq 0x6838
movq %rbx, %rdi
callq 0x6838
movq %r15, %rdi
callq 0x6838
movl 0x8(%rsp), %eax
xorl %edx, %edx
movl $0x3e8, %ecx            # imm = 0x3E8
divl %ecx
testl %edx, %edx
je 0x24fad
movq %r14, %rdi
movq 0x28(%rsp), %rsi
callq 0x3b5f2
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x2ee83
xorl %r13d, %r13d
pushq $0x1
popq %r12
cmpl 0x5c8c(%rsp), %r13d
jge 0x24f98
movq %r15, %rdi
movl %r13d, %esi
callq 0x2ee30
movl %eax, %ebp
movl %r13d, 0x24(%rsp)
movl 0x43b0(%r14), %r15d
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movl $0x5bfc, %edx           # imm = 0x5BFC
leaq 0x80(%rsp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x61f0
movq %r14, %rdi
movl %r12d, %esi
movq %r13, %rdx
callq 0x404a0
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movl %r12d, %esi
leaq 0x80(%rsp), %rdx
callq 0x4187b
cmpl $0x3, %r15d
jl 0x24e23
movl 0x43c8(%r14), %eax
leal -0x2(%r15), %ecx
cmpl %ecx, %eax
jne 0x24df9
movq %r14, %rdi
movl %r12d, %esi
leaq 0x80(%rsp), %rdx
callq 0x41413
movq %r14, %rdi
leaq 0x80(%rsp), %rsi
callq 0x417f6
jmp 0x24e23
cmpl $0x3, %r15d
setne %cl
addl $-0x3, %r15d
cmpl %r15d, %eax
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x24e23
movq %r14, %rdi
movl %r12d, %esi
leaq 0x80(%rsp), %rdx
callq 0x41823
movq %r14, %rdi
xorl %esi, %esi
leaq 0x80(%rsp), %rdx
movl 0xc(%rsp), %ecx
callq 0x25306
movsd %xmm0, 0x10(%rsp)
andl $0x0, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2783e
xorl %r15d, %r15d
leaq 0x3ca55(%rip), %rax     # 0x618b0
movslq (%rax), %rax
cmpq %rax, %r15
jge 0x24f17
leaq 0x1ab27882(%rip), %rax  # 0x1ab4c6f0
movl (%rax,%r15,4), %r13d
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x3bc4c
testb %al, %al
je 0x24ef7
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
leaq 0x80(%rsp), %rcx
callq 0x4149f
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
leaq 0x80(%rsp), %rcx
callq 0x416b8
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
leaq 0x80(%rsp), %rcx
callq 0x41774
movq %r14, %rdi
movl %r13d, %esi
leaq 0x80(%rsp), %rdx
movl 0xc(%rsp), %ecx
callq 0x25306
movsd %xmm0, 0x10(%rsp)
movl %r13d, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2783e
jmp 0x24f0f
andq $0x0, 0x10(%rsp)
movl %r13d, 0x18(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2783e
incq %r15
jmp 0x24e54
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x279d3
leaq 0x3c983(%rip), %rax     # 0x618b0
movl (%rax), %ecx
xorl %eax, %eax
xorl %edx, %edx
leaq 0x5c88(%rsp), %r15
movl 0x24(%rsp), %r13d
movslq %ecx, %rsi
cmpq %rsi, %rdx
jg 0x24f70
movq 0x30(%rsp), %rsi
cmpl %ebp, 0x8(%rsi,%rax,4)
jne 0x24f67
leaq 0x3e5d6(%rip), %rcx     # 0x63530
lock
incl (%rax,%rcx)
leaq 0x3c94b(%rip), %rcx     # 0x618b0
movl (%rcx), %ecx
incq %rdx
addq $0x4, %rax
jmp 0x24f40
lock
incl 0x3e5a5(%rip)           # 0x6351c
movq %rbx, %rdi
callq 0x28024
movq %r14, %rdi
movl %ebp, %esi
movl %r12d, %edx
callq 0x3c2f8
xorl $0x3, %r12d
incl %r13d
jmp 0x24d4e
leaq 0x60(%rsp), %rdi
callq 0x6838
movl 0x8(%rsp), %edx
incl %edx
jmp 0x24c8c
movq 0x3c004(%rip), %r12     # 0x60fb8
movq (%r12), %rdi
leaq 0x21109(%rip), %rsi     # 0x460c8
movl 0x8(%rsp), %edx
xorl %eax, %eax
callq 0x6590
movq (%r12), %rdi
callq 0x6490
jmp 0x24d2d
movq %r14, %rdi
callq 0x3b163
movq 0x28(%rsp), %rdi
callq 0x3b163
addq $0x9d28, %rsp           # imm = 0x9D28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x25016
movq %rax, %rbx
jmp 0x25020
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x6838
leaq 0x30(%rsp), %rdi
callq 0x6838
leaq 0x5c88(%rsp), %rdi
jmp 0x2504b
jmp 0x2502c
movq %rax, %rbx
jmp 0x25046
jmp 0x25039
jmp 0x25039
jmp 0x25039
jmp 0x25039
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x28024
leaq 0x60(%rsp), %rdi
callq 0x6838
movq %rbx, %rdi
callq 0x6740