#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 tri_tri_overlap_test_2d(double *, double *, double *, double *, double *,
                            double *);
int coplanar_tri_tri3d(double p1[3], double q1[3], double r1[3], double p2[3],
                       double q2[3], double r2[3], double normal_1[3]) {
  double P1[2], Q1[2], R1[2];
  double P2[2], Q2[2], R2[2];
  double n_x, n_y, n_z;
  n_x = ((normal_1[0] < 0) ? -normal_1[0] : normal_1[0]);
  n_y = ((normal_1[1] < 0) ? -normal_1[1] : normal_1[1]);
  n_z = ((normal_1[2] < 0) ? -normal_1[2] : normal_1[2]);
  if ((n_x > n_z) && (n_x >= n_y)) {
    P1[0] = q1[2];
    P1[1] = q1[1];
    Q1[0] = p1[2];
    Q1[1] = p1[1];
    R1[0] = r1[2];
    R1[1] = r1[1];
    P2[0] = q2[2];
    P2[1] = q2[1];
    Q2[0] = p2[2];
    Q2[1] = p2[1];
    R2[0] = r2[2];
    R2[1] = r2[1];
  } else if ((n_y > n_z) && (n_y >= n_x)) {
    P1[0] = q1[0];
    P1[1] = q1[2];
    Q1[0] = p1[0];
    Q1[1] = p1[2];
    R1[0] = r1[0];
    R1[1] = r1[2];
    P2[0] = q2[0];
    P2[1] = q2[2];
    Q2[0] = p2[0];
    Q2[1] = p2[2];
    R2[0] = r2[0];
    R2[1] = r2[2];
  } else {
    P1[0] = p1[0];
    P1[1] = p1[1];
    Q1[0] = q1[0];
    Q1[1] = q1[1];
    R1[0] = r1[0];
    R1[1] = r1[1];
    P2[0] = p2[0];
    P2[1] = p2[1];
    Q2[0] = q2[0];
    Q2[1] = q2[1];
    R2[0] = r2[0];
    R2[1] = r2[1];
  }
  return tri_tri_overlap_test_2d(P1, Q1, R1, P2, Q2, R2);
}


x86 assembly (clang, -O0):
<coplanar_tri_tri3d>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
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    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    1174 <coplanar_tri_tri3d+0x64>
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    1184 <coplanar_tri_tri3d+0x74>
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
mov    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x8(%rax),%xmm0
jbe    11d3 <coplanar_tri_tri3d+0xc3>
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    11e4 <coplanar_tri_tri3d+0xd4>
mov    0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd 0x10(%rax),%xmm0
jbe    1233 <coplanar_tri_tri3d+0x123>
mov    0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    1244 <coplanar_tri_tri3d+0x134>
mov    0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
ucomisd -0xa8(%rbp),%xmm0
ff
jbe    1333 <coplanar_tri_tri3d+0x223>
movsd  -0x98(%rbp),%xmm0
ff
ucomisd -0xa0(%rbp),%xmm0
ff
jb     1333 <coplanar_tri_tri3d+0x223>
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    14b9 <coplanar_tri_tri3d+0x3a9>
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd -0xa8(%rbp),%xmm0
ff
jbe    140c <coplanar_tri_tri3d+0x2fc>
movsd  -0xa0(%rbp),%xmm0
ff
ucomisd -0x98(%rbp),%xmm0
ff
jb     140c <coplanar_tri_tri3d+0x2fc>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    14b4 <coplanar_tri_tri3d+0x3a4>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    14b9 <coplanar_tri_tri3d+0x3a9>
lea    -0x40(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x60(%rbp),%rdx
lea    -0x70(%rbp),%rcx
lea    -0x80(%rbp),%r8
lea    -0x90(%rbp),%r9
call   1030 <tri_tri_overlap_test_2d@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coplanar_tri_tri3d>:
sub    $0x68,%rsp
mov    0x70(%rsp),%rax
movsd  (%rax),%xmm2
movsd  0x8(%rax),%xmm3
movapd 0xed6(%rip),%xmm1
movapd %xmm2,%xmm4
xorpd  %xmm1,%xmm4
xorpd  %xmm5,%xmm5
movapd %xmm2,%xmm0
cmpltsd %xmm5,%xmm0
andpd  %xmm0,%xmm4
andnpd %xmm2,%xmm0
orpd   %xmm4,%xmm0
movapd %xmm3,%xmm4
xorpd  %xmm1,%xmm4
movapd %xmm3,%xmm2
cmpltsd %xmm5,%xmm2
andpd  %xmm2,%xmm4
andnpd %xmm3,%xmm2
orpd   %xmm4,%xmm2
movsd  0x10(%rax),%xmm4
xorpd  %xmm4,%xmm1
movapd %xmm4,%xmm3
cmpltsd %xmm5,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm4,%xmm3
orpd   %xmm1,%xmm3
ucomisd %xmm3,%xmm0
jbe    11df <coplanar_tri_tri3d+0xcf>
ucomisd %xmm2,%xmm0
jb     11df <coplanar_tri_tri3d+0xcf>
movups 0x8(%rsi),%xmm0
shufps $0x4e,%xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movups 0x8(%rdi),%xmm0
shufps $0x4e,%xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movups 0x8(%rdx),%xmm0
shufps $0x4e,%xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movups 0x8(%r8),%xmm0
shufps $0x4e,%xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movups 0x8(%rcx),%xmm0
shufps $0x4e,%xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movsd  0x10(%r9),%xmm0
jmp    1299 <coplanar_tri_tri3d+0x189>
ucomisd %xmm3,%xmm2
jbe    126b <coplanar_tri_tri3d+0x15b>
ucomisd %xmm0,%xmm2
jb     126b <coplanar_tri_tri3d+0x15b>
movsd  (%rsi),%xmm0
movsd  %xmm0,0x50(%rsp)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  (%rdi),%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x10(%rdi),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  (%r8),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%r8),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  (%rcx),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x10(%rcx),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%r9),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x2,%eax
jmp    12a3 <coplanar_tri_tri3d+0x193>
movups (%rdi),%xmm0
movaps %xmm0,0x50(%rsp)
movups (%rsi),%xmm0
movaps %xmm0,0x40(%rsp)
movups (%rdx),%xmm0
movaps %xmm0,0x30(%rsp)
movups (%rcx),%xmm0
movaps %xmm0,0x20(%rsp)
movups (%r8),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  (%r9),%xmm0
movsd  %xmm0,(%rsp)
mov    $0x1,%eax
movsd  (%r9,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x50(%rsp),%rdi
lea    0x40(%rsp),%rsi
lea    0x30(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x10(%rsp),%r8
mov    %rsp,%r9
call   1030 <tri_tri_overlap_test_2d@plt>
add    $0x68,%rsp
ret

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

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