#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double pow(double, int);
float iir5_gain(float fq) {
  double f, dt1;
  f = fq;
  dt1 = (double)0.147800765172 * pow(f, -3);
  dt1 += (double)0.03169658430080 * pow(f, -4);
  dt1 += (double)0.0032849456565132 * pow(f, -5);
  dt1 += (double)-0.1237864623 * pow(f, -2);
  return (float)dt1;
}


x86 assembly (clang, -O0):
<iir5_gain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0xfffffffd,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xed3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0xfffffffc,%edi
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xea6(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0xfffffffb,%edi
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe75(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0xfffffffe,%edi
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe44(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iir5_gain>:
sub    $0x18,%rsp
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0xfffffffd,%edi
call   1030 <pow@plt>
mulsd  0xed0(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0xfffffffc,%edi
call   1030 <pow@plt>
mulsd  0xeba(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0xfffffffb,%edi
call   1030 <pow@plt>
mulsd  0xe9e(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0xfffffffe,%edi
call   1030 <pow@plt>
mulsd  0xe82(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @iir5_gain(float %0) {
%2 = alloca float
%3 = alloca double
%4 = alloca double
store float %0, float* %2
%5 = load float, float* %2
%6 = fpext float %5 to double
store double %6, double* %3
%7 = load double, double* %3
%8 = call double @pow(double %7, i32 -3)
%9 = fmul double 0x3FC2EB22AE5E66EB, %8
store double %9, double* %4
%10 = load double, double* %3
%11 = call double @pow(double %10, i32 -4)
%12 = load double, double* %4
%13 = call double @llvm.fmuladd.f64(double 0x3FA03A88E1EF060D, double %11, double %12)
store double %13, double* %4
%14 = load double, double* %3
%15 = call double @pow(double %14, i32 -5)
%16 = load double, double* %4
%17 = call double @llvm.fmuladd.f64(double 0x3F6AE907C53E5A5B, double %15, double %16)
store double %17, double* %4
%18 = load double, double* %3
%19 = call double @pow(double %18, i32 -2)
%20 = load double, double* %4
%21 = call double @llvm.fmuladd.f64(double 0xBFBFB07837441AFF, double %19, double %20)
store double %21, double* %4
%22 = load double, double* %4
%23 = fptrunc double %22 to float
ret float %23
}

LLVM IR (-O2):
define float @iir5_gain(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @pow(double %2, i32 -3)
%4 = fmul double %3, 0x3FC2EB22AE5E66EB
%5 = tail call double @pow(double %2, i32 -4)
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FA03A88E1EF060D, double %4)
%7 = tail call double @pow(double %2, i32 -5)
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0x3F6AE907C53E5A5B, double %6)
%9 = tail call double @pow(double %2, i32 -2)
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0xBFBFB07837441AFF, double %8)
%11 = fptrunc double %10 to float
ret float %11
}