#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 */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ free(double *);
double *seventhOrderIIRFilter(double *B, double *A, double *signal,
                              int signalLength) {
  int i;
  int filterLength = 7;
  double *x, *y, *output;
  double zeros = 0;
  double poles = 0;
  if (A[0] != 1) {
    for (i = 0; i < filterLength; i++) {
      A[i] = A[i] / A[0];
      B[i] = B[i] / A[0];
    }
  }
  x = (double *)calloc((filterLength - 1), sizeof(double));
  y = (double *)calloc((filterLength - 1), sizeof(double));
  output = (double *)calloc((signalLength), sizeof(double));
  for (i = 0; i < filterLength - 1; i++)
    y[i] = 0;
  for (i = 0; i < filterLength - 1; i++)
    x[i] = 0;
  for (i = 0; i < signalLength; i++)
    output[i] = 0;
  for (i = 0; i < signalLength; i++) {
    zeros = B[0] * signal[i] + B[1] * x[0] + B[2] * x[1] + B[3] * x[2] +
            B[4] * x[3] + B[5] * x[4] + B[6] * x[5];
    poles = A[1] * y[0] + A[2] * y[1] + A[3] * y[2] + A[4] * y[3] +
            A[5] * y[4] + A[6] * y[5];
    output[i] = zeros - poles;
    x[5] = x[4];
    x[4] = x[3];
    x[3] = x[2];
    x[2] = x[1];
    x[1] = x[0];
    x[0] = signal[i];
    y[5] = y[4];
    y[4] = y[3];
    y[3] = y[2];
    y[2] = y[1];
    y[1] = y[0];
    y[0] = output[i];
  }
  free(x);
  free(y);
  return output;
}


