// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/TimeTest.cpp
// Function: TimeTest::~TimeTest()
TimeTest::~TimeTest() {
  if (mEventQueue.size() == 0 || mEventQueue.size() != mRecordQueue.size()) {
    return;
  }

  char *file_name = new char[256];
  std::ofstream out_file;
  TimeCost *pTimeCost;

  for (unsigned i = 0; i < mEventQueue.size(); ++i) {
    sprintf(file_name, "Test/TimeTest-%s-%d.txt", mEventQueue[i].data(), mUnum);
    out_file.open(file_name);
    if (out_file.good() == false) {
      PRINT_ERROR("open file error  " << file_name);
      continue;
    }

    out_file << mEventQueue[i].data() << std::endl;

    pTimeCost = &(mRecordQueue[i].mEachTime);
    out_file << std::endl << std::endl;
    out_file << "Time cost for each time: " << std::endl;
    out_file << "Num: " << pTimeCost->mNum << std::endl;
    out_file << "Ave: " << pTimeCost->mAveCost / 1000.0 << " ms" << std::endl;
    out_file << "Max: " << pTimeCost->mMaxCost / 1000.0 << " ms  "
             << pTimeCost->mMaxTime << std::endl;
    out_file << "Min: " << pTimeCost->mMinCost / 1000.0 << " ms  "
             << pTimeCost->mMinTime << std::endl;

    pTimeCost = &(mRecordQueue[i].mEachCycle);
    out_file << std::endl << std::endl;
    out_file << "Time cost for each cycle: " << std::endl;
    out_file << "Num: " << pTimeCost->mNum << std::endl;
    out_file << "Ave: " << pTimeCost->mAveCost / 1000.0 << " ms" << std::endl;
    out_file << "Max: " << pTimeCost->mMaxCost / 1000.0 << " ms  "
             << pTimeCost->mMaxTime << std::endl;
    out_file << "Min: " << pTimeCost->mMinCost / 1000.0 << " ms  "
             << pTimeCost->mMinTime << std::endl;

    out_file.close();
  }

  delete[] file_name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movq 0x8(%rdi), %rcx
subq (%rdi), %rcx
je 0x4250f
sarq $0x5, %rcx
movq 0x20(%rbx), %rax
subq 0x18(%rbx), %rax
pushq $0x78
popq %rsi
cqto
idivq %rsi
cmpq %rax, %rcx
jne 0x4250f
movl $0x100, %edi            # imm = 0x100
callq 0x9050
movq %rax, -0x30(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x9880
leaq -0x230(%rbp), %r12
xorl %r14d, %r14d
movl %r14d, %r14d
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r14, %rcx
jbe 0x424fa
movq %r14, %r15
shlq $0x5, %r15
movq (%rax,%r15), %rdx
movl 0x88(%rbx), %ecx
movq -0x30(%rbp), %r13
movq %r13, %rdi
leaq 0x18964(%rip), %rsi     # 0x5ab68
xorl %eax, %eax
callq 0x9100
movq %r12, %rdi
movq %r13, %rsi
pushq $0x10
popq %rdx
callq 0x9080
movq -0x230(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x210(%rbp,%rax)
je 0x42292
movq 0x34dbb(%rip), %rdi     # 0x76ff0
leaq 0x18944(%rip), %rsi     # 0x5ab80
callq 0x94b0
movq %rax, %rdi
leaq 0x18f27(%rip), %rsi     # 0x5b172
callq 0x94b0
movq %rax, %rdi
pushq $0x41
popq %rsi
callq 0x9890
movq %rax, %rdi
leaq 0x171ba(%rip), %rsi     # 0x5941f
callq 0x94b0
movq %rax, %rdi
leaq 0x18920(%rip), %rsi     # 0x5ab94
callq 0x94b0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
jmp 0x424f2
movq (%rbx), %rax
movq (%rax,%r15), %rsi
movq %r12, %rdi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
imulq $0x78, %r14, %r13
movq 0x18(%rbx), %r15
addq %r13, %r15
movq %r12, %rdi
callq 0x99e8
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x188d8(%rip), %rsi     # 0x5aba6
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x188db(%rip), %rsi     # 0x5abc0
callq 0x94b0
movq 0x30(%r15), %rsi
movq %rax, %rdi
callq 0x9480
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x188be(%rip), %rsi     # 0x5abc6
callq 0x94b0
movsd 0x38(%r15), %xmm0
divsd 0x1647d(%rip), %xmm0    # 0x58798
movq %rax, %rdi
callq 0x97e0
movq %rax, %rdi
leaq 0x16bad(%rip), %rsi     # 0x58eda
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x18888(%rip), %rsi     # 0x5abcc
callq 0x94b0
cvtsi2sdq 0x48(%r15), %xmm0
divsd 0x16441(%rip), %xmm0    # 0x58798
movq %rax, %rdi
callq 0x97e0
movq %rax, %rdi
leaq 0x18869(%rip), %rsi     # 0x5abd2
callq 0x94b0
leaq 0x40(%r15), %rsi
movq %rax, %rdi
callq 0xd465
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x1884c(%rip), %rsi     # 0x5abd8
callq 0x94b0
cvtsi2sdq 0x58(%r15), %xmm0
divsd 0x163f9(%rip), %xmm0    # 0x58798
movq %rax, %rdi
callq 0x97e0
movq %rax, %rdi
leaq 0x18821(%rip), %rsi     # 0x5abd2
callq 0x94b0
addq $0x50, %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0xd465
movq %rax, %rdi
callq 0x99e8
addq 0x18(%rbx), %r13
movq %r12, %rdi
callq 0x99e8
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x187f3(%rip), %rsi     # 0x5abde
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x187be(%rip), %rsi     # 0x5abc0
callq 0x94b0
movq (%r13), %rsi
movq %rax, %rdi
callq 0x9480
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x187a1(%rip), %rsi     # 0x5abc6
callq 0x94b0
movsd 0x8(%r13), %xmm0
divsd 0x16360(%rip), %xmm0    # 0x58798
movq %rax, %rdi
callq 0x97e0
movq %rax, %rdi
leaq 0x16a90(%rip), %rsi     # 0x58eda
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x1876b(%rip), %rsi     # 0x5abcc
callq 0x94b0
cvtsi2sdq 0x18(%r13), %xmm0
divsd 0x16324(%rip), %xmm0    # 0x58798
movq %rax, %rdi
callq 0x97e0
movq %rax, %rdi
leaq 0x1874c(%rip), %rsi     # 0x5abd2
callq 0x94b0
leaq 0x10(%r13), %rsi
movq %rax, %rdi
callq 0xd465
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
leaq 0x1872f(%rip), %rsi     # 0x5abd8
callq 0x94b0
cvtsi2sdq 0x28(%r13), %xmm0
divsd 0x162dc(%rip), %xmm0    # 0x58798
movq %rax, %rdi
callq 0x97e0
movq %rax, %rdi
leaq 0x18704(%rip), %rsi     # 0x5abd2
callq 0x94b0
addq $0x20, %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0xd465
movq %rax, %rdi
callq 0x99e8
movq %r12, %rdi
callq 0x96e0
incl %r14d
jmp 0x421cb
movq -0x30(%rbp), %rdi
callq 0x9630
leaq -0x230(%rbp), %rdi
callq 0x9720
leaq 0x58(%rbx), %rdi
callq 0x429c0
leaq 0x30(%rbx), %rdi
callq 0x429c0
leaq 0x18(%rbx), %rdi
callq 0x42a9c
movq %rbx, %rdi
callq 0x21b20
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x42546
movq %rax, %rdi
callq 0x10599