int levinson(const double *in, int order, double *acoeff, double *err,
             double *kcoeff, double *tmp) {
  int i, j;
  double acc;
  int ret = 0;
  acoeff[0] = (double)1.0;
  *err = in[0];
  for (i = 1; i <= order; ++i) {
    acc = in[i];
    for (j = 1; j <= i - 1; ++j) {
      acc += acoeff[j] * in[i - j];
    }
    kcoeff[i - 1] = -acc / (*err);
    acoeff[i] = kcoeff[i - 1];
    for (j = 0; j < order; ++j) {
      tmp[j] = acoeff[j];
    }
    for (j = 1; j < i; ++j) {
      acoeff[j] += kcoeff[i - 1] * tmp[i - j];
    }
    *err *= (1 - kcoeff[i - 1] * kcoeff[i - 1]);
  }
  return ret;
}


x86 assembly (clang, -O0):
<levinson>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1312 <levinson+0x212>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11be <levinson+0xbe>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    116e <levinson+0x6e>
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x20(%rbp),%rax
divsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    124e <levinson+0x14e>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    121a <levinson+0x11a>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    12ad <levinson+0x1ad>
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    -0x38(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1255 <levinson+0x155>
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd0c(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1149 <levinson+0x49>
mov    -0x44(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<levinson>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rdx)
mov    %rdi,-0x78(%rsp)
movsd  (%rdi),%xmm2
mov    %rcx,0x8(%rsp)
movsd  %xmm2,(%rcx)
mov    %rsi,-0x70(%rsp)
test   %esi,%esi
jle    1606 <levinson+0x506>
mov    -0x70(%rsp),%rax
lea    0x1(%rax),%ecx
mov    %rcx,(%rsp)
mov    %eax,%r12d
lea    0x8(%rdx),%rcx
mov    %rcx,-0x40(%rsp)
lea    (%rdx,%r12,8),%rcx
mov    %r12d,%esi
and    $0xfffffffc,%esi
mov    %rsi,-0x10(%rsp)
add    $0xfffffffffffffffc,%rsi
mov    %rsi,-0x18(%rsp)
mov    %rsi,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
cmp    %r9,%rcx
seta   %cl
lea    (%r9,%r12,8),%rsi
cmp    %rdx,%rsi
seta   %bl
lea    0x8(%r9),%rsi
mov    %rsi,-0x50(%rsp)
and    %cl,%bl
mov    %bl,-0x79(%rsp)
mov    %edi,%r13d
and    $0x3,%r13d
and    $0xfffffffffffffffc,%rdi
mov    %rdi,-0x48(%rsp)
mov    %r12d,%ecx
and    $0x3,%ecx
mov    %rcx,-0x8(%rsp)
lea    0x20(%rdx),%rcx
mov    %rcx,-0x58(%rsp)
mov    -0x78(%rsp),%rdi
lea    0x8(%rdi),%rax
lea    0x10(%r9),%rcx
mov    %rcx,-0x30(%rsp)
lea    0x10(%rdx),%rcx
mov    %rcx,-0x38(%rsp)
mov    %r13,-0x20(%rsp)
shl    $0x5,%r13
movapd 0xe1c(%rip),%xmm0
movsd  0xe24(%rip),%xmm1
lea    -0x8(%r9),%r14
lea    0x18(%rdx),%rcx
mov    %rcx,-0x60(%rsp)
mov    $0x1,%r11d
xor    %r15d,%r15d
mov    %r9,-0x68(%rsp)
jmp    1259 <levinson+0x159>
nopl   0x0(%rax)
movsd  -0x8(%r8,%r11,8),%xmm3
mulsd  %xmm3,%xmm3
movapd %xmm1,%xmm2
subsd  %xmm3,%xmm2
mov    0x8(%rsp),%rcx
mulsd  (%rcx),%xmm2
movsd  %xmm2,(%rcx)
add    $0x1,%r11
add    $0x1,%r15
add    $0x8,%rdi
mov    0x10(%rsp),%rax
add    $0x8,%rax
add    $0x8,%r14
addq   $0x8,-0x68(%rsp)
cmp    (%rsp),%r11
je     1606 <levinson+0x506>
mov    %r15,%r10
and    $0xfffffffffffffffc,%r10
mov    -0x78(%rsp),%rcx
movsd  (%rcx,%r11,8),%xmm3
cmp    $0x2,%r11
jb     132b <levinson+0x22b>
lea    -0x1(%r15),%rcx
mov    $0x1,%ebx
cmp    $0x3,%rcx
jb     12e4 <levinson+0x1e4>
mov    $0xffffffffffffffff,%rbx
mov    -0x58(%rsp),%rbp
movsd  -0x18(%rbp),%xmm4
movsd  -0x10(%rbp),%xmm5
mulsd  0x8(%rdi,%rbx,8),%xmm4
addsd  %xmm3,%xmm4
mulsd  (%rdi,%rbx,8),%xmm5
addsd  %xmm4,%xmm5
movsd  -0x8(%rbp),%xmm4
mulsd  -0x8(%rdi,%rbx,8),%xmm4
addsd  %xmm5,%xmm4
movsd  0x0(%rbp),%xmm3
mulsd  -0x10(%rdi,%rbx,8),%xmm3
addsd  %xmm4,%xmm3
add    $0x20,%rbp
lea    (%r10,%rbx,1),%rcx
add    $0xfffffffffffffffc,%rcx
add    $0xfffffffffffffffc,%rbx
cmp    $0xffffffffffffffff,%rcx
jne    1290 <levinson+0x190>
neg    %rbx
test   $0x3,%r15b
je     132b <levinson+0x22b>
mov    %r15d,%esi
and    $0x3,%esi
lea    0x0(,%rbx,8),%rcx
mov    %rax,%rbp
sub    %rcx,%rbp
lea    (%rdx,%rbx,8),%rbx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rcx,8),%xmm4
mulsd  0x0(%rbp),%xmm4
addsd  %xmm4,%xmm3
add    $0x1,%rcx
add    $0xfffffffffffffff8,%rbp
cmp    %rcx,%rsi
jne    1310 <levinson+0x210>
xorpd  %xmm0,%xmm3
cmpl   $0x4,-0x70(%rsp)
setb   %cl
divsd  %xmm2,%xmm3
movsd  %xmm3,-0x8(%r8,%r11,8)
movsd  %xmm3,(%rdx,%r11,8)
or     -0x79(%rsp),%cl
mov    %rax,0x10(%rsp)
je     1360 <levinson+0x260>
xor    %ebx,%ebx
jmp    142c <levinson+0x32c>
nopw   0x0(%rax,%rax,1)
cmpq   $0xc,-0x18(%rsp)
jae    1370 <levinson+0x270>
xor    %ebx,%ebx
jmp    13e4 <levinson+0x2e4>
nopl   0x0(%rax)
mov    -0x48(%rsp),%rsi
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movups (%rdx,%rbx,8),%xmm2
movups 0x10(%rdx,%rbx,8),%xmm3
movups %xmm2,(%r9,%rbx,8)
movups %xmm3,0x10(%r9,%rbx,8)
movups 0x20(%rdx,%rbx,8),%xmm2
movups 0x30(%rdx,%rbx,8),%xmm3
movups %xmm2,0x20(%r9,%rbx,8)
movups %xmm3,0x30(%r9,%rbx,8)
movups 0x40(%rdx,%rbx,8),%xmm2
movups 0x50(%rdx,%rbx,8),%xmm3
movups %xmm2,0x40(%r9,%rbx,8)
movups %xmm3,0x50(%r9,%rbx,8)
movupd 0x60(%rdx,%rbx,8),%xmm2
movupd 0x70(%rdx,%rbx,8),%xmm3
movupd %xmm2,0x60(%r9,%rbx,8)
movupd %xmm3,0x70(%r9,%rbx,8)
add    $0x10,%rbx
add    $0xfffffffffffffffc,%rsi
jne    1380 <levinson+0x280>
cmpq   $0x0,-0x20(%rsp)
je     141f <levinson+0x31f>
mov    -0x30(%rsp),%rax
lea    (%rax,%rbx,8),%rcx
mov    -0x38(%rsp),%rax
lea    (%rax,%rbx,8),%rsi
xor    %ebx,%ebx
movupd -0x10(%rsi,%rbx,1),%xmm2
movupd (%rsi,%rbx,1),%xmm3
movupd %xmm2,-0x10(%rcx,%rbx,1)
movupd %xmm3,(%rcx,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%r13
jne    1400 <levinson+0x300>
mov    -0x10(%rsp),%rcx
mov    %rcx,%rbx
cmp    %r12,%rcx
je     149b <levinson+0x39b>
mov    %rbx,%rsi
not    %rsi
add    %r12,%rsi
mov    -0x8(%rsp),%rcx
test   %rcx,%rcx
je     1455 <levinson+0x355>
nop
movsd  (%rdx,%rbx,8),%xmm2
movsd  %xmm2,(%r9,%rbx,8)
add    $0x1,%rbx
add    $0xffffffffffffffff,%rcx
jne    1440 <levinson+0x340>
cmp    $0x3,%rsi
jb     149b <levinson+0x39b>
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%rbx,8),%xmm2
movsd  %xmm2,(%r9,%rbx,8)
movsd  0x8(%rdx,%rbx,8),%xmm2
movsd  %xmm2,0x8(%r9,%rbx,8)
movsd  0x10(%rdx,%rbx,8),%xmm2
movsd  %xmm2,0x10(%r9,%rbx,8)
movsd  0x18(%rdx,%rbx,8),%xmm2
movsd  %xmm2,0x18(%r9,%rbx,8)
add    $0x4,%rbx
cmp    %rbx,%r12
jne    1460 <levinson+0x360>
cmp    $0x2,%r11
jb     1210 <levinson+0x110>
mov    $0x1,%eax
cmp    $0x4,%r15
jae    1540 <levinson+0x440>
mov    %rax,%rbx
test   $0x1,%r11b
jne    14de <levinson+0x3de>
movsd  -0x8(%r8,%r11,8),%xmm2
mov    %r11,%rcx
sub    %rax,%rcx
mulsd  (%r9,%rcx,8),%xmm2
addsd  (%rdx,%rax,8),%xmm2
movsd  %xmm2,(%rdx,%rax,8)
lea    0x1(%rax),%rbx
cmp    %rax,%r15
je     1210 <levinson+0x110>
lea    0x0(,%rbx,8),%rcx
mov    -0x68(%rsp),%rsi
sub    %rcx,%rsi
nopw   0x0(%rax,%rax,1)
movsd  -0x8(%r8,%r11,8),%xmm2
mulsd  0x8(%rsi),%xmm2
addsd  (%rdx,%rbx,8),%xmm2
movsd  %xmm2,(%rdx,%rbx,8)
movsd  -0x8(%r8,%r11,8),%xmm2
mulsd  (%rsi),%xmm2
addsd  0x8(%rdx,%rbx,8),%xmm2
movsd  %xmm2,0x8(%rdx,%rbx,8)
add    $0x2,%rbx
add    $0xfffffffffffffff0,%rsi
cmp    %rbx,%r11
jne    1500 <levinson+0x400>
jmp    1210 <levinson+0x110>
nop
lea    (%rdx,%r11,8),%rsi
lea    (%r8,%r15,8),%rcx
mov    %rcx,-0x28(%rsp)
lea    (%r8,%r11,8),%rbx
lea    (%r9,%r11,8),%rbp
mov    -0x40(%rsp),%rcx
cmp    %rbx,%rcx
setb   -0x7a(%rsp)
cmp    %rsi,-0x28(%rsp)
setb   %bl
cmp    %rbp,%rcx
setb   %cl
cmp    %rsi,-0x50(%rsp)
setb   %sil
test   %bl,-0x7a(%rsp)
jne    14b4 <levinson+0x3b4>
and    %sil,%cl
jne    14b4 <levinson+0x3b4>
mov    %r10,%rbx
neg    %rbx
lea    0x1(%r10),%rax
movsd  -0x8(%r8,%r11,8),%xmm2
unpcklpd %xmm2,%xmm2
mov    -0x60(%rsp),%rbp
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movupd -0x10(%r14,%rsi,8),%xmm3
movupd (%r14,%rsi,8),%xmm4
shufpd $0x1,%xmm4,%xmm4
shufpd $0x1,%xmm3,%xmm3
movupd -0x10(%rbp),%xmm5
movupd 0x0(%rbp),%xmm6
mulpd  %xmm2,%xmm4
addpd  %xmm5,%xmm4
mulpd  %xmm2,%xmm3
addpd  %xmm6,%xmm3
movupd %xmm4,-0x10(%rbp)
movupd %xmm3,0x0(%rbp)
add    $0xfffffffffffffffc,%rsi
add    $0x20,%rbp
cmp    %rsi,%rbx
jne    15b0 <levinson+0x4b0>
cmp    %r10,%r15
je     1210 <levinson+0x110>
jmp    14b4 <levinson+0x3b4>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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