#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*/ dVTTriangle2D(double *, double *, double *, double, double *,
                                 double *, double *);
void dJacTx2D(double *prod, const double *yc, const double *x, const double *m,
              int n) {
  double yA[2], yB[2], yC[2], yD[2], yM[2], vol;
  double rA[2], rB[2], rC[2], rD[2], rM[2];
  double xp;
  int i1, i2, r, id, idn, comp;
  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;
  double *wptr;
#pragma omp parallel for default(shared) private(ptr, wptr, i1, i2, r, id,     \
                                                 idn, comp, xp, yA, yB, yC,    \
                                                 yD, yM, rA, rB, rC, rD, rM)
  for (i1 = 0; i1 < m1; i1++) {
    for (i2 = 0; i2 < m2; i2++) {
      idn = i1 + i2 * inc_y;
      id = i1 + i2 * m1;
      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]);
        rA[r] = 0.0;
        rB[r] = 0.0;
        rC[r] = 0.0;
        rD[r] = 0.0;
        rM[r] = 0.0;
        comp += nn;
      }
      xp = x[id];
      dVTTriangle2D(yA, yB, yM, xp, rA, rB, rM);
      dVTTriangle2D(yB, yD, yM, xp, rB, rD, rM);
      dVTTriangle2D(yD, yC, yM, xp, rD, rC, rM);
      dVTTriangle2D(yC, yA, yM, xp, rC, rA, rM);
      comp = 0;
      for (r = 0; r < 2; r++) {
        wptr = prod + idn + comp;
        rM[r] *= .25;
#pragma omp atomic
        *wptr += rA[r] + rM[r];
        wptr += inc_x;
#pragma omp atomic
        *wptr += rB[r] + rM[r];
        wptr += inc_y;
#pragma omp atomic
        *wptr += rD[r] + rM[r];
        wptr -= inc_x;
#pragma omp atomic
        *wptr += rC[r] + rM[r];
        comp += nn;
      }
    }
  }
}


