void __attribute__((no, noclone, hot))
foo(double a, double q, double *ff, double *gx, int e, int ni) {
  union {
    double n;
    unsigned long long o;
  } punner;
  double d;
  punner.n = q;
  __builtin_printf("B: 0x%016llx ---- %g\n", punner.o, q);
  d = q - 5;
  if (d < 0)
    d = -d;
  if (d > 0.1)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
mov    %ecx,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
movsd  -0x10(%rbp),%xmm0
lea    0xeb6(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xe92(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    11a6 <foo+0x86>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xe55(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11c2 <foo+0xa2>
call   1030 <abort@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x18,%rsp
movdqa %xmm1,%xmm0
movdqa %xmm1,(%rsp)
movq   %xmm1,%rsi
lea    0xfa7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movapd (%rsp),%xmm3
addsd  0xf73(%rip),%xmm3
movapd 0xf7b(%rip),%xmm0
xorpd  %xmm3,%xmm0
pxor   %xmm1,%xmm1
movapd %xmm3,%xmm2
cmpltsd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm3,%xmm2
orpd   %xmm0,%xmm2
ucomisd 0xf4e(%rip),%xmm2
ja     10c1 <foo+0x61>
add    $0x18,%rsp
ret
call   1030 <abort@plt>
cs nopw 0x0(%rax,%rax,1)

LLVM IR (-O0):
%union.anon = type { double }
@.str = [22 x i8] c"B: 0x%016llx ---- %g\0A\00"
define void @foo(double %0, double %1, double* %2, double* %3, i32 %4, i32 %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca %union.anon
%14 = alloca double
store double %0, double* %7
store double %1, double* %8
store double* %2, double** %9
store double* %3, double** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%15 = load double, double* %8
%16 = bitcast %union.anon* %13 to double*
store double %15, double* %16
%17 = bitcast %union.anon* %13 to i64*
%18 = load i64, i64* %17
%19 = load double, double* %8
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %18, double %19)
%21 = load double, double* %8
%22 = fsub double %21, 5.000000e+00
store double %22, double* %14
%23 = load double, double* %14
%24 = fcmp olt double %23, 0.000000e+00
br i1 %24, label %25, label %28
25: ; preds = %6
%26 = load double, double* %14
%27 = fneg double %26
store double %27, double* %14
br label %28
28: ; preds = %25, %6
%29 = load double, double* %14
%30 = fcmp ogt double %29, 1.000000e-01
br i1 %30, label %31, label %32
31: ; preds = %28
unreachable
32: ; preds = %28
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"B: 0x%016llx ---- %g\0A\00"
define void @foo(double %0, double %1, double* nocapture readnone %2, double* nocapture readnone %3, i32 %4, i32 %5) {
%7 = bitcast double %1 to i64
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i64 %7, double %1)
%9 = fadd double %1, -5.000000e+00
%10 = fcmp olt double %9, 0.000000e+00
%11 = fneg double %9
%12 = select i1 %10, double %11, double %9
%13 = fcmp ogt double %12, 1.000000e-01
br i1 %13, label %14, label %15
14: ; preds = %6
tail call void @abort()
unreachable
15: ; preds = %6
ret void
}