void fnFilterWC(int *n, double *u, double *alpha, double *beta, double *w) {
  int i;
  w[0] = (u[0] * u[0]) - alpha[0];
  for (i = 1; i < *n; i++)
    w[i] = (u[i] * u[i]) - alpha[0] -
           (alpha[1] + *beta) * (u[i - 1] * u[i - 1]) + *beta * w[i - 1];
}


x86 assembly (clang, -O0):
<fnFilterWC>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    123f <fnFilterWC+0x13f>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    115e <fnFilterWC+0x5e>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnFilterWC>:
movsd  (%rsi),%xmm0
mulsd  %xmm0,%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%r8)
mov    (%rdi),%eax
cmp    $0x2,%eax
jl     1163 <fnFilterWC+0x63>
mov    $0x1,%edi
nopl   (%rax)
movsd  (%rsi,%rdi,8),%xmm1
mulsd  %xmm1,%xmm1
subsd  (%rdx),%xmm1
movsd  -0x8(%rsi,%rdi,8),%xmm2
movsd  (%rcx),%xmm3
movsd  0x8(%rdx),%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm2
mulsd  %xmm4,%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r8,%rdi,8)
add    $0x1,%rdi
cmp    %rdi,%rax
jne    1120 <fnFilterWC+0x20>
ret

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

LLVM IR (-O2):
define void @fnFilterWC(i32* nocapture %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4) {
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fneg double %7
%9 = tail call double @llvm.fmuladd.f64(double %6, double %6, double %8)
store double %9, double* %4
%10 = load i32, i32* %0
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %36
12: ; preds = %5
%13 = getelementptr inbounds double, double* %2, i64 1
%14 = zext i32 %10 to i64
br label %15
15: ; preds = %12, %15
%16 = phi double [ %9, %12 ], [ %32, %15 ]
%17 = phi i64 [ 1, %12 ], [ %34, %15 ]
%18 = getelementptr inbounds double, double* %1, i64 %17
%19 = load double, double* %18
%20 = load double, double* %2
%21 = fneg double %20
%22 = tail call double @llvm.fmuladd.f64(double %19, double %19, double %21)
%23 = load double, double* %13
%24 = load double, double* %3
%25 = fadd double %23, %24
%26 = add nsw i64 %17, -1
%27 = getelementptr inbounds double, double* %1, i64 %26
%28 = load double, double* %27
%29 = fmul double %28, %28
%30 = fneg double %25
%31 = tail call double @llvm.fmuladd.f64(double %30, double %29, double %22)
%32 = tail call double @llvm.fmuladd.f64(double %24, double %16, double %31)
%33 = getelementptr inbounds double, double* %4, i64 %17
store double %32, double* %33
%34 = add nuw nsw i64 %17, 1
%35 = icmp eq i64 %34, %14
br i1 %35, label %36, label %15
36: ; preds = %15, %5
ret void
}