void TetQuadLag(double *par, double *N, double dN[][3]) {
  double r = par[0], s = par[1], t = par[2], t8, t4;
  t8 = 1.0 - r - s - t;
  N[0] = (2.0 * r - 1.0) * r;
  N[1] = (2.0 * s - 1.0) * s;
  N[2] = (2.0 * t - 1.0) * t;
  N[3] = (1.0 - 2.0 * r - 2.0 * s - 2.0 * t) * t8;
  N[4] = 4.0 * r * s;
  N[5] = 4.0 * s * t;
  N[6] = 4.0 * t * r;
  N[7] = 4.0 * r * t8;
  N[8] = 4.0 * s * t8;
  N[9] = 4.0 * t * t8;
  t4 = -3.0 + 4.0 * r + 4.0 * s + 4.0 * t;
  dN[0][0] = 4.0 * r - 1.0;
  dN[0][1] = 0.0;
  dN[0][2] = 0.0;
  dN[1][0] = 0.0;
  dN[1][1] = 4.0 * s - 1.0;
  dN[1][2] = 0.0;
  dN[2][0] = 0.0;
  dN[2][1] = 0.0;
  dN[2][2] = 4.0 * t - 1.0;
  dN[3][0] = t4;
  dN[3][1] = t4;
  dN[3][2] = t4;
  dN[4][0] = 4.0 * s;
  dN[4][1] = 4.0 * r;
  dN[4][2] = 0.0;
  dN[5][0] = 0.0;
  dN[5][1] = 4.0 * t;
  dN[5][2] = 4.0 * s;
  dN[6][0] = 4.0 * t;
  dN[6][1] = 0.0;
  dN[6][2] = 4.0 * r;
  dN[7][0] = 4.0 - 8.0 * r - 4.0 * s - 4.0 * t;
  dN[7][1] = -4.0 * r;
  dN[7][2] = -4.0 * r;
  dN[8][0] = -4.0 * s;
  dN[8][1] = 4.0 - 4.0 * r - 8.0 * s - 4.0 * t;
  dN[8][2] = -4.0 * s;
  dN[9][0] = -4.0 * t;
  dN[9][1] = -4.0 * t;
  dN[9][2] = 4.0 - 4.0 * r - 4.0 * s - 8.0 * t;
}


