#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 dist3i(double *, int, int);
double fabs(double);
int /*<<< orphan*/ normvec(double *, int, int, int, double *, double *,
                           double *);
double orient3d(double *, double *, double *, double *);
double sqrt(double);
int tricheck(double *v, int a, int b, int c, int d, double robustness) {
  double x[3], r, alpha, beta, gamma;
  normvec(v, a, b, c, &x[0], &x[1], &x[2]);
  r = sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]);
  r = (dist3i(v, a, b) + dist3i(v, a, c)) / 2.0 / r;
  x[0] *= r, x[1] *= r, x[2] *= r;
  x[0] += v[3 * a + 0], x[1] += v[3 * a + 1], x[2] += v[3 * a + 2];
  gamma = orient3d(v + 3 * b, v + 3 * c, v + 3 * d, v + 3 * a) /
          orient3d(v + 3 * b, v + 3 * c, x, v + 3 * a);
  if (fabs(gamma) > 1.0 / robustness)
    return 0;
  alpha = orient3d(v + 3 * d, v + 3 * c, x, v + 3 * a) /
          orient3d(v + 3 * b, v + 3 * c, x, v + 3 * a);
  if (alpha < -1.0 / robustness)
    return 0;
  beta = orient3d(v + 3 * b, v + 3 * d, x, v + 3 * a) /
         orient3d(v + 3 * b, v + 3 * c, x, v + 3 * a);
  if (beta < -1.0 / robustness)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<tricheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    -0x40(%rbp),%r8
