// File: /workspace/github_c_makefile_star2_O0/mvermeulen[P]wspy/topdown.c
// Function: print_float
void print_float(struct counter_group *cgroup,enum output_format oformat){
  struct counter_info *cinfo;
  unsigned long instructions = 0;
  unsigned long float_512 = 0;
  unsigned long float_256 = 0;
  unsigned long float_128 = 0;
  unsigned long float_mmx = 0;
  unsigned long float_scalar = 0;
  unsigned long float_all = 0;

  if (oformat == PRINT_CSV_HEADER){
    fprintf(outfile,"float,");
    return;
  }  

  switch(cpu_info->vendor){
  case VENDOR_INTEL:
    break;
  case VENDOR_AMD:
    if (cinfo = find_ci_label(cgroup,"instructions"))
      instructions = cinfo->value;
    if (cinfo = find_ci_label(cgroup,"fp_ret_fops_AVX512"))
      float_512 = cinfo->value;
    if (cinfo = find_ci_label(cgroup,"fp_ret_fops_AVX256"))
      float_256 = cinfo->value;
    if (cinfo = find_ci_label(cgroup,"fp_ret_fops_AVX128"))
      float_128 = cinfo->value;
    if (cinfo = find_ci_label(cgroup,"fp_ret_fops_MMX"))
      float_mmx = cinfo->value;
    if (cinfo = find_ci_label(cgroup,"fp_ret_fops_scalar"))
      float_scalar = cinfo->value;

    float_all = float_512 + float_256 + float_128 + float_mmx + float_scalar;

    if (csvflag){
      fprintf(outfile,"%4.2f%%,",(double) float_all / instructions * 100.0);
    } else {
      fprintf(outfile,"instructions         %-14lu # %4.3f float per 1000 inst\n",
	      instructions,(double) float_all / instructions*1000.0);
      fprintf(outfile,"float 512            %-14lu # %4.3f AVX-512 per 1000 inst\n",
	      float_512,(double) float_512 / instructions*1000.0);      
      fprintf(outfile,"float 256            %-14lu # %4.3f AVX-256 per 1000 inst\n",
	      float_256,(double) float_256 / instructions*1000.0);      
      fprintf(outfile,"float 128            %-14lu # %4.3f AVX-128 per 1000 inst\n",
	      float_128,(double) float_128 / instructions*1000.0);
      fprintf(outfile,"float MMX            %-14lu # %4.3f MMX per 1000 inst\n",
	      float_mmx,(double) float_mmx / instructions*1000.0);      
      fprintf(outfile,"float scalar         %-14lu # %4.3f scalar per 1000 inst\n",
	      float_scalar,(double) float_scalar / instructions*1000.0);      
    }
    break;    
  default:
    return;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
cmpl $0x2, -0xc(%rbp)
jne 0xa95d
leaq 0x87c1(%rip), %rax      # 0x13108
movq (%rax), %rdi
leaq 0x4f5b(%rip), %rsi      # 0xf8ac
movb $0x0, %al
callq 0x31d0
jmp 0xad78
leaq 0x980c(%rip), %rax      # 0x14170
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
subl $0x1, %eax
je 0xa986
jmp 0xa973
movl -0x54(%rbp), %eax
subl $0x2, %eax
jne 0xad76
jmp 0xa981
jmp 0xad78
movq -0x8(%rbp), %rdi
leaq 0x3633(%rip), %rsi      # 0xdfc4
callq 0x6930
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xa9ac
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x38ab(%rip), %rsi      # 0xe262
callq 0x6930
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xa9d2
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x38ad(%rip), %rsi      # 0xe28a
callq 0x6930
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xa9f8
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x38af(%rip), %rsi      # 0xe2b2
callq 0x6930
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xaa1e
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x38b0(%rip), %rsi      # 0xe2d9
callq 0x6930
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xaa44
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x38ae(%rip), %rsi      # 0xe2fd
callq 0x6930
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0xaa6a
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x865f(%rip), %rax      # 0x130e8
cmpl $0x0, (%rax)
je 0xaafa
leaq 0x8673(%rip), %rax      # 0x13108
movq (%rax), %rdi
movq -0x50(%rbp), %xmm0
movaps 0x2e8c(%rip), %xmm3     # 0xd930
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x2e90(%rip), %xmm2     # 0xd940
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x20(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x2dcd(%rip), %xmm1     # 0xd8b0
mulsd %xmm1, %xmm0
leaq 0x49dc(%rip), %rsi      # 0xf4ca
movb $0x1, %al
callq 0x31d0
jmp 0xad74
leaq 0x8607(%rip), %rax      # 0x13108
movq %rax, -0x60(%rbp)
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movq -0x50(%rbp), %xmm0
movaps 0x2e18(%rip), %xmm3     # 0xd930
movaps %xmm3, -0x80(%rbp)
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x2e18(%rip), %xmm2     # 0xd940
movaps %xmm2, -0x70(%rbp)
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq %rdx, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x2db1(%rip), %xmm1     # 0xd910
movsd %xmm1, -0x90(%rbp)
mulsd %xmm1, %xmm0
leaq 0x4d41(%rip), %rsi      # 0xf8b3
movb $0x1, %al
movb %al, -0x81(%rbp)
callq 0x31d0
movsd -0x90(%rbp), %xmm1
movq -0x60(%rbp), %rcx
movaps -0x80(%rbp), %xmm4
movaps -0x70(%rbp), %xmm3
movb -0x81(%rbp), %al
movq (%rcx), %rdi
movq -0x28(%rbp), %rdx
movq %rdx, %xmm0
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
subpd %xmm3, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
movq -0x20(%rbp), %xmm2
punpckldq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
leaq 0x4d0d(%rip), %rsi      # 0xf8ec
callq 0x31d0
movsd -0x90(%rbp), %xmm1
movq -0x60(%rbp), %rcx
movaps -0x80(%rbp), %xmm4
movaps -0x70(%rbp), %xmm3
movb -0x81(%rbp), %al
movq (%rcx), %rdi
movq -0x30(%rbp), %rdx
movq %rdx, %xmm0
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
subpd %xmm3, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
movq -0x20(%rbp), %xmm2
punpckldq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
leaq 0x4ce3(%rip), %rsi      # 0xf927
callq 0x31d0
movsd -0x90(%rbp), %xmm1
movq -0x60(%rbp), %rcx
movaps -0x80(%rbp), %xmm4
movaps -0x70(%rbp), %xmm3
movb -0x81(%rbp), %al
movq (%rcx), %rdi
movq -0x38(%rbp), %rdx
movq %rdx, %xmm0
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
subpd %xmm3, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
movq -0x20(%rbp), %xmm2
punpckldq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
leaq 0x4cb9(%rip), %rsi      # 0xf962
callq 0x31d0
movsd -0x90(%rbp), %xmm1
movq -0x60(%rbp), %rcx
movaps -0x80(%rbp), %xmm4
movaps -0x70(%rbp), %xmm3
movb -0x81(%rbp), %al
movq (%rcx), %rdi
movq -0x40(%rbp), %rdx
movq %rdx, %xmm0
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
subpd %xmm3, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
movq -0x20(%rbp), %xmm2
punpckldq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
leaq 0x4c8f(%rip), %rsi      # 0xf99d
callq 0x31d0
movaps -0x80(%rbp), %xmm3
movaps -0x70(%rbp), %xmm2
movq -0x60(%rbp), %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rdx
movq %rdx, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq -0x20(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x2bae(%rip), %xmm1     # 0xd910
mulsd %xmm1, %xmm0
leaq 0x4c67(%rip), %rsi      # 0xf9d4
movb $0x1, %al
callq 0x31d0
jmp 0xad78
jmp 0xad78
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)