// File: /workspace/github_cpp_makefile_star2_O1/kobanium[P]Ray/src/learn/MinorizationMaximization.cpp
// Function: TestingWorker(train_thread_arg_t*)
static void
TestingWorker( 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 % TRAIN_THREAD_NUM == targ->id) {
      std::ostringstream oss;

      oss << TEST_KIFU_PATH << PATH_SEPARATOR << i << ".sgf";
      if (targ->id == 0) {
        std::cerr << "Test : " << oss.str() << std::endl;
      }
      CopyGame(game, init_game);
      CheckAccuracy(game, oss.str());
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5ec8, %rsp           # imm = 0x5EC8
movq %rdi, 0x30(%rsp)
callq 0x53e60
movq %rax, %r14
callq 0x53e60
movq %rax, 0x48(%rsp)
movq %rax, %rdi
callq 0x53e8b
leaq 0x4748(%r14), %rax
movq %rax, 0x40(%rsp)
movq %r14, %rbx
addq $0x97372, %rbx          # imm = 0x97372
movl $0x9c41, %edx           # imm = 0x9C41
leaq 0x34adc(%rip), %r12     # 0x758b0
leaq 0x1ab1f915(%rip), %r13  # 0x1ab606f0
leaq 0x1880(%rsp), %rbp
movq %rbx, 0x38(%rsp)
movl %edx, %eax
andl $0x7, %eax
movq 0x30(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x41410
movl %edx, 0x1c(%rsp)
leaq 0x78(%rsp), %r15
movq %r15, %rdi
callq 0x6560
movl $0xe, %edx
movq %r15, %rdi
leaq 0x1eec3(%rip), %rsi     # 0x5fcdd
callq 0x64a0
movq 0x372da(%rip), %rsi     # 0x78100
movq 0x372db(%rip), %rdx     # 0x78108
leaq 0x78(%rsp), %rdi
callq 0x64a0
movq %rax, %rdi
movl 0x1c(%rsp), %esi
callq 0x6740
movl $0x4, %edx
movq %rax, %rdi
leaq 0x1e0fd(%rip), %rsi     # 0x5ef4f
callq 0x64a0
movq 0x30(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x40efd
movl $0x7, %edx
movq 0x34177(%rip), %rdi     # 0x74fe8
leaq 0x1edfe(%rip), %rsi     # 0x5fc76
callq 0x64a0
leaq 0x1e28(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x6680
movq 0x1e28(%rsp), %rsi
movq 0x1e30(%rsp), %rdx
movq 0x3413f(%rip), %rdi     # 0x74fe8
callq 0x64a0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x63d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x62a0
movq 0x1e28(%rsp), %rdi
leaq 0x1e38(%rsp), %rax
cmpq %rax, %rdi
je 0x40efd
movq 0x1e38(%rsp), %rsi
incq %rsi
callq 0x6420
movq %r14, %rdi
movq 0x48(%rsp), %rsi
callq 0x5432c
leaq 0x58(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x6680
movl $0x8, %eax
movq $0x0, 0x1e8(%rsp,%rax)
movl $0x0, 0x1f0(%rsp,%rax)
addq $0x10, %rax
cmpq $0x1698, %rax           # imm = 0x1698
jne 0x40f21
movl $0x0, 0x14(%rsp)
movq 0x58(%rsp), %rdi
leaq 0x1e28(%rsp), %rsi
callq 0x4562f
cmpl $0x0, 0x1e2c(%rsp)
jle 0x413d2
movl $0x0, 0x18(%rsp)
movl $0x1, 0xc(%rsp)
xorl %esi, %esi
leaq 0x1e28(%rsp), %rdi
movl %esi, 0x2c(%rsp)
callq 0x455dc
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x41389
movl $0x8, %eax
movq $0x0, 0x1e8(%rsp,%rax)
movl $0x0, 0x1f0(%rsp,%rax)
addq $0x10, %rax
cmpq $0x1698, %rax           # imm = 0x1698
jne 0x40fa3
cmpl $0x0, (%r12)
jle 0x40ff2
xorl %eax, %eax
movslq (%r13,%rax,4), %rcx
leaq (%rcx,%rcx,2), %rcx
movw $0x0, 0x4(%rbx,%rcx,2)
movl $0x0, (%rbx,%rcx,2)
incq %rax
movslq (%r12), %rcx
cmpq %rcx, %rax
jl 0x40fcf
movl $0x0, 0x14(%rsp)
movq %r14, %rdi
movl 0xc(%rsp), %esi
movq %rbp, %rdx
leaq 0x14(%rsp), %rcx
callq 0x56786
movq %r14, %rdi
movl 0xc(%rsp), %esi
movq %rbp, %rdx
leaq 0x14(%rsp), %rcx
callq 0x584a2
movl 0x43b0(%r14), %eax
addl $-0x2, %eax
cmpl %eax, 0x43c8(%r14)
jne 0x41049
movq %r14, %rdi
movl 0xc(%rsp), %esi
movq %rbp, %rdx
leaq 0x14(%rsp), %rcx
callq 0x57c3b
cmpl $0x0, (%r12)
jle 0x412f5
movslq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x1f8(%rsp), %r13
xorl %r15d, %r15d
movq %r12, %rbp
leaq 0x1ab1f67d(%rip), %rax  # 0x1ab606f0
movl (%rax,%r15,4), %r12d
movq %r14, %rdi
movl %r12d, %esi
movl 0xc(%rsp), %edx
callq 0x54d03
xorpd %xmm0, %xmm0
testb %al, %al
je 0x412d4
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %r12d, %edx
callq 0x58300
movq %r14, %rdi
movl 0xc(%rsp), %esi
movl %r12d, %edx
callq 0x57e1b
movslq %r12d, %rax
leaq (%rax,%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x38(%rsp), %rdi
movzbl (%rdi,%rcx), %edx
movsd 0x1bf3c(%rip), %xmm5    # 0x5d008
testq %rdx, %rdx
je 0x410e4
movq 0x370c0(%rip), %rsi     # 0x78198
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm5
movslq %ecx, %rdx
movzbl 0x1(%rdi,%rdx), %edx
movsd 0x1bf14(%rip), %xmm0    # 0x5d008
testq %rdx, %rdx
je 0x4110c
movq 0x370b0(%rip), %rsi     # 0x781b0
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm0
movzbl 0x97374(%r14,%rcx), %edx
movsd 0x1beeb(%rip), %xmm1    # 0x5d008
testq %rdx, %rdx
je 0x41135
movq 0x3709f(%rip), %rsi     # 0x781c8
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm1
movzbl 0x97375(%r14,%rcx), %edx
movsd 0x1bec2(%rip), %xmm2    # 0x5d008
testq %rdx, %rdx
je 0x4115e
movq 0x3708e(%rip), %rsi     # 0x781e0
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm2
movzbl 0x97376(%r14,%rcx), %edx
movsd 0x1be99(%rip), %xmm3    # 0x5d008
testq %rdx, %rdx
je 0x41187
movq 0x3707d(%rip), %rsi     # 0x781f8
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm3
movzbl 0x97377(%r14,%rcx), %ecx
movsd 0x1be70(%rip), %xmm4    # 0x5d008
testq %rcx, %rcx
je 0x411b0
movq 0x3706c(%rip), %rdx     # 0x78210
movq (%rdx), %rdx
shll $0x5, %ecx
movsd 0x18(%rdx,%rcx), %xmm4
mulsd %xmm0, %xmm5
mulsd %xmm1, %xmm5
mulsd %xmm2, %xmm5
mulsd %xmm3, %xmm5
mulsd %xmm4, %xmm5
movsd %xmm5, 0x20(%rsp)
cmpl $0x0, 0x18(%rsp)
je 0x4123d
cmpl $0x2, 0x43b0(%r14)
jl 0x4123d
leaq 0x1aacba9e(%rip), %rdx  # 0x1ab0cc80
movq 0x50(%rsp), %rdi
movl (%rdx,%rdi,4), %ecx
subl (%rdx,%rax,4), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
leaq 0x1aacc7b5(%rip), %rsi  # 0x1ab0d9b0
movl (%rsi,%rdi,4), %ecx
subl (%rsi,%rax,4), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
imulq $0x4c, %rdx, %rcx
addq 0x33d5d(%rip), %rcx     # 0x74f70
movl (%rcx,%rax,4), %eax
addl $-0x2, %eax
cmpl $0x2, %eax
ja 0x4123d
shll $0x5, %eax
movq 0x36f28(%rip), %rcx     # 0x78150
movq (%rcx), %rcx
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rcx,%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movl %r12d, %esi
callq 0x4f857
movl %eax, %eax
movq 0x36ee5(%rip), %rcx     # 0x78138
movslq (%rcx,%rax,4), %rbx
movq 0x40(%rsp), %rdi
movl %r12d, %esi
callq 0x4f84b
leaq 0x3f(%rbx), %rcx
testq %rbx, %rbx
cmovnsq %rbx, %rcx
sarq $0x6, %rcx
shlq $0x3, %rcx
addq 0x36fc2(%rip), %rcx     # 0x78240
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
leaq 0x3f(%rdi), %rdx
andq %rbx, %rdx
xorl %esi, %esi
cmpq %rdi, %rdx
setbe %sil
movq -0x8(%rcx,%rsi,8), %rcx
btq %rbx, %rcx
leaq 0x36ed8(%rip), %rcx     # 0x78180
jb 0x412be
movq 0x36e6f(%rip), %rcx     # 0x78120
movl %eax, %eax
movslq (%rcx,%rax,4), %rbx
leaq 0x36eaa(%rip), %rcx     # 0x78168
movq (%rcx), %rax
movq (%rax), %rax
shlq $0x5, %rbx
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rax,%rbx), %xmm0
movsd %xmm0, -0x8(%r13)
movl %r12d, (%r13)
incq %r15
movq %rbp, %r12
movslq (%rbp), %rax
addq $0x10, %r13
cmpq %rax, %r15
jl 0x41069
movl $0x10, %edx
leaq 0x1f0(%rsp), %rdi
leaq 0x1880(%rsp), %r15
movq %r15, %rsi
callq 0x4190f
movq 0x38(%rsp), %rbx
leaq 0x1ab1f3d2(%rip), %r13  # 0x1ab606f0
leaq 0x1880(%rsp), %rbp
leaq 0x1f0(%rsp), %rdi
movq %r15, %rsi
callq 0x419c2
movslq (%r12), %rax
movl 0x10(%rsp), %esi
testq %rax, %rax
jle 0x413a6
shlq $0x2, %rax
xorl %ecx, %ecx
xorl %edx, %edx
movl $0x0, %esi
testq %rcx, %rcx
je 0x4136f
movsd 0x1f0(%rsp,%rcx,4), %xmm0
ucomisd 0x1e0(%rsp,%rcx,4), %xmm0
jne 0x4136f
jp 0x4136f
incl %edx
movl %edx, %esi
movl 0x10(%rsp), %edx
cmpl %edx, 0x1f8(%rsp,%rcx,4)
je 0x4138d
addq $0x4, %rcx
movl %esi, %edx
cmpq %rcx, %rax
jne 0x4134b
jmp 0x413a2
xorl %esi, %esi
jmp 0x413a6
movslq %esi, %rax
shlq $0x2, %rax
subq %rax, %rcx
leaq 0x36eca(%rip), %rax     # 0x78268
lock
incl (%rcx,%rax)
movl 0x10(%rsp), %esi
movq %r14, %rdi
movl 0xc(%rsp), %edx
callq 0x55134
xorl $0x3, 0xc(%rsp)
movl 0x2c(%rsp), %esi
incl %esi
movl 0x10(%rsp), %eax
movl %eax, 0x18(%rsp)
cmpl 0x1e2c(%rsp), %esi
jl 0x40f7e
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x413ee
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6420
leaq 0x78(%rsp), %rdi
movq 0x33b9e(%rip), %rsi     # 0x74f98
callq 0x61f0
leaq 0xe8(%rsp), %rdi
callq 0x60f0
movl 0x1c(%rsp), %edx
incl %edx
cmpl $0x11171, %edx          # imm = 0x11171
jne 0x40de8
addq $0x5ec8, %rsp           # imm = 0x5EC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x41456
jmp 0x4145d
movq %rax, %rbx
movq 0x1e28(%rsp), %rdi
leaq 0x1e38(%rsp), %rax
cmpq %rax, %rdi
je 0x4147c
movq 0x1e38(%rsp), %rsi
jmp 0x41474
movq %rax, %rbx
jmp 0x4147c
jmp 0x4145d
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x4147c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6420
movq 0x33b15(%rip), %rsi     # 0x74f98
leaq 0x78(%rsp), %rdi
callq 0x61f0
leaq 0xe8(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6770