x86 assembly (clang, -O0):
<dJacTx2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%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,-0xec(%rbp)
mov    -0xec(%rbp),%eax
cmp    -0x104(%rbp),%eax
jge    1637 <dJacTx2D+0x527>
movl   $0x0,-0xf0(%rbp)
mov    -0xf0(%rbp),%eax
cmp    -0x108(%rbp),%eax
jge    161e <dJacTx2D+0x50e>
mov    -0xec(%rbp),%eax
mov    -0xf0(%rbp),%ecx
imul   -0x114(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xfc(%rbp)
mov    -0xec(%rbp),%eax
mov    -0xf0(%rbp),%ecx
imul   -0x104(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xf8(%rbp)
movl   $0x0,-0x100(%rbp)
movl   $0x0,-0xf4(%rbp)
cmpl   $0x2,-0xf4(%rbp)
jge    13a8 <dJacTx2D+0x298>
mov    -0x10(%rbp),%rax
movslq -0xfc(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x100(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
movsd  (%rax),%xmm0
movslq -0xf4(%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 -0xf4(%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 -0xf4(%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 -0xf4(%rbp),%rax
movsd  %xmm0,-0x60(%rbp,%rax,8)
movslq -0xf4(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm1
movslq -0xf4(%rbp),%rax
addsd  -0x50(%rbp,%rax,8),%xmm1
movslq -0xf4(%rbp),%rax
addsd  -0x60(%rbp,%rax,8),%xmm1
movslq -0xf4(%rbp),%rax
addsd  -0x70(%rbp,%rax,8),%xmm1
movsd  0xcee(%rip),%xmm0
mulsd  %xmm1,%xmm0
movslq -0xf4(%rbp),%rax
movsd  %xmm0,-0x80(%rbp,%rax,8)
movslq -0xf4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp,%rax,8)
ff ff
movslq -0xf4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp,%rax,8)
ff ff
movslq -0xf4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
movslq -0xf4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp,%rax,8)
ff ff
movslq -0xf4(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
mov    -0x10c(%rbp),%eax
add    -0x100(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1202 <dJacTx2D+0xf2>
mov    -0x18(%rbp),%rax
movslq -0xf8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x80(%rbp),%rdx
movsd  -0xe8(%rbp),%xmm0
ff
lea    -0xa0(%rbp),%rcx
lea    -0xb0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVTTriangle2D@plt>
lea    -0x50(%rbp),%rdi
lea    -0x70(%rbp),%rsi
lea    -0x80(%rbp),%rdx
movsd  -0xe8(%rbp),%xmm0
ff
lea    -0xb0(%rbp),%rcx
lea    -0xd0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVTTriangle2D@plt>
lea    -0x70(%rbp),%rdi
lea    -0x60(%rbp),%rsi
lea    -0x80(%rbp),%rdx
movsd  -0xe8(%rbp),%xmm0
ff
lea    -0xd0(%rbp),%rcx
lea    -0xc0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVTTriangle2D@plt>
lea    -0x60(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x80(%rbp),%rdx
movsd  -0xe8(%rbp),%xmm0
ff
lea    -0xc0(%rbp),%rcx
lea    -0xa0(%rbp),%r8
lea    -0xe0(%rbp),%r9
call   1030 <dVTTriangle2D@plt>
movl   $0x0,-0x100(%rbp)
movl   $0x0,-0xf4(%rbp)
cmpl   $0x2,-0xf4(%rbp)
jge    1605 <dJacTx2D+0x4f5>
mov    -0x8(%rbp),%rax
movslq -0xfc(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x100(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x128(%rbp)
movslq -0xf4(%rbp),%rax
movsd  0xb31(%rip),%xmm0
mulsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0xe0(%rbp,%rax,8)
ff ff
movslq -0xf4(%rbp),%rax
movsd  -0xa0(%rbp,%rax,8),%xmm0
ff ff
movslq -0xf4(%rbp),%rax
addsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x128(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x128(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x128(%rbp)
movslq -0xf4(%rbp),%rax
movsd  -0xb0(%rbp,%rax,8),%xmm0
ff ff
movslq -0xf4(%rbp),%rax
addsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x128(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x114(%rbp),%ecx
mov    -0x128(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x128(%rbp)
movslq -0xf4(%rbp),%rax
movsd  -0xd0(%rbp,%rax,8),%xmm0
ff ff
movslq -0xf4(%rbp),%rax
addsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x128(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x128(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x128(%rbp)
movslq -0xf4(%rbp),%rax
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
movslq -0xf4(%rbp),%rax
addsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x128(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10c(%rbp),%eax
add    -0x100(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    148c <dJacTx2D+0x37c>
jmp    160a <dJacTx2D+0x4fa>
mov    -0xf0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf0(%rbp)
jmp    11a6 <dJacTx2D+0x96>
jmp    1623 <dJacTx2D+0x513>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    118a <dJacTx2D+0x7a>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dJacTx2D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %rdx,0xe8(%rsp)
mov    %rdi,0x8(%rsp)
cvttsd2si (%rcx),%eax
test   %eax,%eax
jle    157b <dJacTx2D+0x46b>
cvttsd2si 0x8(%rcx),%edi
lea    0x1(%rax),%ecx
lea    0x1(%rdi),%edx
imul   %ecx,%edx
mov    %ecx,%ecx
movslq %edx,%r8
mov    %eax,%eax
mov    %rdi,0xf8(%rsp)
mov    %edi,%edi
mov    %rdi,0xe0(%rsp)
mov    %rax,0xf0(%rsp)
lea    0x0(,%rax,8),%r9
lea    0x8(%rsi),%rax
mov    %rax,0xd8(%rsp)
lea    0x0(,%rcx,8),%r11
lea    0x8(%rsi,%rcx,8),%rax
mov    %rax,0xd0(%rsp)
lea    (%r8,%rcx,1),%rax
lea    0x8(%rsi,%rax,8),%rbx
mov    %rbx,0xc8(%rsp)
lea    0x8(%rsi,%r8,8),%rsi
mov    %rsi,0xc0(%rsp)
mov    0x8(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
mov    %rcx,0xb8(%rsp)
lea    (%rsi,%r8,8),%rcx
mov    %rcx,0xb0(%rsp)
lea    (%rsi,%rax,8),%rax
mov    %rax,0xa8(%rsp)
xor    %r13d,%r13d
xorpd  %xmm0,%xmm0
movapd 0xe17(%rip),%xmm8
lea    0x10(%rsp),%rdi
xor    %eax,%eax
mov    %r9,0x110(%rsp)
mov    %r11,0x108(%rsp)
jmp    122e <dJacTx2D+0x11e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x100(%rsp),%rax
add    $0x1,%rax
add    $0x8,%r13
cmp    0xf0(%rsp),%rax
je     157b <dJacTx2D+0x46b>
mov    %rax,0x100(%rsp)
cmpl   $0x0,0xf8(%rsp)
jle    1210 <dJacTx2D+0x100>
mov    0xe0(%rsp),%r8
mov    0xa8(%rsp),%rcx
mov    0xb0(%rsp),%rsi
mov    0xb8(%rsp),%r10
mov    0x8(%rsp),%rbp
mov    0xc0(%rsp),%rbx
mov    0xc8(%rsp),%rax
mov    0xd0(%rsp),%r14
mov    0xd8(%rsp),%r15
mov    0xe8(%rsp),%r12
nopl   (%rax)
mov    %rax,0x130(%rsp)
mov    %rbx,0x138(%rsp)
mov    %r10,0x140(%rsp)
mov    %rsi,0x148(%rsp)
mov    %rcx,0x150(%rsp)
mov    %r8,0x158(%rsp)
movapd %xmm0,0x60(%rsp)
movapd %xmm0,0x50(%rsp)
movapd %xmm0,0x40(%rsp)
movapd %xmm0,0x30(%rsp)
movapd %xmm0,0x20(%rsp)
mov    %r15,0x128(%rsp)
movsd  -0x8(%r15,%r13,1),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15,%r13,1),%xmm1
movsd  %xmm1,0x90(%rsp)
mov    %r14,0x120(%rsp)
movsd  (%r14,%r13,1),%xmm2
movsd  %xmm2,0x70(%rsp)
movsd  -0x8(%r14,%r13,1),%xmm3
movsd  %xmm3,0x80(%rsp)
movsd  -0x8(%rbx,%r13,1),%xmm4
movsd  %xmm4,0x18(%rsp)
movsd  (%rbx,%r13,1),%xmm5
movsd  %xmm5,0x98(%rsp)
movsd  (%rax,%r13,1),%xmm6
movsd  %xmm6,0x78(%rsp)
movsd  -0x8(%rax,%r13,1),%xmm7
movsd  %xmm7,0x88(%rsp)
unpcklpd %xmm4,%xmm0
unpcklpd %xmm5,%xmm1
addpd  %xmm0,%xmm1
unpcklpd %xmm7,%xmm3
addpd  %xmm1,%xmm3
unpcklpd %xmm6,%xmm2
addpd  %xmm3,%xmm2
mulpd  %xmm8,%xmm2
movapd %xmm2,0x160(%rsp)
mov    %r12,0x118(%rsp)
movsd  (%r12,%r13,1),%xmm0
movsd  %xmm0,(%rsp)
lea    0x90(%rsp),%rsi
lea    0x160(%rsp),%rdx
mov    %rdx,%r14
lea    0x60(%rsp),%r15
mov    %r15,%rcx
lea    0x50(%rsp),%r12
mov    %r12,%r8
lea    0x20(%rsp),%r9
mov    %r9,%rbx
call   1030 <dVTTriangle2D@plt>
lea    0x90(%rsp),%rdi
lea    0x70(%rsp),%rsi
mov    %r14,%rdx
movsd  (%rsp),%xmm0
mov    %r12,%rcx
lea    0x30(%rsp),%r12
mov    %r12,%r8
mov    %rbx,%r9
call   1030 <dVTTriangle2D@plt>
lea    0x70(%rsp),%rdi
lea    0x80(%rsp),%rsi
mov    %r14,%rdx
movsd  (%rsp),%xmm0
mov    %r12,%rcx
lea    0x40(%rsp),%r12
mov    %r12,%r8
mov    %rbx,%r9
call   1030 <dVTTriangle2D@plt>
lea    0x80(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    %r14,%rdx
movsd  (%rsp),%xmm0
mov    %r12,%rcx
mov    %r15,%r8
mov    %rbx,%r9
call   1030 <dVTTriangle2D@plt>
mov    0x140(%rsp),%r10
mov    0x148(%rsp),%rsi
mov    0x150(%rsp),%rcx
mov    0x158(%rsp),%r8
mov    0x130(%rsp),%rax
mov    0x138(%rsp),%rbx
lea    0x10(%rsp),%rdi
movapd 0xb84(%rip),%xmm8
mov    0x108(%rsp),%r11
mov    0x110(%rsp),%rdx
movapd 0x60(%rsp),%xmm1
movapd 0x20(%rsp),%xmm0
mulpd  %xmm8,%xmm0
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
movhpd 0x50(%rsp),%xmm1
addpd  %xmm2,%xmm1
movupd 0x0(%rbp,%r13,1),%xmm3
addpd  %xmm1,%xmm3
movupd %xmm3,0x0(%rbp,%r13,1)
movapd 0x40(%rsp),%xmm1
movhpd 0x30(%rsp),%xmm1
addpd  %xmm2,%xmm1
movupd (%r10,%r13,1),%xmm2
addpd  %xmm1,%xmm2
movupd %xmm2,(%r10,%r13,1)
movapd %xmm0,0x20(%rsp)
movapd 0x60(%rsp),%xmm1
unpckhpd %xmm0,%xmm0
movsd  0x58(%rsp),%xmm2
shufpd $0x1,%xmm2,%xmm1
addpd  %xmm0,%xmm1
movupd (%rsi,%r13,1),%xmm2
addpd  %xmm1,%xmm2
movupd %xmm2,(%rsi,%r13,1)
movapd 0x40(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
shufpd $0x1,%xmm2,%xmm1
addpd  %xmm0,%xmm1
movupd (%rcx,%r13,1),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm0,(%rcx,%r13,1)
xorpd  %xmm0,%xmm0
mov    0x118(%rsp),%r12
add    %rdx,%r12
mov    0x128(%rsp),%r15
add    %r11,%r15
mov    0x120(%rsp),%r14
add    %r11,%r14
add    %r11,%rax
add    %r11,%rbx
add    %r11,%rbp
add    %r11,%r10
add    %r11,%rsi
add    %r11,%rcx
add    $0xffffffffffffffff,%r8
jne    1290 <dJacTx2D+0x180>
jmp    1210 <dJacTx2D+0x100>
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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