// File: kobanium[P]Ray/src/learn/MovePredictionTest.cpp
// Function: EvaluateMovePrediction()
void
EvaluateMovePrediction( void )
{
  std::thread *workers[TEST_WORKER_THREADS];

  for (int i = 0; i < TEST_WORKER_THREADS; i++) {
    workers[i] = new std::thread(PredictionTestWorker, i);
  }

  int sum = 0;

  for (int i = 0; i < TEST_WORKER_THREADS; i++) {
    workers[i]->join();
    delete workers[i];
  }
  

  for (int i = 0; i < pure_board_max + 1; i++) {
    sum += appearance[i];
  }

  for (int i = 0, part = 0; i < 10; i++) {
    part += appearance[i];
    std::cout << i + 1 << " " << static_cast<double>(part) / sum << std::endl;
    std::cerr << i + 1 << " " << appearance[i] << std::endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl $0x0, -0x44(%rbp)
cmpl $0x8, -0x44(%rbp)
jge 0x7a3a5
movl $0x8, %edi
callq 0x7550
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
leaq 0x1dd(%rip), %rsi       # 0x7a540
leaq -0x44(%rbp), %rdx
callq 0x7aaa0
jmp 0x7a36e
movq -0x70(%rbp), %rcx
movslq -0x44(%rbp), %rax
movq %rcx, -0x40(%rbp,%rax,8)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x7a342
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x8, %esi
callq 0x7560
jmp 0x7a52b
movl $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
cmpl $0x8, -0x5c(%rbp)
jge 0x7a3fe
movslq -0x5c(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rdi
callq 0x7940
movslq -0x5c(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0x7a3f1
movq -0x78(%rbp), %rdi
callq 0x66080
movq -0x78(%rbp), %rdi
movl $0x8, %esi
callq 0x7560
jmp 0x7a3f3
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x7a3b3
movl $0x0, -0x60(%rbp)
movl -0x60(%rbp), %eax
leaq 0x6d631(%rip), %rcx     # 0xe7a40
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x7a441
movslq -0x60(%rbp), %rsi
leaq 0x70ded(%rip), %rdi     # 0xeb210
callq 0x7ab60
movq %rax, %rdi
callq 0x25780
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x7a405
movl $0x0, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
cmpl $0xa, -0x64(%rbp)
jge 0x7a522
movslq -0x64(%rbp), %rsi
leaq 0x70dac(%rip), %rdi     # 0xeb210
callq 0x7ab60
movq %rax, %rdi
callq 0x25780
addl -0x68(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x64(%rbp), %esi
addl $0x1, %esi
movq 0x6cb24(%rip), %rdi     # 0xe6fa8
callq 0x7980
movq %rax, %rdi
leaq 0x31fb3(%rip), %rsi     # 0xac446
callq 0x7530
movq %rax, %rdi
cvtsi2sdl -0x68(%rbp), %xmm0
cvtsi2sdl -0x58(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x7a60
movq %rax, %rdi
movq 0x6cab0(%rip), %rsi     # 0xe6f68
callq 0x75b0
movl -0x64(%rbp), %esi
addl $0x1, %esi
movq 0x6cb26(%rip), %rdi     # 0xe6ff0
callq 0x7980
movq %rax, %rdi
leaq 0x31f6d(%rip), %rsi     # 0xac446
callq 0x7530
movq %rax, -0x80(%rbp)
movslq -0x64(%rbp), %rsi
leaq 0x70d23(%rip), %rdi     # 0xeb210
callq 0x7ab60
movq %rax, %rdi
callq 0x25780
movq -0x80(%rbp), %rdi
movl %eax, %esi
callq 0x7980
movq %rax, %rdi
movq 0x6ca59(%rip), %rsi     # 0xe6f68
callq 0x75b0
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x7a44f
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x79b0
nopw %cs:(%rax,%rax)