#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*/ numbuf;

/* Variables and functions */
int CHAR_BIT;
int /*<<< orphan*/ addFailure(char *, long, char const *);
int /*<<< orphan*/ stdimpl_lltoa(long long, char *, int);
int /*<<< orphan*/ stdimpl_strcat(char *, char *);
int /*<<< orphan*/ stdimpl_strcpy(char *, char *);
int /*<<< orphan*/ stdimpl_strncat(char *, char *, int);
void assertImplementationLongLong(long long expected, long long actual,
                                  long line, const char *file) {
  char numbuf[((CHAR_BIT * sizeof(long long) - 2) / 3 + 1) + 2];
  char buffer[2 * (sizeof(numbuf) - 1) + 10];
  stdimpl_strcpy(buffer, "exp ");
  stdimpl_lltoa(expected, numbuf, 10);
  stdimpl_strncat(buffer, numbuf, sizeof(numbuf));
  stdimpl_strcat(buffer, " was ");
  stdimpl_lltoa(actual, numbuf, 10);
  stdimpl_strncat(buffer, numbuf, sizeof(numbuf));
  addFailure(buffer, line, file);
}


x86 assembly (clang, -O0):
<assertImplementationLongLong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2e71(%rip),%rax
movslq (%rax),%rax
lea    -0x2(,%rax,8),%rax
ff
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
shr    %rdx
mov    %rdx,%rax
add    $0x3,%rax
mov    %rax,-0x48(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rdx,%rsi
add    $0x12,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rcx
sub    %rsi,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
lea    0xe(%rdx,%rdx,1),%rax
lea    0x1d(%rdx,%rdx,1),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x40(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x38(%rbp)
lea    0xe22(%rip),%rsi
call   1070 <stdimpl_strcpy@plt>
mov    -0x50(%rbp),%rsi
mov    -0x8(%rbp),%rdi
mov    $0xa,%edx
call   1040 <stdimpl_lltoa@plt>
mov    -0x50(%rbp),%rsi
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    %eax,%edx
call   1050 <stdimpl_strncat@plt>
mov    -0x40(%rbp),%rdi
lea    0xdf2(%rip),%rsi
call   1060 <stdimpl_strcat@plt>
mov    -0x50(%rbp),%rsi
mov    -0x10(%rbp),%rdi
mov    $0xa,%edx
call   1040 <stdimpl_lltoa@plt>
mov    -0x50(%rbp),%rsi
mov    -0x40(%rbp),%rdi
mov    -0x48(%rbp),%rax
mov    %eax,%edx
call   1050 <stdimpl_strncat@plt>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <addFailure@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertImplementationLongLong>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,-0x38(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rsi,%r12
mov    %rdi,%r15
mov    0x2e6a(%rip),%rax
movslq (%rax),%rax
lea    -0x2(,%rax,8),%rax
ff
movabs $0xaaaaaaaaaaaaaaab,%rcx
aa aa aa
mul    %rcx
shr    %rdx
lea    0x3(%rdx),%r13d
lea    0x12(%rdx),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
lea    (%rdx,%rdx,1),%rax
add    $0x1d,%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
lea    0xe3e(%rip),%rsi
mov    %r14,%rdi
call   1070 <stdimpl_strcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <stdimpl_lltoa@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
call   1050 <stdimpl_strncat@plt>
lea    0xe16(%rip),%rsi
mov    %r14,%rdi
call   1060 <stdimpl_strcat@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <stdimpl_lltoa@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
call   1050 <stdimpl_strncat@plt>
mov    %r14,%rdi
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1030 <addFailure@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@CHAR_BIT = global i32 0
@.str = [5 x i8] c"exp \00"
@.str.1 = [6 x i8] c" was \00"
define void @assertImplementationLongLong(i64 %0, i64 %1, i64 %2, i8* %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%12 = load i32, i32* @CHAR_BIT
%13 = sext i32 %12 to i64
%14 = mul i64 %13, 8
%15 = sub i64 %14, 2
%16 = udiv i64 %15, 3
%17 = add i64 %16, 1
%18 = add i64 %17, 2
%19 = call i8* @llvm.stacksave()
store i8* %19, i8** %9
%20 = alloca i8, i64 %18
store i64 %18, i64* %10
%21 = sub i64 %18, 1
%22 = mul i64 2, %21
%23 = add i64 %22, 10
%24 = alloca i8, i64 %23
store i64 %23, i64* %11
%25 = call i32 @stdimpl_strcpy(i8* %24, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%26 = load i64, i64* %5
%27 = call i32 @stdimpl_lltoa(i64 %26, i8* %20, i32 10)
%28 = trunc i64 %18 to i32
%29 = call i32 @stdimpl_strncat(i8* %24, i8* %20, i32 %28)
%30 = call i32 @stdimpl_strcat(i8* %24, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%31 = load i64, i64* %6
%32 = call i32 @stdimpl_lltoa(i64 %31, i8* %20, i32 10)
%33 = trunc i64 %18 to i32
%34 = call i32 @stdimpl_strncat(i8* %24, i8* %20, i32 %33)
%35 = load i64, i64* %7
%36 = load i8*, i8** %8
%37 = call i32 @addFailure(i8* %24, i64 %35, i8* %36)
%38 = load i8*, i8** %9
ret void
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
@.str = [5 x i8] c"exp \00"
@.str.1 = [6 x i8] c" was \00"
define void @assertImplementationLongLong(i64 %0, i64 %1, i64 %2, i8* %3) {
%5 = load i32, i32* @CHAR_BIT
%6 = sext i32 %5 to i64
%7 = shl nsw i64 %6, 3
%8 = add nsw i64 %7, -2
%9 = udiv i64 %8, 3
%10 = add nuw nsw i64 %9, 3
%11 = alloca i8, i64 %10
%12 = shl nuw i64 %9, 1
%13 = add nuw i64 %12, 14
%14 = alloca i8, i64 %13
%15 = call i32 @stdimpl_strcpy(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @stdimpl_lltoa(i64 %0, i8* %11, i32 10)
%17 = trunc i64 %10 to i32
%18 = call i32 @stdimpl_strncat(i8* %14, i8* %11, i32 %17)
%19 = call i32 @stdimpl_strcat(i8* %14, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 @stdimpl_lltoa(i64 %1, i8* %11, i32 10)
%21 = call i32 @stdimpl_strncat(i8* %14, i8* %11, i32 %17)
%22 = call i32 @addFailure(i8* %14, i64 %2, i8* %3)
ret void
}