#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double d2phiarea(double);
int /*<<< orphan*/ vecminus(double *, double *, double *, int);
void d2SarTriangle3D(double *y1, double *y2, double *yM, double *x1, double *x2,
                     double *xM, const double ARef, double *r1, double *r2,
                     double *rM, const double alphaArea) {
  double vy[3], wy[3], wx[3], vx[3], cprod[3], A;
  vecminus(vy, y1, yM, 3);
  vecminus(wy, y2, yM, 3);
  vecminus(vx, x1, xM, 3);
  vecminus(wx, x2, xM, 3);
  cprod[0] = vy[1] * wy[2] - vy[2] * wy[1];
  cprod[1] = vy[0] * wy[2] - vy[2] * wy[0];
  cprod[2] = vy[0] * wy[1] - vy[1] * wy[0];
  A = cprod[0] * cprod[0] + cprod[1] * cprod[1] + cprod[2] * cprod[2];
  double dwA[3], dvA[3];
  dvA[0] = 2.0 * (cprod[1] * wy[2] + cprod[2] * wy[1]);
  dwA[0] = -2.0 * (cprod[1] * vy[2] + cprod[2] * vy[1]);
  dvA[1] = 2.0 * (cprod[0] * wy[2] - cprod[2] * wy[0]);
  dwA[1] = -2.0 * (cprod[0] * vy[2] - cprod[2] * vy[0]);
  dvA[2] = -2.0 * (cprod[0] * wy[1] + cprod[1] * wy[0]);
  dwA[2] = 2.0 * (cprod[0] * vy[1] + cprod[1] * vy[0]);
  double x = dvA[0] * vx[0] + dwA[0] * wx[0] + dvA[1] * vx[1] + dwA[1] * wx[1] +
             dvA[2] * vx[2] + dwA[2] * wx[2];
  double d2A = d2phiarea(A / ARef) * x / (ARef * ARef) * alphaArea;
  rM[0] += d2A * (-dvA[0] - dwA[0]);
  r1[0] += d2A * (dvA[0]);
  r2[0] += d2A * (dwA[0]);
  rM[1] += d2A * (-dvA[1] - dwA[1]);
  r1[1] += d2A * (dvA[1]);
  r2[1] += d2A * (+dwA[1]);
  rM[2] += d2A * (-dvA[2] - dwA[2]);
  r1[2] += d2A * (dvA[2]);
  r2[2] += d2A * (+dwA[2]);
}


