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


x86 assembly (clang, -O0):
<stic_assert_int_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186c0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
lea    -0x186c0(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xeaf(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    -0x186c0(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <stic_simple_test_result@plt>
add    $0x186c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stic_assert_int_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    %esi,%ebx
mov    %edi,%ebp
lea    0xebb(%rip),%rsi
mov    %rsp,%r13
mov    %r13,%rdi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1040 <sprintf@plt>
xor    %edi,%edi
cmp    %ebx,%ebp
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 = [23 x i8] c"Expected %d but was %d\00"
define void @stic_assert_int_equal(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca [100000 x i8]
store i32 %0, i32* %6
store i32 %1, i32* %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 i32, i32* %6
%14 = load i32, i32* %7
%15 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = icmp eq i32 %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 = [23 x i8] c"Expected %d but was %d\00"
define void @stic_assert_int_equal(i32 %0, i32 %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 ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%9 = icmp eq i32 %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
}