void smoothness(double source[], int n, double result[]) {
  int i;
  double t;
  if (n < 5) {
    for (i = 0; i < n; i++)
      result[i] = source[i];
    return;
  }
  result[0] = (69.0 * source[0] + 4.0 * source[1] - 6.0 * source[2] +
               4.0 * source[3] - source[4]) /
              70.0;
  t = 2.0 * source[0] + 27.0 * source[1] + 12.0 * source[2] - 8 * source[3];
  result[1] = (t + 2.0 * source[4]) / 35.0;
  for (i = 2; i < n - 2; i++) {
    t = -3.0 * source[i - 2] + 12.0 * source[i - 1] + 17.0 * source[i];
    result[i] = (t + 12.0 * source[i + 1] - 3.0 * source[i + 2]) / 35.0;
  }
  t = 2.0 * source[n - 5] - 8.0 * source[n - 4] + 12.0 * source[n - 3];
  result[n - 2] = (t + 27.0 * source[n - 2] + 2.0 * source[n - 1]) / 35.0;
  t = -source[n - 5] + 4.0 * source[n - 4] - 6.0 * source[n - 3];
  result[n - 1] = (t + 4.0 * source[n - 2] + 69.0 * source[n - 1]) / 70.0;
  return;
}


x86 assembly (clang, -O0):
<smoothness>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1159 <smoothness+0x59>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <smoothness+0x54>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1120 <smoothness+0x20>
jmp    14e4 <smoothness+0x3e4>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0xebb(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
movsd  0xebe(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  0xe9d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  0xe7c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm0
movsd  0xe5b(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0xe33(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  0xe0d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  0xdec(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdb9(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movl   $0x2,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    133a <smoothness+0x23a>
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xd7d(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  0xda8(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xd93(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xd27(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xd3d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xce5(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    125b <smoothness+0x15b>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x5,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x4,%ecx
movslq %ecx,%rcx
movsd  0xcdf(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xc71(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xc4d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc0b(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x5,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xbda(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xbc0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xb8c(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xb7a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xb52(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<smoothness>:
cmp    $0x4,%esi
jg     114f <smoothness+0x4f>
test   %esi,%esi
jle    13eb <smoothness+0x2eb>
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rdx)
cmp    $0x1,%esi
je     13eb <smoothness+0x2eb>
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,0x8(%rdx)
cmp    $0x2,%esi
je     13eb <smoothness+0x2eb>
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x10(%rdx)
cmp    $0x3,%esi
je     13eb <smoothness+0x2eb>
movsd  0x18(%rdi),%xmm0
movsd  %xmm0,0x18(%rdx)
ret
movsd  0xea8(%rip),%xmm8
movsd  0x8(%rdi),%xmm1
mulsd  %xmm8,%xmm1
movsd  (%rdi),%xmm2
movsd  0x10(%rdi),%xmm3
mulsd  0xe95(%rip),%xmm2
addsd  %xmm1,%xmm2
mulsd  0xe91(%rip),%xmm3
addsd  %xmm2,%xmm3
movsd  0x18(%rdi),%xmm1
mulsd  %xmm8,%xmm1
addsd  %xmm3,%xmm1
subsd  0x20(%rdi),%xmm1
divsd  0xe7a(%rip),%xmm1
movsd  %xmm1,(%rdx)
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
mulsd  0xe6d(%rip),%xmm2
addsd  %xmm1,%xmm1
movsd  0x10(%rdi),%xmm3
mulsd  0xe64(%rip),%xmm3
addsd  %xmm2,%xmm1
movsd  0x18(%rdi),%xmm2
mulsd  0xe5b(%rip),%xmm2
addsd  %xmm1,%xmm3
addsd  %xmm3,%xmm2
movsd  0x20(%rdi),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
divsd  0xe46(%rip),%xmm1
movsd  %xmm1,0x8(%rdx)
lea    -0x2(%rsi),%r10d
lea    -0x2(%r10),%r8
mov    $0x2,%ecx
cmp    $0x2,%r8
jb     12b9 <smoothness+0x1b9>
lea    0x10(%rdx),%r9
lea    (%rdi,%r10,8),%rax
add    $0x10,%rax
cmp    %rax,%r9
jae    122c <smoothness+0x12c>
lea    (%rdx,%r10,8),%rax
cmp    %rdi,%rax
ja     12b9 <smoothness+0x1b9>
mov    %r8,%r9
and    $0xfffffffffffffffe,%r9
lea    0x2(%r9),%rcx
xor    %eax,%eax
movapd 0xe0f(%rip),%xmm1
movapd 0xe17(%rip),%xmm2
movapd 0xe1f(%rip),%xmm3
movapd 0xe27(%rip),%xmm4
nopl   0x0(%rax)
movupd (%rdi,%rax,8),%xmm5
movupd 0x8(%rdi,%rax,8),%xmm6
movupd 0x10(%rdi,%rax,8),%xmm7
movupd 0x18(%rdi,%rax,8),%xmm0
mulpd  %xmm1,%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm6,%xmm5
mulpd  %xmm3,%xmm7
addpd  %xmm5,%xmm7
mulpd  %xmm1,%xmm0
addpd  %xmm7,%xmm0
movupd 0x20(%rdi,%rax,8),%xmm5
mulpd  %xmm2,%xmm5
addpd  %xmm0,%xmm5
divpd  %xmm4,%xmm5
movupd %xmm5,0x10(%rdx,%rax,8)
add    $0x2,%rax
cmp    %rax,%r9
jne    1260 <smoothness+0x160>
cmp    %r9,%r8
je     1336 <smoothness+0x236>
movsd  0xd67(%rip),%xmm1
movsd  0xd77(%rip),%xmm2
movsd  0xd77(%rip),%xmm3
movsd  0xd5f(%rip),%xmm4
nopl   0x0(%rax)
movsd  -0x8(%rdi,%rcx,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x10(%rdi,%rcx,8),%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm0,%xmm5
movsd  (%rdi,%rcx,8),%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm5,%xmm0
movsd  0x8(%rdi,%rcx,8),%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm0,%xmm5
movsd  0x10(%rdi,%rcx,8),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm5,%xmm0
divsd  %xmm4,%xmm0
movsd  %xmm0,(%rdx,%rcx,8)
lea    0x1(%rcx),%rax
mov    %rax,%rcx
cmp    %rax,%r10
jne    12e0 <smoothness+0x1e0>
lea    -0x5(%rsi),%r8d
lea    -0x4(%rsi),%r9d
movsd  (%rdi,%r9,8),%xmm0
mulsd  0xce4(%rip),%xmm0
movsd  (%rdi,%r8,8),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
lea    -0x3(%rsi),%ecx
movsd  (%rdi,%rcx,8),%xmm0
mulsd  0xcbe(%rip),%xmm0
addsd  %xmm1,%xmm0
movslq %r10d,%rax
movsd  (%rdi,%rax,8),%xmm1
mulsd  0xca2(%rip),%xmm1
addsd  %xmm0,%xmm1
add    $0xffffffff,%esi
movsd  (%rdi,%rsi,8),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
divsd  0xc9e(%rip),%xmm0
movsd  %xmm0,(%rdx,%rax,8)
movsd  (%rdi,%r9,8),%xmm0
mulsd  %xmm8,%xmm0
subsd  (%rdi,%r8,8),%xmm0
movsd  (%rdi,%rcx,8),%xmm1
mulsd  0xc53(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  (%rdi,%rax,8),%xmm8
addsd  %xmm1,%xmm8
movsd  (%rdi,%rsi,8),%xmm0
mulsd  0xc2f(%rip),%xmm0
addsd  %xmm8,%xmm0
divsd  0xc32(%rip),%xmm0
movsd  %xmm0,(%rdx,%rsi,8)
ret

LLVM IR (-O0):
define void @smoothness(double* %0, i32 %1, double* %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
store double* %0, double** %4
store i32 %1, i32* %5
store double* %2, double** %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %30
11: ; preds = %3
store i32 0, i32* %7
br label %12
12: ; preds = %26, %11
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %29
16: ; preds = %12
%17 = load double*, double** %4
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* %17, i64 %19
%21 = load double, double* %20
%22 = load double*, double** %6
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
store double %21, double* %25
br label %26
26: ; preds = %16
%27 = load i32, i32* %7
%28 = add nsw i32 %27, 1
store i32 %28, i32* %7
br label %12
29: ; preds = %12
br label %213
30: ; preds = %3
%31 = load double*, double** %4
%32 = getelementptr inbounds double, double* %31, i64 0
%33 = load double, double* %32
%34 = load double*, double** %4
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = load double, double* %35
%37 = fmul double 4.000000e+00, %36
%38 = call double @llvm.fmuladd.f64(double 6.900000e+01, double %33, double %37)
%39 = load double*, double** %4
%40 = getelementptr inbounds double, double* %39, i64 2
%41 = load double, double* %40
%42 = call double @llvm.fmuladd.f64(double -6.000000e+00, double %41, double %38)
%43 = load double*, double** %4
%44 = getelementptr inbounds double, double* %43, i64 3
%45 = load double, double* %44
%46 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %45, double %42)
%47 = load double*, double** %4
%48 = getelementptr inbounds double, double* %47, i64 4
%49 = load double, double* %48
%50 = fsub double %46, %49
%51 = fdiv double %50, 7.000000e+01
%52 = load double*, double** %6
%53 = getelementptr inbounds double, double* %52, i64 0
store double %51, double* %53
%54 = load double*, double** %4
%55 = getelementptr inbounds double, double* %54, i64 0
%56 = load double, double* %55
%57 = load double*, double** %4
%58 = getelementptr inbounds double, double* %57, i64 1
%59 = load double, double* %58
%60 = fmul double 2.700000e+01, %59
%61 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %56, double %60)
%62 = load double*, double** %4
%63 = getelementptr inbounds double, double* %62, i64 2
%64 = load double, double* %63
%65 = call double @llvm.fmuladd.f64(double 1.200000e+01, double %64, double %61)
%66 = load double*, double** %4
%67 = getelementptr inbounds double, double* %66, i64 3
%68 = load double, double* %67
%69 = call double @llvm.fmuladd.f64(double -8.000000e+00, double %68, double %65)
store double %69, double* %8
%70 = load double, double* %8
%71 = load double*, double** %4
%72 = getelementptr inbounds double, double* %71, i64 4
%73 = load double, double* %72
%74 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %73, double %70)
%75 = fdiv double %74, 3.500000e+01
%76 = load double*, double** %6
%77 = getelementptr inbounds double, double* %76, i64 1
store double %75, double* %77
store i32 2, i32* %7
br label %78
78: ; preds = %124, %30
%79 = load i32, i32* %7
%80 = load i32, i32* %5
%81 = sub nsw i32 %80, 2
%82 = icmp slt i32 %79, %81
br i1 %82, label %83, label %127
83: ; preds = %78
%84 = load double*, double** %4
%85 = load i32, i32* %7
%86 = sub nsw i32 %85, 2
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %84, i64 %87
%89 = load double, double* %88
%90 = load double*, double** %4
%91 = load i32, i32* %7
%92 = sub nsw i32 %91, 1
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %90, i64 %93
%95 = load double, double* %94
%96 = fmul double 1.200000e+01, %95
%97 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %89, double %96)
%98 = load double*, double** %4
%99 = load i32, i32* %7
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %98, i64 %100
%102 = load double, double* %101
%103 = call double @llvm.fmuladd.f64(double 1.700000e+01, double %102, double %97)
store double %103, double* %8
%104 = load double, double* %8
%105 = load double*, double** %4
%106 = load i32, i32* %7
%107 = add nsw i32 %106, 1
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %105, i64 %108
%110 = load double, double* %109
%111 = call double @llvm.fmuladd.f64(double 1.200000e+01, double %110, double %104)
%112 = load double*, double** %4
%113 = load i32, i32* %7
%114 = add nsw i32 %113, 2
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %112, i64 %115
%117 = load double, double* %116
%118 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %117, double %111)
%119 = fdiv double %118, 3.500000e+01
%120 = load double*, double** %6
%121 = load i32, i32* %7
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double, double* %120, i64 %122
store double %119, double* %123
br label %124
124: ; preds = %83
%125 = load i32, i32* %7
%126 = add nsw i32 %125, 1
store i32 %126, i32* %7
br label %78
127: ; preds = %78
%128 = load double*, double** %4
%129 = load i32, i32* %5
%130 = sub nsw i32 %129, 5
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %128, i64 %131
%133 = load double, double* %132
%134 = load double*, double** %4
%135 = load i32, i32* %5
%136 = sub nsw i32 %135, 4
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %134, i64 %137
%139 = load double, double* %138
%140 = fmul double 8.000000e+00, %139
%141 = fneg double %140
%142 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %133, double %141)
%143 = load double*, double** %4
%144 = load i32, i32* %5
%145 = sub nsw i32 %144, 3
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds double, double* %143, i64 %146
%148 = load double, double* %147
%149 = call double @llvm.fmuladd.f64(double 1.200000e+01, double %148, double %142)
store double %149, double* %8
%150 = load double, double* %8
%151 = load double*, double** %4
%152 = load i32, i32* %5
%153 = sub nsw i32 %152, 2
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %151, i64 %154
%156 = load double, double* %155
%157 = call double @llvm.fmuladd.f64(double 2.700000e+01, double %156, double %150)
%158 = load double*, double** %4
%159 = load i32, i32* %5
%160 = sub nsw i32 %159, 1
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %158, i64 %161
%163 = load double, double* %162
%164 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %163, double %157)
%165 = fdiv double %164, 3.500000e+01
%166 = load double*, double** %6
%167 = load i32, i32* %5
%168 = sub nsw i32 %167, 2
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %166, i64 %169
store double %165, double* %170
%171 = load double*, double** %4
%172 = load i32, i32* %5
%173 = sub nsw i32 %172, 5
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds double, double* %171, i64 %174
%176 = load double, double* %175
%177 = fneg double %176
%178 = load double*, double** %4
%179 = load i32, i32* %5
%180 = sub nsw i32 %179, 4
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %178, i64 %181
%183 = load double, double* %182
%184 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %183, double %177)
%185 = load double*, double** %4
%186 = load i32, i32* %5
%187 = sub nsw i32 %186, 3
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double, double* %185, i64 %188
%190 = load double, double* %189
%191 = call double @llvm.fmuladd.f64(double -6.000000e+00, double %190, double %184)
store double %191, double* %8
%192 = load double, double* %8
%193 = load double*, double** %4
%194 = load i32, i32* %5
%195 = sub nsw i32 %194, 2
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds double, double* %193, i64 %196
%198 = load double, double* %197
%199 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %198, double %192)
%200 = load double*, double** %4
%201 = load i32, i32* %5
%202 = sub nsw i32 %201, 1
%203 = sext i32 %202 to i64
%204 = getelementptr inbounds double, double* %200, i64 %203
%205 = load double, double* %204
%206 = call double @llvm.fmuladd.f64(double 6.900000e+01, double %205, double %199)
%207 = fdiv double %206, 7.000000e+01
%208 = load double*, double** %6
%209 = load i32, i32* %5
%210 = sub nsw i32 %209, 1
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %208, i64 %211
store double %207, double* %212
br label %213
213: ; preds = %127, %29
ret void
}

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