double low_cut_iir(int c, int i, double NewSample) {
  double ACoef[2 + 1] = {0.96839970114733542000, -1.93679940229467080000,
                         0.96839970114733542000};
  double BCoef[2 + 1] = {1.00000000000000000000, -1.93522955471202770000,
                         0.93726236021916731000};
  static double y[2][2][2 + 1];
  static double x[2][2][2 + 1];
  int n;
  for (n = 2; n > 0; n--) {
    x[c][i][n] = x[c][i][n - 1];
    y[c][i][n] = y[c][i][n - 1];
  }
  x[c][i][0] = NewSample;
  y[c][i][0] = ACoef[0] * x[c][i][0];
  for (n = 1; n <= 2; n++)
    y[c][i][0] += ACoef[n] * x[c][i][n] - BCoef[n] * y[c][i][n];
  return y[c][i][0];
}


x86 assembly (clang, -O0):
<low_cut_iir>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    0xeea(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xee4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xee9(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xee6(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xee3(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x2,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jle    1212 <low_cut_iir+0x112>
movslq -0x4(%rbp),%rcx
lea    0x2f23(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x4(%rbp),%rcx
lea    0x2ef8(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x4(%rbp),%rcx
lea    0x2e72(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x4(%rbp),%rcx
lea    0x2e47(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x54(%rbp)
jmp    1158 <low_cut_iir+0x58>
movsd  -0x10(%rbp),%xmm0
movslq -0x4(%rbp),%rcx
lea    0x2e6e(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
movslq -0x4(%rbp),%rcx
lea    0x2e48(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm0
movslq -0x4(%rbp),%rcx
lea    0x2dc7(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x54(%rbp)
cmpl   $0x2,-0x54(%rbp)
jg     1342 <low_cut_iir+0x242>
movslq -0x54(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
movslq -0x4(%rbp),%rcx
lea    0x2deb(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movslq -0x54(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm1
movslq -0x4(%rbp),%rcx
lea    0x2d5b(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x54(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movslq -0x4(%rbp),%rcx
lea    0x2d16(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1286 <low_cut_iir+0x186>
movslq -0x4(%rbp),%rcx
lea    0x2ce3(%rip),%rax
imul   $0x30,%rcx,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<low_cut_iir>:
movslq %edi,%rax
movslq %esi,%rcx
shl    $0x4,%rax
lea    (%rax,%rax,2),%rdx
lea    0x2f7b(%rip),%rsi
add    %rdx,%rsi
shl    $0x3,%rcx
lea    (%rcx,%rcx,2),%rax
lea    0x2f09(%rip),%rcx
add    %rdx,%rcx
movupd (%rsi,%rax,1),%xmm1
movupd %xmm1,0x8(%rsi,%rax,1)
movupd (%rcx,%rax,1),%xmm2
movupd %xmm2,0x8(%rcx,%rax,1)
movsd  %xmm0,(%rsi,%rax,1)
movsd  0xeb3(%rip),%xmm3
mulsd  %xmm3,%xmm0
movsd  0xeaf(%rip),%xmm4
mulsd  %xmm2,%xmm4
movsd  0xeab(%rip),%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm4,%xmm5
addsd  %xmm5,%xmm0
unpckhpd %xmm2,%xmm2
mulsd  0xe9b(%rip),%xmm2
unpckhpd %xmm1,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%rax,1)
ret

LLVM IR (-O0):
@__const.low_cut_iir.ACoef = [3 x double] [double 0x3FEEFD215EBC498F, double 0xBFFEFD215EBC498F, double 0x3FEEFD215EBC498F]
@__const.low_cut_iir.BCoef = [3 x double] [double 1.000000e+00, double 0xBFFEF6B343FBDA53, double 0x3FEDFE0DA21D3813]
@low_cut_iir.y = internal global [2 x [2 x [3 x double]]] zeroinitializer
@low_cut_iir.x = internal global [2 x [2 x [3 x double]]] zeroinitializer
define double @low_cut_iir(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca [3 x double]
%8 = alloca [3 x double]
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%10 = bitcast [3 x double]* %7 to i8*
%11 = bitcast [3 x double]* %8 to i8*
store i32 2, i32* %9
br label %12
12: ; preds = %56, %3
%13 = load i32, i32* %9
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %59
15: ; preds = %12
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.x, i64 0, i64 %17
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %18, i64 0, i64 %20
%22 = load i32, i32* %9
%23 = sub nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [3 x double], [3 x double]* %21, i64 0, i64 %24
%26 = load double, double* %25
%27 = load i32, i32* %4
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.x, i64 0, i64 %28
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %29, i64 0, i64 %31
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [3 x double], [3 x double]* %32, i64 0, i64 %34
store double %26, double* %35
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %37
%39 = load i32, i32* %5
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %38, i64 0, i64 %40
%42 = load i32, i32* %9
%43 = sub nsw i32 %42, 1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [3 x double], [3 x double]* %41, i64 0, i64 %44
%46 = load double, double* %45
%47 = load i32, i32* %4
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %48
%50 = load i32, i32* %5
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %49, i64 0, i64 %51
%53 = load i32, i32* %9
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [3 x double], [3 x double]* %52, i64 0, i64 %54
store double %46, double* %55
br label %56
56: ; preds = %15
%57 = load i32, i32* %9
%58 = add nsw i32 %57, -1
store i32 %58, i32* %9
br label %12
59: ; preds = %12
%60 = load double, double* %6
%61 = load i32, i32* %4
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.x, i64 0, i64 %62
%64 = load i32, i32* %5
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %63, i64 0, i64 %65
%67 = getelementptr inbounds [3 x double], [3 x double]* %66, i64 0, i64 0
store double %60, double* %67
%68 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%69 = load double, double* %68
%70 = load i32, i32* %4
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.x, i64 0, i64 %71
%73 = load i32, i32* %5
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %72, i64 0, i64 %74
%76 = getelementptr inbounds [3 x double], [3 x double]* %75, i64 0, i64 0
%77 = load double, double* %76
%78 = fmul double %69, %77
%79 = load i32, i32* %4
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %80
%82 = load i32, i32* %5
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %81, i64 0, i64 %83
%85 = getelementptr inbounds [3 x double], [3 x double]* %84, i64 0, i64 0
store double %78, double* %85
store i32 1, i32* %9
br label %86
86: ; preds = %130, %59
%87 = load i32, i32* %9
%88 = icmp sle i32 %87, 2
br i1 %88, label %89, label %133
89: ; preds = %86
%90 = load i32, i32* %9
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 %91
%93 = load double, double* %92
%94 = load i32, i32* %4
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.x, i64 0, i64 %95
%97 = load i32, i32* %5
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %96, i64 0, i64 %98
%100 = load i32, i32* %9
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [3 x double], [3 x double]* %99, i64 0, i64 %101
%103 = load double, double* %102
%104 = load i32, i32* %9
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 %105
%107 = load double, double* %106
%108 = load i32, i32* %4
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %109
%111 = load i32, i32* %5
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %110, i64 0, i64 %112
%114 = load i32, i32* %9
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [3 x double], [3 x double]* %113, i64 0, i64 %115
%117 = load double, double* %116
%118 = fmul double %107, %117
%119 = fneg double %118
%120 = call double @llvm.fmuladd.f64(double %93, double %103, double %119)
%121 = load i32, i32* %4
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %122
%124 = load i32, i32* %5
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %123, i64 0, i64 %125
%127 = getelementptr inbounds [3 x double], [3 x double]* %126, i64 0, i64 0
%128 = load double, double* %127
%129 = fadd double %128, %120
store double %129, double* %127
br label %130
130: ; preds = %89
%131 = load i32, i32* %9
%132 = add nsw i32 %131, 1
store i32 %132, i32* %9
br label %86
133: ; preds = %86
%134 = load i32, i32* %4
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %135
%137 = load i32, i32* %5
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [2 x [3 x double]], [2 x [3 x double]]* %136, i64 0, i64 %138
%140 = getelementptr inbounds [3 x double], [3 x double]* %139, i64 0, i64 0
%141 = load double, double* %140
ret double %141
}

LLVM IR (-O2):
@low_cut_iir.y = internal unnamed_addr global [2 x [2 x [3 x double]]] zeroinitializer
@low_cut_iir.x = internal unnamed_addr global [2 x [2 x [3 x double]]] zeroinitializer
define double @low_cut_iir(i32 %0, i32 %1, double %2) {
%4 = sext i32 %0 to i64
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.x, i64 0, i64 %4, i64 %5, i64 1
%7 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %4, i64 %5, i64 1
%8 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.x, i64 0, i64 %4, i64 %5, i64 0
%9 = bitcast double* %8 to <2 x double>*
%10 = load <2 x double>, <2 x double>* %9
%11 = bitcast double* %6 to <2 x double>*
store <2 x double> %10, <2 x double>* %11
%12 = getelementptr inbounds [2 x [2 x [3 x double]]], [2 x [2 x [3 x double]]]* @low_cut_iir.y, i64 0, i64 %4, i64 %5, i64 0
%13 = bitcast double* %12 to <2 x double>*
%14 = load <2 x double>, <2 x double>* %13
%15 = bitcast double* %7 to <2 x double>*
store <2 x double> %14, <2 x double>* %15
store double %2, double* %8
%16 = fmul double %2, 0x3FEEFD215EBC498F
%17 = extractelement <2 x double> %14, i64 0
%18 = fmul double %17, 0x3FFEF6B343FBDA53
%19 = extractelement <2 x double> %10, i64 0
%20 = tail call double @llvm.fmuladd.f64(double %19, double 0xBFFEFD215EBC498F, double %18)
%21 = fadd double %16, %20
%22 = extractelement <2 x double> %14, i64 1
%23 = fmul double %22, 0xBFEDFE0DA21D3813
%24 = extractelement <2 x double> %10, i64 1
%25 = tail call double @llvm.fmuladd.f64(double %24, double 0x3FEEFD215EBC498F, double %23)
%26 = fadd double %21, %25
store double %26, double* %12
ret double %26
}