#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_dbl_near(double, double, double);
int minitest_fail(char const *, char const *, int);
int minitest_pass(char const *);
int refute_dbl_near(double expected, double actual, double epsilon,
                    const char *msg, const char *caller, int line) {
  if (is_dbl_near(expected, actual, epsilon)) {
    return minitest_fail(msg, caller, line);
  } else {
    return minitest_pass(msg);
  }
}


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

x86 assembly (clang, -O2):
<refute_dbl_near>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1050 <is_dbl_near@plt>
mov    %rbp,%rdi
test   %rax,%rax
je     1159 <refute_dbl_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_dbl_near(double %0, double %1, double %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32 %5, i32* %13
%14 = load double, double* %8
%15 = load double, double* %9
%16 = load double, double* %10
%17 = call i64 @is_dbl_near(double %14, double %15, double %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_dbl_near(double %0, double %1, double %2, i8* %3, i8* %4, i32 %5) {
%7 = tail call i64 @is_dbl_near(double %0, double %1, double %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
}