int TetShapeAndDrv(int p, double par[3], double N[], double dN[][3]) {
  static int TetEMAP[6][2] = {{0, 1}, {1, 2}, {2, 0}, {0, 3}, {1, 3}, {2, 3}};
  static int TetFMAP[4][3] = {{0, 1, 2}, {0, 3, 1}, {1, 3, 2}, {0, 2, 3}};
  int NS, is, i, j, ip, nshp = 0, (*fpdrv)[2];
  double L[4], Le[2], Lf[3], mode, blend, bdrv[3], mdrv[3], epdrv[3][2],
      mfdrv[2];
  double tmp, rst, rsw, stw, rstw, rtw;
  if (p < 1)
    return nshp;
  L[0] = par[0];
  L[1] = par[1];
  L[2] = par[2];
  L[3] = 1.0e0 - par[0] - par[1] - par[2];
  for (i = 0; i < 4; i++) {
    N[i] = L[i];
    if (i == 3)
      dN[i][0] = dN[i][1] = dN[i][2] = -1.0e0;
    else {
      for (j = 0; j < 3; j++) {
        if (i == j)
          dN[i][j] = 1.0e0;
        else
          dN[i][j] = 0.0e0;
      }
    }
  }
  nshp = 4;
  if (p > 1) {
    for (i = 0; i < 6; i++) {
      Le[0] = L[TetEMAP[i][0]];
      Le[1] = L[TetEMAP[i][1]];
      blend = R_edgeBlendTet(TetEMAP[i], L);
      R_edgeBlendTetDrv(TetEMAP[i], L, bdrv);
      E_parDrv(TetEMAP[i][0], TetEMAP[i][1], 4, epdrv);
      for (ip = 2; ip <= p; ip++) {
        mode = E_modeShape(ip, Le);
        E_modeShapeDrv(ip, Le, mdrv);
        N[nshp] = blend * mode;
        dN[nshp][0] = bdrv[0] * mode +
                      blend * (mdrv[0] * epdrv[0][0] + mdrv[1] * epdrv[0][1]);
        dN[nshp][1] = bdrv[1] * mode +
                      blend * (mdrv[0] * epdrv[1][0] + mdrv[1] * epdrv[1][1]);
        dN[nshp][2] = bdrv[2] * mode +
                      blend * (mdrv[0] * epdrv[2][0] + mdrv[1] * epdrv[2][1]);
        nshp++;
      }
    }
  }
  if (p > 2) {
    for (i = 0; i < 4; i++) {
      Lf[0] = L[TetFMAP[i][0]];
      Lf[1] = L[TetFMAP[i][1]];
      Lf[2] = L[TetFMAP[i][2]];
      blend = Lf[0] * Lf[1] * Lf[2];
      R_faceBlendTetDrv(TetFMAP[i], L, bdrv);
      F_parDrv(TetFMAP[i][0], TetFMAP[i][1], TetFMAP[i][2], 4, &fpdrv);
      for (ip = 3; ip <= p; ip++) {
        NS = ip - 2;
        for (is = 0; is < NS; is++) {
          mode = F_modeShapeTri(ip, is, Lf);
          N[nshp] = blend * mode;
          F_modeShapeTriDrv(ip, is, Lf, mfdrv);
          mdrv[0] =
              mfdrv[0] * (double)fpdrv[0][0] + mfdrv[1] * (double)fpdrv[0][1];
          mdrv[1] =
              mfdrv[0] * (double)fpdrv[1][0] + mfdrv[1] * (double)fpdrv[1][1];
          mdrv[2] =
              mfdrv[0] * (double)fpdrv[2][0] + mfdrv[1] * (double)fpdrv[2][1];
          dN[nshp][0] = bdrv[0] * mode + blend * mdrv[0];
          dN[nshp][1] = bdrv[1] * mode + blend * mdrv[1];
          dN[nshp][2] = bdrv[2] * mode + blend * mdrv[2];
          nshp++;
        }
      }
    }
  }
  if (p > 3) {
    for (ip = 4; ip <= p; ip++) {
      NS = (ip - 3) * (ip - 2) / 2;
      blend = L[0] * L[1] * L[2] * L[3];
      tmp = 1.0e0 - L[0] - L[1] - L[2];
      rsw = L[0] * L[1] * tmp;
      stw = L[1] * L[2] * tmp;
      rtw = L[0] * L[2] * tmp;
      rst = L[0] * L[1] * L[2];
      rstw = rst * L[3];
      for (is = 0; is < NS; is++) {
        mode = R_modeShapeTet(ip, is, L);
        N[nshp] = blend * mode;
        R_modeShapeTetDrv(ip, is, L, mdrv);
        dN[nshp][0] = mode * (stw - rst) + rstw * mdrv[0];
        dN[nshp][1] = mode * (rtw - rst) + rstw * mdrv[1];
        dN[nshp][2] = mode * (rsw - rst) + rstw * mdrv[2];
        nshp++;
      }
    }
  }
  return nshp;
}


