xunge/DecIR huggingface dataset:
int mod(int i, int j) {
  int x = i % j;
  return x < 0 ? x + j : x;
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    112c <mod+0x2c>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <mod+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @mod(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 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
br label %17
15: ; preds = %2
%16 = load i32, i32* %5
br label %17
17: ; preds = %15, %11
%18 = phi i32 [ %14, %11 ], [ %16, %15 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = add nsw i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void finish_a2(void) { printf("finish_a2\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"finish_a2\00"
define void @finish_a2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
void mgSetHint(char *hint) { return; }


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

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

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

LLVM IR (-O2):
define void @mgSetHint(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int fun();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  int nr_of_traps = 0;
  long nr_of_reductions = 1;
  ret = fun();
  printf("NR OF TRAPS %d\n", nr_of_traps);
  printf("RETURNED %d\n", ret);
  if (ret != 72 || nr_of_traps != ret) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
mov    $0x0,%al
call   1030 <fun@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x48,-0x14(%rbp)
jne    118a <main+0x6a>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1196 <main+0x76>
movl   $0x1,-0x4(%rbp)
jmp    119d <main+0x7d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <fun@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"NR OF TRAPS %d\0A\00"
@.str.1 = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @fun()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_CLR(int, int /*<<< orphan*/ *);
void Selective_FdClr(int fd, fd_set *s) { FD_CLR(fd, s); }


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

x86 assembly (clang, -O2):
<Selective_FdClr>:
jmp    1030 <FD_CLR@plt>

LLVM IR (-O0):
define void @Selective_FdClr(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 = call i32 @FD_CLR(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @Selective_FdClr(i32 %0, i32* %1) {
%3 = tail call i32 @FD_CLR(i32 %0, i32* %1)
ret void
}
int reverse(int N) {
  int a, rev = 0;
  while (N > 0) {
    a = N % 10;
    rev = rev * 10 + a;
    N /= 10;
  }
  return rev;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1143 <reverse+0x43>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
imul   $0xa,-0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <reverse+0xe>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
xor    %eax,%eax
test   %edi,%edi
jle    1131 <reverse+0x31>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
lea    (%rcx,%rax,2),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverse(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = urem i32 %5, 10
%7 = mul nsw i32 %4, 10
%8 = add nsw i32 %7, %6
%9 = udiv i32 %5, 10
%10 = icmp ult i32 %5, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int sival_int;
};
struct TYPE_5__ {
  TYPE_1__ si_value;
};
typedef TYPE_2__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ Assert_failure(char *);
int /*<<< orphan*/ printf(char *, int);
void catchViolation(int sig, siginfo_t *si, void *threadContext) {
  printf("Attempted banned syscall number [%d] see doc/Seccomp.md for more "
         "information\n",
         ((si)->si_value.sival_int));
  Assert_failure("Disallowed Syscall");
}


x86 assembly (clang, -O0):
<catchViolation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
lea    0xf02(%rip),%rdi
call   1030 <Assert_failure@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catchViolation>:
push   %rax
mov    (%rsi),%esi
lea    0xed6(%rip),%rdi
call   1040 <printf@plt>
lea    0xf18(%rip),%rdi
pop    %rax
jmp    1030 <Assert_failure@plt>

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
@.str = [78 x i8] c"Attempted banned syscall number [%d] see doc/Seccomp.md for more information\0A\00"
@.str.1 = [19 x i8] c"Disallowed Syscall\00"
define void @catchViolation(i32 %0, %struct.TYPE_5__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_5__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_5__* %1, %struct.TYPE_5__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_5__*, %struct.TYPE_5__** %5
%8 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @Assert_failure(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i32 }
@.str = [78 x i8] c"Attempted banned syscall number [%d] see doc/Seccomp.md for more information\0A\00"
@.str.1 = [19 x i8] c"Disallowed Syscall\00"
define void @catchViolation(i32 %0, %struct.TYPE_5__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %1, i64 0, i32 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @Assert_failure(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ io_out8(int, int);
void init_pit(void) {
  io_out8((0x0043), 0x34);
  io_out8((0x0040), 0x9c);
  io_out8((0x0040), 0x2e);
}


x86 assembly (clang, -O0):
<init_pit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <io_out8@plt>
mov    $0x40,%edi
mov    $0x9c,%esi
call   1030 <io_out8@plt>
mov    $0x40,%edi
mov    $0x2e,%esi
call   1030 <io_out8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_pit>:
push   %rax
mov    $0x43,%edi
mov    $0x34,%esi
call   1030 <io_out8@plt>
mov    $0x40,%edi
mov    $0x9c,%esi
call   1030 <io_out8@plt>
mov    $0x40,%edi
mov    $0x2e,%esi
pop    %rax
jmp    1030 <io_out8@plt>

LLVM IR (-O0):
define void @init_pit() {
%1 = call i32 @io_out8(i32 67, i32 52)
%2 = call i32 @io_out8(i32 64, i32 156)
%3 = call i32 @io_out8(i32 64, i32 46)
ret void
}

LLVM IR (-O2):
define void @init_pit() {
%1 = tail call i32 @io_out8(i32 67, i32 52)
%2 = tail call i32 @io_out8(i32 64, i32 156)
%3 = tail call i32 @io_out8(i32 64, i32 46)
ret void
}
int recursive_euclidean(int x, int y) {
  return (x == 0) ? y : (y == 0) ? x : recursive_euclidean(y, x % y);
}


x86 assembly (clang, -O0):
<recursive_euclidean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1133 <recursive_euclidean+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1162 <recursive_euclidean+0x52>
cmpl   $0x0,-0x8(%rbp)
jne    1148 <recursive_euclidean+0x38>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    115c <recursive_euclidean+0x4c>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%esi
call   1030 <recursive_euclidean@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursive_euclidean>:
mov    %esi,%edx
test   %edi,%edi
je     111e <recursive_euclidean+0x1e>
mov    %edi,%eax
test   %edx,%edx
je     1120 <recursive_euclidean+0x20>
nopl   0x0(%rax)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <recursive_euclidean+0x10>
mov    %ecx,%eax
ret
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @recursive_euclidean(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 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i32, i32* %4
br label %22
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = load i32, i32* %3
br label %20
14: ; preds = %9
%15 = load i32, i32* %4
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = srem i32 %16, %17
%19 = call i32 @recursive_euclidean(i32 %15, i32 %18)
br label %20
20: ; preds = %14, %12
%21 = phi i32 [ %13, %12 ], [ %19, %14 ]
br label %22
22: ; preds = %20, %7
%23 = phi i32 [ %8, %7 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @recursive_euclidean(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %11, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %8, %6 ], [ %0, %4 ]
%8 = phi i32 [ %9, %6 ], [ %1, %4 ]
%9 = srem i32 %7, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %4, %2
%12 = phi i32 [ %1, %2 ], [ %0, %4 ], [ %8, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned int *);
unsigned int *glyph_name_to_unicode(char const *);
char *unicode_string_to_hex(unsigned int *);
char *glyph_name_to_hex(const char *glyph_name) {
  unsigned int *unicode_string;
  char *hex_string;
  unicode_string = glyph_name_to_unicode(glyph_name);
  hex_string = unicode_string_to_hex(unicode_string);
  free(unicode_string);
  return hex_string;
}


x86 assembly (clang, -O0):
<glyph_name_to_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <glyph_name_to_unicode@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <unicode_string_to_hex@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glyph_name_to_hex>:
push   %r14
push   %rbx
push   %rax
call   1050 <glyph_name_to_unicode@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <unicode_string_to_hex@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @glyph_name_to_hex(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @glyph_name_to_unicode(i8* %5)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i8* @unicode_string_to_hex(i32* %7)
store i8* %8, i8** %4
%9 = load i32*, i32** %3
%10 = call i32 @free(i32* %9)
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
define i8* @glyph_name_to_hex(i8* %0) {
%2 = tail call i32* @glyph_name_to_unicode(i8* %0)
%3 = tail call i8* @unicode_string_to_hex(i32* %2)
%4 = tail call i32 @free(i32* %2)
ret i8* %3
}
void U_EMRENDPATH_print(const char *contents) { (void)contents; }


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

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

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

LLVM IR (-O2):
define void @U_EMRENDPATH_print(i8* nocapture %0) {
ret void
}
void InterruptEnable(int InterruptSource) {
  ((volatile unsigned long *)(0xE000E000 + (0x100)))[(InterruptSource >> 5)] =
      1 << (InterruptSource & 31);
}


x86 assembly (clang, -O0):
<InterruptEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rdx
mov    -0x4(%rbp),%eax
sar    $0x5,%eax
movslq %eax,%rcx
mov    $0xe000e100,%eax
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<InterruptEnable>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
sar    $0x5,%ecx
movslq %ecx,%rcx
mov    $0xe000e100,%edx
mov    %rax,(%rdx,%rcx,8)
ret

LLVM IR (-O0):
define void @InterruptEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 31
%5 = shl i32 1, %4
%6 = sext i32 %5 to i64
%7 = load i32, i32* %2
%8 = ashr i32 %7, 5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* inttoptr (i64 3758153984 to i64*), i64 %9
store volatile i64 %6, i64* %10
ret void
}

LLVM IR (-O2):
define void @InterruptEnable(i32 %0) {
%2 = and i32 %0, 31
%3 = shl nuw i32 1, %2
%4 = sext i32 %3 to i64
%5 = ashr i32 %0, 5
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* inttoptr (i64 3758153984 to i64*), i64 %6
store volatile i64 %4, i64* %7
ret void
}
/* Variables and functions */
int has_feat_ext(char const *, int /*<<< orphan*/);
int has_feature(const char *nam) { return has_feat_ext(nam, 0); }


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

x86 assembly (clang, -O2):
<has_feature>:
xor    %esi,%esi
jmp    1030 <has_feat_ext@plt>

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

LLVM IR (-O2):
define i32 @has_feature(i8* %0) {
%2 = tail call i32 @has_feat_ext(i8* %0, i32 0)
ret i32 %2
}
int config_MODULE_MONITOR(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @config_MODULE_MONITOR() {
ret i32 1
}

LLVM IR (-O2):
define i32 @config_MODULE_MONITOR() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ putch_tty(char);
void putch(char c) { putch_tty(c); }


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

x86 assembly (clang, -O2):
<putch>:
jmp    1030 <putch_tty@plt>

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

LLVM IR (-O2):
define void @putch(i8 signext %0) {
%2 = tail call i32 @putch_tty(i8 signext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void close_config_file(FILE *in) { fclose(in); }


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

x86 assembly (clang, -O2):
<close_config_file>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @close_config_file(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ core5_swap(char *, int);
void U_EMRSAVEDC_swap(char *record, int torev) { core5_swap(record, torev); }


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

x86 assembly (clang, -O2):
<U_EMRSAVEDC_swap>:
jmp    1030 <core5_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRSAVEDC_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core5_swap(i8* %0, i32 %1)
ret void
}
upper(s) register char *s;
{
  while (*s != '\0') {
    if (islower(*s))
      *s = toupper(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1176 <upper+0x56>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%eax
je     1165 <upper+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    112c <upper+0xc>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upper>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1165 <upper+0x45>
mov    %rdi,%rbx
add    $0x1,%rbx
jmp    114b <upper+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1165 <upper+0x45>
movsbl %al,%ebp
mov    %ebp,%edi
call   1030 <islower@plt>
test   %eax,%eax
je     1140 <upper+0x20>
mov    %ebp,%edi
call   1040 <toupper@plt>
mov    %al,-0x1(%rbx)
jmp    1140 <upper+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @upper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %13
%5 = phi i8 [ %15, %13 ], [ %2, %1 ]
%6 = phi i8* [ %14, %13 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i32 @islower(i32 %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = tail call i32 @toupper(i32 %7)
%12 = trunc i32 %11 to i8
store i8 %12, i8* %6
br label %13
13: ; preds = %10, %4
%14 = getelementptr inbounds i8, i8* %6, i64 1
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %4
17: ; preds = %13, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("Hello\n");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"Hello\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ tpi_write(int);
void tpi_sst(uint8_t data) {
  tpi_write((0x60));
  tpi_write(data);
}


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

x86 assembly (clang, -O2):
<tpi_sst>:
push   %rbx
mov    %edi,%ebx
mov    $0x60,%edi
call   1030 <tpi_write@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tpi_write@plt>

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

LLVM IR (-O2):
define void @tpi_sst(i32 %0) {
%2 = tail call i32 @tpi_write(i32 96)
%3 = tail call i32 @tpi_write(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: ./comm_test <message passing> <number of samples>\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"Usage: ./comm_test <message passing> <number of samples>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"Usage: ./comm_test <message passing> <number of samples>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret void
}
int strlen(const char *s) {
  int d0;
  register int __res;
  __asm__ __volatile__("repne\n\t"
                       "scasb\n\t"
                       "notl %0\n\t"
                       "decl %0"
                       : "=c"(__res), "=&D"(d0)
                       : "1"(s), "a"(0), "0"(0xffffffffu));
  return __res;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    $0xffffffff,%ecx
repnz scas %es:(%rdi),%al
not    %ecx
dec    %ecx
mov    %ecx,-0x10(%rbp)
mov    %edi,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
xor    %eax,%eax
mov    $0xffffffff,%ecx
repnz scas %es:(%rdi),%al
not    %ecx
dec    %ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call { i32, i8* } asm sideeffect "repne\0A\09scasb\0A\09notl $0\0A\09decl $0", "={cx},=&{di},1,{ax},0,~{dirflag},~{fpsr},~{flags}"(i8* %5, i32 0, i32 -1)
%7 = extractvalue { i32, i8* } %6, 0
%8 = extractvalue { i32, i8* } %6, 1
store i32 %7, i32* %4
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
store i32 %10, i32* %3
%11 = load i32, i32* %4
ret i32 %11
}

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
%2 = tail call { i32, i8* } asm sideeffect "repne\0A\09scasb\0A\09notl $0\0A\09decl $0", "={cx},=&{di},1,{ax},0,~{dirflag},~{fpsr},~{flags}"(i8* %0, i32 0, i32 -1)
%3 = extractvalue { i32, i8* } %2, 0
ret i32 %3
}
int infinity() {
  int sk;
  sk = 0;
  while (1) {
    sk = sk + 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<infinity>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
jmp    110b <infinity+0xb>

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

LLVM IR (-O0):
define i32 @infinity() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
br label %2
}

LLVM IR (-O2):
define i32 @infinity() {
br label %1
1: ; preds = %1, %0
br label %1
}
void EVP_CIPHER_CTX_nid(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_nid() {
ret void
}
void setup_out_buffer(void) {}


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

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

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

LLVM IR (-O2):
define void @setup_out_buffer() {
ret void
}
void gtk_text_tag_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_tag_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_valid() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_valid"
         "\n");
}


x86 assembly (clang, -O0):
<pa_format_info_valid>:
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_format_info_valid>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

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

/* Variables and functions */
int S_IXOTH;
scalar_t__ stat(char const *, struct stat *);
int fsop_path_exec_other(const char *path) {
  struct stat st;
  if (stat(path, &st) < 0)
    return -1;
  return (st.st_mode & S_IXOTH);
}


x86 assembly (clang, -O0):
<fsop_path_exec_other>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jge    113f <fsop_path_exec_other+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <fsop_path_exec_other+0x3e>
mov    -0x18(%rbp),%eax
mov    0x2e9f(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsop_path_exec_other>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    0x2ec8(%rip),%rcx
mov    (%rcx),%ecx
and    (%rsp),%ecx
test   %rax,%rax
mov    $0xffffffff,%eax
cmovns %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IXOTH = global i32 0
define i32 @fsop_path_exec_other(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* @S_IXOTH
%9 = and i32 %8, %7
%10 = select i1 %5, i32 -1, i32 %9
ret i32 %10
}
/* Type definitions */
struct ebpt_node {
  int dummy;
};
struct eb_root {
  int dummy;
};

/* Variables and functions */
struct ebpt_node *__ebis_lookup(struct eb_root *, char const *);
struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x) {
  return __ebis_lookup(root, x);
}


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

x86 assembly (clang, -O2):
<ebis_lookup>:
jmp    1030 <__ebis_lookup@plt>

LLVM IR (-O0):
%struct.ebpt_node = type { i32 }
%struct.eb_root = type { i32 }
define %struct.ebpt_node* @ebis_lookup(%struct.eb_root* %0, i8* %1) {
%3 = alloca %struct.eb_root*
%4 = alloca i8*
store %struct.eb_root* %0, %struct.eb_root** %3
store i8* %1, i8** %4
%5 = load %struct.eb_root*, %struct.eb_root** %3
%6 = load i8*, i8** %4
%7 = call %struct.ebpt_node* @__ebis_lookup(%struct.eb_root* %5, i8* %6)
ret %struct.ebpt_node* %7
}

LLVM IR (-O2):
%struct.ebpt_node = type { i32 }
%struct.eb_root = type { i32 }
define %struct.ebpt_node* @ebis_lookup(%struct.eb_root* %0, i8* %1) {
%3 = tail call %struct.ebpt_node* @__ebis_lookup(%struct.eb_root* %0, i8* %1)
ret %struct.ebpt_node* %3
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ hashlittle2(unsigned char *, unsigned int, int *, int *);
unsigned long hashbytes(unsigned char bs[], unsigned int n) {
  uint32_t l0 = 1000420526;
  uint32_t l1 = 598948860;
  hashlittle2(bs, n, &l0, &l1);
  uint64_t top = l1;
  top <<= 32;
  return top | l0;
}


x86 assembly (clang, -O0):
<hashbytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x3ba134ae,-0x10(%rbp)
movl   $0x23b33bfc,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
call   1030 <hashlittle2@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
or     -0x10(%rbp),%eax
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashbytes>:
push   %rax
movl   $0x3ba134ae,0x4(%rsp)
3b
movl   $0x23b33bfc,(%rsp)
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
call   1030 <hashlittle2@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @hashbytes(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 1000420526, i32* %5
store i32 598948860, i32* %6
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = call i32 @hashlittle2(i8* %8, i32 %9, i32* %5, i32* %6)
%11 = load i32, i32* %6
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = shl i32 %12, 32
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = load i32, i32* %5
%16 = or i32 %14, %15
%17 = sext i32 %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @hashbytes(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 1000420526, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 598948860, i32* %4
%7 = call i32 @hashlittle2(i8* %0, i32 %1, i32* %3, i32* %4)
ret i64 poison
}
void GETOSFILE(osfile, len) char *osfile;
int *len;
{
  char *bufp;
  int l;
  bufp = getenv("OSMAP");
  if (bufp) {
    strcpy(osfile, bufp);
    l = strlen(bufp);
  } else {
    l = 0;
  }
  *len = l;
}


x86 assembly (clang, -O0):
<GETOSFILE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <getenv@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     117d <GETOSFILE+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x1c(%rbp)
jmp    1184 <GETOSFILE+0x54>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GETOSFILE>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xebe(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <getenv@plt>
test   %eax,%eax
je     1168 <GETOSFILE+0x38>
movslq %eax,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %rax,%rbx
mov    %ebx,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"OSMAP\00"
define void @GETOSFILE(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @getenv to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %19
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8*, i8** %5
%15 = call i8* @strcpy(i8* %13, i8* %14)
%16 = load i8*, i8** %5
%17 = call i64 @strlen(i8* %16)
%18 = trunc i64 %17 to i32
store i32 %18, i32* %6
br label %20
19: ; preds = %2
store i32 0, i32* %6
br label %20
20: ; preds = %19, %12
%21 = load i32, i32* %6
%22 = load i32*, i32** %4
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"OSMAP\00"
define void @GETOSFILE(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @getenv to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i32 %3, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* %5)
%9 = tail call i64 @strlen(i8* %5)
%10 = trunc i64 %9 to i32
br label %11
11: ; preds = %2, %7
%12 = phi i32 [ %10, %7 ], [ 0, %2 ]
store i32 %12, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rtps_ser_disco(void) { printf("rtps serial disco\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"rtps serial disco\0A\00"
define void @rtps_ser_disco() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"rtps serial disco\00"
define void @rtps_ser_disco() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
int _is_identifier_char(char c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
         (c >= '0' && c <= '9') || c == '_';
}


x86 assembly (clang, -O0):
<_is_identifier_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1129 <_is_identifier_char+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <_is_identifier_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1148 <_is_identifier_char+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <_is_identifier_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1167 <_is_identifier_char+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <_is_identifier_char+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_identifier_char>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
lea    -0x30(%rdi),%ecx
cmp    $0xa,%cl
setb   %cl
cmp    $0x5f,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @_is_identifier_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %30, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 90
br i1 %17, label %30, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 48
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %30, label %26
26: ; preds = %22, %18
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 95
br label %30
30: ; preds = %26, %22, %14, %6
%31 = phi i1 [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @_is_identifier_char(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = icmp eq i8 %0, 95
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ setDebuggingLevel(int);
int /*<<< orphan*/ testInserts();
int /*<<< orphan*/ testListCreation();
int /*<<< orphan*/ testListFind();
int /*<<< orphan*/ testRemoval();
int main(int argc, char *argv[]) {
  setDebuggingLevel(2);
  testListCreation();
  testInserts();
  testListFind();
  testRemoval();
  return 0;
}


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    $0x2,%edi
call   1050 <setDebuggingLevel@plt>
mov    $0x0,%al
call   1070 <testListCreation@plt>
mov    $0x0,%al
call   1060 <testInserts@plt>
mov    $0x0,%al
call   1040 <testListFind@plt>
mov    $0x0,%al
call   1030 <testRemoval@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1050 <setDebuggingLevel@plt>
xor    %eax,%eax
call   1070 <testListCreation@plt>
xor    %eax,%eax
call   1060 <testInserts@plt>
xor    %eax,%eax
call   1040 <testListFind@plt>
xor    %eax,%eax
call   1030 <testRemoval@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = call i32 @setDebuggingLevel(i32 2)
%7 = call i32 (...) @testListCreation()
%8 = call i32 (...) @testInserts()
%9 = call i32 (...) @testListFind()
%10 = call i32 (...) @testRemoval()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setDebuggingLevel(i32 2)
%4 = tail call i32 (...) @testListCreation()
%5 = tail call i32 (...) @testInserts()
%6 = tail call i32 (...) @testListFind()
%7 = tail call i32 (...) @testRemoval()
ret i32 0
}
void Init_NextYear(unsigned char *pds) {
  if (pds[12]++ == 100) {
    pds[12] = 1;
    pds[24]++;
  }
}


x86 assembly (clang, -O0):
<Init_NextYear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    0xc(%rcx),%al
mov    %al,%dl
add    $0x1,%dl
mov    %dl,0xc(%rcx)
movzbl %al,%eax
cmp    $0x64,%eax
jne    1138 <Init_NextYear+0x38>
mov    -0x8(%rbp),%rax
movb   $0x1,0xc(%rax)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%cl
add    $0x1,%cl
mov    %cl,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init_NextYear>:
mov    0xc(%rdi),%al
lea    0x1(%rax),%ecx
mov    %cl,0xc(%rdi)
cmp    $0x64,%al
jne    1115 <Init_NextYear+0x15>
movb   $0x1,0xc(%rdi)
addb   $0x1,0x18(%rdi)
ret

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

LLVM IR (-O2):
define void @Init_NextYear(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 12
%3 = load i8, i8* %2
%4 = add i8 %3, 1
store i8 %4, i8* %2
%5 = icmp eq i8 %3, 100
br i1 %5, label %6, label %10
6: ; preds = %1
store i8 1, i8* %2
%7 = getelementptr inbounds i8, i8* %0, i64 24
%8 = load i8, i8* %7
%9 = add i8 %8, 1
store i8 %9, i8* %7
br label %10
10: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_zi_defaults(double *);
void umf4zdef_(double Control[20]) { umfpack_zi_defaults(Control); }


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

x86 assembly (clang, -O2):
<umf4zdef_>:
jmp    1030 <umfpack_zi_defaults@plt>

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

LLVM IR (-O2):
define void @umf4zdef_(double* %0) {
%2 = tail call i32 @umfpack_zi_defaults(double* %0)
ret void
}
void stop(void) { __asm__ volatile("int $0x20"); }


x86 assembly (clang, -O0):
<stop>:
push   %rbp
mov    %rsp,%rbp
int    $0x20
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop>:
int    $0x20
ret

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

LLVM IR (-O2):
define void @stop() {
tail call void asm sideeffect "int $$0x20", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void f1(int *xp, int *yp) {
  *xp = *xp + *yp;
  *xp = *xp + *yp;
}


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

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

LLVM IR (-O0):
define void @f1(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 = add nsw i32 %6, %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add nsw i32 %12, %14
%16 = load i32*, i32** %3
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @f1(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, %5
store i32 %7, i32* %0
ret void
}
void gtk_file_filter_add_pixbuf_formats() {}


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

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

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

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