xunge/DecIR huggingface dataset:
int fun465() { return 465; }


x86 assembly (clang, -O0):
<fun465>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1d1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun465>:
mov    $0x1d1,%eax
ret

LLVM IR (-O0):
define i32 @fun465() {
ret i32 465
}

LLVM IR (-O2):
define i32 @fun465() {
ret i32 465
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int b;
  int a = b = 3;
  printf("%d, %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d, %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d, %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3, i32 3)
ret i32 0
}
void av_frame_get_best_effort_timestamp() {}


x86 assembly (clang, -O0):
<av_frame_get_best_effort_timestamp>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_frame_get_best_effort_timestamp>:
ret

LLVM IR (-O0):
define void @av_frame_get_best_effort_timestamp() {
ret void
}

LLVM IR (-O2):
define void @av_frame_get_best_effort_timestamp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int distancia, quilometro;
  scanf("%d", &quilometro);
  distancia = 2 * quilometro;
  printf("%d minutos\n", distancia);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
add    %esi,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32, i32* %3
%6 = mul nsw i32 2, %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [12 x i8] c"%d minutos\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = shl nsw i32 %4, 1
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int HelpItem56(void) { return 0; }


x86 assembly (clang, -O0):
<HelpItem56>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HelpItem56>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @HelpItem56() {
ret i32 0
}

LLVM IR (-O2):
define i32 @HelpItem56() {
ret i32 0
}
void dimacs_highest_vertex_id(void *obj, int i, int j) {
  int *n = (int *)obj;
  if (i > *n)
    *n = i;
  if (j > *n)
    *n = j;
}


x86 assembly (clang, -O0):
<dimacs_highest_vertex_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    112e <dimacs_highest_vertex_id+0x2e>
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1146 <dimacs_highest_vertex_id+0x46>
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dimacs_highest_vertex_id>:
mov    (%rdi),%eax
cmp    %esi,%eax
cmovl  %esi,%eax
jl     110e <dimacs_highest_vertex_id+0xe>
cmp    %edx,%eax
jl     110e <dimacs_highest_vertex_id+0xe>
ret
cmp    %edx,%eax
cmovl  %edx,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @dimacs_highest_vertex_id(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32, i32* %5
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
%13 = icmp sgt i32 %10, %12
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32*, i32** %7
store i32 %15, i32* %16
br label %17
17: ; preds = %14, %3
%18 = load i32, i32* %6
%19 = load i32*, i32** %7
%20 = load i32, i32* %19
%21 = icmp sgt i32 %18, %20
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = load i32, i32* %6
%24 = load i32*, i32** %7
store i32 %23, i32* %24
br label %25
25: ; preds = %22, %17
ret void
}

LLVM IR (-O2):
define void @dimacs_highest_vertex_id(i8* nocapture %0, i32 %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, %1
%7 = select i1 %6, i32 %1, i32 %5
%8 = icmp slt i32 %7, %2
%9 = or i1 %6, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = select i1 %8, i32 %2, i32 %7
store i32 %11, i32* %4
br label %12
12: ; preds = %3, %10
ret void
}
void enet_deinitialize(void) {}


x86 assembly (clang, -O0):
<enet_deinitialize>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enet_deinitialize>:
ret

LLVM IR (-O0):
define void @enet_deinitialize() {
ret void
}

LLVM IR (-O2):
define void @enet_deinitialize() {
ret void
}
int Pl_Hash_Table_Size(char *tbl) { return (((int *)(tbl))[0]); }


x86 assembly (clang, -O0):
<Pl_Hash_Table_Size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pl_Hash_Table_Size>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @Pl_Hash_Table_Size(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @Pl_Hash_Table_Size(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
__attribute__((constructor(255))) void init(void) { srandom(time(NULL)); }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <srandom@plt>

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 255, void ()* @init, i8* null }]
define void @init() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srandom(i32 %1)
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 255, void ()* @init, i8* null }]
define void @init() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srandom(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void die(const char *msg) {
  write(STDERR_FILENO, "\nfatal error: ", 14);
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    0xebc(%rip),%rsi
mov    $0xe,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@STDERR_FILENO = global i32 0
@.str = [15 x i8] c"\0Afatal error: \00"
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDERR_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%5 = load i8*, i8** %2
%6 = call i32 @perror(i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@STDERR_FILENO = global i32 0
@.str = [15 x i8] c"\0Afatal error: \00"
define void @die(i8* nocapture %0) {
%2 = load i32, i32* @STDERR_FILENO
%3 = tail call i32 @write(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 14)
%4 = tail call i32 @perror(i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
void *lpcli_memset(void *, int /*<<< orphan*/, size_t);
void *lpcli_zeromemory(void *dst, size_t dstlen) {
  return lpcli_memset(dst, 0, dstlen);
}


x86 assembly (clang, -O0):
<lpcli_zeromemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <lpcli_memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lpcli_zeromemory>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <lpcli_memset@plt>

LLVM IR (-O0):
define i8* @lpcli_zeromemory(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @lpcli_memset(i8* %5, i32 0, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @lpcli_zeromemory(i8* %0, i64 %1) {
%3 = tail call i8* @lpcli_memset(i8* %0, i32 0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int InvertLowestOne(int);
int GetSkipHeight(int height) {
  if (height < 2) {
    return 0;
  }
  return (height & 1) ? InvertLowestOne(InvertLowestOne(height - 1)) + 1
                      : InvertLowestOne(height);
}


x86 assembly (clang, -O0):
<GetSkipHeight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1131 <GetSkipHeight+0x21>
movl   $0x0,-0x4(%rbp)
jmp    116e <GetSkipHeight+0x5e>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     115d <GetSkipHeight+0x4d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <InvertLowestOne@plt>
mov    %eax,%edi
call   1030 <InvertLowestOne@plt>
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1168 <GetSkipHeight+0x58>
mov    -0x8(%rbp),%edi
call   1030 <InvertLowestOne@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSkipHeight>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     1139 <GetSkipHeight+0x29>
test   $0x1,%dil
jne    1122 <GetSkipHeight+0x12>
jmp    1030 <InvertLowestOne@plt>
push   %rax
add    $0xffffffff,%edi
call   1030 <InvertLowestOne@plt>
mov    %eax,%edi
call   1030 <InvertLowestOne@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @GetSkipHeight(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %22
7: ; preds = %1
%8 = load i32, i32* %3
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sub nsw i32 %12, 1
%14 = call i32 @InvertLowestOne(i32 %13)
%15 = call i32 @InvertLowestOne(i32 %14)
%16 = add nsw i32 %15, 1
br label %20
17: ; preds = %7
%18 = load i32, i32* %3
%19 = call i32 @InvertLowestOne(i32 %18)
br label %20
20: ; preds = %17, %11
%21 = phi i32 [ %16, %11 ], [ %19, %17 ]
store i32 %21, i32* %2
br label %22
22: ; preds = %20, %6
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @GetSkipHeight(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = add nsw i32 %0, -1
%8 = tail call i32 @InvertLowestOne(i32 %7)
%9 = tail call i32 @InvertLowestOne(i32 %8)
%10 = add nsw i32 %9, 1
br label %13
11: ; preds = %3
%12 = tail call i32 @InvertLowestOne(i32 %0)
br label %13
13: ; preds = %6, %11, %1
%14 = phi i32 [ 0, %1 ], [ %10, %6 ], [ %12, %11 ]
ret i32 %14
}
/* Type definitions */
typedef scalar_t__ voidpf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ferror(int /*<<< orphan*/ *);
int ferror_file_func(voidpf opaque, voidpf stream) {
  int ret;
  ret = ferror((FILE *)stream);
  return ret;
}


x86 assembly (clang, -O0):
<ferror_file_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ferror@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ferror_file_func>:
mov    %rsi,%rdi
jmp    1030 <ferror@plt>

LLVM IR (-O0):
define i32 @ferror_file_func(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i32*
%8 = call i32 @ferror(i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @ferror_file_func(i64 %0, i64 %1) {
%3 = inttoptr i64 %1 to i32*
%4 = tail call i32 @ferror(i32* %3)
ret i32 %4
}
int PRO1() { return 0; }


x86 assembly (clang, -O0):
<PRO1>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PRO1>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @PRO1() {
ret i32 0
}

LLVM IR (-O2):
define i32 @PRO1() {
ret i32 0
}
/* Variables and functions */
int StringComparisonOutputInt(int, int, int);
int /*<<< orphan*/ free(char *);
int StringNumComparisonSigns(char *first2, int firstSign, char *second2,
                             int secondSign, int isSmallerOrGreater) {
  if (firstSign != secondSign) {
    free(first2);
    free(second2);
    return StringComparisonOutputInt(firstSign, secondSign, isSmallerOrGreater);
  }
  return -1;
}


x86 assembly (clang, -O0):
<StringNumComparisonSigns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
je     116e <StringNumComparisonSigns+0x4e>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
call   1040 <StringComparisonOutputInt@plt>
mov    %eax,-0x4(%rbp)
jmp    1175 <StringNumComparisonSigns+0x55>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringNumComparisonSigns>:
cmp    %ecx,%esi
jne    112a <StringNumComparisonSigns+0xa>
mov    $0xffffffff,%eax
ret
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %rdx,%r15
mov    %esi,%ebx
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <StringComparisonOutputInt@plt>

LLVM IR (-O0):
define i32 @StringNumComparisonSigns(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%12 = load i32, i32* %8
%13 = load i32, i32* %10
%14 = icmp ne i32 %12, %13
br i1 %14, label %15, label %24
15: ; preds = %5
%16 = load i8*, i8** %7
%17 = call i32 @free(i8* %16)
%18 = load i8*, i8** %9
%19 = call i32 @free(i8* %18)
%20 = load i32, i32* %8
%21 = load i32, i32* %10
%22 = load i32, i32* %11
%23 = call i32 @StringComparisonOutputInt(i32 %20, i32 %21, i32 %22)
store i32 %23, i32* %6
br label %25
24: ; preds = %5
store i32 -1, i32* %6
br label %25
25: ; preds = %24, %15
%26 = load i32, i32* %6
ret i32 %26
}

LLVM IR (-O2):
define i32 @StringNumComparisonSigns(i8* nocapture %0, i32 %1, i8* nocapture %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %1, %3
br i1 %6, label %11, label %7
7: ; preds = %5
%8 = tail call i32 @free(i8* %0)
%9 = tail call i32 @free(i8* %2)
%10 = tail call i32 @StringComparisonOutputInt(i32 %1, i32 %3, i32 %4)
br label %11
11: ; preds = %5, %7
%12 = phi i32 [ %10, %7 ], [ -1, %5 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ group_db_close();
void destroy(void) { group_db_close(); }


x86 assembly (clang, -O0):
<destroy>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <group_db_close@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy>:
xor    %eax,%eax
jmp    1030 <group_db_close@plt>

LLVM IR (-O0):
define void @destroy() {
%1 = call i32 (...) @group_db_close()
ret void
}

LLVM IR (-O2):
define void @destroy() {
%1 = tail call i32 (...) @group_db_close()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void bar(void) { printf("This is bar ()!\n"); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"This is bar ()!\0A\00"
define void @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"This is bar ()!\00"
define void @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fork();
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ wait();
int main(void) {
  int depth = 0;
  int pid;
  for (;;) {
    pid = fork();
    if (pid != 0) {
      break;
    }
    depth++;
  }
  if (pid < 0) {
    printf("%d\n", depth);
    return 0;
  }
  wait();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     115f <main+0x2f>
jmp    116d <main+0x3d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
cmpl   $0x0,-0xc(%rbp)
jge    1192 <main+0x62>
mov    -0x8(%rbp),%esi
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11a0 <main+0x70>
mov    $0x0,%al
call   1040 <wait@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <fork@plt>
add    $0x1,%ebx
test   %eax,%eax
je     1140 <main+0x10>
js     1159 <main+0x29>
xor    %eax,%eax
call   1040 <wait@plt>
jmp    1167 <main+0x37>
lea    0xea0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %9, %0
%5 = call i32 (...) @fork()
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %12
9: ; preds = %4
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %8
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
store i32 0, i32* %1
br label %20
18: ; preds = %12
%19 = call i32 (...) @wait()
store i32 0, i32* %1
br label %20
20: ; preds = %18, %15
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 (...) @fork()
%4 = icmp eq i32 %3, 0
%5 = add nuw nsw i32 %2, 1
br i1 %4, label %1, label %6
6: ; preds = %1
%7 = icmp slt i32 %3, 0
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %12
10: ; preds = %6
%11 = tail call i32 (...) @wait()
br label %12
12: ; preds = %10, %8
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_metapost_comment_entities();
int /*<<< orphan*/ test_metapost_comments();
void all_metapost_tests() {
  test_metapost_comments();
  test_metapost_comment_entities();
}


x86 assembly (clang, -O0):
<all_metapost_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <test_metapost_comments@plt>
mov    $0x0,%al
call   1030 <test_metapost_comment_entities@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_metapost_tests>:
push   %rax
xor    %eax,%eax
call   1040 <test_metapost_comments@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_metapost_comment_entities@plt>

LLVM IR (-O0):
define void @all_metapost_tests() {
%1 = call i32 (...) @test_metapost_comments()
%2 = call i32 (...) @test_metapost_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_metapost_tests() {
%1 = tail call i32 (...) @test_metapost_comments()
%2 = tail call i32 (...) @test_metapost_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ subunsub_main(int /*<<< orphan*/, int, char **);
void main(int argc, char **argv) { subunsub_main(0, argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <subunsub_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <subunsub_main@plt>

LLVM IR (-O0):
define void @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @subunsub_main(i32 0, i32 %5, i8** %6)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0, i8** %1) {
%3 = tail call i32 @subunsub_main(i32 0, i32 %0, i8** %1)
ret void
}
void main() { int an_array[] = {3, 5, 3, 8, 10}; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xef0(%rip),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
ret

LLVM IR (-O0):
@__const.main.an_array = [5 x i32] [i32 3, i32 5, i32 3, i32 8, i32 10]
define void @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
void cbcondne(long a) {
  if (a != 0)
    foo();
  bar();
}


x86 assembly (clang, -O0):
<cbcondne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113e <cbcondne+0x1e>
mov    $0x0,%al
call   1040 <foo@plt>
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbcondne>:
test   %rdi,%rdi
je     1131 <cbcondne+0x11>
push   %rax
xor    %eax,%eax
call   1040 <foo@plt>
add    $0x8,%rsp
xor    %eax,%eax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @cbcondne(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @foo()
br label %7
7: ; preds = %5, %1
%8 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
define void @cbcondne(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @foo()
br label %5
5: ; preds = %3, %1
%6 = tail call i32 (...) @bar()
ret void
}
void Init_Language(void) {}


x86 assembly (clang, -O0):
<Init_Language>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_Language>:
ret

LLVM IR (-O0):
define void @Init_Language() {
ret void
}

LLVM IR (-O2):
define void @Init_Language() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_case_1();
int main() {
  test_case_1();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_case_1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_case_1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_case_1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_case_1()
ret i32 0
}
int is_operator(char op) {
  return op == '+' || op == '-' || op == '*' || op == '/';
}


x86 assembly (clang, -O0):
<is_operator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_operator+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_operator+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_operator+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_operator>:
cmp    $0x2d,%dil
ja     1120 <is_operator+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x2c0000000000,%rdx
bt     %rcx,%rdx
jae    1120 <is_operator+0x20>
ret
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_operator(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 43
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 45
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 42
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @is_operator(i8 signext %0) {
switch i8 %0, label %2 [
i8 45, label %5
i8 43, label %5
i8 42, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 47
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_32(int /*<<< orphan*/);
uint32_t elf32_to_cpu(uint32_t val) { return bswap_32(val); }


x86 assembly (clang, -O0):
<elf32_to_cpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <bswap_32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elf32_to_cpu>:
jmp    1030 <bswap_32@plt>

LLVM IR (-O0):
define i32 @elf32_to_cpu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @bswap_32(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @elf32_to_cpu(i32 %0) {
%2 = tail call i32 @bswap_32(i32 %0)
ret i32 %2
}
int fn2(int x, int y) {
  int tem1 = y | x;
  int tem2 = ~x ^ y;
  return tem1 & tem2;
}


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = or i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = xor i32 %10, -1
%12 = load i32, i32* %4
%13 = xor i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @fn2(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
int do_866() { return 866; }


x86 assembly (clang, -O0):
<do_866>:
push   %rbp
mov    %rsp,%rbp
mov    $0x362,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_866>:
mov    $0x362,%eax
ret

LLVM IR (-O0):
define i32 @do_866() {
ret i32 866
}

LLVM IR (-O2):
define i32 @do_866() {
ret i32 866
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void libsoc_set_debug(int level) {
  printf("libsoc-gpio: warning debug support missing!\n");
}


x86 assembly (clang, -O0):
<libsoc_set_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libsoc_set_debug>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"libsoc-gpio: warning debug support missing!\0A\00"
define void @libsoc_set_debug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"libsoc-gpio: warning debug support missing!\00"
define void @libsoc_set_debug(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_args(int, char **);
int /*<<< orphan*/ jrnld(int /*<<< orphan*/);
int main(int argc, char *argv[]) { jrnld(check_args(argc, argv)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <check_args@plt>
mov    %eax,%edi
call   1040 <jrnld@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <check_args@plt>
mov    %eax,%edi
call   1040 <jrnld@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @check_args(i32 %5, i8** %6)
%8 = call i32 @jrnld(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @check_args(i32 %0, i8** %1)
%4 = tail call i32 @jrnld(i32 %3)
ret i32 0
}
void stop_trigger() {}


x86 assembly (clang, -O0):
<stop_trigger>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_trigger>:
ret

LLVM IR (-O0):
define void @stop_trigger() {
ret void
}

LLVM IR (-O2):
define void @stop_trigger() {
ret void
}
void RTCdataLine_ChangeNtfy(void) {}


x86 assembly (clang, -O0):
<RTCdataLine_ChangeNtfy>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTCdataLine_ChangeNtfy>:
ret

LLVM IR (-O0):
define void @RTCdataLine_ChangeNtfy() {
ret void
}

LLVM IR (-O2):
define void @RTCdataLine_ChangeNtfy() {
ret void
}
void smc_outsl(unsigned int addr, void *vbuf, unsigned long len) {
  volatile unsigned long *rp;
  unsigned long *buf, *ebuf;
  buf = (unsigned long *)vbuf;
  rp = (volatile unsigned long *)addr;
  for (ebuf = buf + len; (buf < ebuf);)
    *rp = *buf++;
}


x86 assembly (clang, -O0):
<smc_outsl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x18(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    115d <smc_outsl+0x5d>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x28(%rbp)
mov    (%rax),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
jmp    1131 <smc_outsl+0x31>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smc_outsl>:
lea    (%rsi,%rdx,8),%rax
cmp    %rsi,%rax
jbe    111f <smc_outsl+0x1f>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    (%rsi),%rdx
add    $0x8,%rsi
mov    %rdx,(%rcx)
cmp    %rax,%rsi
jb     1110 <smc_outsl+0x10>
ret

LLVM IR (-O0):
define void @smc_outsl(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64*
%8 = alloca i64*
%9 = alloca i64*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i64*
store i64* %11, i64** %8
%12 = load i32, i32* %4
%13 = zext i32 %12 to i64
%14 = inttoptr i64 %13 to i64*
store i64* %14, i64** %7
%15 = load i64*, i64** %8
%16 = load i64, i64* %6
%17 = getelementptr inbounds i64, i64* %15, i64 %16
store i64* %17, i64** %9
br label %18
18: ; preds = %22, %3
%19 = load i64*, i64** %8
%20 = load i64*, i64** %9
%21 = icmp ult i64* %19, %20
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = load i64*, i64** %8
%24 = getelementptr inbounds i64, i64* %23, i32 1
store i64* %24, i64** %8
%25 = load i64, i64* %23
%26 = load i64*, i64** %7
store volatile i64 %25, i64* %26
br label %18
27: ; preds = %18
ret void
}

LLVM IR (-O2):
define void @smc_outsl(i32 %0, i8* %1, i64 %2) {
%4 = bitcast i8* %1 to i64*
%5 = zext i32 %0 to i64
%6 = inttoptr i64 %5 to i64*
%7 = getelementptr inbounds i64, i64* %4, i64 %2
%8 = icmp ugt i64* %7, %4
br i1 %8, label %9, label %14
9: ; preds = %3, %9
%10 = phi i64* [ %11, %9 ], [ %4, %3 ]
%11 = getelementptr inbounds i64, i64* %10, i64 1
%12 = load i64, i64* %10
store volatile i64 %12, i64* %6
%13 = icmp ult i64* %11, %7
br i1 %13, label %9, label %14
14: ; preds = %9, %3
ret void
}
/* Type definitions */
struct gg_search_request {
  int dummy;
};

/* Variables and functions */
const struct gg_search_request *
gg_search_request_mode_1(char *email, int active, int start) {
  return NULL;
}


x86 assembly (clang, -O0):
<gg_search_request_mode_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg_search_request_mode_1>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.gg_search_request = type { i32 }
define %struct.gg_search_request* @gg_search_request_mode_1(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret %struct.gg_search_request* null
}

LLVM IR (-O2):
%struct.gg_search_request = type { i32 }
define noalias %struct.gg_search_request* @gg_search_request_mode_1(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret %struct.gg_search_request* null
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct timeval {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
uint64_t getTimestamp() {
  struct timeval tv;
  gettimeofday(&tv, 0);
  return (uint64_t)tv.tv_sec;
}


x86 assembly (clang, -O0):
<getTimestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getTimestamp>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @getTimestamp() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @getTimestamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exfun_frame();
int /*<<< orphan*/ new_prof_frame(int /*<<< orphan*/);
void exfun_frame_push_dummy_frame(void) {
  exfun_frame();
  new_prof_frame(0);
}


x86 assembly (clang, -O0):
<exfun_frame_push_dummy_frame>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <exfun_frame@plt>
xor    %edi,%edi
call   1030 <new_prof_frame@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exfun_frame_push_dummy_frame>:
push   %rax
xor    %eax,%eax
call   1040 <exfun_frame@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <new_prof_frame@plt>

LLVM IR (-O0):
define void @exfun_frame_push_dummy_frame() {
%1 = call i32 (...) @exfun_frame()
%2 = call i32 @new_prof_frame(i32 0)
ret void
}

LLVM IR (-O2):
define void @exfun_frame_push_dummy_frame() {
%1 = tail call i32 (...) @exfun_frame()
%2 = tail call i32 @new_prof_frame(i32 0)
ret void
}
/* Variables and functions */
size_t recv(int, char *, size_t, int /*<<< orphan*/);
size_t raw_recv(int sockd, char *buf, size_t n) {
  return recv(sockd, buf, n, 0);
}


x86 assembly (clang, -O0):
<raw_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
call   1030 <recv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raw_recv>:
xor    %ecx,%ecx
jmp    1030 <recv@plt>

LLVM IR (-O0):
define i64 @raw_recv(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @recv(i32 %7, i8* %8, i64 %9, i32 0)
ret i64 %10
}

LLVM IR (-O2):
define i64 @raw_recv(i32 %0, i8* %1, i64 %2) {
%4 = tail call i64 @recv(i32 %0, i8* %1, i64 %2, i32 0)
ret i64 %4
}
void ff_hevc_put_hevc_uni_qpel_hv64_12_sse4() {}


x86 assembly (clang, -O0):
<ff_hevc_put_hevc_uni_qpel_hv64_12_sse4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_put_hevc_uni_qpel_hv64_12_sse4>:
ret

LLVM IR (-O0):
define void @ff_hevc_put_hevc_uni_qpel_hv64_12_sse4() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv64_12_sse4() {
ret void
}
void foo_2_2_2_1_2_1_1_1_1() {}


x86 assembly (clang, -O0):
<foo_2_2_2_1_2_1_1_1_1>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_2_2_2_1_2_1_1_1_1>:
ret

LLVM IR (-O0):
define void @foo_2_2_2_1_2_1_1_1_1() {
ret void
}

LLVM IR (-O2):
define void @foo_2_2_2_1_2_1_1_1_1() {
ret void
}
void funcA(int *x, int *y, int *z) { *z = (*x) * (*y); }


x86 assembly (clang, -O0):
<funcA>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
imul   (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcA>:
mov    (%rsi),%eax
imul   (%rdi),%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @funcA(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = mul nsw i32 %8, %10
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @funcA(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = mul nsw i32 %5, %4
store i32 %6, i32* %2
ret void
}
void kexec_crash(void) {}


x86 assembly (clang, -O0):
<kexec_crash>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kexec_crash>:
ret

LLVM IR (-O0):
define void @kexec_crash() {
ret void
}

LLVM IR (-O2):
define void @kexec_crash() {
ret void
}
int test_imm_A1uint16_reg(unsigned short val) {
  return ((val) & (-0xA1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A1uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff5f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A1uint16_reg>:
test   $0xff5f,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A1uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -161
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_A1uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -161
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct utcp_connection {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ ack(struct utcp_connection *, int);
int /*<<< orphan*/ utcp_buffer(struct utcp_connection *, void const *, size_t);
ssize_t utcp_send(struct utcp_connection *c, const void *data, size_t len) {
  ssize_t buffered = utcp_buffer(c, data, len);
  ack(c, false);
  return buffered;
}


x86 assembly (clang, -O0):
<utcp_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <utcp_buffer@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <ack@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utcp_send>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <utcp_buffer@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <ack@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.utcp_connection = type { i32 }
define i32 @utcp_send(%struct.utcp_connection* %0, i8* %1, i64 %2) {
%4 = alloca %struct.utcp_connection*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store %struct.utcp_connection* %0, %struct.utcp_connection** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load %struct.utcp_connection*, %struct.utcp_connection** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @utcp_buffer(%struct.utcp_connection* %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load %struct.utcp_connection*, %struct.utcp_connection** %4
%13 = call i32 @ack(%struct.utcp_connection* %12, i32 0)
%14 = load i32, i32* %7
ret i32 %14
}

LLVM IR (-O2):
%struct.utcp_connection = type { i32 }
define i32 @utcp_send(%struct.utcp_connection* %0, i8* %1, i64 %2) {
%4 = tail call i32 @utcp_buffer(%struct.utcp_connection* %0, i8* %1, i64 %2)
%5 = tail call i32 @ack(%struct.utcp_connection* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
int const RAND_MAX;
int const rand();
int mwrand(const int limit) {
  const int divisor = RAND_MAX / (limit + 1);
  int retval;
  do {
    retval = rand() / divisor;
  } while (retval > limit);
  return retval;
}


x86 assembly (clang, -O0):
<mwrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%eax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1130 <mwrand+0x20>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mwrand>:
xor    %eax,%eax
jmp    1030 <rand@plt>

LLVM IR (-O0):
@RAND_MAX = constant i32 0
define i32 @mwrand(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* @RAND_MAX
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = sdiv i32 %5, %7
store i32 %8, i32* %3
br label %9
9: ; preds = %13, %1
%10 = call i32 (...) @rand()
%11 = load i32, i32* %3
%12 = sdiv i32 %10, %11
store i32 %12, i32* %4
br label %13
13: ; preds = %9
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = icmp sgt i32 %14, %15
br i1 %16, label %9, label %17
17: ; preds = %13
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@RAND_MAX = constant i32 0
define i32 @mwrand(i32 %0) {
%2 = tail call i32 (...) @rand()
ret i32 poison
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ getegid();
int /*<<< orphan*/ setresgid(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void be_nice_to_people() {
  gid_t gid = getegid();
  setresgid(gid, gid, gid);
}


x86 assembly (clang, -O0):
<be_nice_to_people>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getegid@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1030 <setresgid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_nice_to_people>:
push   %rax
xor    %eax,%eax
call   1040 <getegid@plt>
mov    %eax,%edi
mov    %eax,%esi
mov    %eax,%edx
pop    %rax
jmp    1030 <setresgid@plt>

LLVM IR (-O0):
define void @be_nice_to_people() {
%1 = alloca i32
%2 = call i32 (...) @getegid()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @setresgid(i32 %3, i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
define void @be_nice_to_people() {
%1 = tail call i32 (...) @getegid()
%2 = tail call i32 @setresgid(i32 %1, i32 %1, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void print_input_prompt(void) {
  printf("> ");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<print_input_prompt>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_input_prompt>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"> \00"
@stdout = global i32 0
define void @print_input_prompt() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"> \00"
@stdout = global i32 0
define void @print_input_prompt() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort_message(char *, char *, int);
void yac_abort_message(char *text, char *file, int line) {
  abort_message(text, file, line);
}


x86 assembly (clang, -O0):
<yac_abort_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <abort_message@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yac_abort_message>:
jmp    1030 <abort_message@plt>

LLVM IR (-O0):
define void @yac_abort_message(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @abort_message(i8* %7, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @yac_abort_message(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @abort_message(i8* %0, i8* %1, i32 %2)
ret void
}