int range_intersects(double m1, double e1, double m2, double e2) {
  e1 = m1 * (e1 / 100.0);
  e2 = m2 * (e2 / 100.0);
  return !(m1 + e1 < m2 - e2 || m2 + e2 < m1 - e1);
}


x86 assembly (clang, -O0):
<range_intersects>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xed6(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xeb7(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x21(%rbp)
ja     1197 <range_intersects+0x97>
movsd  -0x18(%rbp),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_intersects>:
unpcklpd %xmm3,%xmm1
divpd  0xef4(%rip),%xmm1
movapd %xmm0,%xmm3
unpcklpd %xmm2,%xmm3
mulpd  %xmm3,%xmm1
addpd  %xmm1,%xmm3
unpcklpd %xmm0,%xmm2
shufpd $0x1,%xmm1,%xmm1
subpd  %xmm1,%xmm2
cmpnltpd %xmm2,%xmm3
movmskpd %xmm3,%ecx
xor    %eax,%eax
cmp    $0x3,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @range_intersects(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %6
%11 = fdiv double %10, 1.000000e+02
%12 = fmul double %9, %11
store double %12, double* %6
%13 = load double, double* %7
%14 = load double, double* %8
%15 = fdiv double %14, 1.000000e+02
%16 = fmul double %13, %15
store double %16, double* %8
%17 = load double, double* %5
%18 = load double, double* %6
%19 = fadd double %17, %18
%20 = load double, double* %7
%21 = load double, double* %8
%22 = fsub double %20, %21
%23 = fcmp olt double %19, %22
br i1 %23, label %32, label %24
24: ; preds = %4
%25 = load double, double* %7
%26 = load double, double* %8
%27 = fadd double %25, %26
%28 = load double, double* %5
%29 = load double, double* %6
%30 = fsub double %28, %29
%31 = fcmp olt double %27, %30
br label %32
32: ; preds = %24, %4
%33 = phi i1 [ true, %4 ], [ %31, %24 ]
%34 = xor i1 %33, true
%35 = zext i1 %34 to i32
ret i32 %35
}

LLVM IR (-O2):
define i32 @range_intersects(double %0, double %1, double %2, double %3) {
%5 = insertelement <2 x double> poison, double %1, i64 0
%6 = insertelement <2 x double> %5, double %3, i64 1
%7 = fdiv <2 x double> %6, <double 1.000000e+02, double 1.000000e+02>
%8 = insertelement <2 x double> poison, double %0, i64 0
%9 = insertelement <2 x double> %8, double %2, i64 1
%10 = fmul <2 x double> %7, %9
%11 = fadd <2 x double> %10, %9
%12 = insertelement <2 x double> poison, double %2, i64 0
%13 = insertelement <2 x double> %12, double %0, i64 1
%14 = shufflevector <2 x double> %10, <2 x double> undef, <2 x i32> <i32 1, i32 0>
%15 = fsub <2 x double> %13, %14
%16 = fcmp uge <2 x double> %11, %15
%17 = shufflevector <2 x i1> %16, <2 x i1> poison, <2 x i32> <i32 1, i32 undef>
%18 = and <2 x i1> %16, %17
%19 = extractelement <2 x i1> %18, i64 0
%20 = zext i1 %19 to i32
ret i32 %20
}