#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 */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT_UINT64_EQ(scalar_t__, scalar_t__);
int /*<<< orphan*/ ASSERT_UINT64_NOT_EQ(scalar_t__, scalar_t__);
scalar_t__ UINT64_MAX;
int /*<<< orphan*/ test_case_end();
int /*<<< orphan*/ test_case_start(char *);
void test_uint64_asserts(void) {
  test_case_start("Test uint64 asserts, these should pass");
  uint64_t actual = UINT64_MAX;
  uint64_t expected = actual;
  ASSERT_UINT64_EQ(expected, actual);
  expected = 0;
  ASSERT_UINT64_NOT_EQ(expected, actual);
  test_case_end();
  test_case_start("Test uint64 asserts, these should fail");
  actual = UINT64_MAX;
  expected = 0;
  ASSERT_UINT64_EQ(expected, actual);
  expected = actual;
  ASSERT_UINT64_NOT_EQ(expected, actual);
  test_case_end();
}


x86 assembly (clang, -O0):
<test_uint64_asserts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <test_case_start@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <ASSERT_UINT64_EQ@plt>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <ASSERT_UINT64_NOT_EQ@plt>
mov    $0x0,%al
call   1040 <test_case_end@plt>
lea    0xe8d(%rip),%rdi
call   1030 <test_case_start@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <ASSERT_UINT64_EQ@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <ASSERT_UINT64_NOT_EQ@plt>
mov    $0x0,%al
call   1040 <test_case_end@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_uint64_asserts>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rdi
call   1030 <test_case_start@plt>
mov    0x2e81(%rip),%r14
mov    (%r14),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1060 <ASSERT_UINT64_EQ@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1050 <ASSERT_UINT64_NOT_EQ@plt>
xor    %eax,%eax
call   1040 <test_case_end@plt>
lea    0xeaa(%rip),%rdi
call   1030 <test_case_start@plt>
mov    (%r14),%rbx
xor    %edi,%edi
mov    %rbx,%rsi
call   1060 <ASSERT_UINT64_EQ@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1050 <ASSERT_UINT64_NOT_EQ@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test_case_end@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Test uint64 asserts, these should pass\00"
@UINT64_MAX = global i64 0
@.str.1 = [39 x i8] c"Test uint64 asserts, these should fail\00"
define void @test_uint64_asserts() {
%1 = alloca i64
%2 = alloca i64
%3 = call i32 @test_case_start(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%4 = load i64, i64* @UINT64_MAX
store i64 %4, i64* %1
%5 = load i64, i64* %1
store i64 %5, i64* %2
%6 = load i64, i64* %2
%7 = load i64, i64* %1
%8 = call i32 @ASSERT_UINT64_EQ(i64 %6, i64 %7)
store i64 0, i64* %2
%9 = load i64, i64* %2
%10 = load i64, i64* %1
%11 = call i32 @ASSERT_UINT64_NOT_EQ(i64 %9, i64 %10)
%12 = call i32 (...) @test_case_end()
%13 = call i32 @test_case_start(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%14 = load i64, i64* @UINT64_MAX
store i64 %14, i64* %1
store i64 0, i64* %2
%15 = load i64, i64* %2
%16 = load i64, i64* %1
%17 = call i32 @ASSERT_UINT64_EQ(i64 %15, i64 %16)
%18 = load i64, i64* %1
store i64 %18, i64* %2
%19 = load i64, i64* %2
%20 = load i64, i64* %1
%21 = call i32 @ASSERT_UINT64_NOT_EQ(i64 %19, i64 %20)
%22 = call i32 (...) @test_case_end()
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Test uint64 asserts, these should pass\00"
@UINT64_MAX = global i64 0
@.str.1 = [39 x i8] c"Test uint64 asserts, these should fail\00"
define void @test_uint64_asserts() {
%1 = tail call i32 @test_case_start(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = load i64, i64* @UINT64_MAX
%3 = tail call i32 @ASSERT_UINT64_EQ(i64 %2, i64 %2)
%4 = tail call i32 @ASSERT_UINT64_NOT_EQ(i64 0, i64 %2)
%5 = tail call i32 (...) @test_case_end()
%6 = tail call i32 @test_case_start(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
%7 = load i64, i64* @UINT64_MAX
%8 = tail call i32 @ASSERT_UINT64_EQ(i64 0, i64 %7)
%9 = tail call i32 @ASSERT_UINT64_NOT_EQ(i64 %7, i64 %7)
%10 = tail call i32 (...) @test_case_end()
ret void
}