lea    -0x40(%rbp),%r9
add    $0x8,%r9
lea    -0x40(%rbp),%rax
add    $0x10,%rax
mov    %rax,(%rsp)
call   1050 <normvec@plt>
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1030 <dist3i@plt>
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1030 <dist3i@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe0e(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x3,-0x14(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x3,-0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
imul   $0x3,-0x14(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
imul   $0x3,-0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
imul   $0x3,-0x20(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x10(%rbp),%rcx
imul   $0x3,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <orient3d@plt>
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
imul   $0x3,-0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x40(%rbp),%rdx
mov    -0x10(%rbp),%rcx
imul   $0x3,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <orient3d@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movaps 0xced(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xcc1(%rip),%xmm1
divsd  -0x28(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    135a <tricheck+0x21a>
movl   $0x0,-0x4(%rbp)
jmp    14cd <tricheck+0x38d>
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x20(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
imul   $0x3,-0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x40(%rbp),%rdx
mov    -0x10(%rbp),%rcx
imul   $0x3,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <orient3d@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
imul   $0x3,-0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x40(%rbp),%rdx
mov    -0x10(%rbp),%rcx
imul   $0x3,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <orient3d@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  0xc1b(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1410 <tricheck+0x2d0>
movl   $0x0,-0x4(%rbp)
jmp    14cd <tricheck+0x38d>
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
imul   $0x3,-0x20(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x40(%rbp),%rdx
mov    -0x10(%rbp),%rcx
imul   $0x3,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <orient3d@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
imul   $0x3,-0x1c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
lea    -0x40(%rbp),%rdx
mov    -0x10(%rbp),%rcx
imul   $0x3,-0x14(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
call   1040 <orient3d@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  0xb65(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    14c6 <tricheck+0x386>
movl   $0x0,-0x4(%rbp)
jmp    14cd <tricheck+0x38d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tricheck>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
movaps %xmm0,0x40(%rsp)
mov    %r8d,%r14d
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%r15d
mov    %rdi,%rbx
lea    0x28(%rsp),%r9
lea    0x30(%rsp),%rax
mov    %rax,(%rsp)
lea    0x20(%rsp),%r8
call   1050 <normvec@plt>
movsd  0x20(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x30(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b0 <tricheck+0x70>
sqrtsd %xmm0,%xmm0
jmp    11b5 <tricheck+0x75>
call   1060 <sqrt@plt>
movsd  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %r13d,%edx
call   1030 <dist3i@plt>
movsd  %xmm0,0x50(%rsp)
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
call   1030 <dist3i@plt>
addsd  0x50(%rsp),%xmm0
mulsd  0xe15(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0x20(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm0
lea    (%r15,%r15,2),%eax
cltq
lea    (%rbx,%rax,8),%r15
movupd (%rbx,%rax,8),%xmm2
addpd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
addsd  0x10(%rbx,%rax,8),%xmm0
movsd  %xmm0,0x30(%rsp)
lea    0x0(%r13,%r13,2),%eax
cltq
lea    (%rbx,%rax,8),%r13
lea    (%r12,%r12,2),%eax
cltq
lea    (%rbx,%rax,8),%r12
lea    (%r14,%r14,2),%eax
cltq
lea    (%rbx,%rax,8),%rbx
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1040 <orient3d@plt>
movapd %xmm0,0x10(%rsp)
lea    0x20(%rsp),%rdx
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rcx
call   1040 <orient3d@plt>
movapd 0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
andpd  0xd8b(%rip),%xmm1
movapd %xmm1,%xmm2
movsd  0xd77(%rip),%xmm0
movapd 0x40(%rsp),%xmm1
divsd  %xmm1,%xmm0
xor    %ebp,%ebp
ucomisd %xmm0,%xmm2
ja     1348 <tricheck+0x208>
lea    0x20(%rsp),%r14
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1040 <orient3d@plt>
movapd %xmm0,0x10(%rsp)
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1040 <orient3d@plt>
movapd 0x10(%rsp),%xmm1
shufpd $0x2,0xd3d(%rip),%xmm1
unpcklpd 0x40(%rsp),%xmm0
divpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
ucomisd %xmm1,%xmm0
ja     1348 <tricheck+0x208>
lea    0x20(%rsp),%rbp
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
movapd %xmm0,0x40(%rsp)
call   1040 <orient3d@plt>
movsd  %xmm0,0x10(%rsp)
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
mov    %r15,%rcx
call   1040 <orient3d@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
xor    %ebp,%ebp
movapd 0x40(%rsp),%xmm0
ucomisd %xmm1,%xmm0
setbe  %bpl
mov    %ebp,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @tricheck(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, double %5) {
%7 = alloca [3 x double]
%8 = bitcast [3 x double]* %7 to i8*
%9 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%10 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 1
%11 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 2
%12 = call i32 @normvec(double* %0, i32 %1, i32 %2, i32 %3, double* %9, double* %10, double* %11)
%13 = load double, double* %9
%14 = load double, double* %10
%15 = fmul double %14, %14
%16 = call double @llvm.fmuladd.f64(double %13, double %13, double %15)
%17 = load double, double* %11
%18 = call double @llvm.fmuladd.f64(double %17, double %17, double %16)
%19 = call double @sqrt(double %18)
%20 = call double @dist3i(double* %0, i32 %1, i32 %2)
%21 = call double @dist3i(double* %0, i32 %1, i32 %3)
%22 = fadd double %20, %21
%23 = fmul double %22, 5.000000e-01
%24 = fdiv double %23, %19
%25 = bitcast [3 x double]* %7 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = insertelement <2 x double> poison, double %24, i64 0
%28 = shufflevector <2 x double> %27, <2 x double> poison, <2 x i32> zeroinitializer
%29 = fmul <2 x double> %26, %28
%30 = load double, double* %11
%31 = fmul double %24, %30
%32 = mul nsw i32 %1, 3
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %0, i64 %33
%35 = load double, double* %34
%36 = add nsw i32 %32, 1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds double, double* %0, i64 %37
%39 = load double, double* %38
%40 = insertelement <2 x double> poison, double %35, i64 0
%41 = insertelement <2 x double> %40, double %39, i64 1
%42 = fadd <2 x double> %29, %41
%43 = bitcast [3 x double]* %7 to <2 x double>*
store <2 x double> %42, <2 x double>* %43
%44 = add nsw i32 %32, 2
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds double, double* %0, i64 %45
%47 = load double, double* %46
%48 = fadd double %31, %47
store double %48, double* %11
%49 = mul nsw i32 %2, 3
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %0, i64 %50
%52 = mul nsw i32 %3, 3
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %0, i64 %53
%55 = mul nsw i32 %4, 3
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %0, i64 %56
%58 = call double @orient3d(double* %51, double* %54, double* %57, double* %34)
%59 = call double @orient3d(double* %51, double* %54, double* %9, double* %34)
%60 = fdiv double %58, %59
%61 = call double @llvm.fabs.f64(double %60)
%62 = fdiv double 1.000000e+00, %5
%63 = fcmp ogt double %61, %62
br i1 %63, label %80, label %64
64: ; preds = %6
%65 = call double @orient3d(double* %57, double* %54, double* %9, double* %34)
%66 = call double @orient3d(double* %51, double* %54, double* %9, double* %34)
%67 = insertelement <2 x double> <double poison, double -1.000000e+00>, double %65, i64 0
%68 = insertelement <2 x double> poison, double %5, i64 1
%69 = insertelement <2 x double> %68, double %66, i64 0
%70 = fdiv <2 x double> %67, %69
%71 = extractelement <2 x double> %70, i64 0
%72 = extractelement <2 x double> %70, i64 1
%73 = fcmp olt double %71, %72
br i1 %73, label %80, label %74
74: ; preds = %64
%75 = call double @orient3d(double* %51, double* %57, double* %9, double* %34)
%76 = call double @orient3d(double* %51, double* %54, double* %9, double* %34)
%77 = fdiv double %75, %76
%78 = fcmp uge double %77, %72
%79 = zext i1 %78 to i32
br label %80
80: ; preds = %74, %64, %6
%81 = phi i32 [ 0, %6 ], [ 0, %64 ], [ %79, %74 ]
ret i32 %81
}