int can_approx_with_line(double x0, double y0, double x2, double y2, double x3,
                         double y3) {
  double triangle_area, side_squared, dx, dy;
  triangle_area = x0 * y2 - x2 * y0 + x2 * y3 - x3 * y2 + x3 * y0 - x0 * y3;
  triangle_area *= triangle_area;
  dx = x3 - x0;
  dy = y3 - y0;
  side_squared = dx * dx + dy * dy;
  return triangle_area <= 1.0 * side_squared;
}


x86 assembly (clang, -O0):
<can_approx_with_line>:
push   %rbp
mov    %rsp,%rbp
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  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  0xdd5(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<can_approx_with_line>:
movapd %xmm2,%xmm6
mulsd  %xmm1,%xmm6
movapd %xmm0,%xmm7
mulsd  %xmm3,%xmm7
subsd  %xmm6,%xmm7
mulsd  %xmm5,%xmm2
addsd  %xmm7,%xmm2
mulsd  %xmm4,%xmm3
subsd  %xmm3,%xmm2
movapd %xmm4,%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
subsd  %xmm0,%xmm4
mulsd  %xmm5,%xmm0
subsd  %xmm0,%xmm3
mulsd  %xmm3,%xmm3
subsd  %xmm1,%xmm5
mulsd  %xmm5,%xmm5
mulsd  %xmm4,%xmm4
addsd  %xmm5,%xmm4
xor    %eax,%eax
ucomisd %xmm3,%xmm4
setae  %al
ret

LLVM IR (-O0):
define i32 @can_approx_with_line(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%17 = load double, double* %7
%18 = load double, double* %10
%19 = load double, double* %9
%20 = load double, double* %8
%21 = fmul double %19, %20
%22 = fneg double %21
%23 = call double @llvm.fmuladd.f64(double %17, double %18, double %22)
%24 = load double, double* %9
%25 = load double, double* %12
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double %23)
%27 = load double, double* %11
%28 = load double, double* %10
%29 = fneg double %27
%30 = call double @llvm.fmuladd.f64(double %29, double %28, double %26)
%31 = load double, double* %11
%32 = load double, double* %8
%33 = call double @llvm.fmuladd.f64(double %31, double %32, double %30)
%34 = load double, double* %7
%35 = load double, double* %12
%36 = fneg double %34
%37 = call double @llvm.fmuladd.f64(double %36, double %35, double %33)
store double %37, double* %13
%38 = load double, double* %13
%39 = load double, double* %13
%40 = fmul double %39, %38
store double %40, double* %13
%41 = load double, double* %11
%42 = load double, double* %7
%43 = fsub double %41, %42
store double %43, double* %15
%44 = load double, double* %12
%45 = load double, double* %8
%46 = fsub double %44, %45
store double %46, double* %16
%47 = load double, double* %15
%48 = load double, double* %15
%49 = load double, double* %16
%50 = load double, double* %16
%51 = fmul double %49, %50
%52 = call double @llvm.fmuladd.f64(double %47, double %48, double %51)
store double %52, double* %14
%53 = load double, double* %13
%54 = load double, double* %14
%55 = fmul double 1.000000e+00, %54
%56 = fcmp ole double %53, %55
%57 = zext i1 %56 to i32
ret i32 %57
}

LLVM IR (-O2):
define i32 @can_approx_with_line(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fneg double %2
%8 = fmul double %7, %1
%9 = tail call double @llvm.fmuladd.f64(double %0, double %3, double %8)
%10 = tail call double @llvm.fmuladd.f64(double %2, double %5, double %9)
%11 = fneg double %4
%12 = tail call double @llvm.fmuladd.f64(double %11, double %3, double %10)
%13 = tail call double @llvm.fmuladd.f64(double %4, double %1, double %12)
%14 = fneg double %0
%15 = tail call double @llvm.fmuladd.f64(double %14, double %5, double %13)
%16 = fmul double %15, %15
%17 = fsub double %4, %0
%18 = fsub double %5, %1
%19 = fmul double %18, %18
%20 = tail call double @llvm.fmuladd.f64(double %17, double %17, double %19)
%21 = fcmp ole double %16, %20
%22 = zext i1 %21 to i32
ret i32 %22
}