int isSameSide(double e0, double f0, double e1, double f1, double e2, double f2,
               double ep, double fp) {
  double test_in_point, test_point2;
  test_in_point = ((f0 - f1) * ep) + ((e1 - e0) * fp) + ((e0 * f1) - (e1 * f0));
  test_point2 = ((f0 - f1) * e2) + ((e1 - e0) * f2) + ((e0 * f1) - (e1 * f0));
  if ((test_in_point > 0 && test_point2 > 0) ||
      (test_in_point < 0 && test_point2 < 0))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isSameSide>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
movsd  %xmm7,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm2
mulsd  -0x18(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
movsd  -0x20(%rbp),%xmm2
mulsd  -0x18(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1214 <isSameSide+0x114>
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     1230 <isSameSide+0x130>
xorps  %xmm0,%xmm0
ucomisd -0x50(%rbp),%xmm0
jbe    123c <isSameSide+0x13c>
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jbe    123c <isSameSide+0x13c>
movl   $0x1,-0x4(%rbp)
jmp    1243 <isSameSide+0x143>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSameSide>:
movapd %xmm1,%xmm8
subsd  %xmm3,%xmm8
movapd %xmm2,%xmm9
subsd  %xmm0,%xmm9
mulsd  %xmm9,%xmm7
mulsd  %xmm8,%xmm6
addsd  %xmm7,%xmm6
xorpd  0xed6(%rip),%xmm2
unpcklpd %xmm9,%xmm2
unpcklpd %xmm5,%xmm1
mulpd  %xmm2,%xmm1
unpcklpd %xmm8,%xmm0
unpcklpd %xmm4,%xmm3
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
addsd  %xmm3,%xmm6
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
addsd  %xmm3,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm6
seta   %al
ucomisd %xmm1,%xmm0
seta   %cl
and    %al,%cl
ucomisd %xmm6,%xmm1
seta   %al
ucomisd %xmm0,%xmm1
seta   %dl
and    %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @isSameSide(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double %7, double* %17
%20 = load double, double* %11
%21 = load double, double* %13
%22 = fsub double %20, %21
%23 = load double, double* %16
%24 = load double, double* %12
%25 = load double, double* %10
%26 = fsub double %24, %25
%27 = load double, double* %17
%28 = fmul double %26, %27
%29 = call double @llvm.fmuladd.f64(double %22, double %23, double %28)
%30 = load double, double* %10
%31 = load double, double* %13
%32 = load double, double* %12
%33 = load double, double* %11
%34 = fmul double %32, %33
%35 = fneg double %34
%36 = call double @llvm.fmuladd.f64(double %30, double %31, double %35)
%37 = fadd double %29, %36
store double %37, double* %18
%38 = load double, double* %11
%39 = load double, double* %13
%40 = fsub double %38, %39
%41 = load double, double* %14
%42 = load double, double* %12
%43 = load double, double* %10
%44 = fsub double %42, %43
%45 = load double, double* %15
%46 = fmul double %44, %45
%47 = call double @llvm.fmuladd.f64(double %40, double %41, double %46)
%48 = load double, double* %10
%49 = load double, double* %13
%50 = load double, double* %12
%51 = load double, double* %11
%52 = fmul double %50, %51
%53 = fneg double %52
%54 = call double @llvm.fmuladd.f64(double %48, double %49, double %53)
%55 = fadd double %47, %54
store double %55, double* %19
%56 = load double, double* %18
%57 = fcmp ogt double %56, 0.000000e+00
br i1 %57, label %58, label %61
58: ; preds = %8
%59 = load double, double* %19
%60 = fcmp ogt double %59, 0.000000e+00
br i1 %60, label %67, label %61
61: ; preds = %58, %8
%62 = load double, double* %18
%63 = fcmp olt double %62, 0.000000e+00
br i1 %63, label %64, label %68
64: ; preds = %61
%65 = load double, double* %19
%66 = fcmp olt double %65, 0.000000e+00
br i1 %66, label %67, label %68
67: ; preds = %64, %58
store i32 1, i32* %9
br label %69
68: ; preds = %64, %61
store i32 0, i32* %9
br label %69
69: ; preds = %68, %67
%70 = load i32, i32* %9
ret i32 %70
}

LLVM IR (-O2):
define i32 @isSameSide(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fsub double %1, %3
%10 = fsub double %2, %0
%11 = fmul double %10, %7
%12 = tail call double @llvm.fmuladd.f64(double %9, double %6, double %11)
%13 = fneg double %2
%14 = insertelement <2 x double> poison, double %13, i64 0
%15 = insertelement <2 x double> %14, double %10, i64 1
%16 = insertelement <2 x double> poison, double %1, i64 0
%17 = insertelement <2 x double> %16, double %5, i64 1
%18 = fmul <2 x double> %15, %17
%19 = insertelement <2 x double> poison, double %0, i64 0
%20 = insertelement <2 x double> %19, double %9, i64 1
%21 = insertelement <2 x double> poison, double %3, i64 0
%22 = insertelement <2 x double> %21, double %4, i64 1
%23 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %20, <2 x double> %22, <2 x double> %18)
%24 = extractelement <2 x double> %23, i64 0
%25 = fadd double %24, %12
%26 = shufflevector <2 x double> %23, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%27 = fadd <2 x double> %23, %26
%28 = extractelement <2 x double> %27, i64 0
%29 = fcmp ogt double %25, 0.000000e+00
%30 = fcmp ogt double %28, 0.000000e+00
%31 = select i1 %29, i1 %30, i1 false
%32 = fcmp olt double %25, 0.000000e+00
%33 = fcmp olt double %28, 0.000000e+00
%34 = select i1 %32, i1 %33, i1 false
%35 = select i1 %31, i1 true, i1 %34
%36 = zext i1 %35 to i32
ret i32 %36
}