#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 */
double dVxTriangle2D(double *, double *, double *, double *, double *,
                     double *);
void dJacx2D(double *result, const double *yc, const double *x, const double *m,
             int n) {
  double yA[2], yB[2], yC[2], yD[2], yM[2], vol;
  double xA[2], xB[2], xC[2], xD[2], xM[2];
  int i1, i2, r, id, idn, comp;
  double res;
  const int m1 = m[0], m2 = m[1];
  const int nn = (m1 + 1) * (m2 + 1);
  const int inc_x = 1;
  const int inc_y = m1 + 1;
  const double *ptr;
#pragma omp parallel for default(shared) private(ptr, i1, i2, r, id, idn,      \
                                                 comp, res, yA, yB, yC, yD,    \
                                                 yM, xA, xB, xC, xD, xM)
  for (i1 = 0; i1 < m1; i1++) {
    for (i2 = 0; i2 < m2; i2++) {
      idn = i1 + i2 * inc_y;
      comp = 0;
      for (r = 0; r < 2; r++) {
        ptr = yc + idn + comp;
        yA[r] = *ptr;
        ptr = ptr + inc_x;
        yB[r] = *ptr;
        ptr = ptr + inc_y;
        yD[r] = *ptr;
        ptr = ptr - inc_x;
        yC[r] = *ptr;
        yM[r] = 0.25 * (yA[r] + yB[r] + yC[r] + yD[r]);
        ptr = x + idn + comp;
        xA[r] = *ptr;
        ptr = ptr + inc_x;
        xB[r] = *ptr;
        ptr = ptr + inc_y;
        xD[r] = *ptr;
        ptr = ptr - inc_x;
        xC[r] = *ptr;
        xM[r] = 0.25 * (xA[r] + xB[r] + xC[r] + xD[r]);
        comp += nn;
      }
      res = dVxTriangle2D(yA, yB, yM, xA, xB, xM);
      res += dVxTriangle2D(yB, yD, yM, xB, xD, xM);
      res += dVxTriangle2D(yD, yC, yM, xD, xC, xM);
      res += dVxTriangle2D(yC, yA, yM, xC, xA, xM);
      id = i1 + i2 * m1;
      result[id] = res;
    }
  }
}


