void get_face_2d_quickest_a_lliffe(int iX, int iY, int nX, int nY, int X_nbr,
                                   int Y_nbr, int nrm, int tid, double delta_t,
                                   double u_face, double dummy, double *sc_face,
                                   double **sc_old) {
  double wind = 1.;
  double crnt;
  double tmp;
  double sc_face_tmp;
  crnt = u_face * delta_t * 1.;
  if (crnt < 0.)
    wind = -1.;
  tmp = (1. - crnt * crnt) * 0.08333333333333333;
  sc_face_tmp = sc_old[iY][iX] *
                (0.5 + 0.5 * crnt * nrm + tmp * (1. + 3. * wind * (nrm)));
  sc_face_tmp += sc_old[iY + Y_nbr][iX + X_nbr] *
                 (0.5 - 0.5 * crnt * (nrm) + tmp * (1. - 3. * wind * (nrm)));
  sc_face_tmp +=
      sc_old[iY - Y_nbr][iX - X_nbr] * (tmp * (-1. - (double)(wind * (nrm))));
  sc_face_tmp += sc_old[iY + 2 * Y_nbr][iX + 2 * X_nbr] *
                 (tmp * (-1. + (double)(wind * (nrm))));
  *sc_face = sc_face_tmp;
}


x86 assembly (clang, -O0):
<get_face_2d_quickest_a_lliffe>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xeac(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    1178 <get_face_2d_quickest_a_lliffe+0x78>
movsd  0xe95(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe5b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe6f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xe41(%rip),%xmm2
mulsd  -0x40(%rbp),%xmm2
cvtsi2sdl 0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe2b(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x48(%rbp),%xmm1
movsd  0xe12(%rip),%xmm3
mulsd  -0x38(%rbp),%xmm3
cvtsi2sdl 0x10(%rbp),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xdec(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rbp),%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  0xdc8(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
cvtsi2sdl 0x10(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xd9b(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  0xd82(%rip),%xmm3
mulsd  -0x38(%rbp),%xmm3
cvtsi2sdl 0x10(%rbp),%xmm4
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm3
movsd  0xd45(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    -0x18(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rbp),%ecx
sub    -0x14(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
cvtsi2sdl 0x10(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
movsd  0xcde(%rip),%xmm3
addsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    0x28(%rbp),%rax
mov    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x4(%rbp),%ecx
mov    -0x14(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
cvtsi2sdl 0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movsd  0xc80(%rip),%xmm3
addsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_face_2d_quickest_a_lliffe>:
mov    0x20(%rsp),%rax
mulsd  %xmm1,%xmm0
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
cmpltsd %xmm2,%xmm1
movsd  0xee1(%rip),%xmm8
movapd %xmm1,%xmm4
andpd  %xmm8,%xmm4
movsd  0xed8(%rip),%xmm3
andnpd %xmm3,%xmm1
orpd   %xmm4,%xmm1
movapd %xmm0,%xmm5
mulsd  %xmm0,%xmm5
movapd %xmm3,%xmm4
subsd  %xmm5,%xmm4
mulsd  0xec0(%rip),%xmm4
movslq %esi,%rdx
mov    (%rax,%rdx,8),%rsi
movslq %edi,%rcx
movsd  0xeb6(%rip),%xmm6
mulsd  %xmm6,%xmm0
cvtsi2sdl 0x8(%rsp),%xmm9
mulsd  %xmm9,%xmm0
movapd %xmm0,%xmm7
addsd  %xmm6,%xmm7
movsd  0xe9e(%rip),%xmm5
mulsd  %xmm1,%xmm5
mulsd  %xmm9,%xmm5
movapd %xmm5,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm7,%xmm2
mulsd  (%rsi,%rcx,8),%xmm2
lea    (%r9,%rdx,1),%esi
movslq %esi,%rsi
mov    (%rax,%rsi,8),%rsi
lea    (%r8,%rcx,1),%edi
movslq %edi,%rdi
subsd  %xmm0,%xmm6
subsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm6,%xmm3
mulsd  (%rsi,%rdi,8),%xmm3
mov    0x18(%rsp),%r10
addsd  %xmm2,%xmm3
lea    (%rdx,%r9,2),%edi
sub    %r9d,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,8),%rdx
lea    (%rcx,%r8,2),%esi
sub    %r8d,%ecx
movslq %ecx,%rcx
mulsd  %xmm9,%xmm1
movapd %xmm8,%xmm0
subsd  %xmm1,%xmm0
mulsd  %xmm4,%xmm0
mulsd  (%rdx,%rcx,8),%xmm0
addsd  %xmm3,%xmm0
movslq %edi,%rcx
mov    (%rax,%rcx,8),%rax
movslq %esi,%rcx
addsd  %xmm8,%xmm1
mulsd  %xmm4,%xmm1
mulsd  (%rax,%rcx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r10)
ret

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

LLVM IR (-O2):
define void @get_face_2d_quickest_a_lliffe(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, double %8, double %9, double %10, double* nocapture writeonly %11, double** nocapture %12) {
%14 = fmul double %8, %9
%15 = fcmp olt double %14, 0.000000e+00
%16 = select i1 %15, double -1.000000e+00, double 1.000000e+00
%17 = fneg double %14
%18 = tail call double @llvm.fmuladd.f64(double %17, double %14, double 1.000000e+00)
%19 = fmul double %18, 0x3FB5555555555555
%20 = sext i32 %1 to i64
%21 = getelementptr inbounds double*, double** %12, i64 %20
%22 = load double*, double** %21
%23 = sext i32 %0 to i64
%24 = getelementptr inbounds double, double* %22, i64 %23
%25 = load double, double* %24
%26 = fmul double %14, 5.000000e-01
%27 = sitofp i32 %6 to double
%28 = tail call double @llvm.fmuladd.f64(double %26, double %27, double 5.000000e-01)
%29 = fmul double %16, 3.000000e+00
%30 = tail call double @llvm.fmuladd.f64(double %29, double %27, double 1.000000e+00)
%31 = tail call double @llvm.fmuladd.f64(double %19, double %30, double %28)
%32 = fmul double %31, %25
%33 = add nsw i32 %5, %1
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double*, double** %12, i64 %34
%36 = load double*, double** %35
%37 = add nsw i32 %4, %0
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double, double* %36, i64 %38
%40 = load double, double* %39
%41 = fneg double %26
%42 = tail call double @llvm.fmuladd.f64(double %41, double %27, double 5.000000e-01)
%43 = fneg double %29
%44 = tail call double @llvm.fmuladd.f64(double %43, double %27, double 1.000000e+00)
%45 = tail call double @llvm.fmuladd.f64(double %19, double %44, double %42)
%46 = tail call double @llvm.fmuladd.f64(double %40, double %45, double %32)
%47 = sub nsw i32 %1, %5
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds double*, double** %12, i64 %48
%50 = load double*, double** %49
%51 = sub nsw i32 %0, %4
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
%54 = load double, double* %53
%55 = fneg double %16
%56 = tail call double @llvm.fmuladd.f64(double %55, double %27, double -1.000000e+00)
%57 = fmul double %19, %56
%58 = tail call double @llvm.fmuladd.f64(double %54, double %57, double %46)
%59 = shl nsw i32 %5, 1
%60 = add nsw i32 %59, %1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double*, double** %12, i64 %61
%63 = load double*, double** %62
%64 = shl nsw i32 %4, 1
%65 = add nsw i32 %64, %0
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %63, i64 %66
%68 = load double, double* %67
%69 = tail call double @llvm.fmuladd.f64(double %16, double %27, double -1.000000e+00)
%70 = fmul double %19, %69
%71 = tail call double @llvm.fmuladd.f64(double %68, double %70, double %58)
store double %71, double* %11
ret void
}