#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*/ nanotest_failed();
int /*<<< orphan*/ nanotest_putfileline(char const *, unsigned int,
                                        char const *);
int /*<<< orphan*/ nanotest_putstr(char const *);
int /*<<< orphan*/ nanotest_putstrnl(char *);
int /*<<< orphan*/ nanotest_putuint(unsigned int);
int /*<<< orphan*/ nanotest_putuint_hex(unsigned int);
void nanotest_failed_uint(unsigned int expected, unsigned int actual,
                          char const *opr, char const *desc, char const *fname,
                          unsigned int lineno) {
  nanotest_failed();
  nanotest_putfileline(fname, lineno, desc);
  nanotest_putstr("      Expected : ");
  nanotest_putuint(expected);
  nanotest_putstr(" (");
  nanotest_putuint_hex(expected);
  nanotest_putstr(") ");
  nanotest_putstr(opr);
  nanotest_putstr("\n        Actual : ");
  nanotest_putuint(actual);
  nanotest_putstr(" (");
  nanotest_putuint_hex(actual);
  nanotest_putstrnl(") ");
}


x86 assembly (clang, -O0):
<nanotest_failed_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    $0x0,%al
call   1070 <nanotest_failed@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <nanotest_putfileline@plt>
lea    0xe64(%rip),%rdi
call   1080 <nanotest_putstr@plt>
mov    -0x4(%rbp),%edi
call   1050 <nanotest_putuint@plt>
lea    0xe62(%rip),%rdi
call   1080 <nanotest_putstr@plt>
mov    -0x4(%rbp),%edi
call   1060 <nanotest_putuint_hex@plt>
lea    0xe51(%rip),%rdi
call   1080 <nanotest_putstr@plt>
mov    -0x10(%rbp),%rdi
call   1080 <nanotest_putstr@plt>
lea    0xe3f(%rip),%rdi
call   1080 <nanotest_putstr@plt>
mov    -0x8(%rbp),%edi
call   1050 <nanotest_putuint@plt>
lea    0xe25(%rip),%rdi
call   1080 <nanotest_putstr@plt>
mov    -0x8(%rbp),%edi
call   1060 <nanotest_putuint_hex@plt>
lea    0xe14(%rip),%rdi
call   1030 <nanotest_putstrnl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nanotest_failed_uint>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r12d
mov    %r8,%rbx
mov    %rcx,%r13
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%ebp
xor    %eax,%eax
call   1070 <nanotest_failed@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %r13,%rdx
call   1040 <nanotest_putfileline@plt>
lea    0xe68(%rip),%rdi
call   1080 <nanotest_putstr@plt>
mov    %ebp,%edi
call   1050 <nanotest_putuint@plt>
lea    0xe67(%rip),%rbx
mov    %rbx,%rdi
call   1080 <nanotest_putstr@plt>
mov    %ebp,%edi
call   1060 <nanotest_putuint_hex@plt>
lea    0xe54(%rip),%rbp
mov    %rbp,%rdi
call   1080 <nanotest_putstr@plt>
mov    %r14,%rdi
call   1080 <nanotest_putstr@plt>
lea    0xe40(%rip),%rdi
call   1080 <nanotest_putstr@plt>
mov    %r15d,%edi
call   1050 <nanotest_putuint@plt>
mov    %rbx,%rdi
call   1080 <nanotest_putstr@plt>
mov    %r15d,%edi
call   1060 <nanotest_putuint_hex@plt>
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <nanotest_putstrnl@plt>

LLVM IR (-O0):
@.str = [18 x i8] c" Expected : \00"
@.str.1 = [3 x i8] c" (\00"
@.str.2 = [3 x i8] c") \00"
@.str.3 = [19 x i8] c"\0A Actual : \00"
define void @nanotest_failed_uint(i32 %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = call i32 (...) @nanotest_failed()
%14 = load i8*, i8** %11
%15 = load i32, i32* %12
%16 = load i8*, i8** %10
%17 = call i32 @nanotest_putfileline(i8* %14, i32 %15, i8* %16)
%18 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%19 = load i32, i32* %7
%20 = call i32 @nanotest_putuint(i32 %19)
%21 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%22 = load i32, i32* %7
%23 = call i32 @nanotest_putuint_hex(i32 %22)
%24 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%25 = load i8*, i8** %9
%26 = call i32 @nanotest_putstr(i8* %25)
%27 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%28 = load i32, i32* %8
%29 = call i32 @nanotest_putuint(i32 %28)
%30 = call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%31 = load i32, i32* %8
%32 = call i32 @nanotest_putuint_hex(i32 %31)
%33 = call i32 @nanotest_putstrnl(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c" Expected : \00"
@.str.1 = [3 x i8] c" (\00"
@.str.2 = [3 x i8] c") \00"
@.str.3 = [19 x i8] c"\0A Actual : \00"
define void @nanotest_failed_uint(i32 %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = tail call i32 (...) @nanotest_failed()
%8 = tail call i32 @nanotest_putfileline(i8* %4, i32 %5, i8* %3)
%9 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @nanotest_putuint(i32 %0)
%11 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @nanotest_putuint_hex(i32 %0)
%13 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%14 = tail call i32 @nanotest_putstr(i8* %2)
%15 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%16 = tail call i32 @nanotest_putuint(i32 %1)
%17 = tail call i32 @nanotest_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = tail call i32 @nanotest_putuint_hex(i32 %1)
%19 = tail call i32 @nanotest_putstrnl(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}