// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x120(%rdi), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x33e0
testl %eax, %eax
jne 0x9e41
xorl %edi, %edi
movq %r14, %rsi
callq 0x3170
testl %eax, %eax
jne 0x9e41
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 0x18ff(%rip), %xmm2     # 0xb5e8
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x661f(%rip)     # 0x10318
movq 0x10(%r14), %rax
subq 0xa0(%r14), %rax
cvtsi2sd %rax, %xmm0
cvtsi2sdq 0x18(%r14), %xmm1
cvtsi2sdq 0xa8(%r14), %xmm3
subsd %xmm3, %xmm1
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x65f4(%rip)     # 0x10320
movq 0x120(%r14), %rax
leaq 0x130(%r14), %r13
subq 0x130(%r14), %rax
cvtsi2sd %rax, %xmm0
cvtsi2sdq 0x128(%r14), %xmm1
cvtsi2sdq 0x138(%r14), %xmm3
subsd %xmm3, %xmm1
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x65a4(%rip)     # 0x10310
leaq 0x1885(%rip), %rsi      # 0xb5f8
movq %rbx, %rdi
callq 0x3270
movsd 0x6595(%rip), %xmm0     # 0x10318
movq %rax, %rdi
callq 0x33d0
leaq 0x186d(%rip), %rsi      # 0xb5ff
movq %rax, %rdi
callq 0x3270
movsd 0x657e(%rip), %xmm0     # 0x10320
movq %rax, %rdi
callq 0x33d0
leaq 0x1859(%rip), %rsi      # 0xb60a
movq %rax, %rdi
callq 0x3270
movsd 0x654f(%rip), %xmm0     # 0x10310
movq %rax, %rdi
callq 0x33d0
leaq 0x1845(%rip), %rsi      # 0xb615
movq %rax, %rdi
callq 0x3270
movsd 0x6530(%rip), %xmm1     # 0x10310
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x9dec
jnp 0x9e08
movsd 0x6524(%rip), %xmm0     # 0x10318
addsd 0x6524(%rip), %xmm0     # 0x10320
mulsd 0x17ec(%rip), %xmm0     # 0xb5f0
divsd %xmm1, %xmm0
movq %rax, %rdi
callq 0x33d0
pushq $0x25
popq %rsi
movq %rax, %rdi
callq 0x32b0
movups (%r15), %xmm0
movups %xmm0, (%r13)
movl $0x90, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3210
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $-0x1
popq %rdi
callq 0x32e0