x86 assembly (clang, -O0):
<seventhOrderIIRFilter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x7,-0x24(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xea2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1173 <seventhOrderIIRFilter+0x53>
jp     1173 <seventhOrderIIRFilter+0x53>
jmp    11dd <seventhOrderIIRFilter+0xbd>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    11d8 <seventhOrderIIRFilter+0xb8>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    117a <seventhOrderIIRFilter+0x5a>
jmp    11dd <seventhOrderIIRFilter+0xbd>
mov    -0x24(%rbp),%edi
sub    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%edi
sub    $0x1,%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x8,%esi
call   1040 <calloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    124c <seventhOrderIIRFilter+0x12c>
mov    -0x38(%rbp),%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    121d <seventhOrderIIRFilter+0xfd>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1282 <seventhOrderIIRFilter+0x162>
mov    -0x30(%rbp),%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1253 <seventhOrderIIRFilter+0x133>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    12b3 <seventhOrderIIRFilter+0x193>
mov    -0x40(%rbp),%rax
movslq -0x20(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1289 <seventhOrderIIRFilter+0x169>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1514 <seventhOrderIIRFilter+0x3f4>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  0x20(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x28(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x38(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x38(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x38(%rbp),%rax
movsd  0x20(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  0x28(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x30(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x38(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x38(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x40(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    12ba <seventhOrderIIRFilter+0x19a>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seventhOrderIIRFilter>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %ecx,%r14d
mov    %rdx,0x10(%rsp)
mov    %rsi,%r15
mov    %rdi,%r12
movsd  (%rsi),%xmm0
ucomisd 0xea8(%rip),%xmm0
jne    1160 <seventhOrderIIRFilter+0x30>
jnp    1263 <seventhOrderIIRFilter+0x133>
divsd  %xmm0,%xmm0
movsd  %xmm0,(%r15)
movsd  (%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r12)
movsd  (%r15),%xmm0
movsd  0x8(%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r15)
movsd  0x8(%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r12)
movsd  (%r15),%xmm0
movsd  0x10(%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%r15)
movsd  0x10(%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%r12)
movsd  (%r15),%xmm0
movsd  0x18(%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%r15)
movsd  0x18(%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%r12)
movsd  (%r15),%xmm0
movsd  0x20(%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%r15)
movsd  0x20(%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%r12)
movsd  (%r15),%xmm0
movsd  0x28(%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%r15)
movsd  0x28(%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%r12)
movsd  (%r15),%xmm0
movsd  0x30(%r15),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%r15)
movsd  0x30(%r12),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%r12)
mov    $0x6,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    $0x6,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,%r13
mov    %r14d,%edi
mov    $0x8,%esi
call   1050 <calloc@plt>
mov    %rax,%rbp
xorpd  %xmm0,%xmm0
movupd %xmm0,0x0(%r13)
movupd %xmm0,0x10(%r13)
movupd %xmm0,0x20(%r13)
movupd %xmm0,(%rbx)
movupd %xmm0,0x10(%rbx)
movupd %xmm0,0x20(%rbx)
test   %r14d,%r14d
jle    142f <seventhOrderIIRFilter+0x2ff>
mov    %r14d,%eax
mov    %rax,0x8(%rsp)
lea    0x0(,%rax,8),%rdx
xor    %r14d,%r14d
mov    %rbp,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x8(%rsp),%rcx
mov    0x10(%rsp),%rax
movsd  0x0(%r13),%xmm2
movsd  0x8(%r13),%xmm3
movsd  0x10(%r13),%xmm5
movsd  0x18(%r13),%xmm1
movsd  0x20(%r13),%xmm4
movsd  0x28(%r13),%xmm0
nop
movsd  (%r12),%xmm6
movsd  0x8(%r12),%xmm7
mulsd  (%rbx),%xmm7
mulsd  (%rax,%r14,8),%xmm6
addsd  %xmm7,%xmm6
movsd  0x10(%r12),%xmm7
mulsd  0x8(%rbx),%xmm7
addsd  %xmm6,%xmm7
movsd  0x18(%r12),%xmm6
mulsd  0x10(%rbx),%xmm6
addsd  %xmm7,%xmm6
movsd  0x20(%r12),%xmm7
mulsd  0x18(%rbx),%xmm7
addsd  %xmm6,%xmm7
movsd  0x28(%r12),%xmm6
mulsd  0x20(%rbx),%xmm6
addsd  %xmm7,%xmm6
movsd  0x30(%r12),%xmm7
mulsd  0x28(%rbx),%xmm7
mulsd  0x10(%r15),%xmm3
mulsd  0x8(%r15),%xmm2
addsd  %xmm6,%xmm7
addsd  %xmm3,%xmm2
mulsd  0x18(%r15),%xmm5
addsd  %xmm2,%xmm5
mulsd  0x20(%r15),%xmm1
addsd  %xmm5,%xmm1
mulsd  0x28(%r15),%xmm4
mulsd  0x30(%r15),%xmm0
addsd  %xmm1,%xmm4
addsd  %xmm4,%xmm0
subsd  %xmm0,%xmm7
movsd  %xmm7,0x0(%rbp,%r14,8)
movsd  0x20(%rbx),%xmm0
movsd  %xmm0,0x28(%rbx)
movups (%rbx),%xmm0
movups 0x10(%rbx),%xmm1
movups %xmm1,0x18(%rbx)
movups %xmm0,0x8(%rbx)
movsd  (%rax,%r14,8),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x20(%r13),%xmm0
movsd  %xmm0,0x28(%r13)
movupd 0x0(%r13),%xmm3
movupd 0x10(%r13),%xmm1
movupd %xmm1,0x18(%r13)
movupd %xmm3,0x8(%r13)
movsd  0x0(%rbp,%r14,8),%xmm2
movsd  %xmm2,0x0(%r13)
add    $0x1,%r14
movapd %xmm3,%xmm5
unpckhpd %xmm3,%xmm5
movapd %xmm1,%xmm4
unpckhpd %xmm1,%xmm4
cmp    %r14,%rcx
jne    1310 <seventhOrderIIRFilter+0x1e0>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double* @seventhOrderIIRFilter(double* %0, double* %1, double* %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double
%15 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store i32 %3, i32* %8
store i32 7, i32* %10
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
%16 = load double*, double** %6
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = fcmp une double %18, 1.000000e+00
br i1 %19, label %20, label %56
20: ; preds = %4
store i32 0, i32* %9
br label %21
21: ; preds = %52, %20
%22 = load i32, i32* %9
%23 = load i32, i32* %10
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %55
25: ; preds = %21
%26 = load double*, double** %6
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %26, i64 %28
%30 = load double, double* %29
%31 = load double*, double** %6
%32 = getelementptr inbounds double, double* %31, i64 0
%33 = load double, double* %32
%34 = fdiv double %30, %33
%35 = load double*, double** %6
%36 = load i32, i32* %9
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %35, i64 %37
store double %34, double* %38
%39 = load double*, double** %5
%40 = load i32, i32* %9
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds double, double* %39, i64 %41
%43 = load double, double* %42
%44 = load double*, double** %6
%45 = getelementptr inbounds double, double* %44, i64 0
%46 = load double, double* %45
%47 = fdiv double %43, %46
%48 = load double*, double** %5
%49 = load i32, i32* %9
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
store double %47, double* %51
br label %52
52: ; preds = %25
%53 = load i32, i32* %9
%54 = add nsw i32 %53, 1
store i32 %54, i32* %9
br label %21
55: ; preds = %21
br label %56
56: ; preds = %55, %4
%57 = load i32, i32* %10
%58 = sub nsw i32 %57, 1
%59 = call i64 @calloc(i32 %58, i32 8)
%60 = inttoptr i64 %59 to double*
store double* %60, double** %11
%61 = load i32, i32* %10
%62 = sub nsw i32 %61, 1
%63 = call i64 @calloc(i32 %62, i32 8)
%64 = inttoptr i64 %63 to double*
store double* %64, double** %12
%65 = load i32, i32* %8
%66 = call i64 @calloc(i32 %65, i32 8)
%67 = inttoptr i64 %66 to double*
store double* %67, double** %13
store i32 0, i32* %9
br label %68
68: ; preds = %78, %56
%69 = load i32, i32* %9
%70 = load i32, i32* %10
%71 = sub nsw i32 %70, 1
%72 = icmp slt i32 %69, %71
br i1 %72, label %73, label %81
73: ; preds = %68
%74 = load double*, double** %12
%75 = load i32, i32* %9
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %74, i64 %76
store double 0.000000e+00, double* %77
br label %78
78: ; preds = %73
%79 = load i32, i32* %9
%80 = add nsw i32 %79, 1
store i32 %80, i32* %9
br label %68
81: ; preds = %68
store i32 0, i32* %9
br label %82
82: ; preds = %92, %81
%83 = load i32, i32* %9
%84 = load i32, i32* %10
%85 = sub nsw i32 %84, 1
%86 = icmp slt i32 %83, %85
br i1 %86, label %87, label %95
87: ; preds = %82
%88 = load double*, double** %11
%89 = load i32, i32* %9
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %88, i64 %90
store double 0.000000e+00, double* %91
br label %92
92: ; preds = %87
%93 = load i32, i32* %9
%94 = add nsw i32 %93, 1
store i32 %94, i32* %9
br label %82
95: ; preds = %82
store i32 0, i32* %9
br label %96
96: ; preds = %105, %95
%97 = load i32, i32* %9
%98 = load i32, i32* %8
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %108
100: ; preds = %96
%101 = load double*, double** %13
%102 = load i32, i32* %9
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
store double 0.000000e+00, double* %104
br label %105
105: ; preds = %100
%106 = load i32, i32* %9
%107 = add nsw i32 %106, 1
store i32 %107, i32* %9
br label %96
108: ; preds = %96
store i32 0, i32* %9
br label %109
109: ; preds = %278, %108
%110 = load i32, i32* %9
%111 = load i32, i32* %8
%112 = icmp slt i32 %110, %111
br i1 %112, label %113, label %281
113: ; preds = %109
%114 = load double*, double** %5
%115 = getelementptr inbounds double, double* %114, i64 0
%116 = load double, double* %115
%117 = load double*, double** %7
%118 = load i32, i32* %9
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %117, i64 %119
%121 = load double, double* %120
%122 = load double*, double** %5
%123 = getelementptr inbounds double, double* %122, i64 1
%124 = load double, double* %123
%125 = load double*, double** %11
%126 = getelementptr inbounds double, double* %125, i64 0
%127 = load double, double* %126
%128 = fmul double %124, %127
%129 = call double @llvm.fmuladd.f64(double %116, double %121, double %128)
%130 = load double*, double** %5
%131 = getelementptr inbounds double, double* %130, i64 2
%132 = load double, double* %131
%133 = load double*, double** %11
%134 = getelementptr inbounds double, double* %133, i64 1
%135 = load double, double* %134
%136 = call double @llvm.fmuladd.f64(double %132, double %135, double %129)
%137 = load double*, double** %5
%138 = getelementptr inbounds double, double* %137, i64 3
%139 = load double, double* %138
%140 = load double*, double** %11
%141 = getelementptr inbounds double, double* %140, i64 2
%142 = load double, double* %141
%143 = call double @llvm.fmuladd.f64(double %139, double %142, double %136)
%144 = load double*, double** %5
%145 = getelementptr inbounds double, double* %144, i64 4
%146 = load double, double* %145
%147 = load double*, double** %11
%148 = getelementptr inbounds double, double* %147, i64 3
%149 = load double, double* %148
%150 = call double @llvm.fmuladd.f64(double %146, double %149, double %143)
%151 = load double*, double** %5
%152 = getelementptr inbounds double, double* %151, i64 5
%153 = load double, double* %152
%154 = load double*, double** %11
%155 = getelementptr inbounds double, double* %154, i64 4
%156 = load double, double* %155
%157 = call double @llvm.fmuladd.f64(double %153, double %156, double %150)
%158 = load double*, double** %5
%159 = getelementptr inbounds double, double* %158, i64 6
%160 = load double, double* %159
%161 = load double*, double** %11
%162 = getelementptr inbounds double, double* %161, i64 5
%163 = load double, double* %162
%164 = call double @llvm.fmuladd.f64(double %160, double %163, double %157)
store double %164, double* %14
%165 = load double*, double** %6
%166 = getelementptr inbounds double, double* %165, i64 1
%167 = load double, double* %166
%168 = load double*, double** %12
%169 = getelementptr inbounds double, double* %168, i64 0
%170 = load double, double* %169
%171 = load double*, double** %6
%172 = getelementptr inbounds double, double* %171, i64 2
%173 = load double, double* %172
%174 = load double*, double** %12
%175 = getelementptr inbounds double, double* %174, i64 1
%176 = load double, double* %175
%177 = fmul double %173, %176
%178 = call double @llvm.fmuladd.f64(double %167, double %170, double %177)
%179 = load double*, double** %6
%180 = getelementptr inbounds double, double* %179, i64 3
%181 = load double, double* %180
%182 = load double*, double** %12
%183 = getelementptr inbounds double, double* %182, i64 2
%184 = load double, double* %183
%185 = call double @llvm.fmuladd.f64(double %181, double %184, double %178)
%186 = load double*, double** %6
%187 = getelementptr inbounds double, double* %186, i64 4
%188 = load double, double* %187
%189 = load double*, double** %12
%190 = getelementptr inbounds double, double* %189, i64 3
%191 = load double, double* %190
%192 = call double @llvm.fmuladd.f64(double %188, double %191, double %185)
%193 = load double*, double** %6
%194 = getelementptr inbounds double, double* %193, i64 5
%195 = load double, double* %194
%196 = load double*, double** %12
%197 = getelementptr inbounds double, double* %196, i64 4
%198 = load double, double* %197
%199 = call double @llvm.fmuladd.f64(double %195, double %198, double %192)
%200 = load double*, double** %6
%201 = getelementptr inbounds double, double* %200, i64 6
%202 = load double, double* %201
%203 = load double*, double** %12
%204 = getelementptr inbounds double, double* %203, i64 5
%205 = load double, double* %204
%206 = call double @llvm.fmuladd.f64(double %202, double %205, double %199)
store double %206, double* %15
%207 = load double, double* %14
%208 = load double, double* %15
%209 = fsub double %207, %208
%210 = load double*, double** %13
%211 = load i32, i32* %9
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds double, double* %210, i64 %212
store double %209, double* %213
%214 = load double*, double** %11
%215 = getelementptr inbounds double, double* %214, i64 4
%216 = load double, double* %215
%217 = load double*, double** %11
%218 = getelementptr inbounds double, double* %217, i64 5
store double %216, double* %218
%219 = load double*, double** %11
%220 = getelementptr inbounds double, double* %219, i64 3
%221 = load double, double* %220
%222 = load double*, double** %11
%223 = getelementptr inbounds double, double* %222, i64 4
store double %221, double* %223
%224 = load double*, double** %11
%225 = getelementptr inbounds double, double* %224, i64 2
%226 = load double, double* %225
%227 = load double*, double** %11
%228 = getelementptr inbounds double, double* %227, i64 3
store double %226, double* %228
%229 = load double*, double** %11
%230 = getelementptr inbounds double, double* %229, i64 1
%231 = load double, double* %230
%232 = load double*, double** %11
%233 = getelementptr inbounds double, double* %232, i64 2
store double %231, double* %233
%234 = load double*, double** %11
%235 = getelementptr inbounds double, double* %234, i64 0
%236 = load double, double* %235
%237 = load double*, double** %11
%238 = getelementptr inbounds double, double* %237, i64 1
store double %236, double* %238
%239 = load double*, double** %7
%240 = load i32, i32* %9
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double, double* %239, i64 %241
%243 = load double, double* %242
%244 = load double*, double** %11
%245 = getelementptr inbounds double, double* %244, i64 0
store double %243, double* %245
%246 = load double*, double** %12
%247 = getelementptr inbounds double, double* %246, i64 4
%248 = load double, double* %247
%249 = load double*, double** %12
%250 = getelementptr inbounds double, double* %249, i64 5
store double %248, double* %250
%251 = load double*, double** %12
%252 = getelementptr inbounds double, double* %251, i64 3
%253 = load double, double* %252
%254 = load double*, double** %12
%255 = getelementptr inbounds double, double* %254, i64 4
store double %253, double* %255
%256 = load double*, double** %12
%257 = getelementptr inbounds double, double* %256, i64 2
%258 = load double, double* %257
%259 = load double*, double** %12
%260 = getelementptr inbounds double, double* %259, i64 3
store double %258, double* %260
%261 = load double*, double** %12
%262 = getelementptr inbounds double, double* %261, i64 1
%263 = load double, double* %262
%264 = load double*, double** %12
%265 = getelementptr inbounds double, double* %264, i64 2
store double %263, double* %265
%266 = load double*, double** %12
%267 = getelementptr inbounds double, double* %266, i64 0
%268 = load double, double* %267
%269 = load double*, double** %12
%270 = getelementptr inbounds double, double* %269, i64 1
store double %268, double* %270
%271 = load double*, double** %13
%272 = load i32, i32* %9
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds double, double* %271, i64 %273
%275 = load double, double* %274
%276 = load double*, double** %12
%277 = getelementptr inbounds double, double* %276, i64 0
store double %275, double* %277
br label %278
278: ; preds = %113
%279 = load i32, i32* %9
%280 = add nsw i32 %279, 1
store i32 %280, i32* %9
br label %109
281: ; preds = %109
%282 = load double*, double** %11
%283 = call i32 @free(double* %282)
%284 = load double*, double** %12
%285 = call i32 @free(double* %284)
%286 = load double*, double** %13
ret double* %286
}

LLVM IR (-O2):
define double* @seventhOrderIIRFilter(double* nocapture %0, double* nocapture %1, double* nocapture %2, i32 %3) {
%5 = load double, double* %1
%6 = fcmp une double %5, 1.000000e+00
br i1 %6, label %7, label %53
7: ; preds = %4
%8 = fdiv double %5, %5
store double %8, double* %1
%9 = load double, double* %0
%10 = fdiv double %9, %8
store double %10, double* %0
%11 = getelementptr inbounds double, double* %1, i64 1
%12 = load double, double* %11
%13 = load double, double* %1
%14 = fdiv double %12, %13
store double %14, double* %11
%15 = getelementptr inbounds double, double* %0, i64 1
%16 = load double, double* %15
%17 = fdiv double %16, %13
store double %17, double* %15
%18 = getelementptr inbounds double, double* %1, i64 2
%19 = load double, double* %18
%20 = load double, double* %1
%21 = fdiv double %19, %20
store double %21, double* %18
%22 = getelementptr inbounds double, double* %0, i64 2
%23 = load double, double* %22
%24 = fdiv double %23, %20
store double %24, double* %22
%25 = getelementptr inbounds double, double* %1, i64 3
%26 = load double, double* %25
%27 = load double, double* %1
%28 = fdiv double %26, %27
store double %28, double* %25
%29 = getelementptr inbounds double, double* %0, i64 3
%30 = load double, double* %29
%31 = fdiv double %30, %27
store double %31, double* %29
%32 = getelementptr inbounds double, double* %1, i64 4
%33 = load double, double* %32
%34 = load double, double* %1
%35 = fdiv double %33, %34
store double %35, double* %32
%36 = getelementptr inbounds double, double* %0, i64 4
%37 = load double, double* %36
%38 = fdiv double %37, %34
store double %38, double* %36
%39 = getelementptr inbounds double, double* %1, i64 5
%40 = load double, double* %39
%41 = load double, double* %1
%42 = fdiv double %40, %41
store double %42, double* %39
%43 = getelementptr inbounds double, double* %0, i64 5
%44 = load double, double* %43
%45 = fdiv double %44, %41
store double %45, double* %43
%46 = getelementptr inbounds double, double* %1, i64 6
%47 = load double, double* %46
%48 = load double, double* %1
%49 = fdiv double %47, %48
store double %49, double* %46
%50 = getelementptr inbounds double, double* %0, i64 6
%51 = load double, double* %50
%52 = fdiv double %51, %48
store double %52, double* %50
br label %53
53: ; preds = %7, %4
%54 = tail call i64 @calloc(i32 6, i32 8)
%55 = tail call i64 @calloc(i32 6, i32 8)
%56 = inttoptr i64 %55 to double*
%57 = inttoptr i64 %55 to i8*
%58 = tail call i64 @calloc(i32 %3, i32 8)
%59 = inttoptr i64 %54 to double*
%60 = inttoptr i64 %54 to i8*
%61 = inttoptr i64 %58 to double*
%62 = icmp sgt i32 %3, 0
br i1 %62, label %63, label %162
63: ; preds = %53
%64 = inttoptr i64 %58 to i8*
%65 = zext i32 %3 to i64
%66 = shl nuw nsw i64 %65, 3
%67 = getelementptr inbounds double, double* %0, i64 1
%68 = getelementptr inbounds double, double* %0, i64 2
%69 = getelementptr inbounds double, double* %59, i64 1
%70 = getelementptr inbounds double, double* %0, i64 3
%71 = getelementptr inbounds double, double* %59, i64 2
%72 = getelementptr inbounds double, double* %0, i64 4
%73 = getelementptr inbounds double, double* %59, i64 3
%74 = getelementptr inbounds double, double* %0, i64 5
%75 = getelementptr inbounds double, double* %59, i64 4
%76 = getelementptr inbounds double, double* %0, i64 6
%77 = getelementptr inbounds double, double* %59, i64 5
%78 = getelementptr inbounds double, double* %1, i64 1
%79 = getelementptr inbounds double, double* %1, i64 2
%80 = getelementptr inbounds double, double* %56, i64 1
%81 = getelementptr inbounds double, double* %1, i64 3
%82 = getelementptr inbounds double, double* %56, i64 2
%83 = getelementptr inbounds double, double* %1, i64 4
%84 = getelementptr inbounds double, double* %56, i64 3
%85 = getelementptr inbounds double, double* %1, i64 5
%86 = getelementptr inbounds double, double* %56, i64 4
%87 = getelementptr inbounds double, double* %1, i64 6
%88 = getelementptr inbounds double, double* %56, i64 5
%89 = zext i32 %3 to i64
%90 = load double, double* %56
%91 = load double, double* %80
%92 = load double, double* %82
%93 = load double, double* %84
%94 = load double, double* %86
%95 = load double, double* %88
%96 = bitcast double* %71 to <2 x double>*
%97 = bitcast double* %73 to <2 x double>*
%98 = inttoptr i64 %54 to <2 x double>*
%99 = bitcast double* %69 to <2 x double>*
%100 = bitcast double* %82 to <2 x double>*
%101 = bitcast double* %84 to <2 x double>*
%102 = inttoptr i64 %55 to <2 x double>*
%103 = bitcast double* %80 to <2 x double>*
br label %104
104: ; preds = %63, %104
%105 = phi double [ %95, %63 ], [ %152, %104 ]
%106 = phi double [ %94, %63 ], [ %161, %104 ]
%107 = phi double [ %93, %63 ], [ %160, %104 ]
%108 = phi double [ %92, %63 ], [ %159, %104 ]
%109 = phi double [ %91, %63 ], [ %158, %104 ]
%110 = phi double [ %90, %63 ], [ %155, %104 ]
%111 = phi i64 [ 0, %63 ], [ %156, %104 ]
%112 = load double, double* %0
%113 = getelementptr inbounds double, double* %2, i64 %111
%114 = load double, double* %113
%115 = load double, double* %67
%116 = load double, double* %59
%117 = fmul double %115, %116
%118 = tail call double @llvm.fmuladd.f64(double %112, double %114, double %117)
%119 = load double, double* %68
%120 = load double, double* %69
%121 = tail call double @llvm.fmuladd.f64(double %119, double %120, double %118)
%122 = load double, double* %70
%123 = load double, double* %71
%124 = tail call double @llvm.fmuladd.f64(double %122, double %123, double %121)
%125 = load double, double* %72
%126 = load double, double* %73
%127 = tail call double @llvm.fmuladd.f64(double %125, double %126, double %124)
%128 = load double, double* %74
%129 = load double, double* %75
%130 = tail call double @llvm.fmuladd.f64(double %128, double %129, double %127)
%131 = load double, double* %76
%132 = load double, double* %77
%133 = tail call double @llvm.fmuladd.f64(double %131, double %132, double %130)
%134 = load double, double* %78
%135 = load double, double* %79
%136 = fmul double %135, %109
%137 = tail call double @llvm.fmuladd.f64(double %134, double %110, double %136)
%138 = load double, double* %81
%139 = tail call double @llvm.fmuladd.f64(double %138, double %108, double %137)
%140 = load double, double* %83
%141 = tail call double @llvm.fmuladd.f64(double %140, double %107, double %139)
%142 = load double, double* %85
%143 = tail call double @llvm.fmuladd.f64(double %142, double %106, double %141)
%144 = load double, double* %87
%145 = tail call double @llvm.fmuladd.f64(double %144, double %105, double %143)
%146 = fsub double %133, %145
%147 = getelementptr inbounds double, double* %61, i64 %111
store double %146, double* %147
%148 = load double, double* %75
store double %148, double* %77
%149 = load <2 x double>, <2 x double>* %96
store <2 x double> %149, <2 x double>* %97
%150 = load <2 x double>, <2 x double>* %98
store <2 x double> %150, <2 x double>* %99
%151 = load double, double* %113
store double %151, double* %59
%152 = load double, double* %86
store double %152, double* %88
%153 = load <2 x double>, <2 x double>* %100
store <2 x double> %153, <2 x double>* %101
%154 = load <2 x double>, <2 x double>* %102
store <2 x double> %154, <2 x double>* %103
%155 = load double, double* %147
store double %155, double* %56
%156 = add nuw nsw i64 %111, 1
%157 = icmp eq i64 %156, %89
%158 = extractelement <2 x double> %154, i64 0
%159 = extractelement <2 x double> %154, i64 1
%160 = extractelement <2 x double> %153, i64 0
%161 = extractelement <2 x double> %153, i64 1
br i1 %157, label %162, label %104
162: ; preds = %104, %53
%163 = tail call i32 @free(double* %59)
%164 = tail call i32 @free(double* %56)
ret double* %61
}