double 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) {
  double 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.0;
  if ((int)answer1_x >= 0 && (int)answer2_x >= 0 && (int)answer3_x >= 0) {
    answer += 1.0;
  } else if ((int)answer1_x <= 0 && (int)answer2_x <= 0 &&
             (int)answer3_x <= 0) {
    answer -= 1.0;
  }
  if ((int)answer1_y >= 0 && (int)answer2_y >= 0 && (int)answer3_y >= 0) {
    answer += 1.0;
  } else if ((int)answer1_y <= 0 && (int)answer2_y <= 0 &&
             (int)answer3_y <= 0) {
    answer -= 1.0;
  }
  if ((int)answer1_z >= 0 && (int)answer2_z >= 0 && (int)answer3_z >= 0) {
    answer += 1.0;
  } else if ((int)answer1_z <= 0 && (int)answer2_z <= 0 &&
             (int)answer3_z <= 0) {
    answer -= 1.0;
  }
  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
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
cvttsd2si -0x50(%rbp),%eax
cmp    $0x0,%eax
jl     1542 <point_in_triangle+0x442>
cvttsd2si -0x68(%rbp),%eax
cmp    $0x0,%eax
jl     1542 <point_in_triangle+0x442>
cvttsd2si -0x80(%rbp),%eax
cmp    $0x0,%eax
jl     1542 <point_in_triangle+0x442>
movsd  0xacd(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1587 <point_in_triangle+0x487>
cvttsd2si -0x50(%rbp),%eax
cmp    $0x0,%eax
jg     1582 <point_in_triangle+0x482>
cvttsd2si -0x68(%rbp),%eax
cmp    $0x0,%eax
jg     1582 <point_in_triangle+0x482>
cvttsd2si -0x80(%rbp),%eax
cmp    $0x0,%eax
jg     1582 <point_in_triangle+0x482>
movsd  -0x48(%rbp),%xmm0
movsd  0xa87(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1587 <point_in_triangle+0x487>
cvttsd2si -0x58(%rbp),%eax
cmp    $0x0,%eax
jl     15cb <point_in_triangle+0x4cb>
cvttsd2si -0x70(%rbp),%eax
cmp    $0x0,%eax
jl     15cb <point_in_triangle+0x4cb>
cvttsd2si -0x88(%rbp),%eax
ff
cmp    $0x0,%eax
jl     15cb <point_in_triangle+0x4cb>
movsd  0xa44(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1613 <point_in_triangle+0x513>
cvttsd2si -0x58(%rbp),%eax
cmp    $0x0,%eax
jg     160e <point_in_triangle+0x50e>
cvttsd2si -0x70(%rbp),%eax
cmp    $0x0,%eax
jg     160e <point_in_triangle+0x50e>
cvttsd2si -0x88(%rbp),%eax
ff
cmp    $0x0,%eax
jg     160e <point_in_triangle+0x50e>
movsd  -0x48(%rbp),%xmm0
movsd  0x9fb(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1613 <point_in_triangle+0x513>
cvttsd2si -0x60(%rbp),%eax
cmp    $0x0,%eax
jl     1657 <point_in_triangle+0x557>
cvttsd2si -0x78(%rbp),%eax
cmp    $0x0,%eax
jl     1657 <point_in_triangle+0x557>
cvttsd2si -0x90(%rbp),%eax
ff
cmp    $0x0,%eax
jl     1657 <point_in_triangle+0x557>
movsd  0x9b8(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    169f <point_in_triangle+0x59f>
cvttsd2si -0x60(%rbp),%eax
cmp    $0x0,%eax
jg     169a <point_in_triangle+0x59a>
cvttsd2si -0x78(%rbp),%eax
cmp    $0x0,%eax
jg     169a <point_in_triangle+0x59a>
cvttsd2si -0x90(%rbp),%eax
ff
cmp    $0x0,%eax
jg     169a <point_in_triangle+0x59a>
movsd  -0x48(%rbp),%xmm0
movsd  0x96f(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    169f <point_in_triangle+0x59f>
movsd  -0x48(%rbp),%xmm0
movsd  0x95c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    16c1 <point_in_triangle+0x5c1>
jp     16c1 <point_in_triangle+0x5c1>
jmp    16de <point_in_triangle+0x5de>
movsd  -0x48(%rbp),%xmm0
movsd  0x942(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    16f0 <point_in_triangle+0x5f0>
jp     16f0 <point_in_triangle+0x5f0>
movsd  0x91a(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    16f8 <point_in_triangle+0x5f8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<point_in_triangle>:
movsd  0x20(%rsp),%xmm10
movapd %xmm7,%xmm8
subsd  %xmm4,%xmm8
movsd  0x8(%rsp),%xmm14
movapd %xmm10,%xmm9
movapd %xmm10,%xmm12
unpcklpd %xmm14,%xmm9
unpcklpd %xmm5,%xmm14
subpd  %xmm14,%xmm9
movsd  0x10(%rsp),%xmm15
movapd %xmm3,%xmm10
unpcklpd %xmm15,%xmm10
unpcklpd %xmm6,%xmm15
subsd  %xmm3,%xmm6
subpd  %xmm15,%xmm10
movsd  0x18(%rsp),%xmm13
movapd %xmm1,%xmm11
subsd  %xmm4,%xmm11
unpcklpd %xmm13,%xmm4
unpcklpd %xmm7,%xmm13
subpd  %xmm13,%xmm4
subsd  %xmm12,%xmm5
movapd %xmm12,%xmm7
movapd %xmm0,%xmm12
subsd  %xmm3,%xmm12
movapd %xmm2,%xmm3
unpcklpd %xmm2,%xmm3
subpd  %xmm14,%xmm3
unpcklpd %xmm0,%xmm0
subpd  %xmm15,%xmm0
unpcklpd %xmm1,%xmm1
subpd  %xmm13,%xmm1
subsd  %xmm7,%xmm2
movapd %xmm1,%xmm15
movapd %xmm4,%xmm13
mulsd  %xmm2,%xmm13
movapd %xmm1,%xmm14
mulsd  %xmm10,%xmm2
mulpd  %xmm10,%xmm1
shufpd $0x1,%xmm6,%xmm10
mulsd  %xmm11,%xmm6
movapd %xmm0,%xmm7
shufpd $0x1,%xmm12,%xmm7
mulsd  %xmm8,%xmm12
mulsd  %xmm5,%xmm14
mulsd  %xmm0,%xmm5
mulpd  %xmm4,%xmm0
shufpd $0x1,%xmm8,%xmm4
mulpd  %xmm3,%xmm4
shufpd $0x1,%xmm11,%xmm15
mulpd  %xmm9,%xmm15
subpd  %xmm4,%xmm15
mulpd  %xmm9,%xmm7
mulpd  %xmm3,%xmm10
subpd  %xmm7,%xmm10
subsd  %xmm13,%xmm14
cvttpd2dq %xmm15,%xmm3
subsd  %xmm5,%xmm2
pshufd $0x50,%xmm3,%xmm4
pcmpeqd %xmm5,%xmm5
pcmpgtd %xmm5,%xmm4
movmskpd %xmm4,%eax
cvttsd2si %xmm14,%ecx
test   $0x2,%al
je     124f <point_in_triangle+0x14f>
test   $0x1,%al
je     124f <point_in_triangle+0x14f>
test   %ecx,%ecx
js     124f <point_in_triangle+0x14f>
movsd  0xdb3(%rip),%xmm3
jmp    128a <point_in_triangle+0x18a>
movdqa 0xdc9(%rip),%xmm4
pcmpgtd %xmm3,%xmm4
pshufd $0x50,%xmm4,%xmm3
movmskpd %xmm3,%eax
test   %ecx,%ecx
jle    1272 <point_in_triangle+0x172>
xorpd  %xmm3,%xmm3
test   $0x1,%al
je     127e <point_in_triangle+0x17e>
jmp    1282 <point_in_triangle+0x182>
movsd  0xd8e(%rip),%xmm3
test   $0x1,%al
jne    1282 <point_in_triangle+0x182>
xorpd  %xmm3,%xmm3
test   $0x2,%al
jne    128a <point_in_triangle+0x18a>
xorpd  %xmm3,%xmm3
subsd  %xmm6,%xmm12
cvttpd2dq %xmm10,%xmm4
subpd  %xmm1,%xmm0
pshufd $0x50,%xmm4,%xmm1
pcmpeqd %xmm5,%xmm5
pcmpgtd %xmm5,%xmm1
movmskpd %xmm1,%eax
cvttsd2si %xmm2,%ecx
test   $0x2,%al
je     12c3 <point_in_triangle+0x1c3>
test   $0x1,%al
je     12c3 <point_in_triangle+0x1c3>
test   %ecx,%ecx
js     12c3 <point_in_triangle+0x1c3>
addsd  0xd3f(%rip),%xmm3
jmp    12fe <point_in_triangle+0x1fe>
movdqa 0xd55(%rip),%xmm1
pcmpgtd %xmm4,%xmm1
pshufd $0x50,%xmm1,%xmm1
movmskpd %xmm1,%eax
test   %ecx,%ecx
jle    12e6 <point_in_triangle+0x1e6>
movapd %xmm3,%xmm1
test   $0x1,%al
je     12f6 <point_in_triangle+0x1f6>
jmp    12fa <point_in_triangle+0x1fa>
movsd  0xd1a(%rip),%xmm1
addsd  %xmm3,%xmm1
test   $0x1,%al
jne    12fa <point_in_triangle+0x1fa>
movapd %xmm3,%xmm1
test   $0x2,%al
jne    1302 <point_in_triangle+0x202>
movapd %xmm3,%xmm1
cvttsd2si %xmm12,%eax
cvttpd2dq %xmm0,%xmm0
test   %eax,%eax
js     1335 <point_in_triangle+0x235>
pshufd $0x50,%xmm0,%xmm2
pcmpeqd %xmm3,%xmm3
pcmpgtd %xmm3,%xmm2
movmskpd %xmm2,%ecx
mov    %ecx,%edx
shr    %dl
je     1335 <point_in_triangle+0x235>
test   $0x1,%cl
je     1335 <point_in_triangle+0x235>
addsd  0xccd(%rip),%xmm1
jmp    1373 <point_in_triangle+0x273>
movdqa 0xce3(%rip),%xmm2
pcmpgtd %xmm0,%xmm2
pshufd $0x50,%xmm2,%xmm0
movmskpd %xmm0,%ecx
test   $0x1,%cl
jne    135a <point_in_triangle+0x25a>
movapd %xmm1,%xmm2
test   $0x2,%cl
je     136b <point_in_triangle+0x26b>
jmp    136f <point_in_triangle+0x26f>
movsd  0xca6(%rip),%xmm2
addsd  %xmm1,%xmm2
test   $0x2,%cl
jne    136f <point_in_triangle+0x26f>
movapd %xmm1,%xmm2
test   %eax,%eax
jle    1377 <point_in_triangle+0x277>
movapd %xmm1,%xmm2
movsd  0xc91(%rip),%xmm0
cmpeqsd %xmm2,%xmm0
movsd  0xc74(%rip),%xmm1
movapd %xmm0,%xmm3
cmpeqsd 0xc7f(%rip),%xmm2
andpd  %xmm1,%xmm3
andpd  %xmm1,%xmm2
andnpd %xmm2,%xmm0
orpd   %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @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 double
%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 double 0.000000e+00, double* %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 double, double* %25
%183 = fadd double %182, 1.000000e+00
store double %183, double* %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 double, double* %25
%198 = fsub double %197, 1.000000e+00
store double %198, double* %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 double, double* %25
%214 = fadd double %213, 1.000000e+00
store double %214, double* %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 double, double* %25
%229 = fsub double %228, 1.000000e+00
store double %229, double* %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 double, double* %25
%245 = fadd double %244, 1.000000e+00
store double %245, double* %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 double, double* %25
%260 = fsub double %259, 1.000000e+00
store double %260, double* %25
br label %261
261: ; preds = %258, %254, %250, %246
br label %262
262: ; preds = %261, %243
%263 = load double, double* %25
%264 = fcmp oeq double %263, 3.000000e+00
br i1 %264, label %268, label %265
265: ; preds = %262
%266 = load double, double* %25
%267 = fcmp oeq double %266, -3.000000e+00
br i1 %267, label %268, label %269
268: ; preds = %265, %262
store double 1.000000e+00, double* %25
br label %270
269: ; preds = %265
store double 0.000000e+00, double* %25
br label %270
270: ; preds = %269, %268
%271 = load double, double* %25
ret double %271
}

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