#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*/ StrLib_StrCopy(char *, unsigned int, char *, int);
int /*<<< orphan*/ libc_printf(char *, int, struct _T6_a *, double, double,
                               double);
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
int /*<<< orphan*/ roots_nearZero(double);
void AssertRDebug(double a, double b, char *message_,
                  unsigned int _message_high) {
  typedef struct _T6_a _T6;
  struct _T6_a {
    char array[10 + 1];
  };
  _T6 copy;
  char message[_message_high + 1];
  memcpy(message, message_, _message_high + 1);
  if (!(roots_nearZero(a - b))) {
    StrLib_StrCopy((char *)message, _message_high, (char *)&copy.array[0], 10);
    libc_printf((char *)"%s failed  %g should equal %g difference is %g\\n", 48,
                &copy, a, b, a - b);
  }
}


x86 assembly (clang, -O0):
<AssertRDebug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x40(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1060 <roots_nearZero@plt>
cmp    $0x0,%eax
jne    11e7 <AssertRDebug+0xa7>
mov    -0x40(%rbp),%rdi
mov    -0x1c(%rbp),%esi
lea    -0x28(%rbp),%rdx
mov    $0xa,%ecx
call   1050 <StrLib_StrCopy@plt>
lea    -0x28(%rbp),%rdx
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
lea    0xe23(%rip),%rdi
mov    $0x30,%esi
call   1030 <libc_printf@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AssertRDebug>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %esi,%r14d
mov    %rdi,%rsi
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %rsp,%r12
lea    0x1(%r14),%edx
mov    %rsp,%rbx
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
call   1040 <memcpy@plt>
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
call   1060 <roots_nearZero@plt>
test   %eax,%eax
jne    11d1 <AssertRDebug+0x91>
lea    -0x48(%rbp),%r15
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %r15,%rdx
mov    $0xa,%ecx
call   1050 <StrLib_StrCopy@plt>
lea    0xe4b(%rip),%rdi
mov    $0x30,%esi
mov    %r15,%rdx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1030 <libc_printf@plt>
mov    %r12,%rsp
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct._T6_a = type { [11 x i8] }
%struct._T6_a.0 = type opaque
@.str = [49 x i8] c"%s failed %g should equal %g difference is %g\\n\00"
define void @AssertRDebug(double %0, double %1, i8* %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca i8*
%8 = alloca i32
%9 = alloca %struct._T6_a
%10 = alloca i8*
%11 = alloca i64
store double %0, double* %5
store double %1, double* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%12 = load i32, i32* %8
%13 = add i32 %12, 1
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
store i8* %15, i8** %10
%16 = alloca i8, i64 %14
store i64 %14, i64* %11
%17 = load i8*, i8** %7
%18 = load i32, i32* %8
%19 = add i32 %18, 1
%20 = call i32 @memcpy(i8* %16, i8* %17, i32 %19)
%21 = load double, double* %5
%22 = load double, double* %6
%23 = fsub double %21, %22
%24 = call i32 @roots_nearZero(double %23)
%25 = icmp ne i32 %24, 0
br i1 %25, label %38, label %26
26: ; preds = %4
%27 = load i32, i32* %8
%28 = getelementptr inbounds %struct._T6_a, %struct._T6_a* %9, i32 0, i32 0
%29 = getelementptr inbounds [11 x i8], [11 x i8]* %28, i64 0, i64 0
%30 = call i32 @StrLib_StrCopy(i8* %16, i32 %27, i8* %29, i32 10)
%31 = bitcast %struct._T6_a* %9 to %struct._T6_a.0*
%32 = load double, double* %5
%33 = load double, double* %6
%34 = load double, double* %5
%35 = load double, double* %6
%36 = fsub double %34, %35
%37 = call i32 @libc_printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 48, %struct._T6_a.0* %31, double %32, double %33, double %36)
br label %38
38: ; preds = %26, %4
%39 = load i8*, i8** %10
ret void
}

LLVM IR (-O2):
%struct._T6_a = type { [11 x i8] }
%struct._T6_a.0 = type opaque
@.str = [49 x i8] c"%s failed %g should equal %g difference is %g\\n\00"
define void @AssertRDebug(double %0, double %1, i8* %2, i32 %3) {
%5 = alloca %struct._T6_a
%6 = getelementptr inbounds %struct._T6_a, %struct._T6_a* %5, i64 0, i32 0, i64 0
%7 = add i32 %3, 1
%8 = zext i32 %7 to i64
%9 = tail call i8* @llvm.stacksave()
%10 = alloca i8, i64 %8
%11 = call i32 @memcpy(i8* %10, i8* %2, i32 %7)
%12 = fsub double %0, %1
%13 = call i32 @roots_nearZero(double %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %4
%16 = call i32 @StrLib_StrCopy(i8* %10, i32 %3, i8* %6, i32 10)
%17 = bitcast %struct._T6_a* %5 to %struct._T6_a.0*
%18 = call i32 @libc_printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 48, %struct._T6_a.0* %17, double %0, double %1, double %12)
br label %19
19: ; preds = %15, %4
ret void
}