xunge/DecIR huggingface dataset:
int main(void) {
  int counter = 0;
  while ((counter < 5) && (3 == 4)) {
    counter++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x5,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    112b <main+0x2b>
xor    %eax,%eax
mov    %al,-0x9(%rbp)
jmp    112b <main+0x2b>
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113b <main+0x3b>
jmp    1149 <main+0x49>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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 %7
6: ; preds = %3
br label %7
7: ; preds = %6, %3
%8 = phi i1 [ false, %3 ], [ false, %6 ]
br i1 %8, label %9, label %12
9: ; preds = %7
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
long long fib2(int n, long long s1, long long s2) {
  if (n == 0) {
    return s1;
  }
  if (n == 1) {
    return s2;
  }
  return fib2(n - 1, s2, s1 + s2);
}


x86 assembly (clang, -O0):
<fib2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    113a <fib2+0x2a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <fib2+0x5c>
cmpl   $0x1,-0xc(%rbp)
jne    1151 <fib2+0x41>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116c <fib2+0x5c>
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
add    -0x20(%rbp),%rdx
call   1030 <fib2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib2>:
mov    %rdx,%rax
test   %edi,%edi
je     1128 <fib2+0x28>
nopw   0x0(%rax,%rax,1)
cmp    $0x1,%edi
je     112b <fib2+0x2b>
add    $0xffffffff,%edi
mov    %rsi,%rcx
add    %rax,%rcx
mov    %rax,%rsi
mov    %rcx,%rax
test   %edi,%edi
jne    1110 <fib2+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @fib2(i32 %0, i64 %1, i64 %2) {
br label %4
4: ; preds = %8, %3
%5 = phi i32 [ %0, %3 ], [ %9, %8 ]
%6 = phi i64 [ %1, %3 ], [ %7, %8 ]
%7 = phi i64 [ %2, %3 ], [ %10, %8 ]
switch i32 %5, label %8 [
i32 0, label %11
i32 1, label %12
]
8: ; preds = %4
%9 = add nsw i32 %5, -1
%10 = add nsw i64 %7, %6
br label %4
11: ; preds = %4
br label %12
12: ; preds = %4, %11
%13 = phi i64 [ %6, %11 ], [ %7, %4 ]
ret i64 %13
}
void sock_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @sock_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void instructions(void) {
  puts("Enter your choice:\n"
       "   1 to insert an element into the list.\n"
       "   2 to delete an element from the list.\n"
       "   3 to end.");
}


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

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

LLVM IR (-O0):
@.str = [114 x i8] c"Enter your choice:\0A 1 to insert an element into the list.\0A 2 to delete an element from the list.\0A 3 to end.\00"
define void @instructions() {
%1 = call i32 @puts(i8* getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [114 x i8] c"Enter your choice:\0A 1 to insert an element into the list.\0A 2 to delete an element from the list.\0A 3 to end.\00"
define void @instructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR5F_set(void) { return U_WMRCORENONE_set("U_WMR5F"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR5F\00"
define i8* @U_WMR5F_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_WMR5F\00"
define i8* @U_WMR5F_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
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *, char const *,
                           char const *, char const *, int);
int /*<<< orphan*/ stderr;
void __assert(const char *expr, const char *file, int line, const char *func) {
  static const char *msg = "Assertion \"%s\" failed at %s:%d)\n";
  fprintf(stderr, msg, expr, file, func, line);
  fflush(NULL);
  abort();
}


x86 assembly (clang, -O0):
<__assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    0x2ee1(%rip),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x14(%rbp),%r9d
call   1040 <fprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__assert>:
push   %rax
mov    %rcx,%r8
mov    %edx,%r9d
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1050 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__assert.msg = internal global i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i32 0, i32 0)
@.str = [33 x i8] c"Assertion \22%s\22 failed at %s:%d)\0A\00"
@stderr = global i32 0
define void @__assert(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** @__assert.msg
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %8
%14 = load i32, i32* %7
%15 = call i32 @fprintf(i32 %9, i8* %10, i8* %11, i8* %12, i8* %13, i32 %14)
%16 = call i32 @fflush(i32* null)
%17 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [33 x i8] c"Assertion \22%s\22 failed at %s:%d)\0A\00"
@stderr = global i32 0
define void @__assert(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %3, i32 %2)
%7 = tail call i32 @fflush(i32* null)
%8 = tail call i32 (...) @abort()
unreachable
}
void AcmeThread_exit(int result) { result = result; }


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

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

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

LLVM IR (-O2):
define void @AcmeThread_exit(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dpop();
int /*<<< orphan*/ set_profiling(int /*<<< orphan*/);
int /*<<< orphan*/ to_boolean(int /*<<< orphan*/);
void primitive_profiling(void) { set_profiling(to_boolean(dpop())); }


x86 assembly (clang, -O0):
<primitive_profiling>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <dpop@plt>
mov    %eax,%edi
call   1050 <to_boolean@plt>
mov    %eax,%edi
call   1030 <set_profiling@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_profiling>:
push   %rax
xor    %eax,%eax
call   1040 <dpop@plt>
mov    %eax,%edi
call   1050 <to_boolean@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <set_profiling@plt>

LLVM IR (-O0):
define void @primitive_profiling() {
%1 = call i32 (...) @dpop()
%2 = call i32 @to_boolean(i32 %1)
%3 = call i32 @set_profiling(i32 %2)
ret void
}

LLVM IR (-O2):
define void @primitive_profiling() {
%1 = tail call i32 (...) @dpop()
%2 = tail call i32 @to_boolean(i32 %1)
%3 = tail call i32 @set_profiling(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char const);
void putword(const char *word) {
  while (*word) {
    putchar(*word);
    if (*word == 'q')
      putchar('u');
    ++word;
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<putword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <putword+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x71,%eax
jne    114f <putword+0x3f>
mov    $0x75,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <putword+0xc>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putword>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1145 <putword+0x35>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    112b <putword+0x1b>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1145 <putword+0x35>
movsbl %al,%edi
call   1030 <putchar@plt>
cmpb   $0x71,-0x1(%rbx)
jne    1120 <putword+0x10>
mov    $0x75,%edi
call   1030 <putchar@plt>
jmp    1120 <putword+0x10>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @putword(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %17, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %20
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @putchar(i8 signext %9)
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 113
br i1 %14, label %15, label %17
15: ; preds = %7
%16 = call i32 @putchar(i8 signext 117)
br label %17
17: ; preds = %15, %7
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
br label %3
20: ; preds = %3
%21 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @putword(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i32 @putchar(i8 signext %5)
%8 = load i8, i8* %6
%9 = icmp eq i8 %8, 113
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = tail call i32 @putchar(i8 signext 117)
br label %12
12: ; preds = %10, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
%17 = tail call i32 @putchar(i8 signext 10)
ret void
}
int bitAnd(int x, int y) { return 2; }


x86 assembly (clang, -O0):
<bitAnd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x2,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bitAnd(i32 %0, i32 %1) {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ merge(int, int, int);
void mergeSort(int low, int high) {
  int mid = (low + high) / 2;
  if (low < high) {
    mergeSort(low, mid);
    mergeSort(mid + 1, high);
    merge(low, mid, high);
  }
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <mergeSort+0x52>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <mergeSort@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
call   1030 <mergeSort@plt>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1040 <merge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
cmp    %esi,%edi
jge    1160 <mergeSort+0x40>
push   %r15
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%r15d
lea    (%r14,%r15,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%esi
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%edi
mov    %r14d,%esi
call   1030 <mergeSort@plt>
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

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

LLVM IR (-O2):
define void @mergeSort(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sdiv i32 %3, 2
%5 = icmp slt i32 %0, %1
br i1 %5, label %7, label %6
6: ; preds = %2, %7
ret void
7: ; preds = %2
tail call void @mergeSort(i32 %0, i32 %4)
%8 = add nsw i32 %4, 1
tail call void @mergeSort(i32 %8, i32 %1)
%9 = tail call i32 @merge(i32 %0, i32 %4, i32 %1)
br label %6
}
void provider1() {}


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

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

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

LLVM IR (-O2):
define void @provider1() {
ret void
}
/* Variables and functions */
int builtin_errmsg(char **, char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int builtin_error(char *argv[], char *s) {
  return builtin_errmsg(argv, s, strerror(errno));
}


x86 assembly (clang, -O0):
<builtin_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <builtin_errmsg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_error>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <builtin_errmsg@plt>

LLVM IR (-O0):
@errno = global i32 0
define i32 @builtin_error(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @errno
%8 = call i32 @strerror(i32 %7)
%9 = call i32 @builtin_errmsg(i8** %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @builtin_error(i8** %0, i8* %1) {
%3 = load i32, i32* @errno
%4 = tail call i32 @strerror(i32 %3)
%5 = tail call i32 @builtin_errmsg(i8** %0, i8* %1, i32 %4)
ret i32 %5
}
OP(dd, da) { op_da(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_da@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_da()
ret i32 undef
}
/* Variables and functions */
long double tanh(double);
__attribute__((weak)) long double tanhl(long double x) {
  return tanh((double)x);
}


x86 assembly (clang, -O0):
<tanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <tanh@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanhl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <tanh@plt>

LLVM IR (-O0):
define weak x86_fp80 @tanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @tanh(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define weak x86_fp80 @tanhl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @tanh(double %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int rand();
int random_int(int min, int max) {
  assert(max > min);
  return rand() % (max - min) + min;
}


x86 assembly (clang, -O0):
<random_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1040 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
sub    %ebp,%ebx
setg   %dil
call   1030 <assert@plt>
xor    %eax,%eax
call   1040 <rand@plt>
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 (...) @rand()
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = srem i32 %10, %13
%15 = load i32, i32* %3
%16 = add nsw i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @random_int(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 (...) @rand()
%7 = sub nsw i32 %1, %0
%8 = srem i32 %6, %7
%9 = add nsw i32 %8, %0
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void initArray1(void) {
  printf("initArray1\n");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<initArray1>:
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):
<initArray1>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@str = [11 x i8] c"initArray1\00"
define void @initArray1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
int LEFT_OP(int x, int y) { return x << y; }


x86 assembly (clang, -O0):
<LEFT_OP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LEFT_OP>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @LEFT_OP(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* %4
%7 = shl i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @LEFT_OP(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
ret i32 %3
}
char *utf8_prev_char(const char *p) {
  while (1) {
    p--;
    if ((*p & 0xc0) != 0x80)
      return (char *)p;
  }
}


x86 assembly (clang, -O0):
<utf8_prev_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
je     1131 <utf8_prev_char+0x31>
mov    -0x8(%rbp),%rax
pop    %rbp
ret
jmp    1108 <utf8_prev_char+0x8>

x86 assembly (clang, -O2):
<utf8_prev_char>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl -0x1(%rax),%ecx
add    $0xffffffffffffffff,%rax
and    $0xc0,%cl
cmp    $0x80,%cl
je     1110 <utf8_prev_char+0x10>
ret

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

LLVM IR (-O2):
define i8* @utf8_prev_char(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 -1
%5 = load i8, i8* %4
%6 = and i8 %5, -64
%7 = icmp eq i8 %6, -128
br i1 %7, label %2, label %8
8: ; preds = %2
ret i8* %4
}
void SSMR3GetSel(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetSel() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  for (int i = 0; i < 5; i++) {
    printf("%d", 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    114d <main+0x3d>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@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   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
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 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), 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):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
void cleanlines(char *lineptr[], int nlines) {
  int i;
  for (i = 0; i < nlines; i++)
    lineptr[i] = '\0';
}


x86 assembly (clang, -O0):
<cleanlines>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <cleanlines+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <cleanlines+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanlines>:
test   %esi,%esi
jle    1126 <cleanlines+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @cleanlines(i8** nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i8** %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank3(int);
void vrc7setParamsB010(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank3(val << 10);
}


x86 assembly (clang, -O0):
<vrc7setParamsB010>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
shl    $0xa,%edi
call   1030 <chr1setBank3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vrc7setParamsB010>:
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank3@plt>

LLVM IR (-O0):
define void @vrc7setParamsB010(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* %4
%7 = shl i32 %6, 10
%8 = call i32 @chr1setBank3(i32 %7)
ret void
}

LLVM IR (-O2):
define void @vrc7setParamsB010(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank3(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_match() {
  printf("NOT IMPLEMENTED:"
         "pa_match"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"NOT IMPLEMENTED:pa_match\0A\00"
define i32 @pa_match() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [25 x i8] c"NOT IMPLEMENTED:pa_match\00"
define i32 @pa_match() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct passwd {
  int pw_gid;
};

/* Variables and functions */
struct passwd *getpwnam(char *);
int get_user_gid(char *user) {
  int retcode;
  struct passwd *pw;
  pw = getpwnam(user);
  if (pw == NULL) {
    retcode = -1;
  } else {
    retcode = pw->pw_gid;
  }
  return retcode;
}


x86 assembly (clang, -O0):
<get_user_gid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getpwnam@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1140 <get_user_gid+0x30>
movl   $0xffffffff,-0xc(%rbp)
jmp    1149 <get_user_gid+0x39>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_user_gid>:
push   %rax
call   1030 <getpwnam@plt>
test   %rax,%rax
je     111f <get_user_gid+0xf>
mov    (%rax),%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i32 }
define i32 @get_user_gid(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.passwd*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call %struct.passwd* @getpwnam(i8* %5)
store %struct.passwd* %6, %struct.passwd** %4
%7 = load %struct.passwd*, %struct.passwd** %4
%8 = icmp eq %struct.passwd* %7, null
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %3
br label %14
10: ; preds = %1
%11 = load %struct.passwd*, %struct.passwd** %4
%12 = getelementptr inbounds %struct.passwd, %struct.passwd* %11, i32 0, i32 0
%13 = load i32, i32* %12
store i32 %13, i32* %3
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define i32 @get_user_gid(i8* nocapture %0) {
%2 = tail call %struct.passwd* @getpwnam(i8* %0)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %6, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint32_t;

/* Variables and functions */
uint32_t load32(const void *src) { return *(const uint32_t *)src; }


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

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

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

LLVM IR (-O2):
define i32 @load32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
struct arg_rex {
  int dummy;
};

/* Variables and functions */
struct arg_rex *arg_rexn(char const *, char const *, char const *, char const *,
                         int /*<<< orphan*/, int, int, char const *);
struct arg_rex *arg_rex0(const char *shortopts, const char *longopts,
                         const char *pattern, const char *datatype, int flags,
                         const char *glossary) {
  return arg_rexn(shortopts, longopts, pattern, datatype, 0, 1, flags,
                  glossary);
}


x86 assembly (clang, -O0):
<arg_rex0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r10d
mov    -0x30(%rbp),%rax
xor    %r8d,%r8d
mov    $0x1,%r9d
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <arg_rexn@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_rex0>:
push   %rax
mov    %r9,%rax
mov    %r8d,%r10d
xor    %r8d,%r8d
mov    $0x1,%r9d
push   %rax
push   %r10
call   1030 <arg_rexn@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.arg_rex = type { i32 }
define %struct.arg_rex* @arg_rex0(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = load i8*, i8** %12
%19 = call %struct.arg_rex* @arg_rexn(i8* %13, i8* %14, i8* %15, i8* %16, i32 0, i32 1, i32 %17, i8* %18)
ret %struct.arg_rex* %19
}

LLVM IR (-O2):
%struct.arg_rex = type { i32 }
define %struct.arg_rex* @arg_rex0(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i8* %5) {
%7 = tail call %struct.arg_rex* @arg_rexn(i8* %0, i8* %1, i8* %2, i8* %3, i32 0, i32 1, i32 %4, i8* %5)
ret %struct.arg_rex* %7
}
/* Variables and functions */
int firstWordIndex(char *);
int /*<<< orphan*/ memcpy(void *, void *, int);
void firstWord(char *cadena, char *word) {
  int pos;
  pos = firstWordIndex(cadena);
  memcpy((void *)word, (void *)cadena, pos);
  word[pos] = '\0';
  return;
}


x86 assembly (clang, -O0):
<firstWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <firstWordIndex@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<firstWord>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <firstWordIndex@plt>
mov    %eax,%ebp
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
movslq %ebp,%rax
movb   $0x0,(%r14,%rax,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @firstWord(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @firstWordIndex(i8* %6)
store i32 %7, i32* %5
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = call i32 @memcpy(i8* %8, i8* %9, i32 %10)
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @firstWord(i8* %0, i8* %1) {
%3 = tail call i32 @firstWordIndex(i8* %0)
%4 = tail call i32 @memcpy(i8* %1, i8* %0, i32 %3)
%5 = sext i32 %3 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ generate_password();
int /*<<< orphan*/ parse_arg(int, char **);
int main(int argc, char *argv[]) {
  parse_arg(argc, argv);
  generate_password();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <parse_arg@plt>
mov    $0x0,%al
call   1040 <generate_password@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <parse_arg@plt>
xor    %eax,%eax
call   1040 <generate_password@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @parse_arg(i32 %6, i8** %7)
%9 = call i32 (...) @generate_password()
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parse_arg(i32 %0, i8** %1)
%4 = tail call i32 (...) @generate_password()
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_meter(void) {
  printf("The meter library is not included in this build\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<test_meter>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"The meter library is not included in this build\0A\00"
define i32 @test_meter() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [48 x i8] c"The meter library is not included in this build\00"
define i32 @test_meter() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SetPenColor84(unsigned long);
void setpencolor(unsigned long c) { SetPenColor84(c); }


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

x86 assembly (clang, -O2):
<setpencolor>:
jmp    1030 <SetPenColor84@plt>

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

LLVM IR (-O2):
define void @setpencolor(i64 %0) {
%2 = tail call i32 @SetPenColor84(i64 %0)
ret void
}
/* Variables and functions */
void GetSaveOptLetters(unsigned char save_opt_bits, char *let1, char *let2) {
  const char a2p[] = "ABCDEFGHIJKLMNOP";
  *let1 = a2p[(size_t)(save_opt_bits & 0x0f)];
  *let2 = a2p[(size_t)((save_opt_bits & 0x30) >> 4)];
}


x86 assembly (clang, -O0):
<GetSaveOptLetters>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0xee7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee4(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xee2(%rip),%al
mov    %al,-0x20(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
cltq
mov    -0x30(%rbp,%rax,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movzbl -0x1(%rbp),%eax
and    $0x30,%eax
sar    $0x4,%eax
cltq
mov    -0x30(%rbp,%rax,1),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetSaveOptLetters>:
mov    %edi,%eax
and    $0xf,%eax
lea    0xef4(%rip),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,(%rsi)
shr    $0x4,%edi
and    $0x3,%edi
mov    (%rdi,%rcx,1),%al
mov    %al,(%rdx)
ret

LLVM IR (-O0):
@__const.GetSaveOptLetters.a2p = [17 x i8] c"ABCDEFGHIJKLMNOP\00"
define void @GetSaveOptLetters(i8 zeroext %0, i8* %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [17 x i8]
store i8 %0, i8* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = bitcast [17 x i8]* %7 to i8*
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = and i32 %10, 15
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [17 x i8], [17 x i8]* %7, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = load i8*, i8** %5
store i8 %14, i8* %15
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = and i32 %17, 48
%19 = ashr i32 %18, 4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [17 x i8], [17 x i8]* %7, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = load i8*, i8** %6
store i8 %22, i8* %23
ret void
}

LLVM IR (-O2):
@__const.GetSaveOptLetters.a2p = [17 x i8] c"ABCDEFGHIJKLMNOP\00"
define void @GetSaveOptLetters(i8 zeroext %0, i8* nocapture writeonly %1, i8* nocapture writeonly %2) {
%4 = zext i8 %0 to i32
%5 = and i32 %4, 15
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds [17 x i8], [17 x i8]* @__const.GetSaveOptLetters.a2p, i64 0, i64 %6
%8 = load i8, i8* %7
store i8 %8, i8* %1
%9 = lshr i32 %4, 4
%10 = and i32 %9, 3
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds [17 x i8], [17 x i8]* @__const.GetSaveOptLetters.a2p, i64 0, i64 %11
%13 = load i8, i8* %12
store i8 %13, i8* %2
ret void
}
unsigned short int cast_uint_ushort_fast(unsigned int x) {
  return (unsigned short int)x;
}


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

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

LLVM IR (-O0):
define zeroext i16 @cast_uint_ushort_fast(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i16
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @cast_uint_ushort_fast(i32 %0) {
%2 = trunc i32 %0 to i16
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void primo(int n) {
  if (n % 2 != 0)
    printf("%d eh primo!\n", n);
  else
    printf("%d nao eh primo!\n", n);
}


x86 assembly (clang, -O0):
<primo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1143 <primo+0x33>
mov    -0x4(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    1152 <primo+0x42>
mov    -0x4(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primo>:
mov    %edi,%esi
test   $0x1,%sil
lea    0xef1(%rip),%rax
lea    0xedc(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"%d eh primo!\0A\00"
@.str.1 = [18 x i8] c"%d nao eh primo!\0A\00"
define void @primo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = srem i32 %3, 2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d eh primo!\0A\00"
@.str.1 = [18 x i8] c"%d nao eh primo!\0A\00"
define void @primo(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void dump(int *input) {
  int i;
  for (i = 0; i < 32 * 32 * 32; ++i) {
    printf("%d\n", input[i]);
  }
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8000,-0xc(%rbp)
jge    1155 <dump+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <dump+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x8000,%rbx
jne    1130 <dump+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @dump(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nuw nsw i64 %3, 1
%8 = icmp eq i64 %7, 32768
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
void speakup_allocate(int currcons) {}


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

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

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

LLVM IR (-O2):
define void @speakup_allocate(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_ldrsh(int /*<<< orphan*/);
int /*<<< orphan*/ t16_memio_reg_op();
void t16_ldrsh_reg() { arm_memio_ldrsh(t16_memio_reg_op()); }


x86 assembly (clang, -O0):
<t16_ldrsh_reg>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <t16_memio_reg_op@plt>
mov    %eax,%edi
call   1040 <arm_memio_ldrsh@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @t16_ldrsh_reg() {
%1 = call i32 (...) @t16_memio_reg_op()
%2 = call i32 @arm_memio_ldrsh(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_ldrsh_reg() {
%1 = tail call i32 (...) @t16_memio_reg_op()
%2 = tail call i32 @arm_memio_ldrsh(i32 %1)
ret void
}
/* Variables and functions */
void *rev(void *end) {
  void **cur = end;
  void **prev;
  void **next = NULL;
  while (cur) {
    prev = *cur;
    *cur = next;
    next = cur;
    cur = prev;
  }
  return next;
}


x86 assembly (clang, -O0):
<rev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114e <rev+0x4e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <rev+0x18>
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev>:
test   %rdi,%rdi
je     1122 <rev+0x22>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
mov    %rdi,%rax
mov    (%rdi),%rdi
mov    %rcx,(%rax)
mov    %rax,%rcx
test   %rdi,%rdi
jne    1110 <rev+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @rev(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %5, %3 ], [ null, %1 ]
%5 = phi i8* [ %7, %3 ], [ %0, %1 ]
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
store i8* %4, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %5, %3 ]
ret i8* %10
}