#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 */
scalar_t__ is_float_near(float, float, float);
int minitest_fail(char const *, char const *, int);
int minitest_pass(char const *);
int refute_float_near(float expected, float actual, float epsilon,
                      const char *msg, const char *caller, int line) {
  if (is_float_near(expected, actual, epsilon)) {
    return minitest_fail(msg, caller, line);
  } else {
    return minitest_pass(msg);
  }
}


x86 assembly (clang, -O0):
<refute_float_near>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %edx,-0x24(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
call   1050 <is_float_near@plt>
cmp    $0x0,%rax
je     1188 <refute_float_near+0x58>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1040 <minitest_fail@plt>
mov    %eax,-0x4(%rbp)
jmp    1194 <refute_float_near+0x64>
mov    -0x18(%rbp),%rdi
call   1030 <minitest_pass@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<refute_float_near>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1050 <is_float_near@plt>
mov    %rbp,%rdi
test   %rax,%rax
je     1159 <refute_float_near+0x29>
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <minitest_fail@plt>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <minitest_pass@plt>

LLVM IR (-O0):
define i32 @refute_float_near(float %0, float %1, float %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
store float %0, float* %8
store float %1, float* %9
store float %2, float* %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32 %5, i32* %13
%14 = load float, float* %8
%15 = load float, float* %9
%16 = load float, float* %10
%17 = call i64 @is_float_near(float %14, float %15, float %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %6
%20 = load i8*, i8** %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = call i32 @minitest_fail(i8* %20, i8* %21, i32 %22)
store i32 %23, i32* %7
br label %27
24: ; preds = %6
%25 = load i8*, i8** %11
%26 = call i32 @minitest_pass(i8* %25)
store i32 %26, i32* %7
br label %27
27: ; preds = %24, %19
%28 = load i32, i32* %7
ret i32 %28
}

LLVM IR (-O2):
define i32 @refute_float_near(float %0, float %1, float %2, i8* %3, i8* %4, i32 %5) {
%7 = tail call i64 @is_float_near(float %0, float %1, float %2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @minitest_fail(i8* %3, i8* %4, i32 %5)
br label %13
11: ; preds = %6
%12 = tail call i32 @minitest_pass(i8* %3)
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
ret i32 %14
}