#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*/ sprintf(char *, char *, unsigned long, unsigned long);
int /*<<< orphan*/ stic_simple_test_result(int, char *, char const *,
                                           char const *, unsigned int);
void stic_assert_ulong_equal(unsigned long expected, unsigned long actual,
                             const char *function, const char file[],
                             unsigned int line) {
  char s[100000];
  sprintf(s, "Expected %lu but was %lu", expected, actual);
  stic_simple_test_result(expected == actual, s, function, file, line);
}


x86 assembly (clang, -O0):
<stic_assert_ulong_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186d0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
lea    -0x186d0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeab(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    -0x186d0(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <stic_simple_test_result@plt>
add    $0x186d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stic_assert_ulong_equal>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x186a8,%rsp
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xeb9(%rip),%rsi
mov    %rsp,%r13
mov    %r13,%rdi
mov    %rbp,%rdx
mov    %rbx,%rcx
call   1040 <sprintf@plt>
xor    %edi,%edi
cmp    %rbx,%rbp
sete   %dil
mov    %r13,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14d,%r8d
call   1030 <stic_simple_test_result@plt>
add    $0x186a8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Expected %lu but was %lu\00"
define void @stic_assert_ulong_equal(i64 %0, i64 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [100000 x i8]
store i64 %0, i64* %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%12 = getelementptr inbounds [100000 x i8], [100000 x i8]* %11, i64 0, i64 0
%13 = load i64, i64* %6
%14 = load i64, i64* %7
%15 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %13, i64 %14)
%16 = load i64, i64* %6
%17 = load i64, i64* %7
%18 = icmp eq i64 %16, %17
%19 = zext i1 %18 to i32
%20 = getelementptr inbounds [100000 x i8], [100000 x i8]* %11, i64 0, i64 0
%21 = load i8*, i8** %8
%22 = load i8*, i8** %9
%23 = load i32, i32* %10
%24 = call i32 @stic_simple_test_result(i32 %19, i8* %20, i8* %21, i8* %22, i32 %23)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Expected %lu but was %lu\00"
define void @stic_assert_ulong_equal(i64 %0, i64 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca [100000 x i8]
%7 = getelementptr inbounds [100000 x i8], [100000 x i8]* %6, i64 0, i64 0
%8 = call i32 @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
%9 = icmp eq i64 %0, %1
%10 = zext i1 %9 to i32
%11 = call i32 @stic_simple_test_result(i32 %10, i8* %7, i8* %2, i8* %3, i32 %4)
ret void
}