int point_in_triangle(double point_x, double point_y, double point_z,
                      double t1_x, double t1_y, double t1_z, double t2_x,
                      double t2_y, double t2_z, double t3_x, double t3_y,
                      double t3_z) {
  int answer;
  double answer1_x, answer1_y, answer1_z;
  double answer2_x, answer2_y, answer2_z;
  double answer3_x, answer3_y, answer3_z;
  double af1, af2, af3;
  double bf1, bf2, bf3;
  double cf1, cf2, cf3;
  double ab1, ab2, ab3;
  double bc1, bc2, bc3;
  double ca1, ca2, ca3;
  ab1 = (t2_x - t1_x);
  ab2 = (t2_y - t1_y);
  ab3 = (t2_z - t1_z);
  bc1 = (t3_x - t2_x);
  bc2 = (t3_y - t2_y);
  bc3 = (t3_z - t2_z);
  ca1 = (t1_x - t3_x);
  ca2 = (t1_y - t3_y);
  ca3 = (t1_z - t3_z);
  af1 = (point_x - t1_x);
  af2 = (point_y - t1_y);
  af3 = (point_z - t1_z);
  bf1 = (point_x - t2_x);
  bf2 = (point_y - t2_y);
  bf3 = (point_z - t2_z);
  cf1 = (point_x - t3_x);
  cf2 = (point_y - t3_y);
  cf3 = (point_z - t3_z);
  answer1_x = (af2 * ab3) - (af3 * ab2);
  answer1_y = (af3 * ab1) - (af1 * ab3);
  answer1_z = (af1 * ab2) - (af2 * ab1);
  answer2_x = (bf2 * bc3) - (bf3 * bc2);
  answer2_y = (bf3 * bc1) - (bf1 * bc3);
  answer2_z = (bf1 * bc2) - (bf2 * bc1);
  answer3_x = (cf2 * ca3) - (cf3 * ca2);
  answer3_y = (cf3 * ca1) - (cf1 * ca3);
  answer3_z = (cf1 * ca2) - (cf2 * ca1);
  answer = 0;
  if ((int)answer1_x >= 0 && (int)answer2_x >= 0 && (int)answer3_x >= 0) {
    answer++;
  } else if ((int)answer1_x <= 0 && (int)answer2_x <= 0 &&
             (int)answer3_x <= 0) {
    answer--;
  }
  if ((int)answer1_y >= 0 && (int)answer2_y >= 0 && (int)answer3_y >= 0) {
    answer++;
  } else if ((int)answer1_y <= 0 && (int)answer2_y <= 0 &&
             (int)answer3_y <= 0) {
    answer--;
  }
  if ((int)answer1_z >= 0 && (int)answer2_z >= 0 && (int)answer3_z >= 0) {
    answer++;
  } else if ((int)answer1_z <= 0 && (int)answer2_z <= 0 &&
             (int)answer3_z <= 0) {
    answer--;
  }
  if (answer == 3 || answer == -3) {
    answer = 1;
  } else {
    answer = 0;
  }
  return (answer);
}


