// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %edx, %r14d
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebx
movl %edi, %ebp
leaq 0x35050(%rip), %rsi     # 0x7a690
leaq 0x38(%rsp), %rdi
movl $0x1, %edx
callq 0x6810
leaq 0x1a882(%rip), %rax     # 0x5fed8
leaq 0x1a884(%rip), %rsi     # 0x5fee1
testl %r14d, %r14d
cmovneq %rax, %rsi
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1a86c(%rip), %rax     # 0x5fee0
leaq 0x1a86e(%rip), %rdx     # 0x5fee9
cmovneq %rax, %rdx
leaq 0x18(%rsp), %rdi
callq 0x200fc
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x58(%rsp,%rax)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
je 0x457b1
movq 0x3093a(%rip), %rdi     # 0x75fe8
callq 0x6490
movq %rax, %r14
leaq 0x1a82d(%rip), %rsi     # 0x5feea
movl $0x6, %edx
movq %rax, %rdi
callq 0x6490
movq %r14, %rdi
movl %ebp, %esi
callq 0x6730
movq %rax, %r14
leaq 0x1a813(%rip), %rsi     # 0x5fef1
movl $0xd, %edx
movq %rax, %rdi
callq 0x6490
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6690
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x63c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x6040
movq %rax, %rdi
callq 0x6290
movq 0x308be(%rip), %rdi     # 0x75fe8
leaq 0x1a780(%rip), %rsi     # 0x5feb1
movl $0xe, %edx
callq 0x6490
movq 0x308a6(%rip), %rdi     # 0x75fe8
movl %ebx, %esi
callq 0x6730
movq %rax, %rbx
leaq 0x1a76d(%rip), %rsi     # 0x5fec0
movl $0xd, %edx
movq %rax, %rdi
callq 0x6490
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x6690
movq %rax, %rbx
leaq 0x17a21(%rip), %rsi     # 0x5d199
movl $0x8, %edx
movq %rax, %rdi
callq 0x6490
movq (%rbx), %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
jmp 0x4587f
leaq 0x38(%rsp), %rdi
callq 0x6490
movq %rax, %r14
leaq 0x1a725(%rip), %rsi     # 0x5feea
movl $0x6, %edx
movq %rax, %rdi
callq 0x6490
movq %r14, %rdi
movl %ebp, %esi
callq 0x6730
movq %rax, %r14
leaq 0x1a70b(%rip), %rsi     # 0x5fef1
movl $0xd, %edx
movq %rax, %rdi
callq 0x6490
movq %r14, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x6690
leaq 0x1a6a9(%rip), %rsi     # 0x5feb1
leaq 0x38(%rsp), %rdi
movl $0xe, %edx
callq 0x6490
leaq 0x38(%rsp), %rdi
movl %ebx, %esi
callq 0x6730
leaq 0x1a696(%rip), %rsi     # 0x5fec0
movl $0xd, %edx
movq %rax, %rdi
callq 0x6490
leaq 0x38(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x50(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x50(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x3, 0x40(%rsp,%rax)
movsd 0x8(%rsp), %xmm0
callq 0x6690
leaq 0x1a65c(%rip), %rsi     # 0x5fece
movl $0x9, %edx
movq %rax, %rdi
callq 0x6490
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x45896
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6410
movq 0x306cb(%rip), %rax     # 0x75f68
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x40(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x38(%rsp,%rcx)
callq 0x6330
leaq 0x130(%rsp), %rdi
callq 0x60f0
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x458f5
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x458f5
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x6410
leaq 0x38(%rsp), %rdi
callq 0x6600
movq %rbx, %rdi
callq 0x6760
nop