#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ get_face_2d_quickest_a_lliffe(int, int, int, int, int, int,
                                                 int, int, double, double,
                                                 double, double *, double **);
int /*<<< orphan*/ get_face_grad_2d_lliffe(int, int, int, int, int, int, int,
                                           double *, double **);
int /*<<< orphan*/ get_uface_2d(int, int, int, int, int, int, int, int,
                                double *, double *);
void update_cell_2D_quickest_a_lliffe(double **sc_old, double **sc_new,
                                      double *u_buff, int iX, int iY, int nX,
                                      int nY, double delta_t, double alpha) {
  int tid;
  double sum_face_a = 0.;
  double sum_face_d = 0.;
  double u_face;
  double u_face_t = 0.;
  double sc_face;
  double sc_face_grad;
  tid = iY * nX + iX;
  get_uface_2d(iX, iY, nX, nY, 1, 0, 0, tid, &u_face, u_buff);
  get_face_2d_quickest_a_lliffe(iX, iY, nX, nY, 1, 0, 1, tid, delta_t, u_face,
                                u_face_t, &sc_face, sc_old);
  get_face_grad_2d_lliffe(iX, iY, nX, nY, 1, 0, tid, &sc_face_grad, sc_old);
  sum_face_a += sc_face * u_face;
  sum_face_d += sc_face_grad;
  get_uface_2d(iX, iY, nX, nY, -1, 0, 0, tid, &u_face, u_buff);
  get_face_2d_quickest_a_lliffe(iX, iY, nX, nY, -1, 0, -1, tid, delta_t, u_face,
                                u_face_t, &sc_face, sc_old);
  get_face_grad_2d_lliffe(iX, iY, nX, nY, -1, 0, tid, &sc_face_grad, sc_old);
  sum_face_a -= sc_face * u_face;
  sum_face_d += sc_face_grad;
  get_uface_2d(iX, iY, nX, nY, 0, 1, 1, tid, &u_face, u_buff);
  get_face_2d_quickest_a_lliffe(iX, iY, nX, nY, 0, 1, 1, tid, delta_t, u_face,
                                u_face_t, &sc_face, sc_old);
  get_face_grad_2d_lliffe(iX, iY, nX, nY, 0, 1, tid, &sc_face_grad, sc_old);
  sum_face_a += sc_face * u_face;
  sum_face_d += sc_face_grad;
  get_uface_2d(iX, iY, nX, nY, 0, -1, 1, tid, &u_face, u_buff);
  get_face_2d_quickest_a_lliffe(iX, iY, nX, nY, 0, -1, -1, tid, delta_t, u_face,
                                u_face_t, &sc_face, sc_old);
  get_face_grad_2d_lliffe(iX, iY, nX, nY, 0, -1, tid, &sc_face_grad, sc_old);
  sum_face_a -= sc_face * u_face;
  sum_face_d += sc_face_grad;
  sc_new[iY][iX] =
      sc_old[iY][iX] + 1. * delta_t * (1. * alpha * sum_face_d - sum_face_a);
}