x86 assembly (clang, -O0):
<dJacx2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x20(%rbp),%rax
cvttsd2si (%rax),%eax
mov    %eax,-0x104(%rbp)
mov    -0x20(%rbp),%rax
cvttsd2si 0x8(%rax),%eax
mov    %eax,-0x108(%rbp)
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    -0x108(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x10c(%rbp)
movl   $0x1,-0x110(%rbp)
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
movl   $0x0,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    158d <dJacx2D+0x47d>
movl   $0x0,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
cmp    -0x108(%rbp),%eax
jge    1574 <dJacx2D+0x464>
mov    -0xe4(%rbp),%eax
mov    -0xe8(%rbp),%ecx
imul   -0x114(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xf4(%rbp)
movl   $0x0,-0xf8(%rbp)
movl   $0x0,-0xec(%rbp)
cmpl   $0x2,-0xec(%rbp)
jge    145d <dJacx2D+0x34d>
mov    -0x10(%rbp),%rax
movslq -0xf4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0xf8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0x40(%rbp,%rax,8)
mov    -0x120(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0x50(%rbp,%rax,8)
mov    -0x120(%rbp),%rax
movslq -0x114(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0x70(%rbp,%rax,8)
mov    -0x120(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
movslq -0xec(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm1
movslq -0xec(%rbp),%rax
addsd  -0x50(%rbp,%rax,8),%xmm1
movslq -0xec(%rbp),%rax
addsd  -0x60(%rbp,%rax,8),%xmm1
movslq -0xec(%rbp),%rax
addsd  -0x70(%rbp,%rax,8),%xmm1
movsd  0xd09(%rip),%xmm0
mulsd  %xmm1,%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0x80(%rbp,%rax,8)
mov    -0x18(%rbp),%rax
movslq -0xf4(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0xf8(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
movslq -0x114(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
mov    -0x120(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
movslq -0xec(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm1
ff ff
movslq -0xec(%rbp),%rax
addsd  -0xb0(%rbp,%rax,8),%xmm1
ff ff
movslq -0xec(%rbp),%rax
addsd  -0xc0(%rbp,%rax,8),%xmm1
ff ff
movslq -0xec(%rbp),%rax
addsd  -0xd0(%rbp,%rax,8),%xmm1
ff ff
movsd  0xbdd(%rip),%xmm0
mulsd  %xmm1,%xmm0
movslq -0xec(%rbp),%rax
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
mov    -0x10c(%rbp),%eax
add    -0xf8(%rbp),%eax
mov    %eax,-0xf8(%rbp)
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    11e7 <dJacx2D+0xd7>
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
lea    -0xb0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVxTriangle2D@plt>
movsd  %xmm0,-0x100(%rbp)
ff
lea    -0x50(%rbp),%rdi
lea    -0x70(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    -0xb0(%rbp),%rcx
lea    -0xd0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVxTriangle2D@plt>
addsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
lea    -0x70(%rbp),%rdi
lea    -0x60(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    -0xd0(%rbp),%rcx
lea    -0xc0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVxTriangle2D@plt>
addsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
lea    -0x60(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x80(%rbp),%rdx
lea    -0xc0(%rbp),%rcx
lea    -0xa0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVxTriangle2D@plt>
addsd  -0x100(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
mov    -0xe4(%rbp),%eax
mov    -0xe8(%rbp),%ecx
imul   -0x104(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xf0(%rbp)
movsd  -0x100(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0xf0(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    11a6 <dJacx2D+0x96>
jmp    1579 <dJacx2D+0x469>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    118a <dJacx2D+0x7a>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dJacx2D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %rdi,0x80(%rsp)
cvttsd2si (%rcx),%eax
test   %eax,%eax
jle    153b <dJacx2D+0x42b>
cvttsd2si 0x8(%rcx),%ebp
lea    0x1(%rax),%ecx
lea    0x1(%rbp),%edi
imul   %ecx,%edi
mov    %ecx,%ebx
movslq %edi,%rcx
mov    %eax,%eax
mov    %rbp,0x90(%rsp)
mov    %ebp,%ebp
mov    %rbp,0x78(%rsp)
mov    %rax,0x88(%rsp)
lea    0x0(,%rax,8),%rdi
lea    0x8(%rsi),%rax
mov    %rax,0x70(%rsp)
lea    0x0(,%rbx,8),%r11
lea    0x8(%rsi,%rbx,8),%rax
mov    %rax,0x68(%rsp)
lea    (%rcx,%rbx,1),%r8
lea    0x8(%rsi,%r8,8),%rax
mov    %rax,0x60(%rsp)
lea    0x8(%rsi,%rcx,8),%rax
mov    %rax,0x58(%rsp)
lea    0x8(%rdx),%rax
mov    %rax,0x50(%rsp)
lea    0x8(%rdx,%rbx,8),%rax
mov    %rax,0x48(%rsp)
lea    0x8(%rdx,%r8,8),%rax
mov    %rax,0x40(%rsp)
lea    (%rdx,%rcx,8),%rax
add    $0x8,%rax
mov    %rax,0x38(%rsp)
xor    %r12d,%r12d
movapd 0xe2e(%rip),%xmm12
lea    0x150(%rsp),%r9
xor    %eax,%eax
mov    %rdi,0xa8(%rsp)
mov    %r11,0xa0(%rsp)
jmp    120e <dJacx2D+0xfe>
xchg   %ax,%ax
mov    0x98(%rsp),%rax
add    $0x1,%rax
add    $0x8,%r12
cmp    0x88(%rsp),%rax
je     153b <dJacx2D+0x42b>
mov    %rax,0x98(%rsp)
cmpl   $0x0,0x90(%rsp)
jle    11f0 <dJacx2D+0xe0>
mov    0x78(%rsp),%r8
mov    0x38(%rsp),%rdx
mov    0x40(%rsp),%rsi
mov    0x48(%rsp),%r10
mov    0x50(%rsp),%rax
mov    0x58(%rsp),%rbp
mov    0x60(%rsp),%r14
mov    0x68(%rsp),%r15
mov    0x70(%rsp),%r13
mov    0x80(%rsp),%rbx
mov    %rbx,0x8(%rsp)
nopw   0x0(%rax,%rax,1)
mov    %rax,0xc8(%rsp)
mov    %r10,0xd0(%rsp)
mov    %rsi,0xd8(%rsp)
mov    %rdx,0xe0(%rsp)
mov    %r8,0xe8(%rsp)
mov    %r13,0xc0(%rsp)
movsd  -0x8(%r13,%r12,1),%xmm5
movsd  %xmm5,0x20(%rsp)
movsd  0x0(%r13,%r12,1),%xmm6
movsd  %xmm6,0x140(%rsp)
mov    %r15,0xb8(%rsp)
movsd  (%r15,%r12,1),%xmm4
movsd  %xmm4,0x120(%rsp)
movsd  -0x8(%r15,%r12,1),%xmm7
movsd  %xmm7,0x130(%rsp)
movsd  -0x8(%rax,%r12,1),%xmm8
movsd  %xmm8,0x10(%rsp)
movsd  (%rax,%r12,1),%xmm1
movsd  %xmm1,0x110(%rsp)
movsd  (%r10,%r12,1),%xmm0
movsd  %xmm0,0xf0(%rsp)
movsd  -0x8(%r10,%r12,1),%xmm2
movsd  %xmm2,0x100(%rsp)
movsd  -0x8(%rbp,%r12,1),%xmm3
movsd  %xmm3,0x28(%rsp)
movsd  0x0(%rbp,%r12,1),%xmm9
movsd  %xmm9,0x148(%rsp)
mov    %r14,0xb0(%rsp)
movsd  (%r14,%r12,1),%xmm10
movsd  %xmm10,0x128(%rsp)
movsd  -0x8(%r14,%r12,1),%xmm11
movsd  %xmm11,0x138(%rsp)
unpcklpd %xmm3,%xmm5
unpcklpd %xmm9,%xmm6
addpd  %xmm5,%xmm6
unpcklpd %xmm11,%xmm7
addpd  %xmm6,%xmm7
unpcklpd %xmm10,%xmm4
addpd  %xmm7,%xmm4
mulpd  %xmm12,%xmm4
movapd %xmm4,0x160(%rsp)
movsd  -0x8(%rdx,%r12,1),%xmm3
movsd  %xmm3,0x18(%rsp)
movsd  (%rdx,%r12,1),%xmm4
movsd  %xmm4,0x118(%rsp)
movsd  (%rsi,%r12,1),%xmm5
movsd  %xmm5,0xf8(%rsp)
movsd  -0x8(%rsi,%r12,1),%xmm6
movsd  %xmm6,0x108(%rsp)
unpcklpd %xmm3,%xmm8
unpcklpd %xmm4,%xmm1
addpd  %xmm8,%xmm1
unpcklpd %xmm6,%xmm2
addpd  %xmm1,%xmm2
unpcklpd %xmm5,%xmm0
addpd  %xmm2,%xmm0
mulpd  %xmm12,%xmm0
movapd %xmm0,0x150(%rsp)
lea    0x20(%rsp),%rdi
lea    0x140(%rsp),%r13
mov    %r13,%rsi
lea    0x160(%rsp),%rbx
mov    %rbx,%rdx
lea    0x10(%rsp),%rcx
lea    0x110(%rsp),%r15
mov    %r15,%r8
mov    %r9,%r14
call   1030 <dVxTriangle2D@plt>
movsd  %xmm0,(%rsp)
mov    %r13,%rdi
lea    0x120(%rsp),%r13
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
lea    0xf0(%rsp),%r15
mov    %r15,%r8
mov    %r14,%r9
call   1030 <dVxTriangle2D@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r13,%rdi
lea    0x130(%rsp),%r13
mov    %r13,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
lea    0x100(%rsp),%r15
mov    %r15,%r8
mov    %r14,%r9
call   1030 <dVxTriangle2D@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r13,%rdi
lea    0x20(%rsp),%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
lea    0x10(%rsp),%r8
mov    %r14,%r9
call   1030 <dVxTriangle2D@plt>
mov    0xc8(%rsp),%rax
mov    0xd0(%rsp),%r10
mov    0xd8(%rsp),%rsi
mov    0xe0(%rsp),%rdx
mov    0xe8(%rsp),%r8
mov    %r14,%r9
movapd 0xb2c(%rip),%xmm12
mov    0xa0(%rsp),%r11
mov    0xa8(%rsp),%rbx
addsd  (%rsp),%xmm0
mov    0x8(%rsp),%rcx
movsd  %xmm0,(%rcx,%r12,1)
add    %rbx,%rcx
mov    %rcx,0x8(%rsp)
mov    0xc0(%rsp),%r13
add    %r11,%r13
mov    0xb8(%rsp),%r15
add    %r11,%r15
mov    0xb0(%rsp),%r14
add    %r11,%r14
add    %r11,%rbp
add    %r11,%rax
add    %r11,%r10
add    %r11,%rsi
add    %r11,%rdx
add    $0xffffffffffffffff,%r8
jne    1260 <dJacx2D+0x150>
jmp    11f0 <dJacx2D+0xe0>
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @dJacx2D(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, i32 %4) {
%6 = alloca [2 x double]
%7 = alloca [2 x double]
%8 = alloca [2 x double]
%9 = alloca [2 x double]
%10 = alloca <2 x double>
%11 = alloca [2 x double]
%12 = alloca [2 x double]
%13 = alloca [2 x double]
%14 = alloca [2 x double]
%15 = alloca <2 x double>
%16 = bitcast [2 x double]* %6 to i8*
%17 = bitcast [2 x double]* %7 to i8*
%18 = bitcast [2 x double]* %8 to i8*
%19 = bitcast [2 x double]* %9 to i8*
%20 = bitcast <2 x double>* %10 to i8*
%21 = bitcast [2 x double]* %11 to i8*
%22 = bitcast [2 x double]* %12 to i8*
%23 = bitcast [2 x double]* %13 to i8*
%24 = bitcast [2 x double]* %14 to i8*
%25 = bitcast <2 x double>* %15 to i8*
%26 = load double, double* %3
%27 = fptosi double %26 to i32
%28 = getelementptr inbounds double, double* %3, i64 1
%29 = load double, double* %28
%30 = fptosi double %29 to i32
%31 = add nsw i32 %27, 1
%32 = icmp sgt i32 %27, 0
br i1 %32, label %33, label %137
33: ; preds = %5
%34 = add nsw i32 %30, 1
%35 = mul i32 %34, %31
%36 = icmp sgt i32 %30, 0
%37 = zext i32 %31 to i64
%38 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 0
%39 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%40 = getelementptr inbounds <2 x double>, <2 x double>* %10, i64 0, i64 0
%41 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%42 = getelementptr inbounds [2 x double], [2 x double]* %12, i64 0, i64 0
%43 = getelementptr inbounds <2 x double>, <2 x double>* %15, i64 0, i64 0
%44 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%45 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 0
%46 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%47 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 0
%48 = sext i32 %35 to i64
%49 = zext i32 %27 to i64
%50 = zext i32 %27 to i64
%51 = zext i32 %30 to i64
%52 = getelementptr inbounds [2 x double], [2 x double]* %6, i64 0, i64 1
%53 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 1
%54 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 1
%55 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 1
%56 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 1
%57 = getelementptr inbounds [2 x double], [2 x double]* %12, i64 0, i64 1
%58 = getelementptr inbounds [2 x double], [2 x double]* %14, i64 0, i64 1
%59 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 1
br label %60
60: ; preds = %33, %134
%61 = phi i64 [ 0, %33 ], [ %135, %134 ]
br i1 %36, label %62, label %134
62: ; preds = %60, %62
%63 = phi i64 [ %132, %62 ], [ 0, %60 ]
%64 = mul nsw i64 %63, %37
%65 = add nuw nsw i64 %64, %61
%66 = getelementptr inbounds double, double* %1, i64 %65
%67 = getelementptr inbounds double, double* %2, i64 %65
%68 = load double, double* %66
store double %68, double* %38
%69 = getelementptr inbounds double, double* %66, i64 1
%70 = load double, double* %69
store double %70, double* %39
%71 = getelementptr inbounds double, double* %69, i64 %37
%72 = load double, double* %71
store double %72, double* %44
%73 = getelementptr inbounds double, double* %71, i64 -1
%74 = load double, double* %73
store double %74, double* %46
%75 = load double, double* %67
store double %75, double* %41
%76 = getelementptr inbounds double, double* %67, i64 1
%77 = load double, double* %76
store double %77, double* %42
%78 = getelementptr inbounds double, double* %76, i64 %37
%79 = load double, double* %78
store double %79, double* %45
%80 = getelementptr inbounds double, double* %78, i64 -1
%81 = load double, double* %80
store double %81, double* %47
%82 = getelementptr inbounds double, double* %66, i64 %48
%83 = load double, double* %82
store double %83, double* %52
%84 = getelementptr inbounds double, double* %82, i64 1
%85 = load double, double* %84
store double %85, double* %53
%86 = getelementptr inbounds double, double* %84, i64 %37
%87 = load double, double* %86
store double %87, double* %54
%88 = getelementptr inbounds double, double* %86, i64 -1
%89 = load double, double* %88
store double %89, double* %55
%90 = insertelement <2 x double> poison, double %68, i64 0
%91 = insertelement <2 x double> %90, double %83, i64 1
%92 = insertelement <2 x double> poison, double %70, i64 0
%93 = insertelement <2 x double> %92, double %85, i64 1
%94 = fadd <2 x double> %91, %93
%95 = insertelement <2 x double> poison, double %74, i64 0
%96 = insertelement <2 x double> %95, double %89, i64 1
%97 = fadd <2 x double> %94, %96
%98 = insertelement <2 x double> poison, double %72, i64 0
%99 = insertelement <2 x double> %98, double %87, i64 1
%100 = fadd <2 x double> %99, %97
%101 = fmul <2 x double> %100, <double 2.500000e-01, double 2.500000e-01>
store <2 x double> %101, <2 x double>* %10
%102 = getelementptr inbounds double, double* %67, i64 %48
%103 = load double, double* %102
store double %103, double* %56
%104 = getelementptr inbounds double, double* %102, i64 1
%105 = load double, double* %104
store double %105, double* %57
%106 = getelementptr inbounds double, double* %104, i64 %37
%107 = load double, double* %106
store double %107, double* %58
%108 = getelementptr inbounds double, double* %106, i64 -1
%109 = load double, double* %108
store double %109, double* %59
%110 = insertelement <2 x double> poison, double %75, i64 0
%111 = insertelement <2 x double> %110, double %103, i64 1
%112 = insertelement <2 x double> poison, double %77, i64 0
%113 = insertelement <2 x double> %112, double %105, i64 1
%114 = fadd <2 x double> %111, %113
%115 = insertelement <2 x double> poison, double %81, i64 0
%116 = insertelement <2 x double> %115, double %109, i64 1
%117 = fadd <2 x double> %114, %116
%118 = insertelement <2 x double> poison, double %79, i64 0
%119 = insertelement <2 x double> %118, double %107, i64 1
%120 = fadd <2 x double> %119, %117
%121 = fmul <2 x double> %120, <double 2.500000e-01, double 2.500000e-01>
store <2 x double> %121, <2 x double>* %15
%122 = call double @dVxTriangle2D(double* %38, double* %39, double* %40, double* %41, double* %42, double* %43)
%123 = call double @dVxTriangle2D(double* %39, double* %44, double* %40, double* %42, double* %45, double* %43)
%124 = fadd double %122, %123
%125 = call double @dVxTriangle2D(double* %44, double* %46, double* %40, double* %45, double* %47, double* %43)
%126 = fadd double %124, %125
%127 = call double @dVxTriangle2D(double* %46, double* %38, double* %40, double* %47, double* %41, double* %43)
%128 = fadd double %126, %127
%129 = mul nsw i64 %63, %49
%130 = add nuw nsw i64 %129, %61
%131 = getelementptr inbounds double, double* %0, i64 %130
store double %128, double* %131
%132 = add nuw nsw i64 %63, 1
%133 = icmp eq i64 %132, %51
br i1 %133, label %134, label %62
134: ; preds = %62, %60
%135 = add nuw nsw i64 %61, 1
%136 = icmp eq i64 %135, %50
br i1 %136, label %137, label %60
137: ; preds = %134, %5
ret void
}