void condition(double *a, const int n, const int isign) {
  double t0, t1, t2, t3;
  if (n < 4)
    return;
  if (isign >= 0) {
    t0 = 0.324894048898962 * a[0] + 0.0371580151158803 * a[1];
    t1 = 1.00144540498130 * a[1];
    t2 = 1.08984305289504 * a[n - 2];
    t3 = -0.800813234246437 * a[n - 2] + 2.09629288435324 * a[n - 1];
    a[0] = t0;
    a[1] = t1;
    a[2] = t2;
    a[3] = t3;
  } else {
    t0 = 3.07792649138669 * a[0] - 0.114204567242137 * a[1];
    t1 = 0.998556681198888 * a[1];
    t2 = 0.917563310922261 * a[n - 2];
    t3 = 0.350522032550918 * a[n - 2] + 0.477032578540915 * a[n - 1];
    a[0] = t0;
    a[1] = t1;
    a[n - 2] = t2;
    a[n - 1] = t3;
  }
  return;
}


x86 assembly (clang, -O0):
<condition>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    111d <condition+0x1d>
jmp    1310 <condition+0x210>
cmpl   $0x0,-0x10(%rbp)
jl     1207 <condition+0x107>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0xf1d(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
movsd  0xf08(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xee7(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xec0(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xe87(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movsd  0xe72(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    130b <condition+0x20b>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0xe0d(%rip),%xmm1
mulsd  0x8(%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xde1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xdc0(%rip),%xmm0
mulsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xd99(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  0xd60(%rip),%xmm1
mulsd  (%rax,%rcx,8),%xmm1
movsd  0xd4b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1310 <condition+0x210>
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition>:
cmp    $0x4,%esi
jl     11d0 <condition+0xd0>
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
test   %edx,%edx
js     116d <condition+0x6d>
movsd  0xf12(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  0xf0e(%rip),%xmm1
addsd  %xmm2,%xmm1
lea    -0x2(%rsi),%eax
movsd  (%rdi,%rax,8),%xmm2
unpcklpd %xmm2,%xmm0
mulpd  0xf0e(%rip),%xmm0
add    $0xffffffff,%esi
movsd  (%rdi,%rsi,8),%xmm3
mulsd  0xeee(%rip),%xmm3
mulsd  0xeee(%rip),%xmm2
addsd  %xmm3,%xmm2
movsd  %xmm1,(%rdi)
movupd %xmm0,0x8(%rdi)
movsd  %xmm2,0x18(%rdi)
ret
movsd  0xe8b(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  0xe87(%rip),%xmm1
mulsd  0xe87(%rip),%xmm0
addsd  %xmm2,%xmm1
lea    -0x2(%rsi),%eax
movsd  (%rdi,%rax,8),%xmm2
movsd  0xe7b(%rip),%xmm3
add    $0xffffffff,%esi
movsd  (%rdi,%rsi,8),%xmm4
mulsd  0xe73(%rip),%xmm4
mulsd  %xmm2,%xmm3
mulsd  0xe6f(%rip),%xmm2
addsd  %xmm4,%xmm2
movsd  %xmm1,(%rdi)
movsd  %xmm0,0x8(%rdi)
movsd  %xmm3,(%rdi,%rax,8)
movsd  %xmm2,(%rdi,%rsi,8)
ret

LLVM IR (-O0):
define void @condition(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 4
br i1 %12, label %13, label %14
13: ; preds = %3
br label %117
14: ; preds = %3
%15 = load i32, i32* %6
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %63
17: ; preds = %14
%18 = load double*, double** %4
%19 = getelementptr inbounds double, double* %18, i64 0
%20 = load double, double* %19
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
%24 = fmul double 0x3FA306601769F939, %23
%25 = call double @llvm.fmuladd.f64(double 0x3FD4CB1068ABE884, double %20, double %24)
store double %25, double* %7
%26 = load double*, double** %4
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double, double* %27
%29 = fmul double 0x3FF005EB9DF1FC8E, %28
store double %29, double* %8
%30 = load double*, double** %4
%31 = load i32, i32* %5
%32 = sub nsw i32 %31, 2
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %30, i64 %33
%35 = load double, double* %34
%36 = fmul double 0x3FF16FFF44DF4FDA, %35
store double %36, double* %9
%37 = load double*, double** %4
%38 = load i32, i32* %5
%39 = sub nsw i32 %38, 2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %37, i64 %40
%42 = load double, double* %41
%43 = load double*, double** %4
%44 = load i32, i32* %5
%45 = sub nsw i32 %44, 1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %43, i64 %46
%48 = load double, double* %47
%49 = fmul double 0x4000C535342913D1, %48
%50 = call double @llvm.fmuladd.f64(double 0xBFE9A04313695B9F, double %42, double %49)
store double %50, double* %10
%51 = load double, double* %7
%52 = load double*, double** %4
%53 = getelementptr inbounds double, double* %52, i64 0
store double %51, double* %53
%54 = load double, double* %8
%55 = load double*, double** %4
%56 = getelementptr inbounds double, double* %55, i64 1
store double %54, double* %56
%57 = load double, double* %9
%58 = load double*, double** %4
%59 = getelementptr inbounds double, double* %58, i64 2
store double %57, double* %59
%60 = load double, double* %10
%61 = load double*, double** %4
%62 = getelementptr inbounds double, double* %61, i64 3
store double %60, double* %62
br label %116
63: ; preds = %14
%64 = load double*, double** %4
%65 = getelementptr inbounds double, double* %64, i64 0
%66 = load double, double* %65
%67 = load double*, double** %4
%68 = getelementptr inbounds double, double* %67, i64 1
%69 = load double, double* %68
%70 = fmul double 0x3FBD3C82B15BDB0F, %69
%71 = fneg double %70
%72 = call double @llvm.fmuladd.f64(double 0x40089F97EC9FFB9E, double %66, double %71)
store double %72, double* %7
%73 = load double*, double** %4
%74 = getelementptr inbounds double, double* %73, i64 1
%75 = load double, double* %74
%76 = fmul double 0x3FEFF42D241E72DE, %75
store double %76, double* %8
%77 = load double*, double** %4
%78 = load i32, i32* %5
%79 = sub nsw i32 %78, 2
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %77, i64 %80
%82 = load double, double* %81
%83 = fmul double 0x3FED5CADBB8D757A, %82
store double %83, double* %9
%84 = load double*, double** %4
%85 = load i32, i32* %5
%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* %5
%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 0x3FDE87B3A6FD6D0F, %95
%97 = call double @llvm.fmuladd.f64(double 0x3FD66EF3F6955A5D, double %89, double %96)
store double %97, double* %10
%98 = load double, double* %7
%99 = load double*, double** %4
%100 = getelementptr inbounds double, double* %99, i64 0
store double %98, double* %100
%101 = load double, double* %8
%102 = load double*, double** %4
%103 = getelementptr inbounds double, double* %102, i64 1
store double %101, double* %103
%104 = load double, double* %9
%105 = load double*, double** %4
%106 = load i32, i32* %5
%107 = sub nsw i32 %106, 2
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %105, i64 %108
store double %104, double* %109
%110 = load double, double* %10
%111 = load double*, double** %4
%112 = load i32, i32* %5
%113 = sub nsw i32 %112, 1
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %111, i64 %114
store double %110, double* %115
br label %116
116: ; preds = %63, %17
br label %117
117: ; preds = %116, %13
ret void
}

LLVM IR (-O2):
define void @condition(double* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, 4
br i1 %4, label %43, label %5
5: ; preds = %3
%6 = icmp sgt i32 %2, -1
%7 = load double, double* %0
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
br i1 %6, label %10, label %28
10: ; preds = %5
%11 = fmul double %9, 0x3FA306601769F939
%12 = tail call double @llvm.fmuladd.f64(double %7, double 0x3FD4CB1068ABE884, double %11)
%13 = add nsw i32 %1, -2
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds double, double* %0, i64 %14
%16 = load double, double* %15
%17 = insertelement <2 x double> poison, double %9, i64 0
%18 = insertelement <2 x double> %17, double %16, i64 1
%19 = fmul <2 x double> %18, <double 0x3FF005EB9DF1FC8E, double 0x3FF16FFF44DF4FDA>
%20 = add nsw i32 %1, -1
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds double, double* %0, i64 %21
%23 = load double, double* %22
%24 = fmul double %23, 0x4000C535342913D1
%25 = tail call double @llvm.fmuladd.f64(double %16, double 0xBFE9A04313695B9F, double %24)
store double %12, double* %0
%26 = bitcast double* %8 to <2 x double>*
store <2 x double> %19, <2 x double>* %26
%27 = getelementptr inbounds double, double* %0, i64 3
store double %25, double* %27
br label %43
28: ; preds = %5
%29 = fmul double %9, 0xBFBD3C82B15BDB0F
%30 = tail call double @llvm.fmuladd.f64(double %7, double 0x40089F97EC9FFB9E, double %29)
%31 = fmul double %9, 0x3FEFF42D241E72DE
%32 = add nsw i32 %1, -2
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds double, double* %0, i64 %33
%35 = load double, double* %34
%36 = fmul double %35, 0x3FED5CADBB8D757A
%37 = add nsw i32 %1, -1
%38 = zext i32 %37 to i64
%39 = getelementptr inbounds double, double* %0, i64 %38
%40 = load double, double* %39
%41 = fmul double %40, 0x3FDE87B3A6FD6D0F
%42 = tail call double @llvm.fmuladd.f64(double %35, double 0x3FD66EF3F6955A5D, double %41)
store double %30, double* %0
store double %31, double* %8
store double %36, double* %34
store double %42, double* %39
br label %43
43: ; preds = %10, %28, %3
ret void
}