double X2L_tria6(double X[6][3], double *XL, double *L, double *N) {
  double ax, ay, az, dx1, dx2, dy1, dy2, dz1, dz2, j1, j2, j3, L1, L2;
  XL[0] = N[0] * X[0][0] + N[1] * X[1][0] + N[2] * X[2][0] + N[3] * X[3][0] +
          N[4] * X[4][0] + N[5] * X[5][0];
  XL[1] = N[0] * X[0][1] + N[1] * X[1][1] + N[2] * X[2][1] + N[3] * X[3][1] +
          N[4] * X[4][1] + N[5] * X[5][1];
  XL[2] = N[0] * X[0][2] + N[1] * X[1][2] + N[2] * X[2][2] + N[3] * X[3][2] +
          N[4] * X[4][2] + N[5] * X[5][2];
  L1 = L[0];
  L2 = L[1];
  ax = X[1][0] - X[3][0] + X[4][0] - X[5][0];
  ay = X[1][1] - X[3][1] + X[4][1] - X[5][1];
  az = X[1][2] - X[3][2] + X[4][2] - X[5][2];
  dx1 = 4.0 * (L1 * (X[0][0] + X[4][0] - 2.0 * X[5][0]) + L2 * ax + X[5][0]) -
        X[0][0] - 3.0 * X[4][0];
  dx2 = 4.0 * (L1 * ax + L2 * (X[2][0] + X[4][0] - 2.0 * X[3][0]) + X[3][0]) -
        X[2][0] - 3.0 * X[4][0];
  dy1 = 4.0 * (L1 * (X[0][1] + X[4][1] - 2.0 * X[5][1]) + L2 * ay + X[5][1]) -
        X[0][1] - 3.0 * X[4][1];
  dy2 = 4.0 * (L1 * ay + L2 * (X[2][1] + X[4][1] - 2.0 * X[3][1]) + X[3][1]) -
        X[2][1] - 3.0 * X[4][1];
  dz1 = 4.0 * (L1 * (X[0][2] + X[4][2] - 2.0 * X[5][2]) + L2 * az + X[5][2]) -
        X[0][2] - 3.0 * X[4][2];
  dz2 = 4.0 * (L1 * az + L2 * (X[2][2] + X[4][2] - 2.0 * X[3][2]) + X[3][2]) -
        X[2][2] - 3.0 * X[4][2];
  j1 = dy1 * dz2 - dy2 * dz1;
  j2 = dx2 * dz1 - dx1 * dz2;
  j3 = dx1 * dy2 - dx2 * dy1;
  return sqrt(j1 * j1 + j2 * j2 + j3 * j3);
}


