double IIR_LP2(const double *pTable, double *pBuffer, double Xn) {
  pBuffer[2] = pBuffer[1];
  pBuffer[1] = pBuffer[0];
  pBuffer[5] = pBuffer[4];
  pBuffer[4] = pBuffer[3];
  pBuffer[3] = Xn;
  pBuffer[0] = (pBuffer[3] + pBuffer[5]) * pTable[3] + pBuffer[4] * pTable[4] -
               pBuffer[1] * pTable[1] - pBuffer[2] * pTable[2];
  return pBuffer[0];
}


x86 assembly (clang, -O0):
<IIR_LP2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<IIR_LP2>:
movupd (%rsi),%xmm1
movupd 0x18(%rsi),%xmm2
movupd %xmm1,0x8(%rsi)
movupd %xmm2,0x20(%rsi)
movsd  %xmm0,0x18(%rsi)
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
mulsd  0x20(%rdi),%xmm2
addsd  %xmm3,%xmm0
mulsd  0x18(%rdi),%xmm0
addsd  %xmm2,%xmm0
movsd  0x8(%rdi),%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
unpckhpd %xmm1,%xmm1
mulsd  0x10(%rdi),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define double @IIR_LP2(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 1
%9 = load double, double* %8
%10 = load double*, double** %5
%11 = getelementptr inbounds double, double* %10, i64 2
store double %9, double* %11
%12 = load double*, double** %5
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 1
store double %14, double* %16
%17 = load double*, double** %5
%18 = getelementptr inbounds double, double* %17, i64 4
%19 = load double, double* %18
%20 = load double*, double** %5
%21 = getelementptr inbounds double, double* %20, i64 5
store double %19, double* %21
%22 = load double*, double** %5
%23 = getelementptr inbounds double, double* %22, i64 3
%24 = load double, double* %23
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 4
store double %24, double* %26
%27 = load double, double* %6
%28 = load double*, double** %5
%29 = getelementptr inbounds double, double* %28, i64 3
store double %27, double* %29
%30 = load double*, double** %5
%31 = getelementptr inbounds double, double* %30, i64 3
%32 = load double, double* %31
%33 = load double*, double** %5
%34 = getelementptr inbounds double, double* %33, i64 5
%35 = load double, double* %34
%36 = fadd double %32, %35
%37 = load double*, double** %4
%38 = getelementptr inbounds double, double* %37, i64 3
%39 = load double, double* %38
%40 = load double*, double** %5
%41 = getelementptr inbounds double, double* %40, i64 4
%42 = load double, double* %41
%43 = load double*, double** %4
%44 = getelementptr inbounds double, double* %43, i64 4
%45 = load double, double* %44
%46 = fmul double %42, %45
%47 = call double @llvm.fmuladd.f64(double %36, double %39, double %46)
%48 = load double*, double** %5
%49 = getelementptr inbounds double, double* %48, i64 1
%50 = load double, double* %49
%51 = load double*, double** %4
%52 = getelementptr inbounds double, double* %51, i64 1
%53 = load double, double* %52
%54 = fneg double %50
%55 = call double @llvm.fmuladd.f64(double %54, double %53, double %47)
%56 = load double*, double** %5
%57 = getelementptr inbounds double, double* %56, i64 2
%58 = load double, double* %57
%59 = load double*, double** %4
%60 = getelementptr inbounds double, double* %59, i64 2
%61 = load double, double* %60
%62 = fneg double %58
%63 = call double @llvm.fmuladd.f64(double %62, double %61, double %55)
%64 = load double*, double** %5
%65 = getelementptr inbounds double, double* %64, i64 0
store double %63, double* %65
%66 = load double*, double** %5
%67 = getelementptr inbounds double, double* %66, i64 0
%68 = load double, double* %67
ret double %68
}

LLVM IR (-O2):
define double @IIR_LP2(double* nocapture %0, double* nocapture %1, double %2) {
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = bitcast double* %1 to <2 x double>*
%6 = load <2 x double>, <2 x double>* %5
%7 = bitcast double* %4 to <2 x double>*
store <2 x double> %6, <2 x double>* %7
%8 = getelementptr inbounds double, double* %1, i64 4
%9 = getelementptr inbounds double, double* %1, i64 3
%10 = bitcast double* %9 to <2 x double>*
%11 = load <2 x double>, <2 x double>* %10
%12 = bitcast double* %8 to <2 x double>*
store <2 x double> %11, <2 x double>* %12
store double %2, double* %9
%13 = extractelement <2 x double> %11, i64 1
%14 = fadd double %13, %2
%15 = getelementptr inbounds double, double* %0, i64 3
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %0, i64 4
%18 = load double, double* %17
%19 = extractelement <2 x double> %11, i64 0
%20 = fmul double %19, %18
%21 = tail call double @llvm.fmuladd.f64(double %14, double %16, double %20)
%22 = getelementptr inbounds double, double* %0, i64 1
%23 = load double, double* %22
%24 = extractelement <2 x double> %6, i64 0
%25 = fneg double %24
%26 = tail call double @llvm.fmuladd.f64(double %25, double %23, double %21)
%27 = getelementptr inbounds double, double* %0, i64 2
%28 = load double, double* %27
%29 = extractelement <2 x double> %6, i64 1
%30 = fneg double %29
%31 = tail call double @llvm.fmuladd.f64(double %30, double %28, double %26)
store double %31, double* %1
ret double %31
}