x86 assembly (clang, -O0):
<d2SarTriangle3D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x3,%ecx
call   1030 <vecminus@plt>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x3,%ecx
call   1030 <vecminus@plt>
lea    -0xc0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    $0x3,%ecx
call   1030 <vecminus@plt>
lea    -0xa0(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    $0x3,%ecx
call   1030 <vecminus@plt>
movsd  -0x58(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0x70(%rbp),%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0x78(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xd26(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0x50(%rbp),%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0x58(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xcf8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0x70(%rbp),%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xca3(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0x50(%rbp),%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc5e(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc28(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xe0(%rbp),%xmm1
ff
movsd  -0x58(%rbp),%xmm2
movsd  -0xd8(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xbea(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0x100(%rbp),%xmm1
ff
mulsd  -0xa0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x118(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x110(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
divsd  -0x38(%rbp),%xmm0
call   1040 <d2phiarea@plt>
mulsd  -0x128(%rbp),%xmm0
ff
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
subsd  -0x100(%rbp),%xmm2
ff
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm2
ff
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x118(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
subsd  -0xf8(%rbp),%xmm2
ff
mov    0x20(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x118(%rbp),%xmm2
ff
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm2
ff
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x110(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
subsd  -0xf0(%rbp),%xmm2
ff
mov    0x20(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x110(%rbp),%xmm2
ff
mov    0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm2
ff
mov    0x18(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rax)
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2SarTriangle3D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xe8,%rsp
movsd  %xmm1,0x28(%rsp)
movsd  %xmm0,(%rsp)
mov    %r9,%r12
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%rbx
mov    %rsi,%r13
mov    %rdi,%rsi
mov    0x130(%rsp),%rbp
lea    0x90(%rsp),%rdi
mov    $0x3,%ecx
call   1030 <vecminus@plt>
lea    0x70(%rsp),%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
mov    $0x3,%ecx
call   1030 <vecminus@plt>
lea    0x30(%rsp),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    $0x3,%ecx
call   1030 <vecminus@plt>
lea    0x50(%rsp),%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    $0x3,%ecx
call   1030 <vecminus@plt>
movsd  0x90(%rsp),%xmm8
movsd  0x98(%rsp),%xmm3
movsd  0x80(%rsp),%xmm7
movsd  0xa0(%rsp),%xmm2
movsd  0x70(%rsp),%xmm9
movsd  0x78(%rsp),%xmm10
movapd %xmm10,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm3,%xmm1
mulsd  %xmm7,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm9,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm8,%xmm11
mulsd  %xmm7,%xmm11
subsd  %xmm0,%xmm11
movapd %xmm9,%xmm0
mulsd  %xmm3,%xmm0
movapd %xmm8,%xmm5
mulsd  %xmm10,%xmm5
subsd  %xmm0,%xmm5
movapd %xmm11,%xmm0
mulsd  %xmm11,%xmm0
movapd %xmm1,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm0,%xmm6
movapd %xmm5,%xmm0
mulsd  %xmm5,%xmm0
addsd  %xmm6,%xmm0
movapd %xmm10,%xmm6
mulsd  %xmm5,%xmm6
movapd %xmm11,%xmm4
mulsd  %xmm7,%xmm4
addsd  %xmm6,%xmm4
addsd  %xmm4,%xmm4
movapd %xmm4,0xb0(%rsp)
movapd %xmm11,%xmm6
mulsd  %xmm2,%xmm6
mulsd  %xmm1,%xmm7
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm10
mulsd  %xmm3,%xmm1
mulsd  %xmm5,%xmm3
addsd  %xmm3,%xmm6
movsd  0xd72(%rip),%xmm12
mulsd  %xmm12,%xmm6
movapd %xmm6,%xmm3
movsd  %xmm6,0x10(%rsp)
movapd %xmm9,%xmm6
mulsd  %xmm5,%xmm6
subsd  %xmm6,%xmm7
movapd %xmm7,%xmm6
addsd  %xmm7,%xmm6
movapd %xmm6,0xc0(%rsp)
mulsd  %xmm8,%xmm5
subsd  %xmm5,%xmm2
mulsd  %xmm12,%xmm2
movapd %xmm2,%xmm5
movsd  %xmm2,0x18(%rsp)
mulsd  %xmm11,%xmm9
movapd %xmm10,%xmm7
addsd  %xmm9,%xmm7
mulsd  %xmm12,%xmm7
movapd %xmm7,0xd0(%rsp)
mulsd  %xmm8,%xmm11
addsd  %xmm11,%xmm1
addsd  %xmm1,%xmm1
movapd %xmm1,%xmm8
movsd  %xmm1,0x20(%rsp)
movsd  0x50(%rsp),%xmm1
mulsd  %xmm3,%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm1,%xmm2
movsd  0x38(%rsp),%xmm1
mulsd  %xmm6,%xmm1
addsd  %xmm2,%xmm1
movsd  0x58(%rsp),%xmm2
mulsd  %xmm5,%xmm2
addsd  %xmm1,%xmm2
movsd  0x40(%rsp),%xmm1
mulsd  %xmm7,%xmm1
addsd  %xmm2,%xmm1
movsd  0x60(%rsp),%xmm2
mulsd  %xmm8,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
divsd  (%rsp),%xmm0
call   1040 <d2phiarea@plt>
mulsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
mulsd  0x28(%rsp),%xmm0
movapd 0xc85(%rip),%xmm1
movapd %xmm0,%xmm2
movapd 0xb0(%rsp),%xmm3
mulsd  %xmm3,%xmm2
xorpd  %xmm1,%xmm3
movsd  0x10(%rsp),%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm0,%xmm3
addsd  0x0(%rbp),%xmm3
movsd  %xmm3,0x0(%rbp)
mov    0x120(%rsp),%rcx
addsd  (%rcx),%xmm2
movsd  %xmm2,(%rcx)
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
mov    0x128(%rsp),%rax
addsd  (%rax),%xmm2
movsd  %xmm2,(%rax)
movapd %xmm0,%xmm2
movapd 0xc0(%rsp),%xmm3
mulsd  %xmm3,%xmm2
xorpd  %xmm1,%xmm3
movsd  0x18(%rsp),%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm0,%xmm3
addsd  0x8(%rbp),%xmm3
movsd  %xmm3,0x8(%rbp)
addsd  0x8(%rcx),%xmm2
movsd  %xmm2,0x8(%rcx)
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
addsd  0x8(%rax),%xmm2
movsd  %xmm2,0x8(%rax)
movapd 0xd0(%rsp),%xmm3
xorpd  %xmm3,%xmm1
movsd  0x20(%rsp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rbp),%xmm1
movsd  %xmm1,0x10(%rbp)
movapd %xmm3,%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rcx),%xmm1
movsd  %xmm1,0x10(%rcx)
mulsd  %xmm2,%xmm0
addsd  0x10(%rax),%xmm0
movsd  %xmm0,0x10(%rax)
add    $0xe8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @d2SarTriangle3D(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5, double %6, double* nocapture %7, double* nocapture %8, double* nocapture %9, double %10) {
%12 = alloca [3 x double]
%13 = alloca [3 x double]
%14 = alloca [3 x double]
%15 = alloca [3 x double]
%16 = bitcast [3 x double]* %12 to i8*
%17 = bitcast [3 x double]* %13 to i8*
%18 = bitcast [3 x double]* %14 to i8*
%19 = bitcast [3 x double]* %15 to i8*
%20 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 0
%21 = call i32 @vecminus(double* %20, double* %0, double* %2, i32 3)
%22 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%23 = call i32 @vecminus(double* %22, double* %1, double* %2, i32 3)
%24 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 0
%25 = call i32 @vecminus(double* %24, double* %3, double* %5, i32 3)
%26 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 0
%27 = call i32 @vecminus(double* %26, double* %4, double* %5, i32 3)
%28 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 1
%29 = load double, double* %28
%30 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 2
%31 = load double, double* %30
%32 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 0, i64 2
%33 = load double, double* %32
%34 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 1
%35 = load double, double* %34
%36 = fneg double %33
%37 = fmul double %35, %36
%38 = call double @llvm.fmuladd.f64(double %29, double %31, double %37)
%39 = load double, double* %20
%40 = load double, double* %22
%41 = fmul double %40, %36
%42 = call double @llvm.fmuladd.f64(double %39, double %31, double %41)
%43 = fneg double %29
%44 = fmul double %40, %43
%45 = call double @llvm.fmuladd.f64(double %39, double %35, double %44)
%46 = fmul double %42, %42
%47 = call double @llvm.fmuladd.f64(double %38, double %38, double %46)
%48 = call double @llvm.fmuladd.f64(double %45, double %45, double %47)
%49 = fmul double %35, %45
%50 = call double @llvm.fmuladd.f64(double %42, double %31, double %49)
%51 = fmul double %50, 2.000000e+00
%52 = fmul double %29, %45
%53 = call double @llvm.fmuladd.f64(double %42, double %33, double %52)
%54 = fmul double %53, -2.000000e+00
%55 = fneg double %45
%56 = fmul double %40, %55
%57 = call double @llvm.fmuladd.f64(double %38, double %31, double %56)
%58 = fmul double %57, 2.000000e+00
%59 = fmul double %39, %55
%60 = call double @llvm.fmuladd.f64(double %38, double %33, double %59)
%61 = fmul double %60, -2.000000e+00
%62 = fmul double %40, %42
%63 = call double @llvm.fmuladd.f64(double %38, double %35, double %62)
%64 = fmul double %63, -2.000000e+00
%65 = fmul double %39, %42
%66 = call double @llvm.fmuladd.f64(double %38, double %29, double %65)
%67 = fmul double %66, 2.000000e+00
%68 = load double, double* %24
%69 = load double, double* %26
%70 = fmul double %69, %54
%71 = call double @llvm.fmuladd.f64(double %51, double %68, double %70)
%72 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 1
%73 = load double, double* %72
%74 = call double @llvm.fmuladd.f64(double %58, double %73, double %71)
%75 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 1
%76 = load double, double* %75
%77 = call double @llvm.fmuladd.f64(double %61, double %76, double %74)
%78 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 2
%79 = load double, double* %78
%80 = call double @llvm.fmuladd.f64(double %64, double %79, double %77)
%81 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 2
%82 = load double, double* %81
%83 = call double @llvm.fmuladd.f64(double %67, double %82, double %80)
%84 = fdiv double %48, %6
%85 = call double @d2phiarea(double %84)
%86 = fmul double %85, %83
%87 = fmul double %6, %6
%88 = fdiv double %86, %87
%89 = fmul double %88, %10
%90 = fneg double %51
%91 = fsub double %90, %54
%92 = load double, double* %9
%93 = call double @llvm.fmuladd.f64(double %89, double %91, double %92)
store double %93, double* %9
%94 = load double, double* %7
%95 = call double @llvm.fmuladd.f64(double %89, double %51, double %94)
store double %95, double* %7
%96 = load double, double* %8
%97 = call double @llvm.fmuladd.f64(double %89, double %54, double %96)
store double %97, double* %8
%98 = fneg double %58
%99 = fsub double %98, %61
%100 = getelementptr inbounds double, double* %9, i64 1
%101 = load double, double* %100
%102 = call double @llvm.fmuladd.f64(double %89, double %99, double %101)
store double %102, double* %100
%103 = getelementptr inbounds double, double* %7, i64 1
%104 = load double, double* %103
%105 = call double @llvm.fmuladd.f64(double %89, double %58, double %104)
store double %105, double* %103
%106 = getelementptr inbounds double, double* %8, i64 1
%107 = load double, double* %106
%108 = call double @llvm.fmuladd.f64(double %89, double %61, double %107)
store double %108, double* %106
%109 = fneg double %64
%110 = fsub double %109, %67
%111 = getelementptr inbounds double, double* %9, i64 2
%112 = load double, double* %111
%113 = call double @llvm.fmuladd.f64(double %89, double %110, double %112)
store double %113, double* %111
%114 = getelementptr inbounds double, double* %7, i64 2
%115 = load double, double* %114
%116 = call double @llvm.fmuladd.f64(double %89, double %64, double %115)
store double %116, double* %114
%117 = getelementptr inbounds double, double* %8, i64 2
%118 = load double, double* %117
%119 = call double @llvm.fmuladd.f64(double %89, double %67, double %118)
store double %119, double* %117
ret void
}