#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*/ addFailure(char *, long, char const *);
int /*<<< orphan*/ stdimpl_itoa(int, char *, int);
int /*<<< orphan*/ stdimpl_strcat(char *, char *);
int /*<<< orphan*/ stdimpl_strcpy(char *, char *);
int /*<<< orphan*/ stdimpl_strncat(char *, char *, int);
void assertImplementationInt(int expected, int actual, long line,
                             const char *file) {
  char buffer[32];
  char numbuf[12];
  stdimpl_strcpy(buffer, "exp ");
  {
    stdimpl_itoa(expected, numbuf, 10);
    stdimpl_strncat(buffer, numbuf, 11);
  }
  stdimpl_strcat(buffer, " was ");
  {
    stdimpl_itoa(actual, numbuf, 10);
    stdimpl_strncat(buffer, numbuf, 11);
  }
  addFailure(buffer, line, file);
}


x86 assembly (clang, -O0):
<assertImplementationInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe8f(%rip),%rsi
call   1070 <stdimpl_strcpy@plt>
mov    -0x4(%rbp),%edi
lea    -0x4c(%rbp),%rsi
mov    $0xa,%edx
call   1040 <stdimpl_itoa@plt>
lea    -0x40(%rbp),%rdi
lea    -0x4c(%rbp),%rsi
mov    $0xb,%edx
call   1050 <stdimpl_strncat@plt>
lea    -0x40(%rbp),%rdi
lea    0xe61(%rip),%rsi
call   1060 <stdimpl_strcat@plt>
mov    -0x8(%rbp),%edi
lea    -0x4c(%rbp),%rsi
mov    $0xa,%edx
call   1040 <stdimpl_itoa@plt>
lea    -0x40(%rbp),%rdi
lea    -0x4c(%rbp),%rsi
mov    $0xb,%edx
call   1050 <stdimpl_strncat@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <addFailure@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertImplementationInt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%r12d
mov    %edi,%ebp
lea    0xe90(%rip),%rsi
lea    0x10(%rsp),%r13
mov    %r13,%rdi
call   1070 <stdimpl_strcpy@plt>
lea    0x4(%rsp),%rbx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <stdimpl_itoa@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0xb,%edx
call   1050 <stdimpl_strncat@plt>
lea    0xe5d(%rip),%rsi
mov    %r13,%rdi
call   1060 <stdimpl_strcat@plt>
mov    %r12d,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <stdimpl_itoa@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    $0xb,%edx
call   1050 <stdimpl_strncat@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <addFailure@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"exp \00"
@.str.1 = [6 x i8] c" was \00"
define void @assertImplementationInt(i32 %0, i32 %1, i64 %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
%9 = alloca [32 x i8]
%10 = alloca [12 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%12 = call i32 @stdimpl_strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %5
%14 = getelementptr inbounds [12 x i8], [12 x i8]* %10, i64 0, i64 0
%15 = call i32 @stdimpl_itoa(i32 %13, i8* %14, i32 10)
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%17 = getelementptr inbounds [12 x i8], [12 x i8]* %10, i64 0, i64 0
%18 = call i32 @stdimpl_strncat(i8* %16, i8* %17, i32 11)
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%20 = call i32 @stdimpl_strcat(i8* %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %6
%22 = getelementptr inbounds [12 x i8], [12 x i8]* %10, i64 0, i64 0
%23 = call i32 @stdimpl_itoa(i32 %21, i8* %22, i32 10)
%24 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%25 = getelementptr inbounds [12 x i8], [12 x i8]* %10, i64 0, i64 0
%26 = call i32 @stdimpl_strncat(i8* %24, i8* %25, i32 11)
%27 = getelementptr inbounds [32 x i8], [32 x i8]* %9, i64 0, i64 0
%28 = load i64, i64* %7
%29 = load i8*, i8** %8
%30 = call i32 @addFailure(i8* %27, i64 %28, i8* %29)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"exp \00"
@.str.1 = [6 x i8] c" was \00"
define void @assertImplementationInt(i32 %0, i32 %1, i64 %2, i8* %3) {
%5 = alloca [32 x i8]
%6 = alloca [12 x i8]
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [12 x i8], [12 x i8]* %6, i64 0, i64 0
%9 = call i32 @stdimpl_strcpy(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @stdimpl_itoa(i32 %0, i8* %8, i32 10)
%11 = call i32 @stdimpl_strncat(i8* %7, i8* %8, i32 11)
%12 = call i32 @stdimpl_strcat(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @stdimpl_itoa(i32 %1, i8* %8, i32 10)
%14 = call i32 @stdimpl_strncat(i8* %7, i8* %8, i32 11)
%15 = call i32 @addFailure(i8* %7, i64 %2, i8* %3)
ret void
}