#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ abort();
float fabsf(float);
int /*<<< orphan*/ printf(char *, char const *, int, char const *, float,
                          float);
void mu_assert_eq_float_epsilon_impl(const char *file, int line,
                                     const char *func, float a, float b,
                                     float e) {
  if (fabsf(a - b) > e) {
    printf("%s:%d in %s: %.10g != %.10g\n", file, line, func, a, b);
    abort();
  }
}


x86 assembly (clang, -O0):
<mu_assert_eq_float_epsilon_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
movss  %xmm1,-0x20(%rbp)
movss  %xmm2,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
subss  -0x20(%rbp),%xmm0
movaps 0xead(%rip),%xmm1
pand   %xmm1,%xmm0
ucomiss -0x24(%rbp),%xmm0
jbe    1189 <mu_assert_eq_float_epsilon_impl+0x69>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mu_assert_eq_float_epsilon_impl>:
push   %rax
movaps %xmm0,%xmm3
subss  %xmm1,%xmm3
andps  0xed1(%rip),%xmm3
ucomiss %xmm2,%xmm3
ja     1136 <mu_assert_eq_float_epsilon_impl+0x16>
pop    %rax
ret
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"%s:%d in %s: %.10g != %.10g\0A\00"
define void @mu_assert_eq_float_epsilon_impl(i8* %0, i32 %1, i8* %2, float %3, float %4, float %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %10
%14 = load float, float* %11
%15 = fsub float %13, %14
%16 = call float @llvm.fabs.f32(float %15)
%17 = load float, float* %12
%18 = fcmp ogt float %16, %17
br i1 %18, label %19, label %27
19: ; preds = %6
%20 = load i8*, i8** %7
%21 = load i32, i32* %8
%22 = load i8*, i8** %9
%23 = load float, float* %10
%24 = load float, float* %11
%25 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %20, i32 %21, i8* %22, float %23, float %24)
%26 = call i32 (...) @abort()
unreachable
27: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"%s:%d in %s: %.10g != %.10g\0A\00"
define void @mu_assert_eq_float_epsilon_impl(i8* %0, i32 %1, i8* %2, float %3, float %4, float %5) {
%7 = fsub float %3, %4
%8 = tail call float @llvm.fabs.f32(float %7)
%9 = fcmp ogt float %8, %5
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2, float %3, float %4)
%12 = tail call i32 (...) @abort()
unreachable
13: ; preds = %6
ret void
}