// File: /workspace/github_cpp_makefile_star2_O1/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 0x4fe75
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 0x4fe75
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 0x4fe36
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 0x1f38c(%rip), %rsi     # 0x6ebb8
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 0x4f90f
movl $0x13, %edx
movq 0x37788(%rip), %rdi     # 0x86ff0
leaq 0x1f361(%rip), %rsi     # 0x6ebd0
callq 0x9560
movl $0x1, %edx
movq 0x37770(%rip), %rdi     # 0x86ff0
leaq 0x1f93b(%rip), %rsi     # 0x6f1c2
callq 0x9560
movq 0x3775d(%rip), %rdi     # 0x86ff0
movl $0x41, %esi
callq 0x9880
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1dbd0(%rip), %rsi     # 0x6d47f
callq 0x9560
movl $0x11, %edx
movq %r12, %rdi
leaq 0x1f321(%rip), %rsi     # 0x6ebe4
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 0x4fe15
movq -0x30(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx,%r14), %r14
testq %r14, %r14
je 0x4f937
movq %r14, %rdi
callq 0x9200
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x9560
jmp 0x4f94c
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 0x1f20c(%rip), %rsi     # 0x6ebf6
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 0x1f1e7(%rip), %rsi     # 0x6ec10
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 0x1f1a2(%rip), %rsi     # 0x6ec16
callq 0x9560
movsd 0x38(%r12), %xmm0
divsd 0x1cd50(%rip), %xmm0    # 0x6c7d8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1d47c(%rip), %rsi     # 0x6cf1e
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 0x1f13f(%rip), %rsi     # 0x6ec1c
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x48(%r12), %xmm0
divsd 0x1cce4(%rip), %xmm0    # 0x6c7d8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1f114(%rip), %rsi     # 0x6ec22
callq 0x9560
leaq 0x40(%r12), %rsi
movq %r14, %rdi
callq 0xea74
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 0x1f0cf(%rip), %rsi     # 0x6ec28
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x58(%r12), %xmm0
divsd 0x1cc68(%rip), %xmm0    # 0x6c7d8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1f098(%rip), %rsi     # 0x6ec22
callq 0x9560
addq $0x50, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xea74
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 0x1effa(%rip), %rsi     # 0x6ec2e
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 0x1ef9d(%rip), %rsi     # 0x6ec10
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 0x1ef59(%rip), %rsi     # 0x6ec16
callq 0x9560
movsd 0x8(%r13), %xmm0
divsd 0x1cb08(%rip), %xmm0    # 0x6c7d8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x3, %edx
movq %rax, %rdi
leaq 0x1d234(%rip), %rsi     # 0x6cf1e
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 0x1eef7(%rip), %rsi     # 0x6ec1c
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x18(%r13), %xmm0
divsd 0x1ca9d(%rip), %xmm0    # 0x6c7d8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1eecd(%rip), %rsi     # 0x6ec22
callq 0x9560
leaq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0xea74
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 0x1ee89(%rip), %rsi     # 0x6ec28
callq 0x9560
xorps %xmm0, %xmm0
cvtsi2sdq 0x28(%r13), %xmm0
divsd 0x1ca23(%rip), %xmm0    # 0x6c7d8
movq %r15, %rdi
callq 0x97d0
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x1ee53(%rip), %rsi     # 0x6ec22
callq 0x9560
addq $0x20, %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xea74
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 0x4f80c
movq -0x38(%rbp), %rdi
callq 0x9630
movq 0x3716a(%rip), %rax     # 0x86fb0
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 0x50438
leaq 0x30(%r13), %rdi
callq 0x50438
movq 0x18(%r13), %rdi
testq %rdi, %rdi
je 0x4fe9c
movq 0x28(%r13), %rsi
subq %rdi, %rsi
callq 0x94e0
movq %r13, %rdi
callq 0x282d4
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4febc
jmp 0x4febc
jmp 0x4febc
movq %rax, %rdi
callq 0x12d4d