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


x86 assembly (clang, -O0):
<AssertEqualPtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1170 <AssertEqualPtr+0x60>
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    -0x18(%rbp),%rax
lea    0xea5(%rip),%rdi
mov    %rax,(%rsp)
call   1030 <TESTError_Fail@plt>
movl   $0x0,-0x4(%rbp)
jmp    1177 <AssertEqualPtr+0x67>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AssertEqualPtr>:
cmp    %rsi,%rdi
je     113c <AssertEqualPtr+0x2c>
push   %rax
mov    %rdi,%rax
mov    %rsi,(%rsp)
lea    0xedc(%rip),%rdi
mov    %rcx,%rsi
mov    %r8,%rcx
mov    %r9,%r8
mov    %rax,%r9
call   1030 <TESTError_Fail@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

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