x86 assembly (clang, -O0):
<point_in_triangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0x10(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0x18(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  0x20(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  0x28(%rbp),%xmm0
subsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
subsd  0x18(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
subsd  0x20(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
subsd  0x28(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
subsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
subsd  0x18(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
subsd  0x20(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
subsd  0x28(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xf0(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xe8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0xf0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0xe8(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0xe0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0x108(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm1
ff
mulsd  -0x100(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0x108(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x100(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0xf8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm2
ff
movsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0x118(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0x110(%rbp),%xmm2
ff
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  -0x120(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x118(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm1
ff
mulsd  -0x110(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x44(%rbp)
cvttsd2si -0x50(%rbp),%eax
cmp    $0x0,%eax
jl     1538 <point_in_triangle+0x438>
cvttsd2si -0x68(%rbp),%eax
cmp    $0x0,%eax
jl     1538 <point_in_triangle+0x438>
cvttsd2si -0x80(%rbp),%eax
cmp    $0x0,%eax
jl     1538 <point_in_triangle+0x438>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1570 <point_in_triangle+0x470>
cvttsd2si -0x50(%rbp),%eax
cmp    $0x0,%eax
jg     156b <point_in_triangle+0x46b>
cvttsd2si -0x68(%rbp),%eax
cmp    $0x0,%eax
jg     156b <point_in_triangle+0x46b>
cvttsd2si -0x80(%rbp),%eax
cmp    $0x0,%eax
jg     156b <point_in_triangle+0x46b>
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    1570 <point_in_triangle+0x470>
cvttsd2si -0x58(%rbp),%eax
cmp    $0x0,%eax
jl     15ab <point_in_triangle+0x4ab>
cvttsd2si -0x70(%rbp),%eax
cmp    $0x0,%eax
jl     15ab <point_in_triangle+0x4ab>
cvttsd2si -0x88(%rbp),%eax
ff
cmp    $0x0,%eax
jl     15ab <point_in_triangle+0x4ab>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    15e6 <point_in_triangle+0x4e6>
cvttsd2si -0x58(%rbp),%eax
cmp    $0x0,%eax
jg     15e1 <point_in_triangle+0x4e1>
cvttsd2si -0x70(%rbp),%eax
cmp    $0x0,%eax
jg     15e1 <point_in_triangle+0x4e1>
cvttsd2si -0x88(%rbp),%eax
ff
cmp    $0x0,%eax
jg     15e1 <point_in_triangle+0x4e1>
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    15e6 <point_in_triangle+0x4e6>
cvttsd2si -0x60(%rbp),%eax
cmp    $0x0,%eax
jl     1621 <point_in_triangle+0x521>
cvttsd2si -0x78(%rbp),%eax
cmp    $0x0,%eax
jl     1621 <point_in_triangle+0x521>
cvttsd2si -0x90(%rbp),%eax
ff
cmp    $0x0,%eax
jl     1621 <point_in_triangle+0x521>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    165c <point_in_triangle+0x55c>
cvttsd2si -0x60(%rbp),%eax
cmp    $0x0,%eax
jg     1657 <point_in_triangle+0x557>
cvttsd2si -0x78(%rbp),%eax
cmp    $0x0,%eax
jg     1657 <point_in_triangle+0x557>
cvttsd2si -0x90(%rbp),%eax
ff
cmp    $0x0,%eax
jg     1657 <point_in_triangle+0x557>
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    165c <point_in_triangle+0x55c>
cmpl   $0x3,-0x44(%rbp)
je     1670 <point_in_triangle+0x570>
cmpl   $0xfffffffd,-0x44(%rbp)
jne    167c <point_in_triangle+0x57c>
movl   $0x1,-0x44(%rbp)
jmp    1683 <point_in_triangle+0x583>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<point_in_triangle>:
movapd %xmm1,%xmm13
movsd  0x20(%rsp),%xmm8
movsd  0x18(%rsp),%xmm1
movsd  0x10(%rsp),%xmm14
movapd %xmm14,%xmm9
unpcklpd %xmm6,%xmm9
unpcklpd %xmm3,%xmm6
subpd  %xmm6,%xmm9
movapd %xmm1,%xmm10
unpcklpd %xmm7,%xmm10
unpcklpd %xmm4,%xmm7
subpd  %xmm7,%xmm10
movsd  0x8(%rsp),%xmm15
movapd %xmm8,%xmm11
unpcklpd %xmm15,%xmm11
unpcklpd %xmm5,%xmm15
subpd  %xmm15,%xmm11
subsd  %xmm14,%xmm3
subsd  %xmm1,%xmm4
subsd  %xmm8,%xmm5
movapd %xmm0,%xmm8
unpcklpd %xmm0,%xmm8
subpd  %xmm6,%xmm8
movapd %xmm13,%xmm12
unpcklpd %xmm13,%xmm12
subpd  %xmm7,%xmm12
movapd %xmm2,%xmm7
unpcklpd %xmm2,%xmm7
subpd  %xmm15,%xmm7
subsd  %xmm14,%xmm0
subsd  %xmm1,%xmm13
movsd  0x20(%rsp),%xmm1
subsd  %xmm1,%xmm2
movapd %xmm12,%xmm6
mulpd  %xmm11,%xmm6
mulpd  %xmm8,%xmm11
mulpd  %xmm10,%xmm8
mulpd  %xmm7,%xmm10
subpd  %xmm10,%xmm6
mulpd  %xmm9,%xmm7
subpd  %xmm11,%xmm7
mulpd  %xmm9,%xmm12
movapd %xmm13,%xmm1
mulsd  %xmm5,%xmm1
mulsd  %xmm0,%xmm5
mulsd  %xmm4,%xmm0
mulsd  %xmm2,%xmm4
subsd  %xmm4,%xmm1
mulsd  %xmm3,%xmm2
subsd  %xmm5,%xmm2
cvttpd2dq %xmm6,%xmm4
mulsd  %xmm3,%xmm13
pshufd $0x50,%xmm4,%xmm3
pcmpeqd %xmm5,%xmm5
pcmpgtd %xmm5,%xmm3
movmskpd %xmm3,%eax
cvttsd2si %xmm1,%ecx
test   $0x2,%al
je     1224 <point_in_triangle+0x124>
test   $0x1,%al
je     1224 <point_in_triangle+0x124>
mov    $0x1,%eax
test   %ecx,%ecx
jns    124a <point_in_triangle+0x14a>
movdqa 0xdd4(%rip),%xmm1
pcmpgtd %xmm4,%xmm1
pshufd $0x50,%xmm1,%xmm1
movmskpd %xmm1,%eax
cmp    $0x3,%al
sete   %al
test   %ecx,%ecx
setle  %cl
and    %al,%cl
movzbl %cl,%eax
neg    %eax
subpd  %xmm12,%xmm8
cvttpd2dq %xmm7,%xmm3
subsd  %xmm13,%xmm0
pshufd $0x50,%xmm3,%xmm1
pcmpeqd %xmm4,%xmm4
pcmpgtd %xmm4,%xmm1
movmskpd %xmm1,%ecx
cvttsd2si %xmm2,%edx
test   $0x2,%cl
je     1280 <point_in_triangle+0x180>
test   $0x1,%cl
je     1280 <point_in_triangle+0x180>
mov    $0x1,%ecx
test   %edx,%edx
jns    12a7 <point_in_triangle+0x1a7>
movdqa 0xd78(%rip),%xmm1
pcmpgtd %xmm3,%xmm1
pshufd $0x50,%xmm1,%xmm1
movmskpd %xmm1,%ecx
cmp    $0x3,%cl
sete   %cl
test   %edx,%edx
setle  %dl
and    %cl,%dl
movzbl %dl,%ecx
neg    %ecx
cvttpd2dq %xmm8,%xmm1
pshufd $0x50,%xmm1,%xmm2
pcmpeqd %xmm3,%xmm3
pcmpgtd %xmm3,%xmm2
movmskpd %xmm2,%esi
cvttsd2si %xmm0,%edx
test   $0x2,%sil
je     12d6 <point_in_triangle+0x1d6>
test   $0x1,%sil
je     12d6 <point_in_triangle+0x1d6>
mov    $0x1,%esi
test   %edx,%edx
jns    1300 <point_in_triangle+0x200>
movdqa 0xd22(%rip),%xmm0
pcmpgtd %xmm1,%xmm0
pshufd $0x50,%xmm0,%xmm0
movmskpd %xmm0,%esi
cmp    $0x3,%sil
sete   %sil
test   %edx,%edx
setle  %dl
and    %sil,%dl
movzbl %dl,%esi
neg    %esi
add    %ecx,%eax
add    %esi,%eax
cmp    $0xfffffffd,%eax
sete   %cl
cmp    $0x3,%eax
sete   %al
or     %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @point_in_triangle(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10, double %11) {
%13 = insertelement <2 x double> poison, double %9, i64 0
%14 = insertelement <2 x double> %13, double %6, i64 1
%15 = insertelement <2 x double> poison, double %6, i64 0
%16 = insertelement <2 x double> %15, double %3, i64 1
%17 = fsub <2 x double> %14, %16
%18 = insertelement <2 x double> poison, double %10, i64 0
%19 = insertelement <2 x double> %18, double %7, i64 1
%20 = insertelement <2 x double> poison, double %7, i64 0
%21 = insertelement <2 x double> %20, double %4, i64 1
%22 = fsub <2 x double> %19, %21
%23 = insertelement <2 x double> poison, double %11, i64 0
%24 = insertelement <2 x double> %23, double %8, i64 1
%25 = insertelement <2 x double> poison, double %8, i64 0
%26 = insertelement <2 x double> %25, double %5, i64 1
%27 = fsub <2 x double> %24, %26
%28 = fsub double %3, %9
%29 = fsub double %4, %10
%30 = fsub double %5, %11
%31 = insertelement <2 x double> poison, double %0, i64 0
%32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> zeroinitializer
%33 = fsub <2 x double> %32, %16
%34 = insertelement <2 x double> poison, double %1, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = fsub <2 x double> %35, %21
%37 = insertelement <2 x double> poison, double %2, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = fsub <2 x double> %38, %26
%40 = fsub double %0, %9
%41 = fsub double %1, %10
%42 = fsub double %2, %11
%43 = fneg <2 x double> %39
%44 = fmul <2 x double> %22, %43
%45 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %36, <2 x double> %27, <2 x double> %44)
%46 = fneg <2 x double> %33
%47 = fmul <2 x double> %27, %46
%48 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %17, <2 x double> %47)
%49 = fneg <2 x double> %36
%50 = fmul <2 x double> %17, %49
%51 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> %22, <2 x double> %50)
%52 = fneg double %42
%53 = fmul double %29, %52
%54 = tail call double @llvm.fmuladd.f64(double %41, double %30, double %53)
%55 = fneg double %40
%56 = fmul double %30, %55
%57 = tail call double @llvm.fmuladd.f64(double %42, double %28, double %56)
%58 = fneg double %41
%59 = fmul double %28, %58
%60 = tail call double @llvm.fmuladd.f64(double %40, double %29, double %59)
%61 = fptosi <2 x double> %45 to <2 x i32>
%62 = icmp sgt <2 x i32> %61, <i32 -1, i32 -1>
%63 = extractelement <2 x i1> %62, i64 0
%64 = extractelement <2 x i1> %62, i64 1
%65 = select i1 %64, i1 %63, i1 false
%66 = fptosi double %54 to i32
%67 = icmp sgt i32 %66, -1
%68 = select i1 %65, i1 %67, i1 false
br i1 %68, label %77, label %69
69: ; preds = %12
%70 = icmp slt <2 x i32> %61, <i32 1, i32 1>
%71 = extractelement <2 x i1> %70, i64 0
%72 = extractelement <2 x i1> %70, i64 1
%73 = select i1 %72, i1 %71, i1 false
%74 = icmp slt i32 %66, 1
%75 = select i1 %73, i1 %74, i1 false
%76 = sext i1 %75 to i32
br label %77
77: ; preds = %69, %12
%78 = phi i32 [ 1, %12 ], [ %76, %69 ]
%79 = fptosi <2 x double> %48 to <2 x i32>
%80 = icmp sgt <2 x i32> %79, <i32 -1, i32 -1>
%81 = extractelement <2 x i1> %80, i64 0
%82 = extractelement <2 x i1> %80, i64 1
%83 = select i1 %82, i1 %81, i1 false
%84 = fptosi double %57 to i32
%85 = icmp sgt i32 %84, -1
%86 = select i1 %83, i1 %85, i1 false
br i1 %86, label %95, label %87
87: ; preds = %77
%88 = icmp slt <2 x i32> %79, <i32 1, i32 1>
%89 = extractelement <2 x i1> %88, i64 0
%90 = extractelement <2 x i1> %88, i64 1
%91 = select i1 %90, i1 %89, i1 false
%92 = icmp slt i32 %84, 1
%93 = select i1 %91, i1 %92, i1 false
%94 = sext i1 %93 to i32
br label %95
95: ; preds = %77, %87
%96 = phi i32 [ %94, %87 ], [ 1, %77 ]
%97 = fptosi <2 x double> %51 to <2 x i32>
%98 = icmp sgt <2 x i32> %97, <i32 -1, i32 -1>
%99 = extractelement <2 x i1> %98, i64 0
%100 = extractelement <2 x i1> %98, i64 1
%101 = select i1 %100, i1 %99, i1 false
%102 = fptosi double %60 to i32
%103 = icmp sgt i32 %102, -1
%104 = select i1 %101, i1 %103, i1 false
br i1 %104, label %113, label %105
105: ; preds = %95
%106 = icmp slt <2 x i32> %97, <i32 1, i32 1>
%107 = extractelement <2 x i1> %106, i64 0
%108 = extractelement <2 x i1> %106, i64 1
%109 = select i1 %108, i1 %107, i1 false
%110 = icmp slt i32 %102, 1
%111 = select i1 %109, i1 %110, i1 false
%112 = sext i1 %111 to i32
br label %113
113: ; preds = %95, %105
%114 = phi i32 [ %112, %105 ], [ 1, %95 ]
%115 = add nsw i32 %78, %96
%116 = add nsw i32 %115, %114
%117 = icmp eq i32 %116, -3
%118 = icmp eq i32 %116, 3
%119 = or i1 %117, %118
%120 = zext i1 %119 to i32
ret i32 %120
}