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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ cofactor3D(double *, double const *, double const *,
                              double const *, double const *, double);
double dVxTetra3D(double *cofDy, const double *y1, const double *y2,
                  const double *y3, const double *yM, const double *x1,
                  const double *x2, const double *x3, const double *xM) {
  cofactor3D(cofDy, y1, y2, y3, yM, 1.0);
  return cofDy[0] * (x1[0] - xM[0]) + cofDy[3] * (x1[1] - xM[1]) +
         cofDy[6] * (x1[2] - xM[2]) + cofDy[1] * (x2[0] - xM[0]) +
         cofDy[4] * (x2[1] - xM[1]) + cofDy[7] * (x2[2] - xM[2]) +
         cofDy[2] * (x3[0] - xM[0]) + cofDy[5] * (x3[1] - xM[1]) +
         cofDy[8] * (x3[2] - xM[2]);
}


x86 assembly (clang, -O0):
<dVxTetra3D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
movsd  0xea8(%rip),%xmm0
call   1030 <cofactor3D@plt>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    0x20(%rbp),%rax
subsd  0x8(%rax),%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  (%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  0x8(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    0x18(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  0x8(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    0x20(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dVxTetra3D>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r9,%r14
mov    %rdi,%rbx
mov    0x38(%rsp),%r15
mov    0x30(%rsp),%r12
mov    0x40(%rsp),%r13
movsd  0xeca(%rip),%xmm0
call   1030 <cofactor3D@plt>
movsd  (%r14),%xmm3
movsd  0x8(%r14),%xmm4
movsd  0x0(%r13),%xmm1
movsd  0x8(%r13),%xmm0
subsd  %xmm0,%xmm4
mulsd  0x18(%rbx),%xmm4
subsd  %xmm1,%xmm3
mulsd  (%rbx),%xmm3
movsd  0x10(%r14),%xmm5
movsd  0x10(%r13),%xmm2
subsd  %xmm2,%xmm5
mulsd  0x30(%rbx),%xmm5
addsd  %xmm4,%xmm3
addsd  %xmm3,%xmm5
movsd  (%r12),%xmm3
movsd  0x8(%r12),%xmm4
subsd  %xmm1,%xmm3
mulsd  0x8(%rbx),%xmm3
addsd  %xmm5,%xmm3
subsd  %xmm0,%xmm4
mulsd  0x20(%rbx),%xmm4
addsd  %xmm3,%xmm4
movsd  0x10(%r12),%xmm3
subsd  %xmm2,%xmm3
mulsd  0x38(%rbx),%xmm3
addsd  %xmm4,%xmm3
movsd  (%r15),%xmm4
movsd  0x8(%r15),%xmm5
subsd  %xmm1,%xmm4
mulsd  0x10(%rbx),%xmm4
addsd  %xmm3,%xmm4
subsd  %xmm0,%xmm5
mulsd  0x28(%rbx),%xmm5
addsd  %xmm4,%xmm5
movsd  0x10(%r15),%xmm0
subsd  %xmm2,%xmm0
mulsd  0x40(%rbx),%xmm0
addsd  %xmm5,%xmm0
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define double @dVxTetra3D(double* %0, double* %1, double* %2, double* %3, double* %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8) {
%10 = tail call i32 @cofactor3D(double* %0, double* %1, double* %2, double* %3, double* %4, double 1.000000e+00)
%11 = load double, double* %0
%12 = load double, double* %5
%13 = load double, double* %8
%14 = fsub double %12, %13
%15 = getelementptr inbounds double, double* %0, i64 3
%16 = load double, double* %15
%17 = getelementptr inbounds double, double* %5, i64 1
%18 = load double, double* %17
%19 = getelementptr inbounds double, double* %8, i64 1
%20 = load double, double* %19
%21 = fsub double %18, %20
%22 = fmul double %16, %21
%23 = tail call double @llvm.fmuladd.f64(double %11, double %14, double %22)
%24 = getelementptr inbounds double, double* %0, i64 6
%25 = load double, double* %24
%26 = getelementptr inbounds double, double* %5, i64 2
%27 = load double, double* %26
%28 = getelementptr inbounds double, double* %8, i64 2
%29 = load double, double* %28
%30 = fsub double %27, %29
%31 = tail call double @llvm.fmuladd.f64(double %25, double %30, double %23)
%32 = getelementptr inbounds double, double* %0, i64 1
%33 = load double, double* %32
%34 = load double, double* %6
%35 = fsub double %34, %13
%36 = tail call double @llvm.fmuladd.f64(double %33, double %35, double %31)
%37 = getelementptr inbounds double, double* %0, i64 4
%38 = load double, double* %37
%39 = getelementptr inbounds double, double* %6, i64 1
%40 = load double, double* %39
%41 = fsub double %40, %20
%42 = tail call double @llvm.fmuladd.f64(double %38, double %41, double %36)
%43 = getelementptr inbounds double, double* %0, i64 7
%44 = load double, double* %43
%45 = getelementptr inbounds double, double* %6, i64 2
%46 = load double, double* %45
%47 = fsub double %46, %29
%48 = tail call double @llvm.fmuladd.f64(double %44, double %47, double %42)
%49 = getelementptr inbounds double, double* %0, i64 2
%50 = load double, double* %49
%51 = load double, double* %7
%52 = fsub double %51, %13
%53 = tail call double @llvm.fmuladd.f64(double %50, double %52, double %48)
%54 = getelementptr inbounds double, double* %0, i64 5
%55 = load double, double* %54
%56 = getelementptr inbounds double, double* %7, i64 1
%57 = load double, double* %56
%58 = fsub double %57, %20
%59 = tail call double @llvm.fmuladd.f64(double %55, double %58, double %53)
%60 = getelementptr inbounds double, double* %0, i64 8
%61 = load double, double* %60
%62 = getelementptr inbounds double, double* %7, i64 2
%63 = load double, double* %62
%64 = fsub double %63, %29
%65 = tail call double @llvm.fmuladd.f64(double %61, double %64, double %59)
ret double %65
}