// File: /workspace/github_c_makefile_star2_O0/mvermeulen[P]wspy/topdown.c
// Function: print_usage
void print_usage(struct rusage *rusage,enum output_format oformat){
  double elapsed;
  
  elapsed = finish_time.tv_sec + finish_time.tv_nsec / 1000000000.0 -
    start_time.tv_sec - start_time.tv_nsec / 1000000000.0;
  switch(oformat){
  case PRINT_CSV_HEADER:
    fprintf(outfile,"elapsed,utime,stime,");
    break;
  case PRINT_CSV:
    fprintf(outfile,"%4.3f,",elapsed);
    fprintf(outfile,"%4.3f,",(double) rusage->ru_utime.tv_sec + rusage->ru_utime.tv_usec / 1000000.0);
    fprintf(outfile,"%4.3f,",(double) rusage->ru_stime.tv_sec + rusage->ru_stime.tv_usec / 1000000.0);    
    break;
  case PRINT_NORMAL:
    fprintf(outfile,"elapsed              %4.3f\n",elapsed);
    fprintf(outfile,"on_cpu               %4.3f          # %4.2f / %d cores\n",
	    (rusage->ru_utime.tv_sec+rusage->ru_utime.tv_usec/1000000.0+
	     rusage->ru_stime.tv_sec+rusage->ru_stime.tv_usec/1000000.0)/
	    elapsed / num_procs,
	    (rusage->ru_utime.tv_sec+rusage->ru_utime.tv_usec/1000000.0+
	     rusage->ru_stime.tv_sec+rusage->ru_stime.tv_usec/1000000.0)/
	    elapsed,
	    cpu_info->num_cores_available
	    );
    fprintf(outfile,"utime                %4.3f\n",
	    (double) rusage->ru_utime.tv_sec +
	    rusage->ru_utime.tv_usec / 1000000.0);
    fprintf(outfile,"stime                %4.3f\n",
	    (double) rusage->ru_stime.tv_sec +
	    rusage->ru_stime.tv_usec / 1000000.0);
    fprintf(outfile,"nvcsw                %-15lu# %4.2f%%\n",
	    rusage->ru_nvcsw,(double) rusage->ru_nvcsw / (rusage->ru_nvcsw + rusage->ru_nivcsw) * 100.0);
    fprintf(outfile,"nivcsw               %-15lu# %4.2f%%\n",
	    rusage->ru_nivcsw,(double) rusage->ru_nivcsw / (rusage->ru_nvcsw + rusage->ru_nivcsw) * 100.0);
    fprintf(outfile,"inblock              %-15lu# %4.2f/sec\n",
	    rusage->ru_inblock,rusage->ru_inblock/elapsed);
    fprintf(outfile,"onblock              %-15lu# %4.2f/sec\n",
	    rusage->ru_oublock,rusage->ru_oublock/elapsed);
    break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cvtsi2sdq 0xdbc8(%rip), %xmm0 # 0x14150
cvtsi2sdq 0xdbc7(%rip), %xmm1 # 0x14158
movsd 0x6c3f(%rip), %xmm2     # 0xd1d8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtsi2sdq 0xdbb6(%rip), %xmm1 # 0x14160
subsd %xmm1, %xmm0
cvtsi2sdq 0xdbb1(%rip), %xmm1 # 0x14168
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x66a2
jmp 0x65d4
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x6609
jmp 0x65de
movl -0x1c(%rbp), %eax
subl $0x2, %eax
jne 0x691e
jmp 0x65ec
leaq 0xcb15(%rip), %rax      # 0x13108
movq (%rax), %rdi
leaq 0x866c(%rip), %rsi      # 0xec69
movb $0x0, %al
callq 0x31d0
jmp 0x691e
leaq 0xcaf8(%rip), %rax      # 0x13108
movq (%rax), %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x865f(%rip), %rsi      # 0xec7e
movb $0x1, %al
callq 0x31d0
leaq 0xcadb(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
cvtsi2sdq (%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq 0x8(%rax), %xmm1
movsd 0x726d(%rip), %xmm2     # 0xd8b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
leaq 0x8624(%rip), %rsi      # 0xec7e
movb $0x1, %al
callq 0x31d0
leaq 0xcaa0(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
cvtsi2sdq 0x10(%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq 0x18(%rax), %xmm1
movsd 0x7231(%rip), %xmm2     # 0xd8b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
leaq 0x85e8(%rip), %rsi      # 0xec7e
movb $0x1, %al
callq 0x31d0
jmp 0x691e
leaq 0xca5f(%rip), %rax      # 0x13108
movq (%rax), %rdi
movsd -0x18(%rbp), %xmm0
leaq 0x85cd(%rip), %rsi      # 0xec85
movb $0x1, %al
callq 0x31d0
leaq 0xca42(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
cvtsi2sdq (%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq 0x8(%rax), %xmm1
movsd 0x71d4(%rip), %xmm2     # 0xd8b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq 0x10(%rax), %xmm1
addsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq 0x18(%rax), %xmm1
movsd 0x71ac(%rip), %xmm2     # 0xd8b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
divsd -0x18(%rbp), %xmm0
leaq 0xc9fc(%rip), %rax      # 0x1311c
cvtsi2sdl (%rax), %xmm1
divsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq (%rax), %xmm1
movq -0x8(%rbp), %rax
cvtsi2sdq 0x8(%rax), %xmm2
movsd 0x7175(%rip), %xmm3     # 0xd8b8
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
movq -0x8(%rbp), %rax
cvtsi2sdq 0x10(%rax), %xmm2
addsd %xmm2, %xmm1
movq -0x8(%rbp), %rax
cvtsi2sdq 0x18(%rax), %xmm2
movsd 0x714d(%rip), %xmm3     # 0xd8b8
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
divsd -0x18(%rbp), %xmm1
leaq 0xd9f1(%rip), %rax      # 0x14170
movq (%rax), %rax
movl 0x10(%rax), %edx
leaq 0x8515(%rip), %rsi      # 0xeca1
movb $0x2, %al
callq 0x31d0
leaq 0xc96e(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
cvtsi2sdq (%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq 0x8(%rax), %xmm1
movsd 0x7100(%rip), %xmm2     # 0xd8b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
leaq 0x8512(%rip), %rsi      # 0xecd9
movb $0x1, %al
callq 0x31d0
leaq 0xc933(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
cvtsi2sdq 0x10(%rax), %xmm0
movq -0x8(%rbp), %rax
cvtsi2sdq 0x18(%rax), %xmm1
movsd 0x70c4(%rip), %xmm2     # 0xd8b8
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
leaq 0x84f2(%rip), %rsi      # 0xecf5
movb $0x1, %al
callq 0x31d0
leaq 0xc8f7(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdx
movq -0x8(%rbp), %rax
cvtsi2sdq 0x80(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x88(%rcx), %rax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd 0x705d(%rip), %xmm1     # 0xd8b0
mulsd %xmm1, %xmm0
leaq 0x84b3(%rip), %rsi      # 0xed11
movb $0x1, %al
callq 0x31d0
leaq 0xc89c(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdx
movq -0x8(%rbp), %rax
cvtsi2sdq 0x88(%rax), %xmm0
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x8(%rbp), %rcx
addq 0x88(%rcx), %rax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movsd 0x7002(%rip), %xmm1     # 0xd8b0
mulsd %xmm1, %xmm0
leaq 0x847e(%rip), %rsi      # 0xed37
movb $0x1, %al
callq 0x31d0
leaq 0xc841(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rdx
movq -0x8(%rbp), %rax
cvtsi2sdq 0x58(%rax), %xmm0
divsd -0x18(%rbp), %xmm0
leaq 0x8475(%rip), %rsi      # 0xed5d
movb $0x1, %al
callq 0x31d0
leaq 0xc812(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rdx
movq -0x8(%rbp), %rax
cvtsi2sdq 0x60(%rax), %xmm0
divsd -0x18(%rbp), %xmm0
leaq 0x846e(%rip), %rsi      # 0xed85
movb $0x1, %al
callq 0x31d0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)