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


x86 assembly (clang, -O0):
<seatest_assert_ulong_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4e40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    -0x4e40(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb0(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    -0x4e40(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <seatest_simple_test_result@plt>
add    $0x4e40,%rsp
pop    %rbp
ret

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

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

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