// File: /workspace/github_cpp_makefile_star2_O3/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 $0x218, %rsp            # imm = 0x218
movq %rdi, %r13
movq 0x8(%rdi), %rax
subq (%rdi), %rax
je 0x4e809
sarq $0x5, %rax
movq 0x20(%r13), %rcx
subq 0x18(%r13), %rcx
sarq $0x3, %rcx
movabsq $-0x1111111111111111, %rdx # imm = 0xEEEEEEEEEEEEEEEF
imulq %rcx, %rdx
cmpq %rdx, %rax
jne 0x4e809
movl $0x100, %edi            # imm = 0x100
callq 0x9050
movq %rax, -0x38(%rbp)
leaq -0x238(%rbp), %r15
movq %r15, %rdi
callq 0x9870
movq (%r13), %rax
cmpq %rax, 0x8(%r13)
je 0x4e7ca
movl $0x1, %ebx
xorl %r12d, %r12d
movq %r13, -0x30(%rbp)
movq %r12, %r14
shlq $0x5, %r14
movq (%rax,%r14), %rdx
movl 0x88(%r13), %ecx
movq -0x38(%rbp), %r13
movq %r13, %rdi
leaq 0x1e9c8(%rip), %rsi     # 0x6cb88
xorl %eax, %eax
callq 0x9110
movq %r15, %rdi
movq %r13, %rsi
movl $0x10, %edx
callq 0x9090
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, -0x218(%rbp,%rax)
je 0x4e2a3
movl $0x13, %edx
movq 0x35df4(%rip), %rdi     # 0x83ff0
leaq 0x1e99d(%rip), %rsi     # 0x6cba0
callq 0x9560
movl $0x1, %edx
movq 0x35ddc(%rip), %rdi     # 0x83ff0
leaq 0x1ef77(%rip), %rsi     # 0x6d192
callq 0x9560
movq 0x35dc9(%rip), %rdi     # 0x83ff0
movl $0x41, %esi
callq 0x9880
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1d214(%rip), %rsi     # 0x6b457
callq 0x9560
movl $0x11, %edx
movq %r12, %rdi
leaq 0x1e95d(%rip), %rsi     # 0x6cbb4
callq 0x9560
movq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x9200
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x9560
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r12, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
jmp 0x4e7a9
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx,%r14), %r14
testq %r14, %r14
je 0x4e2cb
movq %r14, %rdi
callq 0x9200
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x9560
jmp 0x4e2e0
leaq (%rax,%rbp), %rdi
addq $-0x238, %rdi           # imm = 0xFDC8
movl $0x1, %esi
callq 0x9860
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r15, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
imulq $0x78, %r12, %r13
movq -0x30(%rbp), %rax
movq 0x18(%rax), %r12
addq %r13, %r12
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r15, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x19, %edx
movq %r15, %rdi
leaq 0x1e848(%rip), %rsi     # 0x6cbc6
callq 0x9560
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r15, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e823(%rip), %rsi     # 0x6cbe0
callq 0x9560
movq 0x30(%r12), %rsi
movq %r15, %rdi
callq 0x9460
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e7de(%rip), %rsi     # 0x6cbe6
callq 0x9560
movsd 0x38(%r12), %xmm0
divsd 0x1c3ac(%rip), %xmm0    # 0x6a7c8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1cad8(%rip), %rsi     # 0x6af0e
callq 0x9560
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e77b(%rip), %rsi     # 0x6cbec
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x48(%r12), %xmm0
divsd 0x1c340(%rip), %xmm0    # 0x6a7c8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1e750(%rip), %rsi     # 0x6cbf2
callq 0x9560
leaq 0x40(%r12), %rsi
movq %r14, %rdi
callq 0xe974
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e70b(%rip), %rsi     # 0x6cbf8
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x58(%r12), %xmm0
divsd 0x1c2c4(%rip), %xmm0    # 0x6a7c8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1e6d4(%rip), %rsi     # 0x6cbf2
callq 0x9560
addq $0x50, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xe974
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movq -0x30(%rbp), %rax
addq 0x18(%rax), %r13
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r15, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x1a, %edx
movq %r15, %rdi
leaq 0x1e636(%rip), %rsi     # 0x6cbfe
callq 0x9560
movq -0x238(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r15, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e5d9(%rip), %rsi     # 0x6cbe0
callq 0x9560
movq (%r13), %rsi
movq %r15, %rdi
callq 0x9460
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e595(%rip), %rsi     # 0x6cbe6
callq 0x9560
movsd 0x8(%r13), %xmm0
divsd 0x1c164(%rip), %xmm0    # 0x6a7c8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1c890(%rip), %rsi     # 0x6af0e
callq 0x9560
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e533(%rip), %rsi     # 0x6cbec
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x18(%r13), %xmm0
divsd 0x1c0f9(%rip), %xmm0    # 0x6a7c8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1e509(%rip), %rsi     # 0x6cbf2
callq 0x9560
leaq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0xe974
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x5, %edx
movq %r15, %rdi
leaq 0x1e4c5(%rip), %rsi     # 0x6cbf8
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x28(%r13), %xmm0
divsd 0x1c07f(%rip), %xmm0    # 0x6a7c8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1e48f(%rip), %rsi     # 0x6cbf2
callq 0x9560
addq $0x20, %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xe974
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movq %r15, %rdi
callq 0x96c0
movl %ebx, %r12d
movq -0x30(%rbp), %r13
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %ebx
cmpq %r12, %rcx
ja 0x4e1a0
movq -0x38(%rbp), %rdi
callq 0x9630
movq 0x357d6(%rip), %rax     # 0x83fb0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x230(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x238(%rbp,%rcx)
callq 0x9400
leaq -0x140(%rbp), %rdi
callq 0x91c0
leaq 0x58(%r13), %rdi
callq 0x4edd4
leaq 0x30(%r13), %rdi
callq 0x4edd4
movq 0x18(%r13), %rdi
testq %rdi, %rdi
je 0x4e830
movq 0x28(%r13), %rsi
subq %rdi, %rsi
callq 0x94e0
movq %r13, %rdi
callq 0x27a9a
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4e850
jmp 0x4e850
jmp 0x4e850
movq %rax, %rdi
callq 0x12c1b