#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*/ TESTError_Fail(char *, char const *, int, char const *,
                                  char const *, float const, float const);
int /*<<< orphan*/ floatEq(float const, float const);
int AssertEqualFloat(const float a, const float b, int line, const char *file,
                     const char *function, const char *exp) {
  if (!floatEq(a, b)) {
    TESTError_Fail("%s:%d> %s() FAILED: %s was '%f' but should be '%f'\n", file,
                   line, function, exp, a, b);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<AssertEqualFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <floatEq@plt>
cmp    $0x0,%eax
jne    118a <AssertEqualFloat+0x6a>
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
lea    0xe87(%rip),%rdi
call   1040 <TESTError_Fail@plt>
movl   $0x0,-0x4(%rbp)
jmp    1191 <AssertEqualFloat+0x71>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AssertEqualFloat>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%ebp
movss  %xmm0,(%rsp)
movss  %xmm1,0x4(%rsp)
call   1030 <floatEq@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
jne    1171 <AssertEqualFloat+0x51>
lea    0xeac(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r15,%rcx
mov    %r14,%r8
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
call   1040 <TESTError_Fail@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [52 x i8] c"%s:%d> %s() FAILED: %s was '%f' but should be '%f'\0A\00"
define i32 @AssertEqualFloat(float %0, float %1, i32 %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
store float %0, float* %8
store float %1, float* %9
store i32 %2, i32* %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%14 = load float, float* %8
%15 = load float, float* %9
%16 = call i32 @floatEq(float %14, float %15)
%17 = icmp ne i32 %16, 0
br i1 %17, label %26, label %18
18: ; preds = %6
%19 = load i8*, i8** %11
%20 = load i32, i32* %10
%21 = load i8*, i8** %12
%22 = load i8*, i8** %13
%23 = load float, float* %8
%24 = load float, float* %9
%25 = call i32 @TESTError_Fail(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %19, i32 %20, i8* %21, i8* %22, float %23, float %24)
store i32 0, i32* %7
br label %27
26: ; preds = %6
store i32 1, i32* %7
br label %27
27: ; preds = %26, %18
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
@.str = [52 x i8] c"%s:%d> %s() FAILED: %s was '%f' but should be '%f'\0A\00"
define i32 @AssertEqualFloat(float %0, float %1, i32 %2, i8* %3, i8* %4, i8* %5) {
%7 = tail call i32 @floatEq(float %0, float %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @TESTError_Fail(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %2, i8* %4, i8* %5, float %0, float %1)
br label %11
11: ; preds = %6, %9
%12 = phi i32 [ 0, %9 ], [ 1, %6 ]
ret i32 %12
}