void FilterTrace(nsamp, srate, which_fil, data, fl, fh) int nsamp;
float srate;
int which_fil;
float *data, fl, fh;
{
  int npts, ind, n2, i;
  float dt, low_f, hi_f;
  float *cw, *c1;
  npts = nsamp;
  ind = which_fil + 10;
  low_f = fl;
  hi_f = fh;
  n2 = ipow_(&npts);
  dt = (float)1 / srate;
  cw = (float *)malloc(sizeof(double) * n2);
  c1 = (float *)malloc(sizeof(float) * n2);
  for (i = 0; i < nsamp; i++) {
    c1[i] = data[i];
  }
  coinst_(&npts, &dt, &ind, c1, cw, &low_f, &hi_f);
  for (i = 0; i < nsamp; i++) {
    data[i] = c1[i];
  }
  free(c1);
  free(cw);
  return;
}


x86 assembly (clang, -O0):
<FilterTrace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm2,-0x58(%rbp)
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
cvtsd2ss %xmm2,%xmm2
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
mov    %edi,-0x4(%rbp)
movss  %xmm2,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm1,-0x1c(%rbp)
movss  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x28(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x3c(%rbp)
lea    -0x24(%rbp),%rdi
mov    $0x0,%al
call   1040 <ipow_@plt>
mov    %eax,-0x2c(%rbp)
movss  0xe4d(%rip),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movslq -0x2c(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x2c(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    121a <FilterTrace+0xda>
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e6 <FilterTrace+0xa6>
mov    -0x50(%rbp),%rcx
mov    -0x48(%rbp),%r8
lea    -0x24(%rbp),%rdi
lea    -0x34(%rbp),%rsi
lea    -0x28(%rbp),%rdx
lea    -0x38(%rbp),%r9
lea    -0x3c(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1060 <coinst_@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    127c <FilterTrace+0x13c>
mov    -0x50(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x30(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1248 <FilterTrace+0x108>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FilterTrace>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x24(%rsp)
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
mov    %rdx,%r14
mov    %edi,%ebp
xorps  %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm1
mov    %edi,0x10(%rsp)
add    $0xa,%esi
mov    %esi,0x20(%rsp)
movss  %xmm0,0x18(%rsp)
movss  %xmm1,0x14(%rsp)
lea    0x10(%rsp),%rdi
xor    %eax,%eax
call   1040 <ipow_@plt>
movss  0xe5e(%rip),%xmm0
divss  0x24(%rsp),%xmm0
movss  %xmm0,0x1c(%rsp)
movslq %eax,%rbx
lea    0x0(,%rbx,8),%rdi
call   1060 <malloc@plt>
mov    %rax,%r15
shl    $0x2,%rbx
mov    %rbx,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    1222 <FilterTrace+0xd2>
mov    %ebp,%ebp
shl    $0x2,%rbp
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rbp,%rdx
call   1050 <memcpy@plt>
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%rdi
lea    0x1c(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%r9
mov    %rbx,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1070 <coinst_@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1050 <memcpy@plt>
jmp    124c <FilterTrace+0xfc>
lea    0x14(%rsp),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%rdi
lea    0x1c(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x18(%rsp),%r9
mov    %rbx,%rcx
mov    %r15,%r8
xor    %eax,%eax
call   1070 <coinst_@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @FilterTrace(i32 %0, double %1, i32 %2, float* %3, double %4, double %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca i32
%10 = alloca float*
%11 = alloca float
%12 = alloca float
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float*
%21 = alloca float*
%22 = fptrunc double %1 to float
%23 = fptrunc double %4 to float
%24 = fptrunc double %5 to float
store i32 %0, i32* %7
store float %22, float* %8
store i32 %2, i32* %9
store float* %3, float** %10
store float %23, float* %11
store float %24, float* %12
%25 = load i32, i32* %7
store i32 %25, i32* %13
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 10
store i32 %27, i32* %14
%28 = load float, float* %11
store float %28, float* %18
%29 = load float, float* %12
store float %29, float* %19
%30 = call i32 (i32*, ...) bitcast (i32 (...)* @ipow_ to i32 (i32*, ...)*)(i32* %13)
store i32 %30, i32* %15
%31 = load float, float* %8
%32 = fdiv float 1.000000e+00, %31
store float %32, float* %17
%33 = load i32, i32* %15
%34 = sext i32 %33 to i64
%35 = mul i64 8, %34
%36 = call i8* @malloc(i64 %35)
%37 = bitcast i8* %36 to float*
store float* %37, float** %20
%38 = load i32, i32* %15
%39 = sext i32 %38 to i64
%40 = mul i64 4, %39
%41 = call i8* @malloc(i64 %40)
%42 = bitcast i8* %41 to float*
store float* %42, float** %21
store i32 0, i32* %16
br label %43
43: ; preds = %57, %6
%44 = load i32, i32* %16
%45 = load i32, i32* %7
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %60
47: ; preds = %43
%48 = load float*, float** %10
%49 = load i32, i32* %16
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds float, float* %48, i64 %50
%52 = load float, float* %51
%53 = load float*, float** %21
%54 = load i32, i32* %16
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds float, float* %53, i64 %55
store float %52, float* %56
br label %57
57: ; preds = %47
%58 = load i32, i32* %16
%59 = add nsw i32 %58, 1
store i32 %59, i32* %16
br label %43
60: ; preds = %43
%61 = load float*, float** %21
%62 = load float*, float** %20
%63 = call i32 (i32*, float*, i32*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @coinst_ to i32 (i32*, float*, i32*, float*, float*, float*, float*, ...)*)(i32* %13, float* %17, i32* %14, float* %61, float* %62, float* %18, float* %19)
store i32 0, i32* %16
br label %64
64: ; preds = %78, %60
%65 = load i32, i32* %16
%66 = load i32, i32* %7
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %81
68: ; preds = %64
%69 = load float*, float** %21
%70 = load i32, i32* %16
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds float, float* %69, i64 %71
%73 = load float, float* %72
%74 = load float*, float** %10
%75 = load i32, i32* %16
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds float, float* %74, i64 %76
store float %73, float* %77
br label %78
78: ; preds = %68
%79 = load i32, i32* %16
%80 = add nsw i32 %79, 1
store i32 %80, i32* %16
br label %64
81: ; preds = %64
%82 = load float*, float** %21
%83 = bitcast float* %82 to i8*
%84 = load float*, float** %20
%85 = bitcast float* %84 to i8*
ret void
}

LLVM IR (-O2):
define void @FilterTrace(i32 %0, double %1, i32 %2, float* nocapture %3, double %4, double %5) {
%7 = bitcast float* %3 to i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = fptrunc double %1 to float
%14 = fptrunc double %4 to float
%15 = fptrunc double %5 to float
%16 = bitcast i32* %8 to i8*
%17 = bitcast i32* %9 to i8*
%18 = bitcast float* %10 to i8*
%19 = bitcast float* %11 to i8*
%20 = bitcast float* %12 to i8*
store i32 %0, i32* %8
%21 = add nsw i32 %2, 10
store i32 %21, i32* %9
store float %14, float* %11
store float %15, float* %12
%22 = call i32 (i32*, ...) bitcast (i32 (...)* @ipow_ to i32 (i32*, ...)*)(i32* %8)
%23 = fdiv float 1.000000e+00, %13
store float %23, float* %10
%24 = sext i32 %22 to i64
%25 = shl nsw i64 %24, 3
%26 = call i8* @malloc(i64 %25)
%27 = bitcast i8* %26 to float*
%28 = shl nsw i64 %24, 2
%29 = call i8* @malloc(i64 %28)
%30 = bitcast i8* %29 to float*
%31 = icmp sgt i32 %0, 0
br i1 %31, label %34, label %32
32: ; preds = %6
%33 = call i32 (i32*, float*, i32*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @coinst_ to i32 (i32*, float*, i32*, float*, float*, float*, float*, ...)*)(i32* %8, float* %10, i32* %9, float* %30, float* %27, float* %11, float* %12)
br label %40
34: ; preds = %6
%35 = zext i32 %0 to i64
%36 = shl nuw nsw i64 %35, 2
%37 = call i32 (i32*, float*, i32*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @coinst_ to i32 (i32*, float*, i32*, float*, float*, float*, float*, ...)*)(i32* %8, float* %10, i32* %9, float* %30, float* %27, float* %11, float* %12)
%38 = zext i32 %0 to i64
%39 = shl nuw nsw i64 %38, 2
br label %40
40: ; preds = %32, %34
ret void
}