#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 int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT_INT64_EQ(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ ASSERT_INT64_NOT_EQ(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ INT64_MAX;
int /*<<< orphan*/ INT64_MIN;
int /*<<< orphan*/ test_case_end();
int /*<<< orphan*/ test_case_start(char *);
void test_int64_asserts(void) {
  test_case_start("Test int64 asserts, these should pass");
  int64_t actual = INT64_MAX;
  int64_t expected = actual;
  ASSERT_INT64_EQ(expected, actual);
  expected = INT64_MIN;
  ASSERT_INT64_NOT_EQ(expected, actual);
  actual = INT64_MIN;
  expected = actual;
  ASSERT_INT64_EQ(expected, actual);
  expected = INT64_MAX;
  ASSERT_INT64_NOT_EQ(expected, actual);
  test_case_end();
  test_case_start("Test int64 asserts, these should fail");
  actual = INT64_MAX;
  expected = INT64_MIN;
  ASSERT_INT64_EQ(expected, actual);
  expected = actual;
  ASSERT_INT64_NOT_EQ(expected, actual);
  actual = INT64_MIN;
  expected = INT64_MAX;
  ASSERT_INT64_EQ(expected, actual);
  expected = actual;
  ASSERT_INT64_NOT_EQ(expected, actual);
  test_case_end();
}


x86 assembly (clang, -O0):
<test_int64_asserts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <test_case_start@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    0x2e3c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
mov    $0x0,%al
call   1040 <test_case_end@plt>
lea    0xe5c(%rip),%rdi
call   1030 <test_case_start@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2dfe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
mov    0x2dd6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2dd2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
mov    $0x0,%al
call   1040 <test_case_end@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_int64_asserts>:
push   %r15
push   %r14
push   %rbx
lea    0xeb4(%rip),%rdi
call   1030 <test_case_start@plt>
mov    0x2e90(%rip),%r14
mov    (%r14),%ebx
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    0x2e75(%rip),%r15
mov    (%r15),%edi
mov    %ebx,%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
mov    (%r15),%ebx
mov    %ebx,%edi
mov    %ebx,%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    (%r14),%edi
mov    %ebx,%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
xor    %eax,%eax
call   1040 <test_case_end@plt>
lea    0xe8d(%rip),%rdi
call   1030 <test_case_start@plt>
mov    (%r14),%ebx
mov    (%r15),%edi
mov    %ebx,%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
mov    (%r15),%ebx
mov    (%r14),%edi
mov    %ebx,%esi
call   1050 <ASSERT_INT64_EQ@plt>
mov    %ebx,%edi
mov    %ebx,%esi
call   1060 <ASSERT_INT64_NOT_EQ@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <test_case_end@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Test int64 asserts, these should pass\00"
@INT64_MAX = global i32 0
@INT64_MIN = global i32 0
@.str.1 = [38 x i8] c"Test int64 asserts, these should fail\00"
define void @test_int64_asserts() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @test_case_start(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @INT64_MAX
store i32 %4, i32* %1
%5 = load i32, i32* %1
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = call i32 @ASSERT_INT64_EQ(i32 %6, i32 %7)
%9 = load i32, i32* @INT64_MIN
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = call i32 @ASSERT_INT64_NOT_EQ(i32 %10, i32 %11)
%13 = load i32, i32* @INT64_MIN
store i32 %13, i32* %1
%14 = load i32, i32* %1
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = load i32, i32* %1
%17 = call i32 @ASSERT_INT64_EQ(i32 %15, i32 %16)
%18 = load i32, i32* @INT64_MAX
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = load i32, i32* %1
%21 = call i32 @ASSERT_INT64_NOT_EQ(i32 %19, i32 %20)
%22 = call i32 (...) @test_case_end()
%23 = call i32 @test_case_start(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%24 = load i32, i32* @INT64_MAX
store i32 %24, i32* %1
%25 = load i32, i32* @INT64_MIN
store i32 %25, i32* %2
%26 = load i32, i32* %2
%27 = load i32, i32* %1
%28 = call i32 @ASSERT_INT64_EQ(i32 %26, i32 %27)
%29 = load i32, i32* %1
store i32 %29, i32* %2
%30 = load i32, i32* %2
%31 = load i32, i32* %1
%32 = call i32 @ASSERT_INT64_NOT_EQ(i32 %30, i32 %31)
%33 = load i32, i32* @INT64_MIN
store i32 %33, i32* %1
%34 = load i32, i32* @INT64_MAX
store i32 %34, i32* %2
%35 = load i32, i32* %2
%36 = load i32, i32* %1
%37 = call i32 @ASSERT_INT64_EQ(i32 %35, i32 %36)
%38 = load i32, i32* %1
store i32 %38, i32* %2
%39 = load i32, i32* %2
%40 = load i32, i32* %1
%41 = call i32 @ASSERT_INT64_NOT_EQ(i32 %39, i32 %40)
%42 = call i32 (...) @test_case_end()
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Test int64 asserts, these should pass\00"
@INT64_MAX = global i32 0
@INT64_MIN = global i32 0
@.str.1 = [38 x i8] c"Test int64 asserts, these should fail\00"
define void @test_int64_asserts() {
%1 = tail call i32 @test_case_start(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @INT64_MAX
%3 = tail call i32 @ASSERT_INT64_EQ(i32 %2, i32 %2)
%4 = load i32, i32* @INT64_MIN
%5 = tail call i32 @ASSERT_INT64_NOT_EQ(i32 %4, i32 %2)
%6 = load i32, i32* @INT64_MIN
%7 = tail call i32 @ASSERT_INT64_EQ(i32 %6, i32 %6)
%8 = load i32, i32* @INT64_MAX
%9 = tail call i32 @ASSERT_INT64_NOT_EQ(i32 %8, i32 %6)
%10 = tail call i32 (...) @test_case_end()
%11 = tail call i32 @test_case_start(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @INT64_MAX
%13 = load i32, i32* @INT64_MIN
%14 = tail call i32 @ASSERT_INT64_EQ(i32 %13, i32 %12)
%15 = tail call i32 @ASSERT_INT64_NOT_EQ(i32 %12, i32 %12)
%16 = load i32, i32* @INT64_MIN
%17 = load i32, i32* @INT64_MAX
%18 = tail call i32 @ASSERT_INT64_EQ(i32 %17, i32 %16)
%19 = tail call i32 @ASSERT_INT64_NOT_EQ(i32 %16, i32 %16)
%20 = tail call i32 (...) @test_case_end()
ret void
}