x86 assembly (clang, -O0):
<X2L_tria6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x18(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x60(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x78(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x20(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x50(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x68(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x80(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x28(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x58(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x70(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x88(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x48(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x60(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x78(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x50(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x68(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x80(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x58(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x70(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x88(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
addsd  0x60(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x78(%rax),%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x28(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
addsd  0x78(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xbf4(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  0xbd3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x28(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm3
mov    -0x8(%rbp),%rax
addsd  0x60(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm4
addsd  %xmm4,%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
addsd  0x48(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xb59(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  0xb38(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x8(%rbp),%rax
addsd  0x68(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x80(%rax),%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x30(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
addsd  0x80(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xabc(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  0xa9b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x30(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm3
mov    -0x8(%rbp),%rax
addsd  0x68(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x50(%rax),%xmm4
addsd  %xmm4,%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
addsd  0x50(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xa21(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  0xa00(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
addsd  0x70(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x88(%rax),%xmm0
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x38(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
addsd  0x88(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x984(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  0x963(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x38(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm3
mov    -0x8(%rbp),%rax
addsd  0x70(%rax),%xmm3
mov    -0x8(%rbp),%rax
movsd  0x58(%rax),%xmm4
addsd  %xmm4,%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
addsd  0x58(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x8e9(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x70(%rax),%xmm0
movsd  0x8c8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<X2L_tria6>:
movsd  0x8(%rcx),%xmm0
mulsd  0x18(%rdi),%xmm0
movsd  (%rcx),%xmm1
mulsd  (%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rcx),%xmm0
mulsd  0x30(%rdi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x18(%rcx),%xmm1
mulsd  0x48(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x20(%rcx),%xmm0
mulsd  0x60(%rdi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x28(%rcx),%xmm1
mulsd  0x78(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi)
movsd  0x8(%rcx),%xmm0
mulsd  0x20(%rdi),%xmm0
movsd  (%rcx),%xmm1
mulsd  0x8(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rcx),%xmm0
mulsd  0x38(%rdi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x18(%rcx),%xmm1
mulsd  0x50(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x20(%rcx),%xmm0
mulsd  0x68(%rdi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x28(%rcx),%xmm1
mulsd  0x80(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsi)
movsd  0x8(%rcx),%xmm0
mulsd  0x28(%rdi),%xmm0
movsd  (%rcx),%xmm1
mulsd  0x10(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rcx),%xmm0
mulsd  0x40(%rdi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x18(%rcx),%xmm1
mulsd  0x58(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x20(%rcx),%xmm0
mulsd  0x70(%rdi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x28(%rcx),%xmm1
mulsd  0x88(%rdi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsi)
movsd  (%rdx),%xmm2
movsd  0x8(%rdx),%xmm13
movsd  0x18(%rdi),%xmm8
movsd  0x48(%rdi),%xmm9
subsd  %xmm9,%xmm8
movsd  0x60(%rdi),%xmm7
addsd  %xmm7,%xmm8
movsd  0x78(%rdi),%xmm6
subsd  %xmm6,%xmm8
movsd  0x20(%rdi),%xmm0
movsd  0x50(%rdi),%xmm1
subsd  %xmm1,%xmm0
movapd %xmm1,%xmm11
movsd  %xmm1,-0x18(%rsp)
movsd  0x68(%rdi),%xmm10
addsd  %xmm10,%xmm0
movsd  (%rdi),%xmm14
movapd %xmm7,%xmm4
addsd  %xmm14,%xmm4
movapd %xmm6,%xmm5
addsd  %xmm6,%xmm5
subsd  %xmm5,%xmm4
movapd %xmm7,%xmm5
movsd  0x30(%rdi),%xmm1
movsd  %xmm1,-0x8(%rsp)
addsd  %xmm1,%xmm7
movapd %xmm9,%xmm3
addsd  %xmm9,%xmm3
subsd  %xmm3,%xmm7
mulsd  %xmm13,%xmm7
movapd %xmm13,%xmm3
mulsd  %xmm8,%xmm3
mulsd  %xmm2,%xmm4
movapd %xmm2,%xmm1
addsd  %xmm3,%xmm4
addsd  %xmm6,%xmm4
movsd  0xd3a(%rip),%xmm12
mulsd  %xmm12,%xmm4
subsd  %xmm14,%xmm4
movapd %xmm10,%xmm6
movapd %xmm10,%xmm15
movsd  0x38(%rdi),%xmm14
addsd  %xmm14,%xmm10
movapd %xmm11,%xmm3
addsd  %xmm11,%xmm3
subsd  %xmm3,%xmm10
movapd %xmm13,%xmm11
mulsd  %xmm13,%xmm10
movsd  %xmm2,-0x10(%rsp)
mulsd  %xmm2,%xmm8
addsd  %xmm7,%xmm8
movsd  0x80(%rdi),%xmm2
subsd  %xmm2,%xmm0
addsd  %xmm9,%xmm8
movsd  0x8(%rdi),%xmm9
mulsd  %xmm12,%xmm8
subsd  -0x8(%rsp),%xmm8
movsd  0xccf(%rip),%xmm3
mulsd  %xmm3,%xmm5
addsd  %xmm5,%xmm4
addsd  %xmm5,%xmm8
addsd  %xmm9,%xmm6
movapd %xmm2,%xmm5
addsd  %xmm2,%xmm5
subsd  %xmm5,%xmm6
movsd  0x28(%rdi),%xmm7
mulsd  %xmm0,%xmm13
mulsd  %xmm1,%xmm6
addsd  %xmm13,%xmm6
movsd  0x58(%rdi),%xmm13
subsd  %xmm13,%xmm7
addsd  %xmm2,%xmm6
movsd  0x70(%rdi),%xmm5
addsd  %xmm5,%xmm7
movapd %xmm12,%xmm2
mulsd  %xmm12,%xmm6
subsd  %xmm9,%xmm6
movsd  0x88(%rdi),%xmm12
mulsd  %xmm3,%xmm15
addsd  %xmm15,%xmm6
mulsd  %xmm1,%xmm0
addsd  %xmm10,%xmm0
addsd  -0x18(%rsp),%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm14,%xmm0
addsd  %xmm15,%xmm0
movsd  0x10(%rdi),%xmm9
movapd %xmm5,%xmm2
addsd  %xmm9,%xmm2
movapd %xmm12,%xmm1
addsd  %xmm12,%xmm1
subsd  %xmm1,%xmm2
mulsd  %xmm5,%xmm3
movsd  0x40(%rdi),%xmm14
addsd  %xmm14,%xmm5
movapd %xmm13,%xmm1
addsd  %xmm13,%xmm1
subsd  %xmm1,%xmm5
mulsd  %xmm11,%xmm5
subsd  %xmm12,%xmm7
mulsd  %xmm7,%xmm11
movsd  -0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm2
addsd  %xmm11,%xmm2
addsd  %xmm12,%xmm2
movsd  0xbd9(%rip),%xmm10
mulsd  %xmm10,%xmm2
subsd  %xmm9,%xmm2
mulsd  %xmm1,%xmm7
addsd  %xmm5,%xmm7
addsd  %xmm13,%xmm7
mulsd  %xmm10,%xmm7
subsd  %xmm14,%xmm7
addsd  %xmm3,%xmm2
addsd  %xmm3,%xmm7
movapd %xmm6,%xmm1
mulsd  %xmm8,%xmm6
mulsd  %xmm2,%xmm8
mulsd  %xmm0,%xmm2
mulsd  %xmm7,%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm4,%xmm7
subsd  %xmm7,%xmm8
mulsd  %xmm4,%xmm0
subsd  %xmm6,%xmm0
mulsd  %xmm8,%xmm8
mulsd  %xmm1,%xmm1
addsd  %xmm8,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     14a0 <X2L_tria6+0x390>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @X2L_tria6([3 x double]* %0, double* %1, double* %2, double* %3) {
%5 = alloca [3 x double]*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
store [3 x double]* %0, [3 x double]** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%23 = load double*, double** %8
%24 = getelementptr inbounds double, double* %23, i64 0
%25 = load double, double* %24
%26 = load [3 x double]*, [3 x double]** %5
%27 = getelementptr inbounds [3 x double], [3 x double]* %26, i64 0
%28 = getelementptr inbounds [3 x double], [3 x double]* %27, i64 0, i64 0
%29 = load double, double* %28
%30 = load double*, double** %8
%31 = getelementptr inbounds double, double* %30, i64 1
%32 = load double, double* %31
%33 = load [3 x double]*, [3 x double]** %5
%34 = getelementptr inbounds [3 x double], [3 x double]* %33, i64 1
%35 = getelementptr inbounds [3 x double], [3 x double]* %34, i64 0, i64 0
%36 = load double, double* %35
%37 = fmul double %32, %36
%38 = call double @llvm.fmuladd.f64(double %25, double %29, double %37)
%39 = load double*, double** %8
%40 = getelementptr inbounds double, double* %39, i64 2
%41 = load double, double* %40
%42 = load [3 x double]*, [3 x double]** %5
%43 = getelementptr inbounds [3 x double], [3 x double]* %42, i64 2
%44 = getelementptr inbounds [3 x double], [3 x double]* %43, i64 0, i64 0
%45 = load double, double* %44
%46 = call double @llvm.fmuladd.f64(double %41, double %45, double %38)
%47 = load double*, double** %8
%48 = getelementptr inbounds double, double* %47, i64 3
%49 = load double, double* %48
%50 = load [3 x double]*, [3 x double]** %5
%51 = getelementptr inbounds [3 x double], [3 x double]* %50, i64 3
%52 = getelementptr inbounds [3 x double], [3 x double]* %51, i64 0, i64 0
%53 = load double, double* %52
%54 = call double @llvm.fmuladd.f64(double %49, double %53, double %46)
%55 = load double*, double** %8
%56 = getelementptr inbounds double, double* %55, i64 4
%57 = load double, double* %56
%58 = load [3 x double]*, [3 x double]** %5
%59 = getelementptr inbounds [3 x double], [3 x double]* %58, i64 4
%60 = getelementptr inbounds [3 x double], [3 x double]* %59, i64 0, i64 0
%61 = load double, double* %60
%62 = call double @llvm.fmuladd.f64(double %57, double %61, double %54)
%63 = load double*, double** %8
%64 = getelementptr inbounds double, double* %63, i64 5
%65 = load double, double* %64
%66 = load [3 x double]*, [3 x double]** %5
%67 = getelementptr inbounds [3 x double], [3 x double]* %66, i64 5
%68 = getelementptr inbounds [3 x double], [3 x double]* %67, i64 0, i64 0
%69 = load double, double* %68
%70 = call double @llvm.fmuladd.f64(double %65, double %69, double %62)
%71 = load double*, double** %6
%72 = getelementptr inbounds double, double* %71, i64 0
store double %70, double* %72
%73 = load double*, double** %8
%74 = getelementptr inbounds double, double* %73, i64 0
%75 = load double, double* %74
%76 = load [3 x double]*, [3 x double]** %5
%77 = getelementptr inbounds [3 x double], [3 x double]* %76, i64 0
%78 = getelementptr inbounds [3 x double], [3 x double]* %77, i64 0, i64 1
%79 = load double, double* %78
%80 = load double*, double** %8
%81 = getelementptr inbounds double, double* %80, i64 1
%82 = load double, double* %81
%83 = load [3 x double]*, [3 x double]** %5
%84 = getelementptr inbounds [3 x double], [3 x double]* %83, i64 1
%85 = getelementptr inbounds [3 x double], [3 x double]* %84, i64 0, i64 1
%86 = load double, double* %85
%87 = fmul double %82, %86
%88 = call double @llvm.fmuladd.f64(double %75, double %79, double %87)
%89 = load double*, double** %8
%90 = getelementptr inbounds double, double* %89, i64 2
%91 = load double, double* %90
%92 = load [3 x double]*, [3 x double]** %5
%93 = getelementptr inbounds [3 x double], [3 x double]* %92, i64 2
%94 = getelementptr inbounds [3 x double], [3 x double]* %93, i64 0, i64 1
%95 = load double, double* %94
%96 = call double @llvm.fmuladd.f64(double %91, double %95, double %88)
%97 = load double*, double** %8
%98 = getelementptr inbounds double, double* %97, i64 3
%99 = load double, double* %98
%100 = load [3 x double]*, [3 x double]** %5
%101 = getelementptr inbounds [3 x double], [3 x double]* %100, i64 3
%102 = getelementptr inbounds [3 x double], [3 x double]* %101, i64 0, i64 1
%103 = load double, double* %102
%104 = call double @llvm.fmuladd.f64(double %99, double %103, double %96)
%105 = load double*, double** %8
%106 = getelementptr inbounds double, double* %105, i64 4
%107 = load double, double* %106
%108 = load [3 x double]*, [3 x double]** %5
%109 = getelementptr inbounds [3 x double], [3 x double]* %108, i64 4
%110 = getelementptr inbounds [3 x double], [3 x double]* %109, i64 0, i64 1
%111 = load double, double* %110
%112 = call double @llvm.fmuladd.f64(double %107, double %111, double %104)
%113 = load double*, double** %8
%114 = getelementptr inbounds double, double* %113, i64 5
%115 = load double, double* %114
%116 = load [3 x double]*, [3 x double]** %5
%117 = getelementptr inbounds [3 x double], [3 x double]* %116, i64 5
%118 = getelementptr inbounds [3 x double], [3 x double]* %117, i64 0, i64 1
%119 = load double, double* %118
%120 = call double @llvm.fmuladd.f64(double %115, double %119, double %112)
%121 = load double*, double** %6
%122 = getelementptr inbounds double, double* %121, i64 1
store double %120, double* %122
%123 = load double*, double** %8
%124 = getelementptr inbounds double, double* %123, i64 0
%125 = load double, double* %124
%126 = load [3 x double]*, [3 x double]** %5
%127 = getelementptr inbounds [3 x double], [3 x double]* %126, i64 0
%128 = getelementptr inbounds [3 x double], [3 x double]* %127, i64 0, i64 2
%129 = load double, double* %128
%130 = load double*, double** %8
%131 = getelementptr inbounds double, double* %130, i64 1
%132 = load double, double* %131
%133 = load [3 x double]*, [3 x double]** %5
%134 = getelementptr inbounds [3 x double], [3 x double]* %133, i64 1
%135 = getelementptr inbounds [3 x double], [3 x double]* %134, i64 0, i64 2
%136 = load double, double* %135
%137 = fmul double %132, %136
%138 = call double @llvm.fmuladd.f64(double %125, double %129, double %137)
%139 = load double*, double** %8
%140 = getelementptr inbounds double, double* %139, i64 2
%141 = load double, double* %140
%142 = load [3 x double]*, [3 x double]** %5
%143 = getelementptr inbounds [3 x double], [3 x double]* %142, i64 2
%144 = getelementptr inbounds [3 x double], [3 x double]* %143, i64 0, i64 2
%145 = load double, double* %144
%146 = call double @llvm.fmuladd.f64(double %141, double %145, double %138)
%147 = load double*, double** %8
%148 = getelementptr inbounds double, double* %147, i64 3
%149 = load double, double* %148
%150 = load [3 x double]*, [3 x double]** %5
%151 = getelementptr inbounds [3 x double], [3 x double]* %150, i64 3
%152 = getelementptr inbounds [3 x double], [3 x double]* %151, i64 0, i64 2
%153 = load double, double* %152
%154 = call double @llvm.fmuladd.f64(double %149, double %153, double %146)
%155 = load double*, double** %8
%156 = getelementptr inbounds double, double* %155, i64 4
%157 = load double, double* %156
%158 = load [3 x double]*, [3 x double]** %5
%159 = getelementptr inbounds [3 x double], [3 x double]* %158, i64 4
%160 = getelementptr inbounds [3 x double], [3 x double]* %159, i64 0, i64 2
%161 = load double, double* %160
%162 = call double @llvm.fmuladd.f64(double %157, double %161, double %154)
%163 = load double*, double** %8
%164 = getelementptr inbounds double, double* %163, i64 5
%165 = load double, double* %164
%166 = load [3 x double]*, [3 x double]** %5
%167 = getelementptr inbounds [3 x double], [3 x double]* %166, i64 5
%168 = getelementptr inbounds [3 x double], [3 x double]* %167, i64 0, i64 2
%169 = load double, double* %168
%170 = call double @llvm.fmuladd.f64(double %165, double %169, double %162)
%171 = load double*, double** %6
%172 = getelementptr inbounds double, double* %171, i64 2
store double %170, double* %172
%173 = load double*, double** %7
%174 = getelementptr inbounds double, double* %173, i64 0
%175 = load double, double* %174
store double %175, double* %21
%176 = load double*, double** %7
%177 = getelementptr inbounds double, double* %176, i64 1
%178 = load double, double* %177
store double %178, double* %22
%179 = load [3 x double]*, [3 x double]** %5
%180 = getelementptr inbounds [3 x double], [3 x double]* %179, i64 1
%181 = getelementptr inbounds [3 x double], [3 x double]* %180, i64 0, i64 0
%182 = load double, double* %181
%183 = load [3 x double]*, [3 x double]** %5
%184 = getelementptr inbounds [3 x double], [3 x double]* %183, i64 3
%185 = getelementptr inbounds [3 x double], [3 x double]* %184, i64 0, i64 0
%186 = load double, double* %185
%187 = fsub double %182, %186
%188 = load [3 x double]*, [3 x double]** %5
%189 = getelementptr inbounds [3 x double], [3 x double]* %188, i64 4
%190 = getelementptr inbounds [3 x double], [3 x double]* %189, i64 0, i64 0
%191 = load double, double* %190
%192 = fadd double %187, %191
%193 = load [3 x double]*, [3 x double]** %5
%194 = getelementptr inbounds [3 x double], [3 x double]* %193, i64 5
%195 = getelementptr inbounds [3 x double], [3 x double]* %194, i64 0, i64 0
%196 = load double, double* %195
%197 = fsub double %192, %196
store double %197, double* %9
%198 = load [3 x double]*, [3 x double]** %5
%199 = getelementptr inbounds [3 x double], [3 x double]* %198, i64 1
%200 = getelementptr inbounds [3 x double], [3 x double]* %199, i64 0, i64 1
%201 = load double, double* %200
%202 = load [3 x double]*, [3 x double]** %5
%203 = getelementptr inbounds [3 x double], [3 x double]* %202, i64 3
%204 = getelementptr inbounds [3 x double], [3 x double]* %203, i64 0, i64 1
%205 = load double, double* %204
%206 = fsub double %201, %205
%207 = load [3 x double]*, [3 x double]** %5
%208 = getelementptr inbounds [3 x double], [3 x double]* %207, i64 4
%209 = getelementptr inbounds [3 x double], [3 x double]* %208, i64 0, i64 1
%210 = load double, double* %209
%211 = fadd double %206, %210
%212 = load [3 x double]*, [3 x double]** %5
%213 = getelementptr inbounds [3 x double], [3 x double]* %212, i64 5
%214 = getelementptr inbounds [3 x double], [3 x double]* %213, i64 0, i64 1
%215 = load double, double* %214
%216 = fsub double %211, %215
store double %216, double* %10
%217 = load [3 x double]*, [3 x double]** %5
%218 = getelementptr inbounds [3 x double], [3 x double]* %217, i64 1
%219 = getelementptr inbounds [3 x double], [3 x double]* %218, i64 0, i64 2
%220 = load double, double* %219
%221 = load [3 x double]*, [3 x double]** %5
%222 = getelementptr inbounds [3 x double], [3 x double]* %221, i64 3
%223 = getelementptr inbounds [3 x double], [3 x double]* %222, i64 0, i64 2
%224 = load double, double* %223
%225 = fsub double %220, %224
%226 = load [3 x double]*, [3 x double]** %5
%227 = getelementptr inbounds [3 x double], [3 x double]* %226, i64 4
%228 = getelementptr inbounds [3 x double], [3 x double]* %227, i64 0, i64 2
%229 = load double, double* %228
%230 = fadd double %225, %229
%231 = load [3 x double]*, [3 x double]** %5
%232 = getelementptr inbounds [3 x double], [3 x double]* %231, i64 5
%233 = getelementptr inbounds [3 x double], [3 x double]* %232, i64 0, i64 2
%234 = load double, double* %233
%235 = fsub double %230, %234
store double %235, double* %11
%236 = load double, double* %21
%237 = load [3 x double]*, [3 x double]** %5
%238 = getelementptr inbounds [3 x double], [3 x double]* %237, i64 0
%239 = getelementptr inbounds [3 x double], [3 x double]* %238, i64 0, i64 0
%240 = load double, double* %239
%241 = load [3 x double]*, [3 x double]** %5
%242 = getelementptr inbounds [3 x double], [3 x double]* %241, i64 4
%243 = getelementptr inbounds [3 x double], [3 x double]* %242, i64 0, i64 0
%244 = load double, double* %243
%245 = fadd double %240, %244
%246 = load [3 x double]*, [3 x double]** %5
%247 = getelementptr inbounds [3 x double], [3 x double]* %246, i64 5
%248 = getelementptr inbounds [3 x double], [3 x double]* %247, i64 0, i64 0
%249 = load double, double* %248
%250 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %249, double %245)
%251 = load double, double* %22
%252 = load double, double* %9
%253 = fmul double %251, %252
%254 = call double @llvm.fmuladd.f64(double %236, double %250, double %253)
%255 = load [3 x double]*, [3 x double]** %5
%256 = getelementptr inbounds [3 x double], [3 x double]* %255, i64 5
%257 = getelementptr inbounds [3 x double], [3 x double]* %256, i64 0, i64 0
%258 = load double, double* %257
%259 = fadd double %254, %258
%260 = load [3 x double]*, [3 x double]** %5
%261 = getelementptr inbounds [3 x double], [3 x double]* %260, i64 0
%262 = getelementptr inbounds [3 x double], [3 x double]* %261, i64 0, i64 0
%263 = load double, double* %262
%264 = fneg double %263
%265 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %259, double %264)
%266 = load [3 x double]*, [3 x double]** %5
%267 = getelementptr inbounds [3 x double], [3 x double]* %266, i64 4
%268 = getelementptr inbounds [3 x double], [3 x double]* %267, i64 0, i64 0
%269 = load double, double* %268
%270 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %269, double %265)
store double %270, double* %12
%271 = load double, double* %21
%272 = load double, double* %9
%273 = load double, double* %22
%274 = load [3 x double]*, [3 x double]** %5
%275 = getelementptr inbounds [3 x double], [3 x double]* %274, i64 2
%276 = getelementptr inbounds [3 x double], [3 x double]* %275, i64 0, i64 0
%277 = load double, double* %276
%278 = load [3 x double]*, [3 x double]** %5
%279 = getelementptr inbounds [3 x double], [3 x double]* %278, i64 4
%280 = getelementptr inbounds [3 x double], [3 x double]* %279, i64 0, i64 0
%281 = load double, double* %280
%282 = fadd double %277, %281
%283 = load [3 x double]*, [3 x double]** %5
%284 = getelementptr inbounds [3 x double], [3 x double]* %283, i64 3
%285 = getelementptr inbounds [3 x double], [3 x double]* %284, i64 0, i64 0
%286 = load double, double* %285
%287 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %286, double %282)
%288 = fmul double %273, %287
%289 = call double @llvm.fmuladd.f64(double %271, double %272, double %288)
%290 = load [3 x double]*, [3 x double]** %5
%291 = getelementptr inbounds [3 x double], [3 x double]* %290, i64 3
%292 = getelementptr inbounds [3 x double], [3 x double]* %291, i64 0, i64 0
%293 = load double, double* %292
%294 = fadd double %289, %293
%295 = load [3 x double]*, [3 x double]** %5
%296 = getelementptr inbounds [3 x double], [3 x double]* %295, i64 2
%297 = getelementptr inbounds [3 x double], [3 x double]* %296, i64 0, i64 0
%298 = load double, double* %297
%299 = fneg double %298
%300 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %294, double %299)
%301 = load [3 x double]*, [3 x double]** %5
%302 = getelementptr inbounds [3 x double], [3 x double]* %301, i64 4
%303 = getelementptr inbounds [3 x double], [3 x double]* %302, i64 0, i64 0
%304 = load double, double* %303
%305 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %304, double %300)
store double %305, double* %13
%306 = load double, double* %21
%307 = load [3 x double]*, [3 x double]** %5
%308 = getelementptr inbounds [3 x double], [3 x double]* %307, i64 0
%309 = getelementptr inbounds [3 x double], [3 x double]* %308, i64 0, i64 1
%310 = load double, double* %309
%311 = load [3 x double]*, [3 x double]** %5
%312 = getelementptr inbounds [3 x double], [3 x double]* %311, i64 4
%313 = getelementptr inbounds [3 x double], [3 x double]* %312, i64 0, i64 1
%314 = load double, double* %313
%315 = fadd double %310, %314
%316 = load [3 x double]*, [3 x double]** %5
%317 = getelementptr inbounds [3 x double], [3 x double]* %316, i64 5
%318 = getelementptr inbounds [3 x double], [3 x double]* %317, i64 0, i64 1
%319 = load double, double* %318
%320 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %319, double %315)
%321 = load double, double* %22
%322 = load double, double* %10
%323 = fmul double %321, %322
%324 = call double @llvm.fmuladd.f64(double %306, double %320, double %323)
%325 = load [3 x double]*, [3 x double]** %5
%326 = getelementptr inbounds [3 x double], [3 x double]* %325, i64 5
%327 = getelementptr inbounds [3 x double], [3 x double]* %326, i64 0, i64 1
%328 = load double, double* %327
%329 = fadd double %324, %328
%330 = load [3 x double]*, [3 x double]** %5
%331 = getelementptr inbounds [3 x double], [3 x double]* %330, i64 0
%332 = getelementptr inbounds [3 x double], [3 x double]* %331, i64 0, i64 1
%333 = load double, double* %332
%334 = fneg double %333
%335 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %329, double %334)
%336 = load [3 x double]*, [3 x double]** %5
%337 = getelementptr inbounds [3 x double], [3 x double]* %336, i64 4
%338 = getelementptr inbounds [3 x double], [3 x double]* %337, i64 0, i64 1
%339 = load double, double* %338
%340 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %339, double %335)
store double %340, double* %14
%341 = load double, double* %21
%342 = load double, double* %10
%343 = load double, double* %22
%344 = load [3 x double]*, [3 x double]** %5
%345 = getelementptr inbounds [3 x double], [3 x double]* %344, i64 2
%346 = getelementptr inbounds [3 x double], [3 x double]* %345, i64 0, i64 1
%347 = load double, double* %346
%348 = load [3 x double]*, [3 x double]** %5
%349 = getelementptr inbounds [3 x double], [3 x double]* %348, i64 4
%350 = getelementptr inbounds [3 x double], [3 x double]* %349, i64 0, i64 1
%351 = load double, double* %350
%352 = fadd double %347, %351
%353 = load [3 x double]*, [3 x double]** %5
%354 = getelementptr inbounds [3 x double], [3 x double]* %353, i64 3
%355 = getelementptr inbounds [3 x double], [3 x double]* %354, i64 0, i64 1
%356 = load double, double* %355
%357 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %356, double %352)
%358 = fmul double %343, %357
%359 = call double @llvm.fmuladd.f64(double %341, double %342, double %358)
%360 = load [3 x double]*, [3 x double]** %5
%361 = getelementptr inbounds [3 x double], [3 x double]* %360, i64 3
%362 = getelementptr inbounds [3 x double], [3 x double]* %361, i64 0, i64 1
%363 = load double, double* %362
%364 = fadd double %359, %363
%365 = load [3 x double]*, [3 x double]** %5
%366 = getelementptr inbounds [3 x double], [3 x double]* %365, i64 2
%367 = getelementptr inbounds [3 x double], [3 x double]* %366, i64 0, i64 1
%368 = load double, double* %367
%369 = fneg double %368
%370 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %364, double %369)
%371 = load [3 x double]*, [3 x double]** %5
%372 = getelementptr inbounds [3 x double], [3 x double]* %371, i64 4
%373 = getelementptr inbounds [3 x double], [3 x double]* %372, i64 0, i64 1
%374 = load double, double* %373
%375 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %374, double %370)
store double %375, double* %15
%376 = load double, double* %21
%377 = load [3 x double]*, [3 x double]** %5
%378 = getelementptr inbounds [3 x double], [3 x double]* %377, i64 0
%379 = getelementptr inbounds [3 x double], [3 x double]* %378, i64 0, i64 2
%380 = load double, double* %379
%381 = load [3 x double]*, [3 x double]** %5
%382 = getelementptr inbounds [3 x double], [3 x double]* %381, i64 4
%383 = getelementptr inbounds [3 x double], [3 x double]* %382, i64 0, i64 2
%384 = load double, double* %383
%385 = fadd double %380, %384
%386 = load [3 x double]*, [3 x double]** %5
%387 = getelementptr inbounds [3 x double], [3 x double]* %386, i64 5
%388 = getelementptr inbounds [3 x double], [3 x double]* %387, i64 0, i64 2
%389 = load double, double* %388
%390 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %389, double %385)
%391 = load double, double* %22
%392 = load double, double* %11
%393 = fmul double %391, %392
%394 = call double @llvm.fmuladd.f64(double %376, double %390, double %393)
%395 = load [3 x double]*, [3 x double]** %5
%396 = getelementptr inbounds [3 x double], [3 x double]* %395, i64 5
%397 = getelementptr inbounds [3 x double], [3 x double]* %396, i64 0, i64 2
%398 = load double, double* %397
%399 = fadd double %394, %398
%400 = load [3 x double]*, [3 x double]** %5
%401 = getelementptr inbounds [3 x double], [3 x double]* %400, i64 0
%402 = getelementptr inbounds [3 x double], [3 x double]* %401, i64 0, i64 2
%403 = load double, double* %402
%404 = fneg double %403
%405 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %399, double %404)
%406 = load [3 x double]*, [3 x double]** %5
%407 = getelementptr inbounds [3 x double], [3 x double]* %406, i64 4
%408 = getelementptr inbounds [3 x double], [3 x double]* %407, i64 0, i64 2
%409 = load double, double* %408
%410 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %409, double %405)
store double %410, double* %16
%411 = load double, double* %21
%412 = load double, double* %11
%413 = load double, double* %22
%414 = load [3 x double]*, [3 x double]** %5
%415 = getelementptr inbounds [3 x double], [3 x double]* %414, i64 2
%416 = getelementptr inbounds [3 x double], [3 x double]* %415, i64 0, i64 2
%417 = load double, double* %416
%418 = load [3 x double]*, [3 x double]** %5
%419 = getelementptr inbounds [3 x double], [3 x double]* %418, i64 4
%420 = getelementptr inbounds [3 x double], [3 x double]* %419, i64 0, i64 2
%421 = load double, double* %420
%422 = fadd double %417, %421
%423 = load [3 x double]*, [3 x double]** %5
%424 = getelementptr inbounds [3 x double], [3 x double]* %423, i64 3
%425 = getelementptr inbounds [3 x double], [3 x double]* %424, i64 0, i64 2
%426 = load double, double* %425
%427 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %426, double %422)
%428 = fmul double %413, %427
%429 = call double @llvm.fmuladd.f64(double %411, double %412, double %428)
%430 = load [3 x double]*, [3 x double]** %5
%431 = getelementptr inbounds [3 x double], [3 x double]* %430, i64 3
%432 = getelementptr inbounds [3 x double], [3 x double]* %431, i64 0, i64 2
%433 = load double, double* %432
%434 = fadd double %429, %433
%435 = load [3 x double]*, [3 x double]** %5
%436 = getelementptr inbounds [3 x double], [3 x double]* %435, i64 2
%437 = getelementptr inbounds [3 x double], [3 x double]* %436, i64 0, i64 2
%438 = load double, double* %437
%439 = fneg double %438
%440 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %434, double %439)
%441 = load [3 x double]*, [3 x double]** %5
%442 = getelementptr inbounds [3 x double], [3 x double]* %441, i64 4
%443 = getelementptr inbounds [3 x double], [3 x double]* %442, i64 0, i64 2
%444 = load double, double* %443
%445 = call double @llvm.fmuladd.f64(double -3.000000e+00, double %444, double %440)
store double %445, double* %17
%446 = load double, double* %14
%447 = load double, double* %17
%448 = load double, double* %15
%449 = load double, double* %16
%450 = fmul double %448, %449
%451 = fneg double %450
%452 = call double @llvm.fmuladd.f64(double %446, double %447, double %451)
store double %452, double* %18
%453 = load double, double* %13
%454 = load double, double* %16
%455 = load double, double* %12
%456 = load double, double* %17
%457 = fmul double %455, %456
%458 = fneg double %457
%459 = call double @llvm.fmuladd.f64(double %453, double %454, double %458)
store double %459, double* %19
%460 = load double, double* %12
%461 = load double, double* %15
%462 = load double, double* %13
%463 = load double, double* %14
%464 = fmul double %462, %463
%465 = fneg double %464
%466 = call double @llvm.fmuladd.f64(double %460, double %461, double %465)
store double %466, double* %20
%467 = load double, double* %18
%468 = load double, double* %18
%469 = load double, double* %19
%470 = load double, double* %19
%471 = fmul double %469, %470
%472 = call double @llvm.fmuladd.f64(double %467, double %468, double %471)
%473 = load double, double* %20
%474 = load double, double* %20
%475 = call double @llvm.fmuladd.f64(double %473, double %474, double %472)
%476 = call double @sqrt(double %475)
ret double %476
}

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