// File: kobanium[P]Ray/src/learn/LearningLog.cpp
// Function: OutputLearningLogFile(int, int, double, double, bool)
void
OutputLearningLogFile( const int update_steps, const int all_moves, const double consume_time, const double accuracy, const bool is_train )
{
  std::ofstream ofs(learning_log_file_path, std::ios::app);
  std::string phase = is_train ? "Training" : "Testing ";

  if (!ofs) {
    std::cerr << phase << " step " << update_steps << ", accuracy : " << accuracy << std::endl;
    std::cerr << ", all_moves : " << all_moves << ", run_time : " << consume_time << " seconds" << std::endl;
  } else {
    ofs << phase << " step " << update_steps << ", accuracy : " << accuracy;
    ofs << ", all_moves : " << all_moves << ", run_time : ";
    ofs << std::fixed << std::setprecision(3) << consume_time << " seconds\n";
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movb %dl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
leaq -0x220(%rbp), %rdi
leaq 0x6a390(%rip), %rsi     # 0xeb810
movl $0x1, %edx
callq 0x7a90
testb $0x1, -0x19(%rbp)
je 0x814a0
leaq 0x2daa1(%rip), %rax     # 0xaef38
movq %rax, -0x260(%rbp)
jmp 0x814b0
leaq 0x2da9a(%rip), %rax     # 0xaef41
movq %rax, -0x260(%rbp)
jmp 0x814b0
movq -0x260(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x241(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x79c0
movq -0x270(%rbp), %rsi
movq -0x268(%rbp), %rdx
leaq -0x240(%rbp), %rdi
callq 0x256b0
jmp 0x814ed
leaq -0x241(%rbp), %rdi
callq 0x75d0
movq -0x220(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x220(%rbp,%rax), %rdi
callq 0x7220
movb %al, -0x271(%rbp)
jmp 0x81519
movb -0x271(%rbp), %al
testb $0x1, %al
jne 0x81528
jmp 0x816a9
movq 0x65ac1(%rip), %rdi     # 0xe6ff0
leaq -0x240(%rbp), %rsi
callq 0x7480
movq %rax, -0x280(%rbp)
jmp 0x81544
movq -0x280(%rbp), %rdi
leaq 0x2d9f8(%rip), %rsi     # 0xaef4a
callq 0x7530
movq %rax, -0x288(%rbp)
jmp 0x81560
movq -0x288(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x7980
movq %rax, -0x290(%rbp)
jmp 0x81578
movq -0x290(%rbp), %rdi
leaq 0x2d9cb(%rip), %rsi     # 0xaef51
callq 0x7530
movq %rax, -0x298(%rbp)
jmp 0x81594
movq -0x298(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
callq 0x7a60
movq %rax, -0x2a0(%rbp)
jmp 0x815ae
movq -0x2a0(%rbp), %rdi
movq 0x659ac(%rip), %rsi     # 0xe6f68
callq 0x75b0
jmp 0x815c3
movq 0x65a26(%rip), %rdi     # 0xe6ff0
leaq 0x2d940(%rip), %rsi     # 0xaef11
callq 0x7530
movq %rax, -0x2a8(%rbp)
jmp 0x815df
movq -0x2a8(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x7980
movq %rax, -0x2b0(%rbp)
jmp 0x815f7
movq -0x2b0(%rbp), %rdi
leaq 0x2d91b(%rip), %rsi     # 0xaef20
callq 0x7530
movq %rax, -0x2b8(%rbp)
jmp 0x81613
movq -0x2b8(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
callq 0x7a60
movq %rax, -0x2c0(%rbp)
jmp 0x8162d
movq -0x2c0(%rbp), %rdi
leaq 0x2ab5e(%rip), %rsi     # 0xac199
callq 0x7530
movq %rax, -0x2c8(%rbp)
jmp 0x81649
movq -0x2c8(%rbp), %rdi
movq 0x65911(%rip), %rsi     # 0xe6f68
callq 0x75b0
jmp 0x8165e
jmp 0x817f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x250(%rbp)
movl %eax, -0x254(%rbp)
leaq -0x241(%rbp), %rdi
callq 0x75d0
jmp 0x81818
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x250(%rbp)
movl %eax, -0x254(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x7ae8
jmp 0x81818
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x7480
movq %rax, -0x2d0(%rbp)
jmp 0x816c5
movq -0x2d0(%rbp), %rdi
leaq 0x2d877(%rip), %rsi     # 0xaef4a
callq 0x7530
movq %rax, -0x2d8(%rbp)
jmp 0x816e1
movq -0x2d8(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x7980
movq %rax, -0x2e0(%rbp)
jmp 0x816f9
movq -0x2e0(%rbp), %rdi
leaq 0x2d84a(%rip), %rsi     # 0xaef51
callq 0x7530
movq %rax, -0x2e8(%rbp)
jmp 0x81715
movq -0x2e8(%rbp), %rdi
movsd -0x18(%rbp), %xmm0
callq 0x7a60
jmp 0x81728
leaq 0x2d7e2(%rip), %rsi     # 0xaef11
leaq -0x220(%rbp), %rdi
callq 0x7530
movq %rax, -0x2f0(%rbp)
jmp 0x81744
movq -0x2f0(%rbp), %rdi
movl -0x8(%rbp), %esi
callq 0x7980
movq %rax, -0x2f8(%rbp)
jmp 0x8175c
movq -0x2f8(%rbp), %rdi
leaq 0x2d7b6(%rip), %rsi     # 0xaef20
callq 0x7530
jmp 0x81771
leaq -0x55188(%rip), %rsi    # 0x2c5f0
leaq -0x220(%rbp), %rdi
callq 0x7170
movq %rax, -0x300(%rbp)
jmp 0x8178d
movl $0x3, %edi
callq 0x2c620
movl %eax, -0x304(%rbp)
jmp 0x8179f
movq -0x300(%rbp), %rdi
movl -0x304(%rbp), %eax
movl %eax, -0x258(%rbp)
movl -0x258(%rbp), %esi
callq 0x7880
movq %rax, -0x310(%rbp)
jmp 0x817c6
movq -0x310(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
callq 0x7a60
movq %rax, -0x318(%rbp)
jmp 0x817e0
movq -0x318(%rbp), %rdi
leaq 0x2d740(%rip), %rsi     # 0xaef2e
callq 0x7530
jmp 0x817f5
jmp 0x817f7
leaq -0x240(%rbp), %rdi
callq 0x7ae8
leaq -0x220(%rbp), %rdi
callq 0x7820
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
leaq -0x220(%rbp), %rdi
callq 0x7820
movq -0x250(%rbp), %rdi
callq 0x79b0