// File: /workspace/github_cpp_makefile_star2_O3/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 0x543a6
movq %rax, %r15
callq 0x543a6
movq %rax, 0x48(%rsp)
movq %rax, %rdi
callq 0x543d1
leaq 0x4748(%r15), %rax
movq %rax, 0x40(%rsp)
movq %r15, %r14
addq $0x97372, %r14          # imm = 0x97372
movl $0x9c41, %edx           # imm = 0x9C41
leaq 0x3582a(%rip), %r13     # 0x768b0
leaq 0x1ab20663(%rip), %rbp  # 0x1ab616f0
movq %r14, 0x38(%rsp)
movl %edx, %eax
andl $0x7, %eax
movq 0x30(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x416bd
movl %edx, 0x1c(%rsp)
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x6550
movl $0xe, %edx
movq %rbx, %rdi
leaq 0x1ec99(%rip), %rsi     # 0x5fd5d
callq 0x6490
movq 0x38030(%rip), %rsi     # 0x79100
movq 0x38031(%rip), %rdx     # 0x79108
leaq 0x78(%rsp), %rdi
callq 0x6490
movq %rax, %rdi
movl 0x1c(%rsp), %esi
callq 0x6730
movl $0x4, %edx
movq %rax, %rdi
leaq 0x1deb3(%rip), %rsi     # 0x5efaf
callq 0x6490
movq 0x30(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x411a7
movl $0x7, %edx
movq 0x34ecd(%rip), %rdi     # 0x75fe8
leaq 0x1ebd4(%rip), %rsi     # 0x5fcf6
callq 0x6490
leaq 0x1e28(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x6670
movq 0x1e28(%rsp), %rsi
movq 0x1e30(%rsp), %rdx
movq 0x34e95(%rip), %rdi     # 0x75fe8
callq 0x6490
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movq 0x1e28(%rsp), %rdi
leaq 0x1e38(%rsp), %rax
cmpq %rax, %rdi
je 0x411a7
movq 0x1e38(%rsp), %rsi
incq %rsi
callq 0x6410
movq %r15, %rdi
movq 0x48(%rsp), %rsi
callq 0x549d9
leaq 0x58(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x6670
movq 0x58(%rsp), %rdi
movl $0x8, %eax
movq $0x0, 0x1e8(%rsp,%rax)
movl $0x0, 0x1f0(%rsp,%rax)
addq $0x10, %rax
cmpq $0x1698, %rax           # imm = 0x1698
jne 0x411d0
movl $0x0, 0x14(%rsp)
leaq 0x1e28(%rsp), %rsi
callq 0x4595b
leaq 0x1880(%rsp), %rbx
cmpl $0x0, 0x1e2c(%rsp)
jle 0x4167f
movl $0x0, 0x18(%rsp)
movl $0x1, 0xc(%rsp)
xorl %esi, %esi
leaq 0x1e28(%rsp), %rdi
movl %esi, 0x2c(%rsp)
callq 0x45908
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x4164f
movl $0x8, %eax
movq $0x0, 0x1e8(%rsp,%rax)
movl $0x0, 0x1f0(%rsp,%rax)
addq $0x10, %rax
cmpq $0x1698, %rax           # imm = 0x1698
jne 0x41255
cmpl $0x0, (%r13)
jle 0x412a6
xorl %eax, %eax
movslq (%rbp,%rax,4), %rcx
leaq (%rcx,%rcx,2), %rcx
movw $0x0, 0x4(%r14,%rcx,2)
movl $0x0, (%r14,%rcx,2)
incq %rax
movslq (%r13), %rcx
cmpq %rcx, %rax
jl 0x41281
movl $0x0, 0x14(%rsp)
movq %r15, %rdi
movl 0xc(%rsp), %esi
movq %rbx, %rdx
leaq 0x14(%rsp), %rcx
callq 0x5712c
movq %r15, %rdi
movl 0xc(%rsp), %esi
movq %rbx, %rdx
leaq 0x14(%rsp), %rcx
callq 0x58dc7
movl 0x43b0(%r15), %eax
addl $-0x2, %eax
cmpl %eax, 0x43c8(%r15)
jne 0x412fd
movq %r15, %rdi
movl 0xc(%rsp), %esi
movq %rbx, %rdx
leaq 0x14(%rsp), %rcx
callq 0x58535
cmpl $0x0, (%r13)
jle 0x415aa
movslq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x1f8(%rsp), %rbp
xorl %r12d, %r12d
movq %r13, %rbx
leaq 0x1ab203c9(%rip), %rax  # 0x1ab616f0
movl (%rax,%r12,4), %r13d
movq %r15, %rdi
movl %r13d, %esi
movl 0xc(%rsp), %edx
callq 0x556c8
xorpd %xmm0, %xmm0
testb %al, %al
je 0x4158b
movq %r15, %rdi
movl 0xc(%rsp), %esi
movl %r13d, %edx
callq 0x58c25
movq %r15, %rdi
movl 0xc(%rsp), %esi
movl %r13d, %edx
callq 0x5871b
movslq %r13d, %rax
leaq (%rax,%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x38(%rsp), %rdi
movzbl (%rdi,%rcx), %edx
movsd 0x1bc88(%rip), %xmm5    # 0x5d008
testq %rdx, %rdx
je 0x41398
movq 0x37e0c(%rip), %rsi     # 0x79198
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm5
movslq %ecx, %rdx
movzbl 0x1(%rdi,%rdx), %edx
movsd 0x1bc60(%rip), %xmm0    # 0x5d008
testq %rdx, %rdx
je 0x413c0
movq 0x37dfc(%rip), %rsi     # 0x791b0
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm0
movzbl 0x97374(%r15,%rcx), %edx
movsd 0x1bc37(%rip), %xmm1    # 0x5d008
testq %rdx, %rdx
je 0x413e9
movq 0x37deb(%rip), %rsi     # 0x791c8
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm1
movzbl 0x97375(%r15,%rcx), %edx
movsd 0x1bc0e(%rip), %xmm2    # 0x5d008
testq %rdx, %rdx
je 0x41412
movq 0x37dda(%rip), %rsi     # 0x791e0
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm2
movzbl 0x97376(%r15,%rcx), %edx
movsd 0x1bbe5(%rip), %xmm3    # 0x5d008
testq %rdx, %rdx
je 0x4143b
movq 0x37dc9(%rip), %rsi     # 0x791f8
movq (%rsi), %rsi
shll $0x5, %edx
movsd 0x18(%rsi,%rdx), %xmm3
movzbl 0x97377(%r15,%rcx), %ecx
movsd 0x1bbbc(%rip), %xmm4    # 0x5d008
testq %rcx, %rcx
je 0x41464
movq 0x37db8(%rip), %rdx     # 0x79210
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 0x414f1
cmpl $0x2, 0x43b0(%r15)
jl 0x414f1
leaq 0x1aacc7ea(%rip), %rdx  # 0x1ab0dc80
movq 0x50(%rsp), %rdi
movl (%rdx,%rdi,4), %ecx
subl (%rdx,%rax,4), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
leaq 0x1aacd501(%rip), %rsi  # 0x1ab0e9b0
movl (%rsi,%rdi,4), %ecx
subl (%rsi,%rax,4), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
imulq $0x4c, %rdx, %rcx
addq 0x34aa9(%rip), %rcx     # 0x75f70
movl (%rcx,%rax,4), %eax
addl $-0x2, %eax
cmpl $0x2, %eax
ja 0x414f1
shll $0x5, %eax
movq 0x37c74(%rip), %rcx     # 0x79150
movq (%rcx), %rcx
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rcx,%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movl %r13d, %esi
callq 0x4fc36
movl %eax, %eax
movq 0x37c31(%rip), %rcx     # 0x79138
movslq (%rcx,%rax,4), %r14
movq 0x40(%rsp), %rdi
movl %r13d, %esi
callq 0x4fc2a
leal 0x3f(%r14), %ecx
testl %r14d, %r14d
cmovnsl %r14d, %ecx
sarl $0x6, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq 0x37d0c(%rip), %rcx     # 0x79240
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
leaq 0x3f(%rdi), %rdx
andq %r14, %rdx
xorl %esi, %esi
cmpq %rdi, %rdx
setbe %sil
movq -0x8(%rcx,%rsi,8), %rcx
btq %r14, %rcx
leaq 0x37c22(%rip), %rcx     # 0x79180
jb 0x41574
movq 0x37bb9(%rip), %rcx     # 0x79120
movl %eax, %eax
movslq (%rcx,%rax,4), %r14
leaq 0x37bf4(%rip), %rcx     # 0x79168
movq (%rcx), %rax
movq (%rax), %rax
shlq $0x5, %r14
movsd 0x20(%rsp), %xmm0
mulsd 0x18(%rax,%r14), %xmm0
movsd %xmm0, -0x8(%rbp)
movl %r13d, (%rbp)
incq %r12
movq %rbx, %r13
movslq (%rbx), %rax
addq $0x10, %rbp
cmpq %rax, %r12
jl 0x4131d
movl $0x10, %edx
leaq 0x1f0(%rsp), %rdi
leaq 0x1880(%rsp), %r12
movq %r12, %rsi
callq 0x41bc1
movq 0x38(%rsp), %r14
leaq 0x1ab2011d(%rip), %rbp  # 0x1ab616f0
leaq 0x1880(%rsp), %rbx
leaq 0x1f0(%rsp), %rdi
movq %r12, %rsi
callq 0x41c74
movslq (%r13), %rax
testq %rax, %rax
jle 0x4164f
shlq $0x2, %rax
xorl %ecx, %ecx
xorl %edx, %edx
movl $0x0, %esi
testq %rcx, %rcx
je 0x41620
movsd 0x1f0(%rsp,%rcx,4), %xmm0
ucomisd 0x1e0(%rsp,%rcx,4), %xmm0
jne 0x41620
jp 0x41620
incl %edx
movl %edx, %esi
movl 0x10(%rsp), %edx
cmpl %edx, 0x1f8(%rsp,%rcx,4)
je 0x4163a
addq $0x4, %rcx
movl %esi, %edx
cmpq %rcx, %rax
jne 0x415fc
jmp 0x4164f
movslq %esi, %rax
shlq $0x2, %rax
subq %rax, %rcx
leaq 0x37c1d(%rip), %rax     # 0x79268
lock
incl (%rcx,%rax)
movq %r15, %rdi
movl 0x10(%rsp), %esi
movl 0xc(%rsp), %edx
callq 0x55ae8
xorl $0x3, 0xc(%rsp)
movl 0x2c(%rsp), %esi
incl %esi
movl 0x10(%rsp), %eax
movl %eax, 0x18(%rsp)
cmpl 0x1e2c(%rsp), %esi
jl 0x41230
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x4169b
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6410
leaq 0x78(%rsp), %rdi
movq 0x348f1(%rip), %rsi     # 0x75f98
callq 0x61e0
leaq 0xe8(%rsp), %rdi
callq 0x60f0
movl 0x1c(%rsp), %edx
incl %edx
cmpl $0x11171, %edx          # imm = 0x11171
jne 0x41092
addq $0x5ec8, %rsp           # imm = 0x5EC8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x41703
jmp 0x4170a
movq %rax, %rbx
movq 0x1e28(%rsp), %rdi
leaq 0x1e38(%rsp), %rax
cmpq %rax, %rdi
je 0x41729
movq 0x1e38(%rsp), %rsi
jmp 0x41721
movq %rax, %rbx
jmp 0x41729
jmp 0x4170a
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x41729
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x34868(%rip), %rsi     # 0x75f98
leaq 0x78(%rsp), %rdi
callq 0x61e0
leaq 0xe8(%rsp), %rdi
callq 0x60f0
movq %rbx, %rdi
callq 0x6760
nop