x86 assembly (clang, -O0):
<update_cell_2D_quickest_a_lliffe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x20(%rbp),%eax
imul   -0x24(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x18(%rbp),%rax
mov    $0x1,%r8d
xor    %r9d,%r9d
lea    -0x58(%rbp),%r10
movl   $0x0,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <get_uface_2d@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
movsd  -0x30(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mov    -0x8(%rbp),%rax
mov    $0x1,%r8d
xor    %r9d,%r9d
lea    -0x68(%rbp),%r10
movl   $0x1,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1050 <get_face_2d_quickest_a_lliffe@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x8(%rbp),%rax
mov    $0x1,%r8d
xor    %r9d,%r9d
lea    -0x70(%rbp),%r10
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <get_face_grad_2d_lliffe@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x18(%rbp),%rax
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
lea    -0x58(%rbp),%r10
movl   $0x0,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <get_uface_2d@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
movsd  -0x30(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mov    -0x8(%rbp),%rax
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
lea    -0x68(%rbp),%r10
movl   $0xffffffff,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1050 <get_face_2d_quickest_a_lliffe@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x8(%rbp),%rax
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
lea    -0x70(%rbp),%r10
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <get_face_grad_2d_lliffe@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x18(%rbp),%rax
xor    %r8d,%r8d
mov    $0x1,%r9d
lea    -0x58(%rbp),%r10
movl   $0x1,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <get_uface_2d@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
movsd  -0x30(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mov    -0x8(%rbp),%rax
xor    %r8d,%r8d
mov    $0x1,%r9d
lea    -0x68(%rbp),%r10
movl   $0x1,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1050 <get_face_2d_quickest_a_lliffe@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x8(%rbp),%rax
xor    %r8d,%r8d
mov    $0x1,%r9d
lea    -0x70(%rbp),%r10
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <get_face_grad_2d_lliffe@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x18(%rbp),%rax
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
lea    -0x58(%rbp),%r10
movl   $0x1,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <get_uface_2d@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
movsd  -0x30(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mov    -0x8(%rbp),%rax
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
lea    -0x68(%rbp),%r10
movl   $0xffffffff,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1050 <get_face_2d_quickest_a_lliffe@plt>
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%r11d
mov    -0x8(%rbp),%rax
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
lea    -0x70(%rbp),%r10
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <get_face_grad_2d_lliffe@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  0xa99(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xa8c(%rip),%xmm2
mulsd  -0x38(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_cell_2D_quickest_a_lliffe>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm1,0x38(%rsp)
movsd  %xmm0,0x28(%rsp)
mov    %r9d,%ebp
mov    %r8d,%ebx
mov    %ecx,%r12d
mov    %rdx,%rax
mov    %rdx,0x30(%rsp)
mov    %rsi,0x40(%rsp)
mov    %rdi,%r15
mov    0x80(%rsp),%r13d
mov    %r9d,%r14d
imul   %r8d,%r14d
add    %ecx,%r14d
mov    %rsp,%r10
mov    %ecx,%edi
mov    %r8d,%esi
mov    %r9d,%edx
mov    %r13d,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
push   %rax
push   %r10
push   %r14
push   $0x0
call   1030 <get_uface_2d@plt>
add    $0x20,%rsp
movsd  (%rsp),%xmm1
lea    0x10(%rsp),%rax
xorps  %xmm2,%xmm2
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
movsd  0x28(%rsp),%xmm0
push   %r15
push   %rax
push   %r14
push   $0x1
call   1050 <get_face_2d_quickest_a_lliffe@plt>
add    $0x18,%rsp
lea    0x10(%rsp),%rax
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
push   %r15
push   %rax
push   %r14
call   1040 <get_face_grad_2d_lliffe@plt>
add    $0x20,%rsp
movsd  0x10(%rsp),%xmm0
mulsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
push   0x30(%rsp)
lea    0x8(%rsp),%rax
push   %rax
push   %r14
push   $0x0
call   1030 <get_uface_2d@plt>
add    $0x20,%rsp
movsd  (%rsp),%xmm1
xorps  %xmm2,%xmm2
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
movsd  0x28(%rsp),%xmm0
push   %r15
lea    0x18(%rsp),%rax
push   %rax
push   %r14
push   $0xffffffffffffffff
call   1050 <get_face_2d_quickest_a_lliffe@plt>
add    $0x18,%rsp
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
push   %r15
lea    0x18(%rsp),%rax
push   %rax
push   %r14
call   1040 <get_face_grad_2d_lliffe@plt>
add    $0x20,%rsp
movsd  0x10(%rsp),%xmm0
mulsd  (%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
push   0x30(%rsp)
lea    0x8(%rsp),%rax
push   %rax
push   %r14
push   $0x1
call   1030 <get_uface_2d@plt>
add    $0x20,%rsp
movsd  (%rsp),%xmm1
xorps  %xmm2,%xmm2
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
movsd  0x28(%rsp),%xmm0
push   %r15
lea    0x18(%rsp),%rax
push   %rax
push   %r14
push   $0x1
call   1050 <get_face_2d_quickest_a_lliffe@plt>
add    $0x18,%rsp
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
push   %r15
lea    0x18(%rsp),%rax
push   %rax
push   %r14
call   1040 <get_face_grad_2d_lliffe@plt>
add    $0x20,%rsp
movsd  0x10(%rsp),%xmm0
mulsd  (%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
push   0x30(%rsp)
lea    0x8(%rsp),%rax
push   %rax
push   %r14
push   $0x1
call   1030 <get_uface_2d@plt>
add    $0x20,%rsp
movsd  (%rsp),%xmm1
xorps  %xmm2,%xmm2
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
movsd  0x28(%rsp),%xmm0
push   %r15
lea    0x18(%rsp),%rax
push   %rax
push   %r14
push   $0xffffffffffffffff
call   1050 <get_face_2d_quickest_a_lliffe@plt>
add    $0x18,%rsp
mov    %r12d,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
push   %r15
lea    0x18(%rsp),%rax
push   %rax
push   %r14
call   1040 <get_face_grad_2d_lliffe@plt>
add    $0x20,%rsp
movsd  0x10(%rsp),%xmm0
mulsd  (%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movslq %ebx,%rax
mov    (%r15,%rax,8),%rcx
movslq %r12d,%rdx
mulsd  0x38(%rsp),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x28(%rsp),%xmm0
addsd  (%rcx,%rdx,8),%xmm0
mov    0x40(%rsp),%rcx
mov    (%rcx,%rax,8),%rax
movsd  %xmm0,(%rax,%rdx,8)
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @update_cell_2D_quickest_a_lliffe(double** %0, double** %1, double* %2, i32 %3, i32 %4, i32 %5, i32 %6, double %7, double %8) {
%10 = alloca double**
%11 = alloca double**
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca double
%19 = alloca i32
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store double** %0, double*** %10
store double** %1, double*** %11
store double* %2, double** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store double %7, double* %17
store double %8, double* %18
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %21
store double 0.000000e+00, double* %23
%26 = load i32, i32* %14
%27 = load i32, i32* %15
%28 = mul nsw i32 %26, %27
%29 = load i32, i32* %13
%30 = add nsw i32 %28, %29
store i32 %30, i32* %19
%31 = load i32, i32* %13
%32 = load i32, i32* %14
%33 = load i32, i32* %15
%34 = load i32, i32* %16
%35 = load i32, i32* %19
%36 = load double*, double** %12
%37 = call i32 @get_uface_2d(i32 %31, i32 %32, i32 %33, i32 %34, i32 1, i32 0, i32 0, i32 %35, double* %22, double* %36)
%38 = load i32, i32* %13
%39 = load i32, i32* %14
%40 = load i32, i32* %15
%41 = load i32, i32* %16
%42 = load i32, i32* %19
%43 = load double, double* %17
%44 = load double, double* %22
%45 = load double, double* %23
%46 = load double**, double*** %10
%47 = call i32 @get_face_2d_quickest_a_lliffe(i32 %38, i32 %39, i32 %40, i32 %41, i32 1, i32 0, i32 1, i32 %42, double %43, double %44, double %45, double* %24, double** %46)
%48 = load i32, i32* %13
%49 = load i32, i32* %14
%50 = load i32, i32* %15
%51 = load i32, i32* %16
%52 = load i32, i32* %19
%53 = load double**, double*** %10
%54 = call i32 @get_face_grad_2d_lliffe(i32 %48, i32 %49, i32 %50, i32 %51, i32 1, i32 0, i32 %52, double* %25, double** %53)
%55 = load double, double* %24
%56 = load double, double* %22
%57 = load double, double* %20
%58 = call double @llvm.fmuladd.f64(double %55, double %56, double %57)
store double %58, double* %20
%59 = load double, double* %25
%60 = load double, double* %21
%61 = fadd double %60, %59
store double %61, double* %21
%62 = load i32, i32* %13
%63 = load i32, i32* %14
%64 = load i32, i32* %15
%65 = load i32, i32* %16
%66 = load i32, i32* %19
%67 = load double*, double** %12
%68 = call i32 @get_uface_2d(i32 %62, i32 %63, i32 %64, i32 %65, i32 -1, i32 0, i32 0, i32 %66, double* %22, double* %67)
%69 = load i32, i32* %13
%70 = load i32, i32* %14
%71 = load i32, i32* %15
%72 = load i32, i32* %16
%73 = load i32, i32* %19
%74 = load double, double* %17
%75 = load double, double* %22
%76 = load double, double* %23
%77 = load double**, double*** %10
%78 = call i32 @get_face_2d_quickest_a_lliffe(i32 %69, i32 %70, i32 %71, i32 %72, i32 -1, i32 0, i32 -1, i32 %73, double %74, double %75, double %76, double* %24, double** %77)
%79 = load i32, i32* %13
%80 = load i32, i32* %14
%81 = load i32, i32* %15
%82 = load i32, i32* %16
%83 = load i32, i32* %19
%84 = load double**, double*** %10
%85 = call i32 @get_face_grad_2d_lliffe(i32 %79, i32 %80, i32 %81, i32 %82, i32 -1, i32 0, i32 %83, double* %25, double** %84)
%86 = load double, double* %24
%87 = load double, double* %22
%88 = load double, double* %20
%89 = fneg double %86
%90 = call double @llvm.fmuladd.f64(double %89, double %87, double %88)
store double %90, double* %20
%91 = load double, double* %25
%92 = load double, double* %21
%93 = fadd double %92, %91
store double %93, double* %21
%94 = load i32, i32* %13
%95 = load i32, i32* %14
%96 = load i32, i32* %15
%97 = load i32, i32* %16
%98 = load i32, i32* %19
%99 = load double*, double** %12
%100 = call i32 @get_uface_2d(i32 %94, i32 %95, i32 %96, i32 %97, i32 0, i32 1, i32 1, i32 %98, double* %22, double* %99)
%101 = load i32, i32* %13
%102 = load i32, i32* %14
%103 = load i32, i32* %15
%104 = load i32, i32* %16
%105 = load i32, i32* %19
%106 = load double, double* %17
%107 = load double, double* %22
%108 = load double, double* %23
%109 = load double**, double*** %10
%110 = call i32 @get_face_2d_quickest_a_lliffe(i32 %101, i32 %102, i32 %103, i32 %104, i32 0, i32 1, i32 1, i32 %105, double %106, double %107, double %108, double* %24, double** %109)
%111 = load i32, i32* %13
%112 = load i32, i32* %14
%113 = load i32, i32* %15
%114 = load i32, i32* %16
%115 = load i32, i32* %19
%116 = load double**, double*** %10
%117 = call i32 @get_face_grad_2d_lliffe(i32 %111, i32 %112, i32 %113, i32 %114, i32 0, i32 1, i32 %115, double* %25, double** %116)
%118 = load double, double* %24
%119 = load double, double* %22
%120 = load double, double* %20
%121 = call double @llvm.fmuladd.f64(double %118, double %119, double %120)
store double %121, double* %20
%122 = load double, double* %25
%123 = load double, double* %21
%124 = fadd double %123, %122
store double %124, double* %21
%125 = load i32, i32* %13
%126 = load i32, i32* %14
%127 = load i32, i32* %15
%128 = load i32, i32* %16
%129 = load i32, i32* %19
%130 = load double*, double** %12
%131 = call i32 @get_uface_2d(i32 %125, i32 %126, i32 %127, i32 %128, i32 0, i32 -1, i32 1, i32 %129, double* %22, double* %130)
%132 = load i32, i32* %13
%133 = load i32, i32* %14
%134 = load i32, i32* %15
%135 = load i32, i32* %16
%136 = load i32, i32* %19
%137 = load double, double* %17
%138 = load double, double* %22
%139 = load double, double* %23
%140 = load double**, double*** %10
%141 = call i32 @get_face_2d_quickest_a_lliffe(i32 %132, i32 %133, i32 %134, i32 %135, i32 0, i32 -1, i32 -1, i32 %136, double %137, double %138, double %139, double* %24, double** %140)
%142 = load i32, i32* %13
%143 = load i32, i32* %14
%144 = load i32, i32* %15
%145 = load i32, i32* %16
%146 = load i32, i32* %19
%147 = load double**, double*** %10
%148 = call i32 @get_face_grad_2d_lliffe(i32 %142, i32 %143, i32 %144, i32 %145, i32 0, i32 -1, i32 %146, double* %25, double** %147)
%149 = load double, double* %24
%150 = load double, double* %22
%151 = load double, double* %20
%152 = fneg double %149
%153 = call double @llvm.fmuladd.f64(double %152, double %150, double %151)
store double %153, double* %20
%154 = load double, double* %25
%155 = load double, double* %21
%156 = fadd double %155, %154
store double %156, double* %21
%157 = load double**, double*** %10
%158 = load i32, i32* %14
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double*, double** %157, i64 %159
%161 = load double*, double** %160
%162 = load i32, i32* %13
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %161, i64 %163
%165 = load double, double* %164
%166 = load double, double* %17
%167 = fmul double 1.000000e+00, %166
%168 = load double, double* %18
%169 = fmul double 1.000000e+00, %168
%170 = load double, double* %21
%171 = load double, double* %20
%172 = fneg double %171
%173 = call double @llvm.fmuladd.f64(double %169, double %170, double %172)
%174 = call double @llvm.fmuladd.f64(double %167, double %173, double %165)
%175 = load double**, double*** %11
%176 = load i32, i32* %14
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double*, double** %175, i64 %177
%179 = load double*, double** %178
%180 = load i32, i32* %13
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %179, i64 %181
store double %174, double* %182
ret void
}

LLVM IR (-O2):
define void @update_cell_2D_quickest_a_lliffe(double** %0, double** nocapture %1, double* %2, i32 %3, i32 %4, i32 %5, i32 %6, double %7, double %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = bitcast double* %10 to i8*
%14 = bitcast double* %11 to i8*
%15 = bitcast double* %12 to i8*
%16 = mul nsw i32 %5, %4
%17 = add nsw i32 %16, %3
%18 = call i32 @get_uface_2d(i32 %3, i32 %4, i32 %5, i32 %6, i32 1, i32 0, i32 0, i32 %17, double* %10, double* %2)
%19 = load double, double* %10
%20 = call i32 @get_face_2d_quickest_a_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 1, i32 0, i32 1, i32 %17, double %7, double %19, double 0.000000e+00, double* %11, double** %0)
%21 = call i32 @get_face_grad_2d_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 1, i32 0, i32 %17, double* %12, double** %0)
%22 = load double, double* %11
%23 = load double, double* %10
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double 0.000000e+00)
%25 = load double, double* %12
%26 = fadd double %25, 0.000000e+00
%27 = call i32 @get_uface_2d(i32 %3, i32 %4, i32 %5, i32 %6, i32 -1, i32 0, i32 0, i32 %17, double* %10, double* %2)
%28 = load double, double* %10
%29 = call i32 @get_face_2d_quickest_a_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 -1, i32 0, i32 -1, i32 %17, double %7, double %28, double 0.000000e+00, double* %11, double** %0)
%30 = call i32 @get_face_grad_2d_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 -1, i32 0, i32 %17, double* %12, double** %0)
%31 = load double, double* %11
%32 = load double, double* %10
%33 = fneg double %31
%34 = call double @llvm.fmuladd.f64(double %33, double %32, double %24)
%35 = load double, double* %12
%36 = fadd double %26, %35
%37 = call i32 @get_uface_2d(i32 %3, i32 %4, i32 %5, i32 %6, i32 0, i32 1, i32 1, i32 %17, double* %10, double* %2)
%38 = load double, double* %10
%39 = call i32 @get_face_2d_quickest_a_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 0, i32 1, i32 1, i32 %17, double %7, double %38, double 0.000000e+00, double* %11, double** %0)
%40 = call i32 @get_face_grad_2d_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 0, i32 1, i32 %17, double* %12, double** %0)
%41 = load double, double* %11
%42 = load double, double* %10
%43 = call double @llvm.fmuladd.f64(double %41, double %42, double %34)
%44 = load double, double* %12
%45 = fadd double %36, %44
%46 = call i32 @get_uface_2d(i32 %3, i32 %4, i32 %5, i32 %6, i32 0, i32 -1, i32 1, i32 %17, double* %10, double* %2)
%47 = load double, double* %10
%48 = call i32 @get_face_2d_quickest_a_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 0, i32 -1, i32 -1, i32 %17, double %7, double %47, double 0.000000e+00, double* %11, double** %0)
%49 = call i32 @get_face_grad_2d_lliffe(i32 %3, i32 %4, i32 %5, i32 %6, i32 0, i32 -1, i32 %17, double* %12, double** %0)
%50 = load double, double* %11
%51 = load double, double* %10
%52 = fneg double %50
%53 = call double @llvm.fmuladd.f64(double %52, double %51, double %43)
%54 = load double, double* %12
%55 = fadd double %45, %54
%56 = sext i32 %4 to i64
%57 = getelementptr inbounds double*, double** %0, i64 %56
%58 = load double*, double** %57
%59 = sext i32 %3 to i64
%60 = getelementptr inbounds double, double* %58, i64 %59
%61 = load double, double* %60
%62 = fneg double %53
%63 = call double @llvm.fmuladd.f64(double %8, double %55, double %62)
%64 = call double @llvm.fmuladd.f64(double %7, double %63, double %61)
%65 = getelementptr inbounds double*, double** %1, i64 %56
%66 = load double*, double** %65
%67 = getelementptr inbounds double, double* %66, i64 %59
store double %64, double* %67
ret void
}