xunge/DecIR huggingface dataset:
/* Variables and functions */
void *_lfind(void const *, void const *, unsigned int *, unsigned int,
             int (*)(void const *, void const *));
void *lfind(const void *match, const void *start, unsigned int *array_size,
            unsigned int elem_size, int (*cf)(const void *, const void *)) {
  return _lfind(match, start, array_size, elem_size, cf);
}


x86 assembly (clang, -O0):
<lfind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
call   1030 <_lfind@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lfind>:
jmp    1030 <_lfind@plt>

LLVM IR (-O0):
define i8* @lfind(i8* %0, i8* %1, i32* %2, i32 %3, i32 (i8*, i8*)* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 (i8*, i8*)* %4, i32 (i8*, i8*)** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i32*, i32** %8
%14 = load i32, i32* %9
%15 = load i32 (i8*, i8*)*, i32 (i8*, i8*)** %10
%16 = call i8* @_lfind(i8* %11, i8* %12, i32* %13, i32 %14, i32 (i8*, i8*)* %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @lfind(i8* %0, i8* %1, i32* %2, i32 %3, i32 (i8*, i8*)* %4) {
%6 = tail call i8* @_lfind(i8* %0, i8* %1, i32* %2, i32 %3, i32 (i8*, i8*)* %4)
ret i8* %6
}
void init_all(argc, argv) int argc;
char *argv[];
{
  options_init(argc, argv);
  key_list_init();
  perfect_init();
}


x86 assembly (clang, -O0):
<init_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <options_init@plt>
mov    $0x0,%al
call   1050 <key_list_init@plt>
mov    $0x0,%al
call   1040 <perfect_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_all>:
push   %rax
xor    %eax,%eax
call   1030 <options_init@plt>
xor    %eax,%eax
call   1050 <key_list_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <perfect_init@plt>

LLVM IR (-O0):
define void @init_all(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 (i32, i8**, ...) bitcast (i32 (...)* @options_init to i32 (i32, i8**, ...)*)(i32 %5, i8** %6)
%8 = call i32 (...) @key_list_init()
%9 = call i32 (...) @perfect_init()
ret void
}

LLVM IR (-O2):
define void @init_all(i32 %0, i8** %1) {
%3 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @options_init to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
%4 = tail call i32 (...) @key_list_init()
%5 = tail call i32 (...) @perfect_init()
ret void
}
char *strcpy(char *dest, char const *src) {
  char *ret = dest;
  while (*dest++ = *src++)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
br label %7
7: ; preds = %14, %2
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %4
%10 = load i8, i8* %8
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
store i8 %10, i8* %11
%13 = icmp ne i8 %10, 0
br i1 %13, label %14, label %15
14: ; preds = %7
br label %7
15: ; preds = %7
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRA3_set(void) { return U_WMRCORENONE_set("U_WMRA3"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRA3\00"
define i8* @U_WMRA3_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRA3\00"
define i8* @U_WMRA3_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
const char *SkipListDBCursorGetLastErrorString(void *cursor) {}


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

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

LLVM IR (-O0):
define i8* @SkipListDBCursorGetLastErrorString(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %2
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @SkipListDBCursorGetLastErrorString(i8* nocapture readnone %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void Error(const char *msg) {
  fprintf(stderr, "Error: %s\n", msg);
  exit(0);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @Error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Error: %s\0A\00"
define void @Error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int nondet_int();
main() {
  int x, i;
  x = 5;
  x = nondet_int();
  while (x < 4) {
    if (x > 0) {
      x = x + 1;
    } else {
      x = 1;
    }
  }
L:
  assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    116e <main+0x4e>
cmpl   $0x0,-0x8(%rbp)
jle    1162 <main+0x42>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1169 <main+0x49>
movl   $0x1,-0x8(%rbp)
jmp    1140 <main+0x20>
jmp    1173 <main+0x53>
xor    %edi,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nondet_int@plt>
cmp    $0x3,%eax
jg     114f <main+0x2f>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
lea    0x1(%rax),%edx
cmovle %ecx,%edx
mov    %edx,%eax
cmp    $0x4,%edx
jb     1140 <main+0x20>
xor    %edi,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = icmp slt i32 %1, 4
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = phi i32 [ %7, %3 ], [ %1, %0 ]
%5 = add nsw i32 %4, 1
%6 = icmp slt i32 %4, 1
%7 = select i1 %6, i32 1, i32 %5
%8 = icmp ult i32 %7, 4
br i1 %8, label %3, label %9
9: ; preds = %3, %0
%10 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ns2dis(int, int);
void ns2dis_(int *isid, int *force) { ns2dis(*isid, *force); }


x86 assembly (clang, -O0):
<ns2dis_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
call   1030 <ns2dis@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns2dis_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <ns2dis@plt>

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

LLVM IR (-O2):
define void @ns2dis_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @ns2dis(i32 %3, i32 %4)
ret void
}
int do_nocomm(cnt)
long cnt;
{}


x86 assembly (clang, -O0):
<do_nocomm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @do_nocomm(i64 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ smalloc(scalar_t__);
char *strcpy(int /*<<< orphan*/, char *);
scalar_t__ strlen(char *);
char *duplicatestring(char *orig) {
  return strcpy(smalloc(strlen(orig) + 1), orig);
}


x86 assembly (clang, -O0):
<duplicatestring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <smalloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<duplicatestring>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <smalloc@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @duplicatestring(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = call i32 @smalloc(i64 %5)
%7 = load i8*, i8** %2
%8 = call i8* @strcpy(i32 %6, i8* %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @duplicatestring(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i32 @smalloc(i64 %3)
%5 = tail call i8* @strcpy(i32 %4, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Queens(int);
int main() {
  int i;
  for (i = 0; i < 5; i++)
    Queens(i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1146 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <Queens@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <Queens@plt>
mov    $0x1,%edi
call   1030 <Queens@plt>
mov    $0x2,%edi
call   1030 <Queens@plt>
mov    $0x3,%edi
call   1030 <Queens@plt>
mov    $0x4,%edi
call   1030 <Queens@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @Queens(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @Queens(i32 0)
%2 = tail call i32 @Queens(i32 1)
%3 = tail call i32 @Queens(i32 2)
%4 = tail call i32 @Queens(i32 3)
%5 = tail call i32 @Queens(i32 4)
ret i32 0
}
unsigned int count_set_bits(unsigned int number) {
  unsigned int count = 0;
  while (number > 0) {
    count += number & 1u;
    number = number >> 1u;
  }
  return count;
}


x86 assembly (clang, -O0):
<count_set_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    1132 <count_set_bits+0x32>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <count_set_bits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_set_bits>:
xor    %eax,%eax
test   %edi,%edi
je     1120 <count_set_bits+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <count_set_bits+0x10>
ret

LLVM IR (-O0):
define i32 @count_set_bits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = and i32 %8, 1
%10 = load i32, i32* %3
%11 = add i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = lshr i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @count_set_bits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add i32 %4, %6
%8 = lshr i32 %5, 1
%9 = icmp ult i32 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
int test8(int x) { return x; }


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test8(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ putchar(char);
int main(void) {
  char ch;
  for (ch = getchar(); ch != '\n'; ch = getchar()) {
    if (ch == ' ')
      putchar(ch);
    else
      putchar(ch + 1);
  }
  putchar(ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1184 <main+0x64>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1161 <main+0x41>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    1170 <main+0x50>
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1175 <main+0x55>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
jmp    1139 <main+0x19>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
jmp    1138 <main+0x18>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x20,%al
je     1130 <main+0x10>
cmp    $0xa,%al
je     114b <main+0x2b>
add    $0x1,%al
jmp    1130 <main+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %2
br label %4
4: ; preds = %22, %0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %24
8: ; preds = %4
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 32
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i8, i8* %2
%14 = call i32 @putchar(i8 signext %13)
br label %21
15: ; preds = %8
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = add nsw i32 %17, 1
%19 = trunc i32 %18 to i8
%20 = call i32 @putchar(i8 signext %19)
br label %21
21: ; preds = %15, %12
br label %22
22: ; preds = %21
%23 = call signext i8 (...) @getchar()
store i8 %23, i8* %2
br label %4
24: ; preds = %4
%25 = load i8, i8* %2
%26 = call i32 @putchar(i8 signext %25)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %5, %0
%2 = tail call signext i8 (...) @getchar()
switch i8 %2, label %3 [
i8 10, label %8
i8 32, label %5
]
3: ; preds = %1
%4 = add i8 %2, 1
br label %5
5: ; preds = %1, %3
%6 = phi i8 [ %4, %3 ], [ %2, %1 ]
%7 = tail call i32 @putchar(i8 signext %6)
br label %1
8: ; preds = %1
%9 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}
float ign_guy() {}


x86 assembly (clang, -O0):
<ign_guy>:
push   %rbp
mov    %rsp,%rbp
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @ign_guy() {
%1 = alloca float
%2 = load float, float* %1
ret float %2
}

LLVM IR (-O2):
define float @ign_guy() {
ret float undef
}
void g_slist_prepend() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_prepend() {
ret void
}
/* Variables and functions */
int singlerandomvaluegenerator();
void randvectorgenerator(int length, int *vec) {
  for (int i = 0; i < length; i++) {
    vec[i] = singlerandomvaluegenerator();
  }
}


x86 assembly (clang, -O0):
<randvectorgenerator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <randvectorgenerator+0x44>
mov    $0x0,%al
call   1030 <singlerandomvaluegenerator@plt>
mov    %eax,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <randvectorgenerator+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randvectorgenerator>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1144 <randvectorgenerator+0x34>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <singlerandomvaluegenerator@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <randvectorgenerator+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @randvectorgenerator(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = call i32 (...) @singlerandomvaluegenerator()
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
store i32 %11, i32* %15
br label %16
16: ; preds = %10
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
br label %6
19: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @randvectorgenerator(i32 %0, i32* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %11, %7 ]
%9 = tail call i32 (...) @singlerandomvaluegenerator()
%10 = getelementptr inbounds i32, i32* %1, i64 %8
store i32 %9, i32* %10
%11 = add nuw nsw i64 %8, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %6, label %7
}
__attribute__((used)) int _fstat(int file, struct stat *st) { return -1; }


x86 assembly (clang, -O0):
<_fstat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.stat = type opaque
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, %struct.stat*)* @_fstat to i8*)], section "llvm.metadata"
define i32 @_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.stat = type opaque
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (i32, %struct.stat*)* @_fstat to i8*)], section "llvm.metadata"
define i32 @_fstat(i32 %0, %struct.stat* nocapture readnone %1) {
ret i32 -1
}
int big2little(int reg) {
  return ((reg & 0x000000ff) << 24) | ((reg & 0x0000ff00) << 8) |
         ((reg & 0x00ff0000) >> 8) | ((reg & 0xff000000) >> 24);
}


x86 assembly (clang, -O0):
<big2little>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<big2little>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @big2little(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @big2little(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *bigN_sqrt(char *);
char *integerSquareRoot(char *str) { return bigN_sqrt(str); }


x86 assembly (clang, -O0):
<integerSquareRoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bigN_sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integerSquareRoot>:
jmp    1030 <bigN_sqrt@plt>

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

LLVM IR (-O2):
define i8* @integerSquareRoot(i8* %0) {
%2 = tail call i8* @bigN_sqrt(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int /*<<< orphan*/ sem_post(int /*<<< orphan*/ *);
void up(sem_t *sem) { sem_post(sem); }


x86 assembly (clang, -O0):
<up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sem_post@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<up>:
jmp    1030 <sem_post@plt>

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

LLVM IR (-O2):
define void @up(i32* %0) {
%2 = tail call i32 @sem_post(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ InitFlash();
int /*<<< orphan*/ SaveFlashToFile(char *);
void testcase_0() {
  InitFlash();
  SaveFlashToFile("t1.dat");
}


x86 assembly (clang, -O0):
<testcase_0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <InitFlash@plt>
lea    0xece(%rip),%rdi
call   1040 <SaveFlashToFile@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testcase_0>:
push   %rax
xor    %eax,%eax
call   1030 <InitFlash@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <SaveFlashToFile@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"t1.dat\00"
define void @testcase_0() {
%1 = call i32 (...) @InitFlash()
%2 = call i32 @SaveFlashToFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"t1.dat\00"
define void @testcase_0() {
%1 = tail call i32 (...) @InitFlash()
%2 = tail call i32 @SaveFlashToFile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outnop1str(char *);
int /*<<< orphan*/ sbc0();
void negBsbcA() {
  outnop1str("NEGB");
  sbc0();
}


x86 assembly (clang, -O0):
<negBsbcA>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <outnop1str@plt>
mov    $0x0,%al
call   1030 <sbc0@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<negBsbcA>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <outnop1str@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <sbc0@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"NEGB\00"
define void @negBsbcA() {
%1 = call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @sbc0()
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"NEGB\00"
define void @negBsbcA() {
%1 = tail call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @sbc0()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_gdt();
int /*<<< orphan*/ init_idt();
void init_descriptor_tables() {
  init_gdt();
  init_idt();
}


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

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

LLVM IR (-O0):
define void @init_descriptor_tables() {
%1 = call i32 (...) @init_gdt()
%2 = call i32 (...) @init_idt()
ret void
}

LLVM IR (-O2):
define void @init_descriptor_tables() {
%1 = tail call i32 (...) @init_gdt()
%2 = tail call i32 (...) @init_idt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lsmash_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<lsmash_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsmash_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @lsmash_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void ff_hevc_put_hevc_bi_epel_hv8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_hv8_12_sse4() {
ret void
}
void fd165(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    p024A:
      goto p024A;
      goto a;
    P024A:
      goto P024A;
      0;
    };
  P02B:
    goto P02B;
    {
      typedef int(*h)[n];
    P025A:
      goto P025A;
      0;
    };
  a:;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd165>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd165+0x7>

x86 assembly (clang, -O2):
<fd165>:
jmp    1100 <fd165>

LLVM IR (-O0):
define void @fd165(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; preds = %32
br label %32
33: ; No predecessors!
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %36, %33
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd165(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_haskell_comments() {
  test_parser_verify_parse(test_parser_sourcefile("haskell", " --comment"),
                           "haskell", "", "--comment", 0);
}


x86 assembly (clang, -O0):
<test_haskell_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xec0(%rip),%rdx
lea    0xebb(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_haskell_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec9(%rip),%rdx
lea    0xec4(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"haskell\00"
@.str.1 = [11 x i8] c" --comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"--comment\00"
define void @test_haskell_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"haskell\00"
@.str.1 = [11 x i8] c" --comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"--comment\00"
define void @test_haskell_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ copyAndSort(int *, int *, int);
int /*<<< orphan*/ printArray(int *, int);
int main(int argc, char **argv) {
  uint64_t unsorted[11] = {3, 2, 5, 7, 10, 4, 1, 7, 9, 8, 6};
  uint64_t sorted[11];
  copyAndSort(unsorted, sorted, 11);
  printArray(sorted, 11);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0xb,%edx
call   1030 <copyAndSort@plt>
lea    -0x70(%rbp),%rdi
mov    $0xb,%esi
call   1050 <printArray@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movups 0xef0(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
lea    0x30(%rsp),%rbx
mov    %rbx,%rsi
mov    $0xb,%edx
call   1030 <copyAndSort@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1040 <printArray@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.unsorted = [11 x i32] [i32 3, i32 2, i32 5, i32 7, i32 10, i32 4, i32 1, i32 7, i32 9, i32 8, i32 6]
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [11 x i32]
%7 = alloca [11 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [11 x i32]* %6 to i8*
%9 = getelementptr inbounds [11 x i32], [11 x i32]* %6, i64 0, i64 0
%10 = getelementptr inbounds [11 x i32], [11 x i32]* %7, i64 0, i64 0
%11 = call i32 @copyAndSort(i32* %9, i32* %10, i32 11)
%12 = getelementptr inbounds [11 x i32], [11 x i32]* %7, i64 0, i64 0
%13 = call i32 @printArray(i32* %12, i32 11)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@__const.main.unsorted = [11 x i32] [i32 3, i32 2, i32 5, i32 7, i32 10, i32 4, i32 1, i32 7, i32 9, i32 8, i32 6]
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [11 x i32]
%4 = alloca [11 x i32]
%5 = bitcast [11 x i32]* %3 to i8*
%6 = bitcast [11 x i32]* %4 to i8*
%7 = getelementptr inbounds [11 x i32], [11 x i32]* %3, i64 0, i64 0
%8 = getelementptr inbounds [11 x i32], [11 x i32]* %4, i64 0, i64 0
%9 = call i32 @copyAndSort(i32* %7, i32* %8, i32 11)
%10 = call i32 @printArray(i32* %8, i32 11)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Console_Char(unsigned char);
void OPM_LogW(unsigned char ch) { Console_Char(ch); }


x86 assembly (clang, -O0):
<OPM_LogW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <Console_Char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPM_LogW>:
jmp    1030 <Console_Char@plt>

LLVM IR (-O0):
define void @OPM_LogW(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @Console_Char(i8 zeroext %3)
ret void
}

LLVM IR (-O2):
define void @OPM_LogW(i8 zeroext %0) {
%2 = tail call i32 @Console_Char(i8 zeroext %0)
ret void
}
void foo_1_1_2_1_1_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_1_1_1_2_2_2() {
ret void
}
void scalarVectorMult(float *vector, const int scalar) {
  int i;
  int length = (sizeof(vector) / sizeof((vector)[0])) + 1;
  for (i = 0; i < length; i++) {
    vector[i] *= scalar;
  }
}


x86 assembly (clang, -O0):
<scalarVectorMult>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114a <scalarVectorMult+0x4a>
cvtsi2ssl -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <scalarVectorMult+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalarVectorMult>:
cvtsi2ss %esi,%xmm0
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @scalarVectorMult(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
store i32 3, i32* %6
store i32 0, i32* %5
br label %7
7: ; preds = %20, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to float
%14 = load float*, float** %3
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %14, i64 %16
%18 = load float, float* %17
%19 = fmul float %18, %13
store float %19, float* %17
br label %20
20: ; preds = %11
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %7
23: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @scalarVectorMult(float* nocapture %0, i32 %1) {
%3 = sitofp i32 %1 to float
%4 = load float, float* %0
%5 = fmul float %4, %3
store float %5, float* %0
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = fmul float %7, %3
store float %8, float* %6
%9 = getelementptr inbounds float, float* %0, i64 2
%10 = load float, float* %9
%11 = fmul float %10, %3
store float %11, float* %9
ret void
}
/* Variables and functions */
long double term(int);
long double expr(void) { return term(6); }


x86 assembly (clang, -O0):
<expr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <term@plt>
fld    %st(0)
fstp   %st(0)
pop    %rbp
ret

x86 assembly (clang, -O2):
<expr>:
mov    $0x6,%edi
jmp    1030 <term@plt>

LLVM IR (-O0):
define x86_fp80 @expr() {
%1 = call x86_fp80 @term(i32 6)
ret x86_fp80 %1
}

LLVM IR (-O2):
define x86_fp80 @expr() {
%1 = tail call x86_fp80 @term(i32 6)
ret x86_fp80 %1
}
__attribute__((always_)) void MODULE_PARM_(void) {}


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

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

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

LLVM IR (-O2):
define void @MODULE_PARM_() {
ret void
}
unsigned int _uiMapKey(unsigned char ucSource, unsigned char ucTarget) {
  return (0);
}


x86 assembly (clang, -O0):
<_uiMapKey>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_uiMapKey(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @_uiMapKey(i8 zeroext %0, i8 zeroext %1) {
ret i32 0
}
void uniphier_ld4_sbc_init(void) {}


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

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

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

LLVM IR (-O2):
define void @uniphier_ld4_sbc_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  extern char *__progname;
  fprintf(stderr, "usage: %s infile cfile hfile\n", __progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"usage: %s infile cfile hfile\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"usage: %s infile cfile hfile\0A\00"
@__progname = external global i8*
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ jpeg_fdct_islow();
int benchmark(void) {
  jpeg_fdct_islow();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @benchmark() {
%1 = call i32 (...) @jpeg_fdct_islow()
ret i32 0
}

LLVM IR (-O2):
define i32 @benchmark() {
%1 = tail call i32 (...) @jpeg_fdct_islow()
ret i32 0
}
/* Variables and functions */
char *llvm_gc_allocate(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *__tiger__substring(char *s, int off, int len) {
  char *s1 = llvm_gc_allocate(len + 1);
  strncpy(s1, &s[off], len + 1);
  return s1;
}


x86 assembly (clang, -O0):
<__tiger__substring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edi
add    $0x1,%edi
call   1040 <llvm_gc_allocate@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    -0x10(%rbp),%edx
add    $0x1,%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__tiger__substring>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r15d
mov    %rdi,%r14
add    $0x1,%ebx
mov    %ebx,%edi
call   1040 <llvm_gc_allocate@plt>
mov    %rax,%rbp
movslq %r15d,%rsi
add    %r14,%rsi
mov    %rax,%rdi
mov    %ebx,%edx
call   1030 <strncpy@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @__tiger__substring(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = add nsw i32 %8, 1
%10 = call i8* @llvm_gc_allocate(i32 %9)
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
%18 = call i32 @strncpy(i8* %11, i8* %15, i32 %17)
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
define i8* @__tiger__substring(i8* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, 1
%5 = tail call i8* @llvm_gc_allocate(i32 %4)
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = tail call i32 @strncpy(i8* %5, i8* %7, i32 %4)
ret i8* %5
}
void bpemu_init(void) {}


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

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

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

LLVM IR (-O2):
define void @bpemu_init() {
ret void
}
hash(name) char *name;
{
  int sum;
  for (sum = 0; *name != '\0'; name++)
    sum += (sum + *name);
  sum %= 101;
  if (sum < 0)
    sum += 101;
  return (sum);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1142 <hash+0x42>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x65,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1163 <hash+0x63>
mov    -0xc(%rbp),%eax
add    $0x65,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%al
test   %al,%al
je     114b <hash+0x4b>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
lea    (%rax,%rcx,2),%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <hash+0x10>
movslq %ecx,%rax
imul   $0x288df0cb,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x65,%ecx,%ecx
mov    %eax,%edx
sub    %ecx,%edx
neg    %ecx
test   %edx,%edx
lea    0x65(%rax,%rcx,1),%eax
cmovns %edx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %17, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %20
9: ; preds = %4
%10 = load i32, i32* %3
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = add nsw i32 %10, %13
%15 = load i32, i32* %3
%16 = add nsw i32 %15, %14
store i32 %16, i32* %3
br label %17
17: ; preds = %9
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
br label %4
20: ; preds = %4
%21 = load i32, i32* %3
%22 = srem i32 %21, 101
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %20
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 101
store i32 %27, i32* %3
br label %28
28: ; preds = %25, %20
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %19, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = shl i32 %6, 1
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = srem i32 %10, 101
%16 = icmp slt i32 %15, 0
%17 = add nsw i32 %15, 101
%18 = select i1 %16, i32 %17, i32 %15
br label %19
19: ; preds = %14, %1
%20 = phi i32 [ 0, %1 ], [ %18, %14 ]
ret i32 %20
}