// File: /workspace/github_cpp_makefile_star2_O1/giovannarosone[P]BCR_LCP_GSA/Timer.cpp
// Function: Timer::print(std::ostream&)
std::ostream& Timer::print(std::ostream& os)
{
    if (gettimeofday(&thisTime_, NULL) != 0)
        exit(-1);
    if (getrusage(RUSAGE_SELF, &thisUsage_) != 0)
        exit(-1);

    static double elapsedActual, elapsedUser, elapsedSystem;

    elapsedUser = thisUsage_.ru_utime.tv_sec - lastUsage_.ru_utime.tv_sec
            + (thisUsage_.ru_utime.tv_usec
                    - (double) lastUsage_.ru_utime.tv_usec) / 1000000;

    elapsedSystem = thisUsage_.ru_stime.tv_sec - lastUsage_.ru_stime.tv_sec
            + (thisUsage_.ru_stime.tv_usec
                    - (double) lastUsage_.ru_stime.tv_usec) / 1000000;

    elapsedActual = thisTime_.tv_sec - lastTime_.tv_sec + (thisTime_.tv_usec
            - (double) lastTime_.tv_usec) / 1000000;

    os << "User: " << elapsedUser << "s System: " << elapsedSystem
            << "s Actual: " << elapsedActual << "s Efficiency: "
            << ((elapsedActual == 0) ? 0 : ((elapsedUser + elapsedSystem)
                    * 100.0 / elapsedActual)) << '\045'; // only way to print % liked by both Intel and gcc!
    lastTime_ = thisTime_;
    lastUsage_ = thisUsage_;
    return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x120(%rdi), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x33e0
testl %eax, %eax
jne 0xb07b
xorl %edi, %edi
movq %r14, %rsi
callq 0x3180
testl %eax, %eax
jne 0xb07b
movq (%r14), %rax
leaq 0x90(%r14), %r12
subq 0x90(%r14), %rax
cvtsi2sd %rax, %xmm0
cvtsi2sdq 0x8(%r14), %xmm1
cvtsi2sdq 0x98(%r14), %xmm2
subsd %xmm2, %xmm1
movsd 0x2727(%rip), %xmm2     # 0xd610
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x6437(%rip)     # 0x11330
movq 0x10(%r14), %rax
subq 0xa0(%r14), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdq 0x18(%r14), %xmm1
cvtsi2sdq 0xa8(%r14), %xmm3
subsd %xmm3, %xmm1
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x6406(%rip)     # 0x11338
movq 0x120(%r14), %rax
leaq 0x130(%r14), %rbp
subq 0x130(%r14), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdq 0x128(%r14), %xmm1
xorps %xmm3, %xmm3
cvtsi2sdq 0x138(%r14), %xmm3
subsd %xmm3, %xmm1
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x63ad(%rip)     # 0x11328
leaq 0x269e(%rip), %rsi      # 0xd620
movl $0x6, %edx
movq %rbx, %rdi
callq 0x32d0
movsd 0x6399(%rip), %xmm0     # 0x11330
movq %rbx, %rdi
callq 0x33d0
movq %rax, %r13
leaq 0x267e(%rip), %rsi      # 0xd627
movl $0xa, %edx
movq %rax, %rdi
callq 0x32d0
movsd 0x637a(%rip), %xmm0     # 0x11338
movq %r13, %rdi
callq 0x33d0
movq %rax, %r13
leaq 0x2662(%rip), %rsi      # 0xd632
movl $0xa, %edx
movq %rax, %rdi
callq 0x32d0
movsd 0x6343(%rip), %xmm0     # 0x11328
movq %r13, %rdi
callq 0x33d0
movq %rax, %r13
leaq 0x2646(%rip), %rsi      # 0xd63d
movl $0xe, %edx
movq %rax, %rdi
callq 0x32d0
movsd 0x631c(%rip), %xmm1     # 0x11328
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0xb018
jnp 0xb034
movsd 0x6310(%rip), %xmm0     # 0x11330
addsd 0x6310(%rip), %xmm0     # 0x11338
mulsd 0x25e8(%rip), %xmm0     # 0xd618
divsd %xmm1, %xmm0
movq %r13, %rdi
callq 0x33d0
leaq 0x7(%rsp), %rsi
movb $0x25, (%rsi)
movl $0x1, %edx
movq %rax, %rdi
callq 0x32d0
movups (%r15), %xmm0
movups %xmm0, (%rbp)
movl $0x90, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3230
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3300