x86 assembly (clang, -O0):
<TetQuadLag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xee7(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xeb2(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe90(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x30(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe6d(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x20(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xe5a(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  0xe0e(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  0xdf3(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x28(%rax)
movsd  0xdd8(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x30(%rax)
movsd  0xdbd(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x38(%rax)
movsd  0xda2(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  0xd87(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xd67(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd6b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xd4a(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xd35(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xd1b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd17(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  0xcd2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcce(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x30(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
movsd  -0x30(%rbp),%xmm0
movsd  0xc88(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc84(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x40(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x48(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x50(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x58(%rax)
movsd  0xc3d(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x60(%rax)
movsd  0xc27(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x68(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x70(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x78(%rax)
movsd  0xbf9(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x80(%rax)
movsd  0xbe0(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x88(%rax)
movsd  0xbc7(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x90(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x98(%rax)
movsd  0xb9f(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xa0(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xb71(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb75(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xb5c(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xb47(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xa8(%rax)
movsd  0xb2b(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xb0(%rax)
movsd  0xb12(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xb8(%rax)
movsd  0xaf9(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xc0(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xadb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xad7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xab6(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xaa9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xc8(%rax)
movsd  0xa8d(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xd0(%rax)
movsd  0xa74(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xd8(%rax)
movsd  0xa5b(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xe0(%rax)
movsd  -0x20(%rbp),%xmm0
movsd  0xa3d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xa39(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xa20(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xa03(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0xe8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TetQuadLag>:
movupd (%rdi),%xmm2
movsd  0x10(%rdi),%xmm9
movsd  0xeee(%rip),%xmm3
movapd %xmm3,%xmm5
subsd  %xmm2,%xmm5
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
subsd  %xmm1,%xmm5
movapd %xmm2,%xmm4
addpd  %xmm2,%xmm4
addpd  0xefa(%rip),%xmm4
subsd  %xmm9,%xmm5
mulpd  %xmm2,%xmm4
movupd %xmm4,(%rsi)
movapd %xmm9,%xmm4
addsd  %xmm9,%xmm4
movsd  0xeb2(%rip),%xmm8
movapd %xmm2,%xmm7
addsd  %xmm2,%xmm7
subsd  %xmm7,%xmm3
movapd %xmm1,%xmm7
addsd  %xmm1,%xmm7
subsd  %xmm7,%xmm3
subsd  %xmm4,%xmm3
addsd  %xmm8,%xmm4
movapd %xmm9,%xmm7
unpcklpd %xmm3,%xmm7
unpcklpd %xmm5,%xmm4
mulpd  %xmm7,%xmm4
movupd %xmm4,0x10(%rsi)
movapd 0xeab(%rip),%xmm4
mulpd  %xmm2,%xmm4
movapd %xmm2,%xmm3
shufpd $0x1,%xmm9,%xmm3
mulpd  %xmm4,%xmm3
movupd %xmm3,0x20(%rsi)
movsd  0xe5c(%rip),%xmm3
movapd %xmm9,%xmm7
mulsd  %xmm3,%xmm7
movapd %xmm2,%xmm0
mulsd  %xmm7,%xmm0
movsd  %xmm0,0x30(%rsi)
movapd %xmm7,%xmm0
mulsd  %xmm5,%xmm0
unpcklpd %xmm5,%xmm5
mulpd  %xmm4,%xmm5
movupd %xmm5,0x38(%rsi)
movsd  %xmm0,0x48(%rsi)
movapd %xmm2,%xmm0
mulsd  %xmm3,%xmm0
movsd  0xe24(%rip),%xmm5
addsd  %xmm0,%xmm5
movapd %xmm1,%xmm6
mulsd  %xmm3,%xmm6
addsd  %xmm6,%xmm5
addsd  %xmm8,%xmm0
movsd  %xmm0,(%rdx)
addsd  %xmm8,%xmm6
xorpd  %xmm0,%xmm0
movupd %xmm0,0x8(%rdx)
movq   $0x0,0x18(%rdx)
movsd  %xmm6,0x20(%rdx)
movapd 0xe20(%rip),%xmm6
unpcklpd %xmm5,%xmm6
movapd %xmm7,%xmm5
unpcklpd %xmm7,%xmm5
addpd  %xmm6,%xmm5
movupd %xmm0,0x28(%rdx)
movq   $0x0,0x38(%rdx)
movupd %xmm5,0x40(%rdx)
unpckhpd %xmm5,%xmm5
movupd %xmm5,0x50(%rdx)
movapd %xmm4,%xmm5
shufpd $0x1,%xmm4,%xmm5
movupd %xmm5,0x60(%rdx)
movupd %xmm0,0x70(%rdx)
movsd  %xmm7,0x80(%rdx)
movhpd %xmm4,0x88(%rdx)
movsd  %xmm7,0x90(%rdx)
movq   $0x0,0x98(%rdx)
movlpd %xmm4,0xa0(%rdx)
movsd  0xd7f(%rip),%xmm4
movapd %xmm2,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
movsd  0xd73(%rip),%xmm5
movapd %xmm1,%xmm6
mulsd  %xmm5,%xmm6
addsd  %xmm6,%xmm0
movapd %xmm9,%xmm7
mulsd  %xmm5,%xmm7
addsd  %xmm7,%xmm0
movsd  %xmm0,0xa8(%rdx)
movapd 0xd82(%rip),%xmm0
mulpd  %xmm2,%xmm0
movlpd %xmm0,0xb0(%rdx)
movupd %xmm0,0xb8(%rdx)
mulsd  %xmm5,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm7,%xmm1
movsd  %xmm1,0xc8(%rdx)
movhpd %xmm0,0xd0(%rdx)
movsd  %xmm7,0xd8(%rdx)
movsd  %xmm7,0xe0(%rdx)
addsd  %xmm6,%xmm2
mulsd  %xmm4,%xmm9
addsd  %xmm2,%xmm9
movsd  %xmm9,0xe8(%rdx)
ret

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

LLVM IR (-O2):
define void @TetQuadLag(double* nocapture %0, double* nocapture writeonly %1, [3 x double]* writeonly %2) {
%4 = bitcast double* %0 to <2 x double>*
%5 = load <2 x double>, <2 x double>* %4
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = extractelement <2 x double> %5, i64 0
%9 = fsub double 1.000000e+00, %8
%10 = extractelement <2 x double> %5, i64 1
%11 = fsub double %9, %10
%12 = fsub double %11, %7
%13 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %5, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%14 = fmul <2 x double> %5, %13
%15 = bitcast double* %1 to <2 x double>*
store <2 x double> %14, <2 x double>* %15
%16 = tail call double @llvm.fmuladd.f64(double %7, double 2.000000e+00, double -1.000000e+00)
%17 = getelementptr inbounds double, double* %1, i64 2
%18 = tail call double @llvm.fmuladd.f64(double %8, double -2.000000e+00, double 1.000000e+00)
%19 = tail call double @llvm.fmuladd.f64(double %10, double -2.000000e+00, double %18)
%20 = tail call double @llvm.fmuladd.f64(double %7, double -2.000000e+00, double %19)
%21 = insertelement <2 x double> poison, double %7, i64 0
%22 = insertelement <2 x double> %21, double %20, i64 1
%23 = insertelement <2 x double> poison, double %16, i64 0
%24 = insertelement <2 x double> %23, double %12, i64 1
%25 = fmul <2 x double> %22, %24
%26 = bitcast double* %17 to <2 x double>*
store <2 x double> %25, <2 x double>* %26
%27 = getelementptr inbounds double, double* %1, i64 4
%28 = fmul <2 x double> %5, <double 4.000000e+00, double 4.000000e+00>
%29 = insertelement <2 x double> poison, double %10, i64 0
%30 = insertelement <2 x double> %29, double %7, i64 1
%31 = fmul <2 x double> %28, %30
%32 = bitcast double* %27 to <2 x double>*
store <2 x double> %31, <2 x double>* %32
%33 = fmul double %7, 4.000000e+00
%34 = fmul double %8, %33
%35 = getelementptr inbounds double, double* %1, i64 6
store double %34, double* %35
%36 = getelementptr inbounds double, double* %1, i64 7
%37 = insertelement <2 x double> poison, double %12, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = fmul <2 x double> %28, %38
%40 = bitcast double* %36 to <2 x double>*
store <2 x double> %39, <2 x double>* %40
%41 = fmul double %33, %12
%42 = getelementptr inbounds double, double* %1, i64 9
store double %41, double* %42
%43 = tail call double @llvm.fmuladd.f64(double %8, double 4.000000e+00, double -3.000000e+00)
%44 = tail call double @llvm.fmuladd.f64(double %10, double 4.000000e+00, double %43)
%45 = tail call double @llvm.fmuladd.f64(double %8, double 4.000000e+00, double -1.000000e+00)
%46 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
store double %45, double* %46
%47 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 1
%48 = tail call double @llvm.fmuladd.f64(double %10, double 4.000000e+00, double -1.000000e+00)
%49 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 1, i64 1
%50 = bitcast double* %47 to i8*
store double %48, double* %49
%51 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 1, i64 2
%52 = shufflevector <2 x double> %21, <2 x double> poison, <2 x i32> zeroinitializer
%53 = insertelement <2 x double> <double -1.000000e+00, double poison>, double %44, i64 1
%54 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %52, <2 x double> <double 4.000000e+00, double 4.000000e+00>, <2 x double> %53)
%55 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 2, i64 2
%56 = bitcast double* %51 to i8*
%57 = bitcast double* %55 to <2 x double>*
store <2 x double> %54, <2 x double>* %57
%58 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 3, i64 1
%59 = shufflevector <2 x double> %54, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%60 = bitcast double* %58 to <2 x double>*
store <2 x double> %59, <2 x double>* %60
%61 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 4, i64 0
%62 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%63 = bitcast double* %61 to <2 x double>*
store <2 x double> %62, <2 x double>* %63
%64 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 4, i64 2
%65 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 5, i64 1
%66 = bitcast double* %64 to i8*
store double %33, double* %65
%67 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 5, i64 2
%68 = extractelement <2 x double> %28, i64 1
store double %68, double* %67
%69 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 6, i64 0
store double %33, double* %69
%70 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 6, i64 1
store double 0.000000e+00, double* %70
%71 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 6, i64 2
%72 = extractelement <2 x double> %28, i64 0
store double %72, double* %71
%73 = tail call double @llvm.fmuladd.f64(double %8, double -8.000000e+00, double 4.000000e+00)
%74 = tail call double @llvm.fmuladd.f64(double %10, double -4.000000e+00, double %73)
%75 = tail call double @llvm.fmuladd.f64(double %7, double -4.000000e+00, double %74)
%76 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 7, i64 0
store double %75, double* %76
%77 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 7, i64 1
%78 = fmul <2 x double> %5, <double -4.000000e+00, double -4.000000e+00>
%79 = extractelement <2 x double> %78, i64 0
store double %79, double* %77
%80 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 7, i64 2
%81 = bitcast double* %80 to <2 x double>*
store <2 x double> %78, <2 x double>* %81
%82 = tail call double @llvm.fmuladd.f64(double %8, double -4.000000e+00, double 4.000000e+00)
%83 = tail call double @llvm.fmuladd.f64(double %10, double -8.000000e+00, double %82)
%84 = tail call double @llvm.fmuladd.f64(double %7, double -4.000000e+00, double %83)
%85 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 8, i64 1
store double %84, double* %85
%86 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 8, i64 2
%87 = extractelement <2 x double> %78, i64 1
store double %87, double* %86
%88 = fmul double %7, -4.000000e+00
%89 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 9, i64 0
store double %88, double* %89
%90 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 9, i64 1
store double %88, double* %90
%91 = tail call double @llvm.fmuladd.f64(double %10, double -4.000000e+00, double %82)
%92 = tail call double @llvm.fmuladd.f64(double %7, double -8.000000e+00, double %91)
%93 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 9, i64 2
store double %92, double* %93
ret void
}