x86 assembly (clang, -O0):
<TetShapeAndDrv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    11e6 <TetShapeAndDrv+0x36>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1b49 <TetShapeAndDrv+0x999>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xde5(%rip),%xmm0
subsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jge    1348 <TetShapeAndDrv+0x198>
movslq -0x2c(%rbp),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x3,-0x2c(%rbp)
jne    12c0 <TetShapeAndDrv+0x110>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0xd89(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0xd6d(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  0xd51(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1335 <TetShapeAndDrv+0x185>
movl   $0x0,-0x30(%rbp)
cmpl   $0x3,-0x30(%rbp)
jge    1330 <TetShapeAndDrv+0x180>
mov    -0x2c(%rbp),%eax
cmp    -0x30(%rbp),%eax
jne    1302 <TetShapeAndDrv+0x152>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  0xd08(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    131d <TetShapeAndDrv+0x16d>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1322 <TetShapeAndDrv+0x172>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12c7 <TetShapeAndDrv+0x117>
jmp    1335 <TetShapeAndDrv+0x185>
jmp    133a <TetShapeAndDrv+0x18a>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    123d <TetShapeAndDrv+0x8d>
movl   $0x4,-0x38(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    15c9 <TetShapeAndDrv+0x419>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x6,-0x2c(%rbp)
jge    15c4 <TetShapeAndDrv+0x414>
movslq -0x2c(%rbp),%rcx
lea    0x2d0b(%rip),%rax
movslq (%rax,%rcx,8),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movslq -0x2c(%rbp),%rcx
lea    0x2cf1(%rip),%rax
movslq 0x4(%rax,%rcx,8),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movslq -0x2c(%rbp),%rax
lea    0x2cd6(%rip),%rdi
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
mov    $0x0,%al
call   1060 <R_edgeBlendTet@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movslq -0x2c(%rbp),%rax
lea    0x2cad(%rip),%rdi
shl    $0x3,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
mov    $0x0,%al
call   1050 <R_edgeBlendTetDrv@plt>
movslq -0x2c(%rbp),%rcx
lea    0x2c89(%rip),%rax
mov    (%rax,%rcx,8),%edi
movslq -0x2c(%rbp),%rcx
lea    0x2c7b(%rip),%rax
mov    0x4(%rax,%rcx,8),%esi
lea    -0x110(%rbp),%rcx
mov    $0x4,%edx
mov    $0x0,%al
call   10b0 <E_parDrv@plt>
movl   $0x2,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     15b1 <TetShapeAndDrv+0x401>
mov    -0x34(%rbp),%edi
lea    -0x70(%rbp),%rsi
mov    $0x0,%al
call   10a0 <E_modeShape@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x34(%rbp),%edi
lea    -0x70(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
mov    $0x0,%al
call   1070 <E_modeShapeDrv@plt>
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm3
ff
movsd  -0x110(%rbp),%xmm5
ff
movsd  -0xd8(%rbp),%xmm4
ff
mulsd  -0x108(%rbp),%xmm4
ff
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm3
ff
movsd  -0x100(%rbp),%xmm5
ff
movsd  -0xd8(%rbp),%xmm4
ff
mulsd  -0xf8(%rbp),%xmm4
ff
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm3
ff
movsd  -0xf0(%rbp),%xmm5
ff
movsd  -0xd8(%rbp),%xmm4
ff
mulsd  -0xe8(%rbp),%xmm4
ff
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x10(%rax)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1423 <TetShapeAndDrv+0x273>
jmp    15b6 <TetShapeAndDrv+0x406>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1360 <TetShapeAndDrv+0x1b0>
jmp    15c9 <TetShapeAndDrv+0x419>
cmpl   $0x2,-0x8(%rbp)
jle    18f8 <TetShapeAndDrv+0x748>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jge    18f3 <TetShapeAndDrv+0x743>
movslq -0x2c(%rbp),%rcx
lea    0x2ac1(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq (%rax),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movslq -0x2c(%rbp),%rcx
lea    0x2a9e(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq 0x4(%rax),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movslq -0x2c(%rbp),%rcx
lea    0x2a7a(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
movslq 0x8(%rax),%rax
movsd  -0x60(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x88(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movslq -0x2c(%rbp),%rax
lea    0x2a3c(%rip),%rdi
imul   $0xc,%rax,%rax
add    %rax,%rdi
lea    -0x60(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
mov    $0x0,%al
call   1040 <R_faceBlendTetDrv@plt>
movslq -0x2c(%rbp),%rcx
lea    0x2a18(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%edi
movslq -0x2c(%rbp),%rcx
lea    0x2a04(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    0x4(%rax),%esi
movslq -0x2c(%rbp),%rcx
lea    0x29ef(%rip),%rax
imul   $0xc,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%edx
mov    $0x4,%ecx
lea    -0x40(%rbp),%r8
mov    $0x0,%al
call   10c0 <F_parDrv@plt>
movl   $0x3,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     18e0 <TetShapeAndDrv+0x730>
mov    -0x34(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    18cd <TetShapeAndDrv+0x71d>
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%esi
lea    -0x90(%rbp),%rdx
mov    $0x0,%al
call   10d0 <F_modeShapeTri@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%esi
lea    -0x90(%rbp),%rdx
lea    -0x120(%rbp),%rcx
mov    $0x0,%al
call   1090 <F_modeShapeTriDrv@plt>
movsd  -0x120(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
cvtsi2sdl (%rax),%xmm2
movsd  -0x118(%rbp),%xmm1
ff
mov    -0x40(%rbp),%rax
cvtsi2sdl 0x4(%rax),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
cvtsi2sdl 0x8(%rax),%xmm2
movsd  -0x118(%rbp),%xmm1
ff
mov    -0x40(%rbp),%rax
cvtsi2sdl 0xc(%rax),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
cvtsi2sdl 0x10(%rax),%xmm2
movsd  -0x118(%rbp),%xmm1
ff
mov    -0x40(%rbp),%rax
cvtsi2sdl 0x14(%rax),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xe0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x10(%rax)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    16fe <TetShapeAndDrv+0x54e>
jmp    18d2 <TetShapeAndDrv+0x722>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    16e2 <TetShapeAndDrv+0x532>
jmp    18e5 <TetShapeAndDrv+0x735>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    15da <TetShapeAndDrv+0x42a>
jmp    18f8 <TetShapeAndDrv+0x748>
cmpl   $0x3,-0x8(%rbp)
jle    1b43 <TetShapeAndDrv+0x993>
movl   $0x4,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1b3e <TetShapeAndDrv+0x98e>
mov    -0x34(%rbp),%eax
sub    $0x3,%eax
mov    -0x34(%rbp),%ecx
sub    $0x2,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
movsd  -0x60(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0x6ad(%rip),%xmm0
subsd  -0x60(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1b2b <TetShapeAndDrv+0x97b>
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%esi
lea    -0x60(%rbp),%rdx
mov    $0x0,%al
call   1080 <R_modeShapeTet@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0x98(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%edi
mov    -0x28(%rbp),%esi
lea    -0x60(%rbp),%rdx
lea    -0xe0(%rbp),%rcx
mov    $0x0,%al
call   1030 <R_modeShapeTetDrv@plt>
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x140(%rbp),%xmm2
ff
subsd  -0x130(%rbp),%xmm2
ff
movsd  -0x148(%rbp),%xmm1
ff
mulsd  -0xe0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x150(%rbp),%xmm2
ff
subsd  -0x130(%rbp),%xmm2
ff
movsd  -0x148(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x138(%rbp),%xmm2
ff
subsd  -0x130(%rbp),%xmm2
ff
movsd  -0x148(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,0x10(%rax)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    19eb <TetShapeAndDrv+0x83b>
jmp    1b30 <TetShapeAndDrv+0x980>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1909 <TetShapeAndDrv+0x759>
jmp    1b43 <TetShapeAndDrv+0x993>
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TetShapeAndDrv>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x158,%rsp
test   %edi,%edi
jle    18d0 <TetShapeAndDrv+0x720>
movupd (%rsi),%xmm0
movapd %xmm0,0x40(%rsp)
movsd  0x10(%rsi),%xmm1
movsd  %xmm1,0x50(%rsp)
movsd  0xe1a(%rip),%xmm4
movapd %xmm4,%xmm2
subsd  %xmm0,%xmm2
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
subsd  %xmm3,%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,0x58(%rsp)
movlpd %xmm0,(%rdx)
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rcx)
xorpd  %xmm3,%xmm3
movupd %xmm3,0x8(%rcx)
movhpd %xmm0,0x8(%rdx)
xorpd  %xmm0,%xmm0
unpcklpd %xmm4,%xmm0
movupd %xmm0,0x18(%rcx)
movq   $0x0,0x28(%rcx)
movsd  %xmm1,0x10(%rdx)
movupd %xmm3,0x30(%rcx)
mov    %rax,0x40(%rcx)
movsd  %xmm2,0x18(%rdx)
movabs $0xbff0000000000000,%rax
mov    %rax,0x58(%rcx)
movapd 0xdaf(%rip),%xmm0
movupd %xmm0,0x48(%rcx)
mov    $0x4,%eax
cmp    $0x1,%edi
je     18db <TetShapeAndDrv+0x72b>
mov    %rdi,0x8(%rsp)
mov    %edi,%eax
mov    %rax,0x38(%rsp)
add    $0x10,%rcx
mov    %rcx,0x10(%rsp)
mov    $0x4,%r15d
lea    0xf0(%rsp),%r12
xor    %r14d,%r14d
mov    %rdx,0x18(%rsp)
nop
lea    0x2dd9(%rip),%rbx
lea    (%rbx,%r14,8),%rbp
movslq (%rbx,%r14,8),%rax
movsd  0x40(%rsp,%rax,8),%xmm0
movsd  %xmm0,0xf0(%rsp)
movslq 0x4(%rbx,%r14,8),%rax
movsd  0x40(%rsp,%rax,8),%xmm0
movsd  %xmm0,0xf8(%rsp)
mov    %rbp,%rdi
lea    0x40(%rsp),%rsi
xor    %eax,%eax
mov    %rdx,%r13
call   1060 <R_edgeBlendTet@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x60(%rsp)
mov    %rbp,%rdi
lea    0x40(%rsp),%rsi
lea    0xc0(%rsp),%rdx
xor    %eax,%eax
call   1050 <R_edgeBlendTetDrv@plt>
mov    (%rbx,%r14,8),%edi
mov    %r14,0x80(%rsp)
mov    0x4(%rbx,%r14,8),%esi
mov    $0x4,%edx
lea    0x120(%rsp),%rcx
xor    %eax,%eax
call   10b0 <E_parDrv@plt>
mov    %r15,(%rsp)
movslq %r15d,%rax
movaps 0x60(%rsp),%xmm0
movlhps %xmm0,%xmm0
movaps %xmm0,0x90(%rsp)
lea    0x0(%r13,%rax,8),%r15
mov    %rax,0x70(%rsp)
lea    (%rax,%rax,2),%rax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%r14
mov    $0x2,%ebp
xor    %ebx,%ebx
mov    0x38(%rsp),%r13
nopw   0x0(%rax,%rax,1)
mov    %ebp,%edi
mov    %r12,%rsi
xor    %eax,%eax
call   10a0 <E_modeShape@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x20(%rsp)
mov    %ebp,%edi
mov    %r12,%rsi
lea    0xa0(%rsp),%rdx
xor    %eax,%eax
call   1070 <E_modeShapeDrv@plt>
movapd 0x60(%rsp),%xmm5
movapd %xmm5,%xmm0
movapd 0x20(%rsp),%xmm6
mulsd  %xmm6,%xmm0
movsd  %xmm0,(%r15)
movapd 0x120(%rsp),%xmm1
movsd  0xa0(%rsp),%xmm0
movsd  0xa8(%rsp),%xmm2
movupd 0x128(%rsp),%xmm3
movapd %xmm2,%xmm4
unpcklpd %xmm2,%xmm4
movhpd 0x138(%rsp),%xmm3
mulpd  %xmm4,%xmm3
movapd %xmm0,%xmm4
unpcklpd %xmm0,%xmm4
movhpd 0x130(%rsp),%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm3,%xmm1
mulpd  0x90(%rsp),%xmm1
movapd %xmm6,%xmm3
unpcklpd %xmm6,%xmm3
mulpd  0xc0(%rsp),%xmm3
addpd  %xmm1,%xmm3
movupd %xmm3,-0x10(%r14)
mulsd  0x148(%rsp),%xmm2
mulsd  0x140(%rsp),%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm5,%xmm0
movapd %xmm6,%xmm1
mulsd  0xd0(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
add    $0x1,%ebp
add    $0x8,%r15
add    $0x18,%r14
add    $0xffffffffffffffff,%rbx
lea    (%rbx,%r13,1),%eax
cmp    $0x1,%eax
jne    1370 <TetShapeAndDrv+0x1c0>
mov    0x80(%rsp),%r14
add    $0x1,%r14
mov    0x70(%rsp),%r15
sub    %rbx,%r15
cmp    $0x6,%r14
mov    0x18(%rsp),%rdx
jne    12a0 <TetShapeAndDrv+0xf0>
mov    0x8(%rsp),%rax
cmp    $0x2,%eax
jle    18d4 <TetShapeAndDrv+0x724>
movslq (%rsp),%r15
sub    %rbx,%r15
add    $0xffffffff,%eax
mov    %eax,0x80(%rsp)
xor    %eax,%eax
nopl   0x0(%rax)
mov    %rax,0x70(%rsp)
lea    (%rax,%rax,2),%rbx
lea    0x2be0(%rip),%rbp
lea    0x0(,%rbx,4),%rdi
add    %rbp,%rdi
movslq 0x0(%rbp,%rbx,4),%rax
movsd  0x40(%rsp,%rax,8),%xmm2
movsd  %xmm2,0x100(%rsp)
movslq 0x4(%rbp,%rbx,4),%rax
movsd  0x40(%rsp,%rax,8),%xmm0
movsd  %xmm0,0x108(%rsp)
movslq 0x8(%rbp,%rbx,4),%rax
movsd  0x40(%rsp,%rax,8),%xmm1
movsd  %xmm1,0x110(%rsp)
mulsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
lea    0x40(%rsp),%rsi
lea    0xc0(%rsp),%rdx
xor    %eax,%eax
call   1040 <R_faceBlendTetDrv@plt>
mov    0x0(%rbp,%rbx,4),%edi
mov    0x4(%rbp,%rbx,4),%esi
mov    0x8(%rbp,%rbx,4),%edx
mov    $0x4,%ecx
lea    0xd8(%rsp),%r8
xor    %eax,%eax
call   10c0 <F_parDrv@plt>
movaps 0x20(%rsp),%xmm2
movlhps %xmm2,%xmm2
mov    $0x3,%r12d
mov    $0x1,%ebx
movaps %xmm2,0x90(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,(%rsp)
movslq %r15d,%r15
lea    (%r15,%r15,2),%rax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%rbp
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %r14d,%esi
lea    0x100(%rsp),%r13
mov    %r13,%rdx
xor    %eax,%eax
call   10d0 <F_modeShapeTri@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm1,0x60(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  %xmm1,%xmm0
mov    0x18(%rsp),%rax
movsd  %xmm0,(%rax,%r15,8)
mov    %r12d,%edi
mov    %r14d,%esi
mov    %r13,%rdx
lea    0xe0(%rsp),%rcx
xor    %eax,%eax
call   1090 <F_modeShapeTriDrv@plt>
mov    0xd8(%rsp),%rax
movsd  0xe0(%rsp),%xmm0
movss  0x8(%rax),%xmm1
movss  (%rax),%xmm2
unpcklps %xmm1,%xmm2
cvtdq2pd %xmm2,%xmm1
movsd  0xe8(%rsp),%xmm2
movss  0xc(%rax),%xmm3
movss  0x4(%rax),%xmm4
unpcklps %xmm3,%xmm4
cvtdq2pd %xmm4,%xmm3
movapd %xmm2,%xmm4
unpcklpd %xmm2,%xmm4
mulpd  %xmm3,%xmm4
movapd %xmm0,%xmm3
unpcklpd %xmm0,%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm4,%xmm3
movapd %xmm3,0xa0(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sdl 0x10(%rax),%xmm1
xorps  %xmm4,%xmm4
cvtsi2sdl 0x14(%rax),%xmm4
mulsd  %xmm2,%xmm4
movapd 0x90(%rsp),%xmm2
mulsd  %xmm0,%xmm1
addsd  %xmm4,%xmm1
movsd  %xmm1,0xb0(%rsp)
movapd 0x60(%rsp),%xmm4
movapd %xmm4,%xmm0
unpcklpd %xmm4,%xmm0
mulpd  0xc0(%rsp),%xmm0
mulpd  %xmm2,%xmm3
addpd  %xmm3,%xmm0
movupd %xmm0,-0x10(%rbp)
movapd 0x20(%rsp),%xmm0
mulsd  %xmm0,%xmm1
movapd %xmm4,%xmm3
mulsd  0xd0(%rsp),%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x0(%rbp)
add    $0x1,%r15
add    $0x1,%r14d
add    $0x18,%rbp
cmp    %r14d,%ebx
jne    15a0 <TetShapeAndDrv+0x3f0>
add    $0x1,%r12d
add    $0x1,%ebx
cmp    0x80(%rsp),%ebx
jne    1580 <TetShapeAndDrv+0x3d0>
mov    0x70(%rsp),%rax
add    $0x1,%rax
cmp    $0x4,%rax
jne    14c0 <TetShapeAndDrv+0x310>
mov    (%rsp),%rax
add    %r14d,%eax
cmpl   $0x4,0x8(%rsp)
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rsi
mov    0x38(%rsp),%rdi
jl     18db <TetShapeAndDrv+0x72b>
mov    $0x4,%r14d
lea    0x40(%rsp),%r15
lea    0xa0(%rsp),%r12
jmp    1750 <TetShapeAndDrv+0x5a0>
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%r14),%ecx
cmp    %edi,%r14d
mov    %ecx,%r14d
je     18db <TetShapeAndDrv+0x72b>
lea    -0x3(%r14),%ebp
lea    -0x2(%r14),%ecx
imul   %ebp,%ecx
cmp    $0x2,%ecx
jl     1740 <TetShapeAndDrv+0x590>
mov    %ecx,%edi
shr    $0x1f,%edi
add    %ecx,%edi
sar    %edi
movapd 0x40(%rsp),%xmm4
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
movapd %xmm4,%xmm5
mulsd  %xmm0,%xmm5
movsd  0x50(%rsp),%xmm1
movapd %xmm5,%xmm2
mulsd  %xmm1,%xmm2
movsd  0x58(%rsp),%xmm6
mulsd  %xmm2,%xmm6
movsd  0x861(%rip),%xmm3
subsd  %xmm4,%xmm3
subsd  %xmm0,%xmm3
subsd  %xmm1,%xmm3
unpcklpd %xmm1,%xmm1
mulsd  %xmm3,%xmm5
unpcklpd %xmm3,%xmm3
subsd  %xmm2,%xmm5
movapd %xmm5,0x80(%rsp)
unpcklpd %xmm2,%xmm2
shufpd $0x1,%xmm4,%xmm4
mulpd  %xmm1,%xmm4
mulpd  %xmm3,%xmm4
subpd  %xmm2,%xmm4
movapd %xmm4,0x90(%rsp)
mov    %rax,(%rsp)
movslq %eax,%rcx
movapd %xmm6,0x20(%rsp)
unpcklpd %xmm6,%xmm6
movapd %xmm6,0x70(%rsp)
lea    (%rsi,%rcx,8),%rax
mov    %rax,0x8(%rsp)
lea    (%rcx,%rcx,2),%rcx
lea    (%rdx,%rcx,8),%rbx
mov    %edi,%r13d
xor    %ebp,%ebp
nop
mov    %r14d,%edi
mov    %ebp,%esi
mov    %r15,%rdx
xor    %eax,%eax
call   1080 <R_modeShapeTet@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movapd %xmm1,0x60(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  %xmm1,%xmm0
mov    0x8(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
mov    %r14d,%edi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1030 <R_modeShapeTetDrv@plt>
movapd 0xa0(%rsp),%xmm0
mulpd  0x70(%rsp),%xmm0
movapd 0x60(%rsp),%xmm2
movapd %xmm2,%xmm1
unpcklpd %xmm2,%xmm1
mulpd  0x90(%rsp),%xmm1
addpd  %xmm0,%xmm1
movupd %xmm1,-0x10(%rbx)
movsd  0xb0(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
movapd %xmm2,%xmm1
mulsd  0x80(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
add    $0x1,%rbp
add    $0x18,%rbx
cmp    %ebp,%r13d
jne    1810 <TetShapeAndDrv+0x660>
mov    (%rsp),%rax
add    %ebp,%eax
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rsi
mov    0x38(%rsp),%rdi
jmp    1740 <TetShapeAndDrv+0x590>
xor    %eax,%eax
jmp    18db <TetShapeAndDrv+0x72b>
mov    (%rsp),%rax
sub    %rbx,%rax
add    $0x158,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@TetShapeAndDrv.TetEMAP = internal global [6 x [2 x i32]] [[2 x i32] [i32 0, i32 1], [2 x i32] [i32 1, i32 2], [2 x i32] [i32 2, i32 0], [2 x i32] [i32 0, i32 3], [2 x i32] [i32 1, i32 3], [2 x i32] [i32 2, i32 3]]
@TetShapeAndDrv.TetFMAP = internal global [4 x [3 x i32]] [[3 x i32] [i32 0, i32 1, i32 2], [3 x i32] [i32 0, i32 3, i32 1], [3 x i32] [i32 1, i32 3, i32 2], [3 x i32] [i32 0, i32 2, i32 3]]
define i32 @TetShapeAndDrv(i32 %0, double* %1, double* %2, [3 x double]* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca [3 x double]*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca [2 x i32]*
%17 = alloca [4 x double]
%18 = alloca [2 x double]
%19 = alloca [3 x double]
%20 = alloca double
%21 = alloca double
%22 = alloca [3 x double]
%23 = alloca [3 x double]
%24 = alloca [3 x [2 x double]]
%25 = alloca [2 x double]
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
store i32 %0, i32* %6
store double* %1, double** %7
store double* %2, double** %8
store [3 x double]* %3, [3 x double]** %9
store i32 0, i32* %15
%32 = load i32, i32* %6
%33 = icmp slt i32 %32, 1
br i1 %33, label %34, label %36
34: ; preds = %4
%35 = load i32, i32* %15
store i32 %35, i32* %5
br label %619
36: ; preds = %4
%37 = load double*, double** %7
%38 = getelementptr inbounds double, double* %37, i64 0
%39 = load double, double* %38
%40 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
store double %39, double* %40
%41 = load double*, double** %7
%42 = getelementptr inbounds double, double* %41, i64 1
%43 = load double, double* %42
%44 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 1
store double %43, double* %44
%45 = load double*, double** %7
%46 = getelementptr inbounds double, double* %45, i64 2
%47 = load double, double* %46
%48 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 2
store double %47, double* %48
%49 = load double*, double** %7
%50 = getelementptr inbounds double, double* %49, i64 0
%51 = load double, double* %50
%52 = fsub double 1.000000e+00, %51
%53 = load double*, double** %7
%54 = getelementptr inbounds double, double* %53, i64 1
%55 = load double, double* %54
%56 = fsub double %52, %55
%57 = load double*, double** %7
%58 = getelementptr inbounds double, double* %57, i64 2
%59 = load double, double* %58
%60 = fsub double %56, %59
%61 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 3
store double %60, double* %61
store i32 0, i32* %12
br label %62
62: ; preds = %122, %36
%63 = load i32, i32* %12
%64 = icmp slt i32 %63, 4
br i1 %64, label %65, label %125
65: ; preds = %62
%66 = load i32, i32* %12
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 %67
%69 = load double, double* %68
%70 = load double*, double** %8
%71 = load i32, i32* %12
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
store double %69, double* %73
%74 = load i32, i32* %12
%75 = icmp eq i32 %74, 3
br i1 %75, label %76, label %92
76: ; preds = %65
%77 = load [3 x double]*, [3 x double]** %9
%78 = load i32, i32* %12
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [3 x double], [3 x double]* %77, i64 %79
%81 = getelementptr inbounds [3 x double], [3 x double]* %80, i64 0, i64 2
store double -1.000000e+00, double* %81
%82 = load [3 x double]*, [3 x double]** %9
%83 = load i32, i32* %12
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [3 x double], [3 x double]* %82, i64 %84
%86 = getelementptr inbounds [3 x double], [3 x double]* %85, i64 0, i64 1
store double -1.000000e+00, double* %86
%87 = load [3 x double]*, [3 x double]** %9
%88 = load i32, i32* %12
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds [3 x double], [3 x double]* %87, i64 %89
%91 = getelementptr inbounds [3 x double], [3 x double]* %90, i64 0, i64 0
store double -1.000000e+00, double* %91
br label %121
92: ; preds = %65
store i32 0, i32* %13
br label %93
93: ; preds = %117, %92
%94 = load i32, i32* %13
%95 = icmp slt i32 %94, 3
br i1 %95, label %96, label %120
96: ; preds = %93
%97 = load i32, i32* %12
%98 = load i32, i32* %13
%99 = icmp eq i32 %97, %98
br i1 %99, label %100, label %108
100: ; preds = %96
%101 = load [3 x double]*, [3 x double]** %9
%102 = load i32, i32* %12
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [3 x double], [3 x double]* %101, i64 %103
%105 = load i32, i32* %13
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [3 x double], [3 x double]* %104, i64 0, i64 %106
store double 1.000000e+00, double* %107
br label %116
108: ; preds = %96
%109 = load [3 x double]*, [3 x double]** %9
%110 = load i32, i32* %12
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds [3 x double], [3 x double]* %109, i64 %111
%113 = load i32, i32* %13
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds [3 x double], [3 x double]* %112, i64 0, i64 %114
store double 0.000000e+00, double* %115
br label %116
116: ; preds = %108, %100
br label %117
117: ; preds = %116
%118 = load i32, i32* %13
%119 = add nsw i32 %118, 1
store i32 %119, i32* %13
br label %93
120: ; preds = %93
br label %121
121: ; preds = %120, %76
br label %122
122: ; preds = %121
%123 = load i32, i32* %12
%124 = add nsw i32 %123, 1
store i32 %124, i32* %12
br label %62
125: ; preds = %62
store i32 4, i32* %15
%126 = load i32, i32* %6
%127 = icmp sgt i32 %126, 1
br i1 %127, label %128, label %276
128: ; preds = %125
store i32 0, i32* %12
br label %129
129: ; preds = %272, %128
%130 = load i32, i32* %12
%131 = icmp slt i32 %130, 6
br i1 %131, label %132, label %275
132: ; preds = %129
%133 = load i32, i32* %12
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %134
%136 = getelementptr inbounds [2 x i32], [2 x i32]* %135, i64 0, i64 0
%137 = load i32, i32* %136
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 %138
%140 = load double, double* %139
%141 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0, i64 0
store double %140, double* %141
%142 = load i32, i32* %12
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %143
%145 = getelementptr inbounds [2 x i32], [2 x i32]* %144, i64 0, i64 1
%146 = load i32, i32* %145
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 %147
%149 = load double, double* %148
%150 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0, i64 1
store double %149, double* %150
%151 = load i32, i32* %12
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %152
%154 = getelementptr inbounds [2 x i32], [2 x i32]* %153, i64 0, i64 0
%155 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%156 = call i32 (i32*, double*, ...) bitcast (i32 (...)* @R_edgeBlendTet to i32 (i32*, double*, ...)*)(i32* %154, double* %155)
%157 = sitofp i32 %156 to double
store double %157, double* %21
%158 = load i32, i32* %12
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %159
%161 = getelementptr inbounds [2 x i32], [2 x i32]* %160, i64 0, i64 0
%162 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%163 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
%164 = call i32 (i32*, double*, double*, ...) bitcast (i32 (...)* @R_edgeBlendTetDrv to i32 (i32*, double*, double*, ...)*)(i32* %161, double* %162, double* %163)
%165 = load i32, i32* %12
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %166
%168 = getelementptr inbounds [2 x i32], [2 x i32]* %167, i64 0, i64 0
%169 = load i32, i32* %168
%170 = load i32, i32* %12
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %171
%173 = getelementptr inbounds [2 x i32], [2 x i32]* %172, i64 0, i64 1
%174 = load i32, i32* %173
%175 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %24, i64 0, i64 0
%176 = call i32 (i32, i32, i32, [2 x double]*, ...) bitcast (i32 (...)* @E_parDrv to i32 (i32, i32, i32, [2 x double]*, ...)*)(i32 %169, i32 %174, i32 4, [2 x double]* %175)
store i32 2, i32* %14
br label %177
177: ; preds = %268, %132
%178 = load i32, i32* %14
%179 = load i32, i32* %6
%180 = icmp sle i32 %178, %179
br i1 %180, label %181, label %271
181: ; preds = %177
%182 = load i32, i32* %14
%183 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0, i64 0
%184 = call i32 (i32, double*, ...) bitcast (i32 (...)* @E_modeShape to i32 (i32, double*, ...)*)(i32 %182, double* %183)
%185 = sitofp i32 %184 to double
store double %185, double* %20
%186 = load i32, i32* %14
%187 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0, i64 0
%188 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%189 = call i32 (i32, double*, double*, ...) bitcast (i32 (...)* @E_modeShapeDrv to i32 (i32, double*, double*, ...)*)(i32 %186, double* %187, double* %188)
%190 = load double, double* %21
%191 = load double, double* %20
%192 = fmul double %190, %191
%193 = load double*, double** %8
%194 = load i32, i32* %15
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds double, double* %193, i64 %195
store double %192, double* %196
%197 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
%198 = load double, double* %197
%199 = load double, double* %20
%200 = load double, double* %21
%201 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%202 = load double, double* %201
%203 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %24, i64 0, i64 0
%204 = getelementptr inbounds [2 x double], [2 x double]* %203, i64 0, i64 0
%205 = load double, double* %204
%206 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 1
%207 = load double, double* %206
%208 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %24, i64 0, i64 0
%209 = getelementptr inbounds [2 x double], [2 x double]* %208, i64 0, i64 1
%210 = load double, double* %209
%211 = fmul double %207, %210
%212 = call double @llvm.fmuladd.f64(double %202, double %205, double %211)
%213 = fmul double %200, %212
%214 = call double @llvm.fmuladd.f64(double %198, double %199, double %213)
%215 = load [3 x double]*, [3 x double]** %9
%216 = load i32, i32* %15
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds [3 x double], [3 x double]* %215, i64 %217
%219 = getelementptr inbounds [3 x double], [3 x double]* %218, i64 0, i64 0
store double %214, double* %219
%220 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 1
%221 = load double, double* %220
%222 = load double, double* %20
%223 = load double, double* %21
%224 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%225 = load double, double* %224
%226 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %24, i64 0, i64 1
%227 = getelementptr inbounds [2 x double], [2 x double]* %226, i64 0, i64 0
%228 = load double, double* %227
%229 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 1
%230 = load double, double* %229
%231 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %24, i64 0, i64 1
%232 = getelementptr inbounds [2 x double], [2 x double]* %231, i64 0, i64 1
%233 = load double, double* %232
%234 = fmul double %230, %233
%235 = call double @llvm.fmuladd.f64(double %225, double %228, double %234)
%236 = fmul double %223, %235
%237 = call double @llvm.fmuladd.f64(double %221, double %222, double %236)
%238 = load [3 x double]*, [3 x double]** %9
%239 = load i32, i32* %15
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds [3 x double], [3 x double]* %238, i64 %240
%242 = getelementptr inbounds [3 x double], [3 x double]* %241, i64 0, i64 1
store double %237, double* %242
%243 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 2
%244 = load double, double* %243
%245 = load double, double* %20
%246 = load double, double* %21
%247 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%248 = load double, double* %247
%249 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %24, i64 0, i64 2
%250 = getelementptr inbounds [2 x double], [2 x double]* %249, i64 0, i64 0
%251 = load double, double* %250
%252 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 1
%253 = load double, double* %252
%254 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %24, i64 0, i64 2
%255 = getelementptr inbounds [2 x double], [2 x double]* %254, i64 0, i64 1
%256 = load double, double* %255
%257 = fmul double %253, %256
%258 = call double @llvm.fmuladd.f64(double %248, double %251, double %257)
%259 = fmul double %246, %258
%260 = call double @llvm.fmuladd.f64(double %244, double %245, double %259)
%261 = load [3 x double]*, [3 x double]** %9
%262 = load i32, i32* %15
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds [3 x double], [3 x double]* %261, i64 %263
%265 = getelementptr inbounds [3 x double], [3 x double]* %264, i64 0, i64 2
store double %260, double* %265
%266 = load i32, i32* %15
%267 = add nsw i32 %266, 1
store i32 %267, i32* %15
br label %268
268: ; preds = %181
%269 = load i32, i32* %14
%270 = add nsw i32 %269, 1
store i32 %270, i32* %14
br label %177
271: ; preds = %177
br label %272
272: ; preds = %271
%273 = load i32, i32* %12
%274 = add nsw i32 %273, 1
store i32 %274, i32* %12
br label %129
275: ; preds = %129
br label %276
276: ; preds = %275, %125
%277 = load i32, i32* %6
%278 = icmp sgt i32 %277, 2
br i1 %278, label %279, label %475
279: ; preds = %276
store i32 0, i32* %12
br label %280
280: ; preds = %471, %279
%281 = load i32, i32* %12
%282 = icmp slt i32 %281, 4
br i1 %282, label %283, label %474
283: ; preds = %280
%284 = load i32, i32* %12
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %285
%287 = getelementptr inbounds [3 x i32], [3 x i32]* %286, i64 0, i64 0
%288 = load i32, i32* %287
%289 = sext i32 %288 to i64
%290 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 %289
%291 = load double, double* %290
%292 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
store double %291, double* %292
%293 = load i32, i32* %12
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %294
%296 = getelementptr inbounds [3 x i32], [3 x i32]* %295, i64 0, i64 1
%297 = load i32, i32* %296
%298 = sext i32 %297 to i64
%299 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 %298
%300 = load double, double* %299
%301 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 1
store double %300, double* %301
%302 = load i32, i32* %12
%303 = sext i32 %302 to i64
%304 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %303
%305 = getelementptr inbounds [3 x i32], [3 x i32]* %304, i64 0, i64 2
%306 = load i32, i32* %305
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 %307
%309 = load double, double* %308
%310 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 2
store double %309, double* %310
%311 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
%312 = load double, double* %311
%313 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 1
%314 = load double, double* %313
%315 = fmul double %312, %314
%316 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 2
%317 = load double, double* %316
%318 = fmul double %315, %317
store double %318, double* %21
%319 = load i32, i32* %12
%320 = sext i32 %319 to i64
%321 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %320
%322 = getelementptr inbounds [3 x i32], [3 x i32]* %321, i64 0, i64 0
%323 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%324 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
%325 = call i32 (i32*, double*, double*, ...) bitcast (i32 (...)* @R_faceBlendTetDrv to i32 (i32*, double*, double*, ...)*)(i32* %322, double* %323, double* %324)
%326 = load i32, i32* %12
%327 = sext i32 %326 to i64
%328 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %327
%329 = getelementptr inbounds [3 x i32], [3 x i32]* %328, i64 0, i64 0
%330 = load i32, i32* %329
%331 = load i32, i32* %12
%332 = sext i32 %331 to i64
%333 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %332
%334 = getelementptr inbounds [3 x i32], [3 x i32]* %333, i64 0, i64 1
%335 = load i32, i32* %334
%336 = load i32, i32* %12
%337 = sext i32 %336 to i64
%338 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %337
%339 = getelementptr inbounds [3 x i32], [3 x i32]* %338, i64 0, i64 2
%340 = load i32, i32* %339
%341 = call i32 (i32, i32, i32, i32, [2 x i32]**, ...) bitcast (i32 (...)* @F_parDrv to i32 (i32, i32, i32, i32, [2 x i32]**, ...)*)(i32 %330, i32 %335, i32 %340, i32 4, [2 x i32]** %16)
store i32 3, i32* %14
br label %342
342: ; preds = %467, %283
%343 = load i32, i32* %14
%344 = load i32, i32* %6
%345 = icmp sle i32 %343, %344
br i1 %345, label %346, label %470
346: ; preds = %342
%347 = load i32, i32* %14
%348 = sub nsw i32 %347, 2
store i32 %348, i32* %10
store i32 0, i32* %11
br label %349
349: ; preds = %463, %346
%350 = load i32, i32* %11
%351 = load i32, i32* %10
%352 = icmp slt i32 %350, %351
br i1 %352, label %353, label %466
353: ; preds = %349
%354 = load i32, i32* %14
%355 = load i32, i32* %11
%356 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
%357 = call i32 (i32, i32, double*, ...) bitcast (i32 (...)* @F_modeShapeTri to i32 (i32, i32, double*, ...)*)(i32 %354, i32 %355, double* %356)
%358 = sitofp i32 %357 to double
store double %358, double* %20
%359 = load double, double* %21
%360 = load double, double* %20
%361 = fmul double %359, %360
%362 = load double*, double** %8
%363 = load i32, i32* %15
%364 = sext i32 %363 to i64
%365 = getelementptr inbounds double, double* %362, i64 %364
store double %361, double* %365
%366 = load i32, i32* %14
%367 = load i32, i32* %11
%368 = getelementptr inbounds [3 x double], [3 x double]* %19, i64 0, i64 0
%369 = getelementptr inbounds [2 x double], [2 x double]* %25, i64 0, i64 0
%370 = call i32 (i32, i32, double*, double*, ...) bitcast (i32 (...)* @F_modeShapeTriDrv to i32 (i32, i32, double*, double*, ...)*)(i32 %366, i32 %367, double* %368, double* %369)
%371 = getelementptr inbounds [2 x double], [2 x double]* %25, i64 0, i64 0
%372 = load double, double* %371
%373 = load [2 x i32]*, [2 x i32]** %16
%374 = getelementptr inbounds [2 x i32], [2 x i32]* %373, i64 0
%375 = getelementptr inbounds [2 x i32], [2 x i32]* %374, i64 0, i64 0
%376 = load i32, i32* %375
%377 = sitofp i32 %376 to double
%378 = getelementptr inbounds [2 x double], [2 x double]* %25, i64 0, i64 1
%379 = load double, double* %378
%380 = load [2 x i32]*, [2 x i32]** %16
%381 = getelementptr inbounds [2 x i32], [2 x i32]* %380, i64 0
%382 = getelementptr inbounds [2 x i32], [2 x i32]* %381, i64 0, i64 1
%383 = load i32, i32* %382
%384 = sitofp i32 %383 to double
%385 = fmul double %379, %384
%386 = call double @llvm.fmuladd.f64(double %372, double %377, double %385)
%387 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
store double %386, double* %387
%388 = getelementptr inbounds [2 x double], [2 x double]* %25, i64 0, i64 0
%389 = load double, double* %388
%390 = load [2 x i32]*, [2 x i32]** %16
%391 = getelementptr inbounds [2 x i32], [2 x i32]* %390, i64 1
%392 = getelementptr inbounds [2 x i32], [2 x i32]* %391, i64 0, i64 0
%393 = load i32, i32* %392
%394 = sitofp i32 %393 to double
%395 = getelementptr inbounds [2 x double], [2 x double]* %25, i64 0, i64 1
%396 = load double, double* %395
%397 = load [2 x i32]*, [2 x i32]** %16
%398 = getelementptr inbounds [2 x i32], [2 x i32]* %397, i64 1
%399 = getelementptr inbounds [2 x i32], [2 x i32]* %398, i64 0, i64 1
%400 = load i32, i32* %399
%401 = sitofp i32 %400 to double
%402 = fmul double %396, %401
%403 = call double @llvm.fmuladd.f64(double %389, double %394, double %402)
%404 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 1
store double %403, double* %404
%405 = getelementptr inbounds [2 x double], [2 x double]* %25, i64 0, i64 0
%406 = load double, double* %405
%407 = load [2 x i32]*, [2 x i32]** %16
%408 = getelementptr inbounds [2 x i32], [2 x i32]* %407, i64 2
%409 = getelementptr inbounds [2 x i32], [2 x i32]* %408, i64 0, i64 0
%410 = load i32, i32* %409
%411 = sitofp i32 %410 to double
%412 = getelementptr inbounds [2 x double], [2 x double]* %25, i64 0, i64 1
%413 = load double, double* %412
%414 = load [2 x i32]*, [2 x i32]** %16
%415 = getelementptr inbounds [2 x i32], [2 x i32]* %414, i64 2
%416 = getelementptr inbounds [2 x i32], [2 x i32]* %415, i64 0, i64 1
%417 = load i32, i32* %416
%418 = sitofp i32 %417 to double
%419 = fmul double %413, %418
%420 = call double @llvm.fmuladd.f64(double %406, double %411, double %419)
%421 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 2
store double %420, double* %421
%422 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 0
%423 = load double, double* %422
%424 = load double, double* %20
%425 = load double, double* %21
%426 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%427 = load double, double* %426
%428 = fmul double %425, %427
%429 = call double @llvm.fmuladd.f64(double %423, double %424, double %428)
%430 = load [3 x double]*, [3 x double]** %9
%431 = load i32, i32* %15
%432 = sext i32 %431 to i64
%433 = getelementptr inbounds [3 x double], [3 x double]* %430, i64 %432
%434 = getelementptr inbounds [3 x double], [3 x double]* %433, i64 0, i64 0
store double %429, double* %434
%435 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 1
%436 = load double, double* %435
%437 = load double, double* %20
%438 = load double, double* %21
%439 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 1
%440 = load double, double* %439
%441 = fmul double %438, %440
%442 = call double @llvm.fmuladd.f64(double %436, double %437, double %441)
%443 = load [3 x double]*, [3 x double]** %9
%444 = load i32, i32* %15
%445 = sext i32 %444 to i64
%446 = getelementptr inbounds [3 x double], [3 x double]* %443, i64 %445
%447 = getelementptr inbounds [3 x double], [3 x double]* %446, i64 0, i64 1
store double %442, double* %447
%448 = getelementptr inbounds [3 x double], [3 x double]* %22, i64 0, i64 2
%449 = load double, double* %448
%450 = load double, double* %20
%451 = load double, double* %21
%452 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 2
%453 = load double, double* %452
%454 = fmul double %451, %453
%455 = call double @llvm.fmuladd.f64(double %449, double %450, double %454)
%456 = load [3 x double]*, [3 x double]** %9
%457 = load i32, i32* %15
%458 = sext i32 %457 to i64
%459 = getelementptr inbounds [3 x double], [3 x double]* %456, i64 %458
%460 = getelementptr inbounds [3 x double], [3 x double]* %459, i64 0, i64 2
store double %455, double* %460
%461 = load i32, i32* %15
%462 = add nsw i32 %461, 1
store i32 %462, i32* %15
br label %463
463: ; preds = %353
%464 = load i32, i32* %11
%465 = add nsw i32 %464, 1
store i32 %465, i32* %11
br label %349
466: ; preds = %349
br label %467
467: ; preds = %466
%468 = load i32, i32* %14
%469 = add nsw i32 %468, 1
store i32 %469, i32* %14
br label %342
470: ; preds = %342
br label %471
471: ; preds = %470
%472 = load i32, i32* %12
%473 = add nsw i32 %472, 1
store i32 %473, i32* %12
br label %280
474: ; preds = %280
br label %475
475: ; preds = %474, %276
%476 = load i32, i32* %6
%477 = icmp sgt i32 %476, 3
br i1 %477, label %478, label %617
478: ; preds = %475
store i32 4, i32* %14
br label %479
479: ; preds = %613, %478
%480 = load i32, i32* %14
%481 = load i32, i32* %6
%482 = icmp sle i32 %480, %481
br i1 %482, label %483, label %616
483: ; preds = %479
%484 = load i32, i32* %14
%485 = sub nsw i32 %484, 3
%486 = load i32, i32* %14
%487 = sub nsw i32 %486, 2
%488 = mul nsw i32 %485, %487
%489 = sdiv i32 %488, 2
store i32 %489, i32* %10
%490 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%491 = load double, double* %490
%492 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 1
%493 = load double, double* %492
%494 = fmul double %491, %493
%495 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 2
%496 = load double, double* %495
%497 = fmul double %494, %496
%498 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 3
%499 = load double, double* %498
%500 = fmul double %497, %499
store double %500, double* %21
%501 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%502 = load double, double* %501
%503 = fsub double 1.000000e+00, %502
%504 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 1
%505 = load double, double* %504
%506 = fsub double %503, %505
%507 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 2
%508 = load double, double* %507
%509 = fsub double %506, %508
store double %509, double* %26
%510 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%511 = load double, double* %510
%512 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 1
%513 = load double, double* %512
%514 = fmul double %511, %513
%515 = load double, double* %26
%516 = fmul double %514, %515
store double %516, double* %28
%517 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 1
%518 = load double, double* %517
%519 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 2
%520 = load double, double* %519
%521 = fmul double %518, %520
%522 = load double, double* %26
%523 = fmul double %521, %522
store double %523, double* %29
%524 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%525 = load double, double* %524
%526 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 2
%527 = load double, double* %526
%528 = fmul double %525, %527
%529 = load double, double* %26
%530 = fmul double %528, %529
store double %530, double* %31
%531 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%532 = load double, double* %531
%533 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 1
%534 = load double, double* %533
%535 = fmul double %532, %534
%536 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 2
%537 = load double, double* %536
%538 = fmul double %535, %537
store double %538, double* %27
%539 = load double, double* %27
%540 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 3
%541 = load double, double* %540
%542 = fmul double %539, %541
store double %542, double* %30
store i32 0, i32* %11
br label %543
543: ; preds = %609, %483
%544 = load i32, i32* %11
%545 = load i32, i32* %10
%546 = icmp slt i32 %544, %545
br i1 %546, label %547, label %612
547: ; preds = %543
%548 = load i32, i32* %14
%549 = load i32, i32* %11
%550 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%551 = call i32 (i32, i32, double*, ...) bitcast (i32 (...)* @R_modeShapeTet to i32 (i32, i32, double*, ...)*)(i32 %548, i32 %549, double* %550)
%552 = sitofp i32 %551 to double
store double %552, double* %20
%553 = load double, double* %21
%554 = load double, double* %20
%555 = fmul double %553, %554
%556 = load double*, double** %8
%557 = load i32, i32* %15
%558 = sext i32 %557 to i64
%559 = getelementptr inbounds double, double* %556, i64 %558
store double %555, double* %559
%560 = load i32, i32* %14
%561 = load i32, i32* %11
%562 = getelementptr inbounds [4 x double], [4 x double]* %17, i64 0, i64 0
%563 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%564 = call i32 (i32, i32, double*, double*, ...) bitcast (i32 (...)* @R_modeShapeTetDrv to i32 (i32, i32, double*, double*, ...)*)(i32 %560, i32 %561, double* %562, double* %563)
%565 = load double, double* %20
%566 = load double, double* %29
%567 = load double, double* %27
%568 = fsub double %566, %567
%569 = load double, double* %30
%570 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 0
%571 = load double, double* %570
%572 = fmul double %569, %571
%573 = call double @llvm.fmuladd.f64(double %565, double %568, double %572)
%574 = load [3 x double]*, [3 x double]** %9
%575 = load i32, i32* %15
%576 = sext i32 %575 to i64
%577 = getelementptr inbounds [3 x double], [3 x double]* %574, i64 %576
%578 = getelementptr inbounds [3 x double], [3 x double]* %577, i64 0, i64 0
store double %573, double* %578
%579 = load double, double* %20
%580 = load double, double* %31
%581 = load double, double* %27
%582 = fsub double %580, %581
%583 = load double, double* %30
%584 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 1
%585 = load double, double* %584
%586 = fmul double %583, %585
%587 = call double @llvm.fmuladd.f64(double %579, double %582, double %586)
%588 = load [3 x double]*, [3 x double]** %9
%589 = load i32, i32* %15
%590 = sext i32 %589 to i64
%591 = getelementptr inbounds [3 x double], [3 x double]* %588, i64 %590
%592 = getelementptr inbounds [3 x double], [3 x double]* %591, i64 0, i64 1
store double %587, double* %592
%593 = load double, double* %20
%594 = load double, double* %28
%595 = load double, double* %27
%596 = fsub double %594, %595
%597 = load double, double* %30
%598 = getelementptr inbounds [3 x double], [3 x double]* %23, i64 0, i64 2
%599 = load double, double* %598
%600 = fmul double %597, %599
%601 = call double @llvm.fmuladd.f64(double %593, double %596, double %600)
%602 = load [3 x double]*, [3 x double]** %9
%603 = load i32, i32* %15
%604 = sext i32 %603 to i64
%605 = getelementptr inbounds [3 x double], [3 x double]* %602, i64 %604
%606 = getelementptr inbounds [3 x double], [3 x double]* %605, i64 0, i64 2
store double %601, double* %606
%607 = load i32, i32* %15
%608 = add nsw i32 %607, 1
store i32 %608, i32* %15
br label %609
609: ; preds = %547
%610 = load i32, i32* %11
%611 = add nsw i32 %610, 1
store i32 %611, i32* %11
br label %543
612: ; preds = %543
br label %613
613: ; preds = %612
%614 = load i32, i32* %14
%615 = add nsw i32 %614, 1
store i32 %615, i32* %14
br label %479
616: ; preds = %479
br label %617
617: ; preds = %616, %475
%618 = load i32, i32* %15
store i32 %618, i32* %5
br label %619
619: ; preds = %617, %34
%620 = load i32, i32* %5
ret i32 %620
}

LLVM IR (-O2):
@TetShapeAndDrv.TetEMAP = internal global [6 x [2 x i32]] [[2 x i32] [i32 0, i32 1], [2 x i32] [i32 1, i32 2], [2 x i32] [i32 2, i32 0], [2 x i32] [i32 0, i32 3], [2 x i32] [i32 1, i32 3], [2 x i32] [i32 2, i32 3]]
@TetShapeAndDrv.TetFMAP = internal global [4 x [3 x i32]] [[3 x i32] [i32 0, i32 1, i32 2], [3 x i32] [i32 0, i32 3, i32 1], [3 x i32] [i32 1, i32 3, i32 2], [3 x i32] [i32 0, i32 2, i32 3]]
define i32 @TetShapeAndDrv(i32 %0, double* nocapture %1, double* nocapture writeonly %2, [3 x double]* nocapture writeonly %3) {
%5 = alloca [2 x i32]*
%6 = alloca [4 x double]
%7 = alloca [2 x double]
%8 = alloca [3 x double]
%9 = alloca [3 x double]
%10 = alloca [3 x double]
%11 = alloca [3 x [2 x double]]
%12 = alloca [2 x double]
%13 = bitcast [2 x i32]** %5 to i8*
%14 = bitcast [4 x double]* %6 to i8*
%15 = bitcast [2 x double]* %7 to i8*
%16 = bitcast [3 x double]* %8 to i8*
%17 = bitcast [3 x double]* %9 to i8*
%18 = bitcast [3 x double]* %10 to i8*
%19 = bitcast [3 x [2 x double]]* %11 to i8*
%20 = bitcast [2 x double]* %12 to i8*
%21 = icmp slt i32 %0, 1
br i1 %21, label %309, label %22
22: ; preds = %4
%23 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%24 = bitcast double* %1 to <2 x double>*
%25 = load <2 x double>, <2 x double>* %24
%26 = bitcast [4 x double]* %6 to <2 x double>*
store <2 x double> %25, <2 x double>* %26
%27 = getelementptr inbounds double, double* %1, i64 2
%28 = load double, double* %27
%29 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 2
store double %28, double* %29
%30 = extractelement <2 x double> %25, i64 0
%31 = fsub double 1.000000e+00, %30
%32 = extractelement <2 x double> %25, i64 1
%33 = fsub double %31, %32
%34 = fsub double %33, %28
%35 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 3
store double %34, double* %35
store double %30, double* %2
%36 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
store double 1.000000e+00, double* %36
%37 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%38 = getelementptr inbounds double, double* %2, i64 1
%39 = bitcast double* %37 to i8*
store double %32, double* %38
%40 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 1, i64 0
%41 = bitcast double* %40 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %41
%42 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 1, i64 2
store double 0.000000e+00, double* %42
%43 = getelementptr inbounds double, double* %2, i64 2
store double %28, double* %43
%44 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 2, i64 0
%45 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 2, i64 2
%46 = bitcast double* %44 to i8*
store double 1.000000e+00, double* %45
%47 = getelementptr inbounds double, double* %2, i64 3
store double %34, double* %47
%48 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 3, i64 2
store double -1.000000e+00, double* %48
%49 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 3, i64 0
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> <double -1.000000e+00, double -1.000000e+00>, <2 x double>* %50
%51 = icmp eq i32 %0, 1
br i1 %51, label %309, label %52
52: ; preds = %22
%53 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 0
%54 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0, i64 1
%55 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 0
%56 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %11, i64 0, i64 0
%57 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 0
%58 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 1
%59 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %11, i64 0, i64 0, i64 1
%60 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %11, i64 0, i64 1, i64 0
%61 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %11, i64 0, i64 1, i64 1
%62 = getelementptr inbounds [3 x double], [3 x double]* %9, i64 0, i64 2
%63 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %11, i64 0, i64 2, i64 0
%64 = getelementptr inbounds [3 x [2 x double]], [3 x [2 x double]]* %11, i64 0, i64 2, i64 1
%65 = bitcast [3 x [2 x double]]* %11 to <2 x double>*
%66 = bitcast double* %59 to <2 x double>*
%67 = bitcast [3 x double]* %9 to <2 x double>*
br label %68
68: ; preds = %131, %52
%69 = phi i64 [ 0, %52 ], [ %132, %131 ]
%70 = phi i64 [ 4, %52 ], [ %128, %131 ]
%71 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %69, i64 0
%72 = load i32, i32* %71
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 %73
%75 = load double, double* %74
store double %75, double* %53
%76 = getelementptr inbounds [6 x [2 x i32]], [6 x [2 x i32]]* @TetShapeAndDrv.TetEMAP, i64 0, i64 %69, i64 1
%77 = load i32, i32* %76
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 %78
%80 = load double, double* %79
store double %80, double* %54
%81 = call i32 (i32*, double*, ...) bitcast (i32 (...)* @R_edgeBlendTet to i32 (i32*, double*, ...)*)(i32* %71, double* %23)
%82 = sitofp i32 %81 to double
%83 = call i32 (i32*, double*, double*, ...) bitcast (i32 (...)* @R_edgeBlendTetDrv to i32 (i32*, double*, double*, ...)*)(i32* %71, double* %23, double* %55)
%84 = load i32, i32* %71
%85 = load i32, i32* %76
%86 = call i32 (i32, i32, i32, [2 x double]*, ...) bitcast (i32 (...)* @E_parDrv to i32 (i32, i32, i32, [2 x double]*, ...)*)(i32 %84, i32 %85, i32 4, [2 x double]* %56)
%87 = shl i64 %70, 32
%88 = ashr exact i64 %87, 32
%89 = insertelement <2 x double> poison, double %82, i64 0
%90 = shufflevector <2 x double> %89, <2 x double> poison, <2 x i32> zeroinitializer
br label %91
91: ; preds = %68, %91
%92 = phi i64 [ %88, %68 ], [ %128, %91 ]
%93 = phi i32 [ 2, %68 ], [ %129, %91 ]
%94 = call i32 (i32, double*, ...) bitcast (i32 (...)* @E_modeShape to i32 (i32, double*, ...)*)(i32 %93, double* %53)
%95 = sitofp i32 %94 to double
%96 = call i32 (i32, double*, double*, ...) bitcast (i32 (...)* @E_modeShapeDrv to i32 (i32, double*, double*, ...)*)(i32 %93, double* %53, double* %57)
%97 = fmul double %82, %95
%98 = getelementptr inbounds double, double* %2, i64 %92
store double %97, double* %98
%99 = load double, double* %57
%100 = load <2 x double>, <2 x double>* %65
%101 = load double, double* %58
%102 = load <2 x double>, <2 x double>* %66
%103 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 %92, i64 0
%104 = load <2 x double>, <2 x double>* %67
%105 = load double, double* %60
%106 = load double, double* %61
%107 = insertelement <2 x double> poison, double %101, i64 0
%108 = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> zeroinitializer
%109 = insertelement <2 x double> %102, double %106, i64 1
%110 = fmul <2 x double> %108, %109
%111 = insertelement <2 x double> poison, double %99, i64 0
%112 = shufflevector <2 x double> %111, <2 x double> poison, <2 x i32> zeroinitializer
%113 = insertelement <2 x double> %100, double %105, i64 1
%114 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %112, <2 x double> %113, <2 x double> %110)
%115 = fmul <2 x double> %114, %90
%116 = insertelement <2 x double> poison, double %95, i64 0
%117 = shufflevector <2 x double> %116, <2 x double> poison, <2 x i32> zeroinitializer
%118 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %104, <2 x double> %117, <2 x double> %115)
%119 = bitcast double* %103 to <2 x double>*
store <2 x double> %118, <2 x double>* %119
%120 = load double, double* %62
%121 = load double, double* %63
%122 = load double, double* %64
%123 = fmul double %101, %122
%124 = call double @llvm.fmuladd.f64(double %99, double %121, double %123)
%125 = fmul double %124, %82
%126 = call double @llvm.fmuladd.f64(double %120, double %95, double %125)
%127 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 %92, i64 2
store double %126, double* %127
%128 = add nsw i64 %92, 1
%129 = add nuw i32 %93, 1
%130 = icmp eq i32 %93, %0
br i1 %130, label %131, label %91
131: ; preds = %91
%132 = add nuw nsw i64 %69, 1
%133 = icmp eq i64 %132, 6
br i1 %133, label %134, label %68
134: ; preds = %131
%135 = trunc i64 %128 to i32
%136 = icmp sgt i32 %0, 2
br i1 %136, label %137, label %309
137: ; preds = %134
%138 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%139 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 1
%140 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 2
%141 = getelementptr inbounds [2 x double], [2 x double]* %12, i64 0, i64 0
%142 = getelementptr inbounds [2 x double], [2 x double]* %12, i64 0, i64 1
%143 = getelementptr inbounds [3 x double], [3 x double]* %10, i64 0, i64 2
%144 = add nsw i32 %0, -1
%145 = bitcast [3 x double]* %10 to <2 x double>*
%146 = bitcast [3 x double]* %9 to <2 x double>*
br label %147
147: ; preds = %237, %137
%148 = phi i64 [ 0, %137 ], [ %238, %237 ]
%149 = phi i64 [ %128, %137 ], [ %230, %237 ]
%150 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %148, i64 0
%151 = load i32, i32* %150
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 %152
%154 = load double, double* %153
store double %154, double* %138
%155 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %148, i64 1
%156 = load i32, i32* %155
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 %157
%159 = load double, double* %158
store double %159, double* %139
%160 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* @TetShapeAndDrv.TetFMAP, i64 0, i64 %148, i64 2
%161 = load i32, i32* %160
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 %162
%164 = load double, double* %163
store double %164, double* %140
%165 = fmul double %154, %159
%166 = fmul double %165, %164
%167 = call i32 (i32*, double*, double*, ...) bitcast (i32 (...)* @R_faceBlendTetDrv to i32 (i32*, double*, double*, ...)*)(i32* %150, double* %23, double* %55)
%168 = load i32, i32* %150
%169 = load i32, i32* %155
%170 = load i32, i32* %160
%171 = call i32 (i32, i32, i32, i32, [2 x i32]**, ...) bitcast (i32 (...)* @F_parDrv to i32 (i32, i32, i32, i32, [2 x i32]**, ...)*)(i32 %168, i32 %169, i32 %170, i32 4, [2 x i32]** %5)
%172 = insertelement <2 x double> poison, double %166, i64 0
%173 = shufflevector <2 x double> %172, <2 x double> poison, <2 x i32> zeroinitializer
br label %174
174: ; preds = %233, %147
%175 = phi i32 [ 1, %147 ], [ %235, %233 ]
%176 = phi i32 [ 3, %147 ], [ %234, %233 ]
%177 = phi i64 [ %149, %147 ], [ %230, %233 ]
%178 = shl i64 %177, 32
%179 = ashr exact i64 %178, 32
br label %180
180: ; preds = %174, %180
%181 = phi i64 [ %179, %174 ], [ %230, %180 ]
%182 = phi i32 [ 0, %174 ], [ %231, %180 ]
%183 = call i32 (i32, i32, double*, ...) bitcast (i32 (...)* @F_modeShapeTri to i32 (i32, i32, double*, ...)*)(i32 %176, i32 %182, double* %138)
%184 = sitofp i32 %183 to double
%185 = fmul double %166, %184
%186 = getelementptr inbounds double, double* %2, i64 %181
store double %185, double* %186
%187 = call i32 (i32, i32, double*, double*, ...) bitcast (i32 (...)* @F_modeShapeTriDrv to i32 (i32, i32, double*, double*, ...)*)(i32 %176, i32 %182, double* %138, double* %141)
%188 = load double, double* %141
%189 = load [2 x i32]*, [2 x i32]** %5
%190 = getelementptr inbounds [2 x i32], [2 x i32]* %189, i64 0, i64 0
%191 = load i32, i32* %190
%192 = load double, double* %142
%193 = getelementptr inbounds [2 x i32], [2 x i32]* %189, i64 0, i64 1
%194 = load i32, i32* %193
%195 = getelementptr inbounds [2 x i32], [2 x i32]* %189, i64 1, i64 0
%196 = load i32, i32* %195
%197 = insertelement <2 x i32> poison, i32 %191, i64 0
%198 = insertelement <2 x i32> %197, i32 %196, i64 1
%199 = sitofp <2 x i32> %198 to <2 x double>
%200 = getelementptr inbounds [2 x i32], [2 x i32]* %189, i64 1, i64 1
%201 = load i32, i32* %200
%202 = insertelement <2 x i32> poison, i32 %194, i64 0
%203 = insertelement <2 x i32> %202, i32 %201, i64 1
%204 = sitofp <2 x i32> %203 to <2 x double>
%205 = insertelement <2 x double> poison, double %192, i64 0
%206 = shufflevector <2 x double> %205, <2 x double> poison, <2 x i32> zeroinitializer
%207 = fmul <2 x double> %206, %204
%208 = insertelement <2 x double> poison, double %188, i64 0
%209 = shufflevector <2 x double> %208, <2 x double> poison, <2 x i32> zeroinitializer
%210 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %209, <2 x double> %199, <2 x double> %207)
store <2 x double> %210, <2 x double>* %145
%211 = getelementptr inbounds [2 x i32], [2 x i32]* %189, i64 2, i64 0
%212 = load i32, i32* %211
%213 = sitofp i32 %212 to double
%214 = getelementptr inbounds [2 x i32], [2 x i32]* %189, i64 2, i64 1
%215 = load i32, i32* %214
%216 = sitofp i32 %215 to double
%217 = fmul double %192, %216
%218 = call double @llvm.fmuladd.f64(double %188, double %213, double %217)
store double %218, double* %143
%219 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 %181, i64 0
%220 = load <2 x double>, <2 x double>* %146
%221 = fmul <2 x double> %173, %210
%222 = insertelement <2 x double> poison, double %184, i64 0
%223 = shufflevector <2 x double> %222, <2 x double> poison, <2 x i32> zeroinitializer
%224 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %220, <2 x double> %223, <2 x double> %221)
%225 = bitcast double* %219 to <2 x double>*
store <2 x double> %224, <2 x double>* %225
%226 = load double, double* %62
%227 = fmul double %166, %218
%228 = call double @llvm.fmuladd.f64(double %226, double %184, double %227)
%229 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 %181, i64 2
store double %228, double* %229
%230 = add nsw i64 %181, 1
%231 = add nuw nsw i32 %182, 1
%232 = icmp eq i32 %231, %175
br i1 %232, label %233, label %180
233: ; preds = %180
%234 = add nuw nsw i32 %176, 1
%235 = add nuw nsw i32 %175, 1
%236 = icmp eq i32 %235, %144
br i1 %236, label %237, label %174
237: ; preds = %233
%238 = add nuw nsw i64 %148, 1
%239 = icmp eq i64 %238, 4
br i1 %239, label %240, label %147
240: ; preds = %237
%241 = trunc i64 %230 to i32
%242 = icmp slt i32 %0, 4
br i1 %242, label %309, label %243
243: ; preds = %240
%244 = bitcast [4 x double]* %6 to <2 x double>*
%245 = bitcast [3 x double]* %10 to <2 x double>*
br label %246
246: ; preds = %243, %305
%247 = phi i32 [ %307, %305 ], [ 4, %243 ]
%248 = phi i32 [ %306, %305 ], [ %241, %243 ]
%249 = add nsw i32 %247, -3
%250 = add nsw i32 %247, -2
%251 = mul nsw i32 %249, %250
%252 = sdiv i32 %251, 2
%253 = load <2 x double>, <2 x double>* %244
%254 = extractelement <2 x double> %253, i64 0
%255 = extractelement <2 x double> %253, i64 1
%256 = fmul double %254, %255
%257 = load double, double* %29
%258 = fmul double %256, %257
%259 = load double, double* %35
%260 = fmul double %258, %259
%261 = fsub double 1.000000e+00, %254
%262 = fsub double %261, %255
%263 = fsub double %262, %257
%264 = icmp sgt i32 %251, 1
br i1 %264, label %265, label %305
265: ; preds = %246
%266 = insertelement <2 x double> poison, double %257, i64 0
%267 = shufflevector <2 x double> %266, <2 x double> poison, <2 x i32> zeroinitializer
%268 = fmul <2 x double> %253, %267
%269 = insertelement <2 x double> poison, double %263, i64 0
%270 = shufflevector <2 x double> %269, <2 x double> poison, <2 x i32> zeroinitializer
%271 = fmul <2 x double> %268, %270
%272 = fmul double %256, %263
%273 = insertelement <2 x double> poison, double %258, i64 0
%274 = shufflevector <2 x double> %273, <2 x double> poison, <2 x i32> zeroinitializer
%275 = fsub <2 x double> %271, %274
%276 = shufflevector <2 x double> %275, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%277 = fsub double %272, %258
%278 = sext i32 %248 to i64
%279 = insertelement <2 x double> poison, double %260, i64 0
%280 = shufflevector <2 x double> %279, <2 x double> poison, <2 x i32> zeroinitializer
br label %281
281: ; preds = %265, %281
%282 = phi i64 [ %278, %265 ], [ %300, %281 ]
%283 = phi i32 [ 0, %265 ], [ %301, %281 ]
%284 = call i32 (i32, i32, double*, ...) bitcast (i32 (...)* @R_modeShapeTet to i32 (i32, i32, double*, ...)*)(i32 %247, i32 %283, double* %23)
%285 = sitofp i32 %284 to double
%286 = fmul double %260, %285
%287 = getelementptr inbounds double, double* %2, i64 %282
store double %286, double* %287
%288 = call i32 (i32, i32, double*, double*, ...) bitcast (i32 (...)* @R_modeShapeTetDrv to i32 (i32, i32, double*, double*, ...)*)(i32 %247, i32 %283, double* %23, double* %57)
%289 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 %282, i64 0
%290 = load <2 x double>, <2 x double>* %245
%291 = fmul <2 x double> %280, %290
%292 = insertelement <2 x double> poison, double %285, i64 0
%293 = shufflevector <2 x double> %292, <2 x double> poison, <2 x i32> zeroinitializer
%294 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %293, <2 x double> %276, <2 x double> %291)
%295 = bitcast double* %289 to <2 x double>*
store <2 x double> %294, <2 x double>* %295
%296 = load double, double* %143
%297 = fmul double %260, %296
%298 = call double @llvm.fmuladd.f64(double %285, double %277, double %297)
%299 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 %282, i64 2
store double %298, double* %299
%300 = add nsw i64 %282, 1
%301 = add nuw nsw i32 %283, 1
%302 = icmp eq i32 %301, %252
br i1 %302, label %303, label %281
303: ; preds = %281
%304 = trunc i64 %300 to i32
br label %305
305: ; preds = %303, %246
%306 = phi i32 [ %248, %246 ], [ %304, %303 ]
%307 = add nuw i32 %247, 1
%308 = icmp eq i32 %247, %0
br i1 %308, label %309, label %246
309: ; preds = %305, %22, %134, %240, %4
%310 = phi i32 [ 0, %4 ], [ %241, %240 ], [ %135, %134 ], [ 4, %22 ], [ %306, %305 ]
ret i32 %310
}