xunge/DecIR huggingface dataset:
/* Type definitions */
struct termios {
  int c_ispeed;
  int c_ospeed;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print_baudrate_raw(const struct termios *tmios) {
  printf("input %d, output %d\n", tmios->c_ispeed, tmios->c_ospeed);
}


x86 assembly (clang, -O0):
<print_baudrate_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_baudrate_raw>:
mov    (%rdi),%esi
mov    0x4(%rdi),%edx
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
%struct.termios = type { i32, i32 }
@.str = [21 x i8] c"input %d, output %d\0A\00"
define void @print_baudrate_raw(%struct.termios* nocapture %0) {
%2 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 1
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_u32x4_murmur32v_data(int /*<<< orphan*/ const *, size_t,
                                             uintptr_t, int /*<<< orphan*/ *);
void rgph_u32x4_murmur32v_u8a(const uint8_t *key, size_t len, uintptr_t seed,
                              uint32_t *h) {
  rgph_u32x4_murmur32v_data(key, len, seed, h);
}


x86 assembly (clang, -O0):
<rgph_u32x4_murmur32v_u8a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <rgph_u32x4_murmur32v_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32x4_murmur32v_u8a>:
jmp    1030 <rgph_u32x4_murmur32v_data@plt>

LLVM IR (-O0):
define void @rgph_u32x4_murmur32v_u8a(i32* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i32* %0, i32** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i32 @rgph_u32x4_murmur32v_data(i32* %9, i64 %10, i64 %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @rgph_u32x4_murmur32v_u8a(i32* %0, i64 %1, i64 %2, i32* %3) {
%5 = tail call i32 @rgph_u32x4_murmur32v_data(i32* %0, i64 %1, i64 %2, i32* %3)
ret void
}
int sort(void const *a, void const *b) {
  return *(int const *)a - *(int const *)b;
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @sort(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef char uint16_t;

/* Variables and functions */
char *pd9p_dec2(char *buf, uint16_t *val) {
  *val = buf[0];
  *val += buf[1] << 8;
  return buf + 2;
}


x86 assembly (clang, -O0):
<pd9p_dec2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
add    %edx,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pd9p_dec2>:
mov    (%rdi),%al
mov    %al,(%rsi)
lea    0x2(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @pd9p_dec2(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
store i8 %7, i8* %8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = add nsw i32 %16, %13
%18 = trunc i32 %17 to i8
store i8 %18, i8* %14
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i64 2
ret i8* %20
}

LLVM IR (-O2):
define i8* @pd9p_dec2(i8* %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
%4 = getelementptr inbounds i8, i8* %0, i64 2
ret i8* %4
}
int g(int a, int b, int c, int d) { return a + b + c + d; }


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @g(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %8
%15 = add nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @g(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = add nsw i32 %1, %0
%6 = add nsw i32 %5, %2
%7 = add nsw i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fE() { printf("I am fE, i was added after them!"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"I am fE, i was added after them!\00"
define void @fE() {
%1 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"I am fE, i was added after them!\00"
define void @fE() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
char *set_bool(int value) { return ((value) ? "true" : "false"); }


x86 assembly (clang, -O0):
<set_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef4(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bool>:
test   %edi,%edi
lea    0xefc(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @set_bool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @set_bool(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
void fun_c_v() {}


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

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

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

LLVM IR (-O2):
define void @fun_c_v() {
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
long do_rand(unsigned long *ctx) {
  return ((*ctx = *ctx * 1103515245UL + 12345UL) %
          ((unsigned long)RAND_MAX + 1));
}


x86 assembly (clang, -O0):
<do_rand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x41c64e6d,(%rax),%rax
add    $0x3039,%rax
mov    -0x8(%rbp),%rcx
mov    %rax,(%rcx)
mov    0x2ec1(%rip),%rcx
mov    (%rcx),%rcx
add    $0x1,%rcx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_rand>:
imul   $0x41c64e6d,(%rdi),%rax
add    $0x3039,%rax
mov    %rax,(%rdi)
mov    0x2ed1(%rip),%rcx
mov    (%rcx),%rcx
add    $0x1,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     1133 <do_rand+0x33>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i64 @do_rand(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = mul i64 %4, 1103515245
%6 = add i64 %5, 12345
%7 = load i64*, i64** %2
store i64 %6, i64* %7
%8 = load i64, i64* @RAND_MAX
%9 = add i64 %8, 1
%10 = urem i64 %6, %9
ret i64 %10
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i64 @do_rand(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = mul i64 %2, 1103515245
%4 = add i64 %3, 12345
store i64 %4, i64* %0
%5 = load i64, i64* @RAND_MAX
%6 = add i64 %5, 1
%7 = urem i64 %4, %6
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint64_t;

/* Variables and functions */
uint64_t get_64(const uint64_t *p) { return *p; }


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

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

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

LLVM IR (-O2):
define i32 @get_64(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
int get_map_width() { return 67; }


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

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

LLVM IR (-O0):
define i32 @get_map_width() {
ret i32 67
}

LLVM IR (-O2):
define i32 @get_map_width() {
ret i32 67
}
/* Variables and functions */
int meson_test_main_foo();
int meson_test_subproj_foo();
int /*<<< orphan*/ printf(char *);
int main(void) {
  if (meson_test_main_foo() != 10) {
    printf("Failed meson_test_main_foo\n");
    return 1;
  }
  if (meson_test_subproj_foo() != 20) {
    printf("Failed meson_test_subproj_foo\n");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <meson_test_main_foo@plt>
cmp    $0xa,%eax
je     1167 <main+0x37>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1196 <main+0x66>
mov    $0x0,%al
call   1040 <meson_test_subproj_foo@plt>
cmp    $0x14,%eax
je     118f <main+0x5f>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1196 <main+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <meson_test_main_foo@plt>
cmp    $0xa,%eax
jne    1154 <main+0x24>
xor    %eax,%eax
call   1040 <meson_test_subproj_foo@plt>
cmp    $0x14,%eax
je     1165 <main+0x35>
lea    0xeae(%rip),%rdi
jmp    115b <main+0x2b>
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Failed meson_test_main_foo\0A\00"
@.str.1 = [31 x i8] c"Failed meson_test_subproj_foo\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @meson_test_main_foo()
%3 = icmp ne i32 %2, 10
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %12
6: ; preds = %0
%7 = call i32 (...) @meson_test_subproj_foo()
%8 = icmp ne i32 %7, 20
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %1
br label %12
11: ; preds = %6
store i32 0, i32* %1
br label %12
12: ; preds = %11, %9, %4
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@str = [30 x i8] c"Failed meson_test_subproj_foo\00"
@str.2 = [27 x i8] c"Failed meson_test_main_foo\00"
define i32 @main() {
%1 = tail call i32 (...) @meson_test_main_foo()
%2 = icmp eq i32 %1, 10
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @meson_test_subproj_foo()
%5 = icmp eq i32 %4, 20
br i1 %5, label %9, label %6
6: ; preds = %3, %0
%7 = phi i8* [ getelementptr inbounds ([27 x i8], [27 x i8]* @str.2, i64 0, i64 0), %0 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0), %3 ]
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
br label %9
9: ; preds = %6, %3
%10 = phi i32 [ 0, %3 ], [ 1, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Page_DenyAccess(void *, size_t);
void Page_Delete(void *address, size_t size) { Page_DenyAccess(address, size); }


x86 assembly (clang, -O0):
<Page_Delete>:
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 <Page_DenyAccess@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Page_Delete>:
jmp    1030 <Page_DenyAccess@plt>

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

LLVM IR (-O2):
define void @Page_Delete(i8* %0, i64 %1) {
%3 = tail call i32 @Page_DenyAccess(i8* %0, i64 %1)
ret void
}
int fun461() { return 461; }


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

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

LLVM IR (-O0):
define i32 @fun461() {
ret i32 461
}

LLVM IR (-O2):
define i32 @fun461() {
ret i32 461
}
/* Variables and functions */
int /*<<< orphan*/ deallocateFileStreamTable();
int /*<<< orphan*/ deallocateMethodLookupCache();
int /*<<< orphan*/ deallocateObjectMemory();
void deallocateAll() {
  deallocateObjectMemory();
  deallocateMethodLookupCache();
  deallocateFileStreamTable();
}


x86 assembly (clang, -O0):
<deallocateAll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <deallocateObjectMemory@plt>
mov    $0x0,%al
call   1030 <deallocateMethodLookupCache@plt>
mov    $0x0,%al
call   1050 <deallocateFileStreamTable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<deallocateAll>:
push   %rax
xor    %eax,%eax
call   1040 <deallocateObjectMemory@plt>
xor    %eax,%eax
call   1030 <deallocateMethodLookupCache@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <deallocateFileStreamTable@plt>

LLVM IR (-O0):
define void @deallocateAll() {
%1 = call i32 (...) @deallocateObjectMemory()
%2 = call i32 (...) @deallocateMethodLookupCache()
%3 = call i32 (...) @deallocateFileStreamTable()
ret void
}

LLVM IR (-O2):
define void @deallocateAll() {
%1 = tail call i32 (...) @deallocateObjectMemory()
%2 = tail call i32 (...) @deallocateMethodLookupCache()
%3 = tail call i32 (...) @deallocateFileStreamTable()
ret void
}
int numero(char c) {
  switch (c) {
  case '0':
    return 0;
    break;
  case '1':
    return 1;
    break;
  case '2':
    return 2;
    break;
  case '3':
    return 3;
    break;
  case '4':
    return 4;
    break;
  case '5':
    return 5;
    break;
  case '6':
    return 6;
    break;
  case '7':
    return 7;
    break;
  case '8':
    return 8;
    break;
  case '9':
    return 9;
    break;
  default:
    return -1;
    break;
  }
}


x86 assembly (clang, -O0):
<numero>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     11ac <numero+0xac>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x1,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x2,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x3,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x4,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x5,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x6,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x7,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x8,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0x9,-0x4(%rbp)
jmp    11b3 <numero+0xb3>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numero>:
lea    -0x30(%rdi),%ecx
cmp    $0xa,%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @numero(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %16 [
i32 48, label %6
i32 49, label %7
i32 50, label %8
i32 51, label %9
i32 52, label %10
i32 53, label %11
i32 54, label %12
i32 55, label %13
i32 56, label %14
i32 57, label %15
]
6: ; preds = %1
store i32 0, i32* %2
br label %17
7: ; preds = %1
store i32 1, i32* %2
br label %17
8: ; preds = %1
store i32 2, i32* %2
br label %17
9: ; preds = %1
store i32 3, i32* %2
br label %17
10: ; preds = %1
store i32 4, i32* %2
br label %17
11: ; preds = %1
store i32 5, i32* %2
br label %17
12: ; preds = %1
store i32 6, i32* %2
br label %17
13: ; preds = %1
store i32 7, i32* %2
br label %17
14: ; preds = %1
store i32 8, i32* %2
br label %17
15: ; preds = %1
store i32 9, i32* %2
br label %17
16: ; preds = %1
store i32 -1, i32* %2
br label %17
17: ; preds = %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @numero(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = select i1 %4, i32 %3, i32 -1
ret i32 %5
}
int bcmp(b1, b2, n)
register char *b1, *b2;
register int n;
{
  register int i;
  while (n--) {
    if (i = *b2++ - *b1++)
      return i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<bcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1165 <bcmp+0x65>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
je     1160 <bcmp+0x60>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116c <bcmp+0x6c>
jmp    110f <bcmp+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcmp>:
mov    %edx,%r8d
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
cmp    %edx,%r8d
je     1126 <bcmp+0x26>
movsbl (%rsi,%rdx,1),%eax
movsbl (%rdi,%rdx,1),%ecx
add    $0x1,%rdx
sub    %ecx,%eax
je     1110 <bcmp+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bcmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
br label %4
4: ; preds = %9, %3
%5 = phi i8* [ %0, %3 ], [ %14, %9 ]
%6 = phi i8* [ %1, %3 ], [ %11, %9 ]
%7 = phi i32 [ %2, %3 ], [ %10, %9 ]
%8 = icmp eq i32 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %4
%10 = add nsw i32 %7, -1
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %6
%13 = sext i8 %12 to i32
%14 = getelementptr inbounds i8, i8* %5, i64 1
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = sub nsw i32 %13, %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %4, label %19
19: ; preds = %4, %9
%20 = phi i32 [ %17, %9 ], [ 0, %4 ]
ret i32 %20
}
void buf_endl(void *ctx) { *(*((char **)ctx))++ = '\n'; }


x86 assembly (clang, -O0):
<buf_endl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movb   $0xa,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_endl>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
movb   $0xa,(%rax)
ret

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

LLVM IR (-O2):
define void @buf_endl(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %4, i8** %2
store i8 10, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int recurse(int val) {
  printf("%i\n", val);
  if (val) {
    return recurse(val - 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<recurse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     1157 <recurse+0x37>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <recurse@plt>
mov    %eax,-0x4(%rbp)
jmp    115e <recurse+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xee3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
test   %ebx,%ebx
je     114f <recurse+0x3f>
add    $0xffffffff,%ebx
lea    0xece(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jb     1140 <recurse+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @recurse(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp eq i32 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %6, %4 ], [ %0, %1 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp eq i32 %6, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret i32 0
}
R0RX1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if (r0 <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<R0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x28(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     1138 <R0RX1+0x38>
movl   $0x1,-0x4(%rbp)
jmp    113f <R0RX1+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<R0RX1>:
movslq %ecx,%rcx
xor    %eax,%eax
cmp    %edi,(%r9,%rcx,4)
setge  %al
ret

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

LLVM IR (-O2):
define i32 @R0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
%10 = icmp sge i32 %9, %0
%11 = zext i1 %10 to i32
ret i32 %11
}
int gmod(int x, int m) {
  int r = x % m;
  return r < 0 ? r + m : r;
}


x86 assembly (clang, -O0):
<gmod>:
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 <gmod+0x2c>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <gmod+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @gmod(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 @gmod(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 xrandom(int);
int probability(int prob) {
  if (prob <= 0)
    return 0;
  if (prob >= 100)
    return 1;
  return (xrandom(100) < prob);
}


x86 assembly (clang, -O0):
<probability>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1131 <probability+0x21>
movl   $0x0,-0x4(%rbp)
jmp    115f <probability+0x4f>
cmpl   $0x64,-0x8(%rbp)
jl     1147 <probability+0x37>
movl   $0x1,-0x4(%rbp)
jmp    115f <probability+0x4f>
mov    $0x64,%edi
call   1030 <xrandom@plt>
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<probability>:
push   %rbx
test   %edi,%edi
jle    1136 <probability+0x26>
mov    %edi,%ebx
mov    $0x1,%eax
cmp    $0x63,%edi
ja     1134 <probability+0x24>
mov    $0x64,%edi
call   1030 <xrandom@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
setl   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @probability(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 100
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %16
11: ; preds = %7
%12 = call i32 @xrandom(i32 100)
%13 = load i32, i32* %3
%14 = icmp slt i32 %12, %13
%15 = zext i1 %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %10, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @probability(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = icmp ugt i32 %0, 99
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = tail call i32 @xrandom(i32 100)
%7 = icmp slt i32 %6, %0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %3, %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ], [ 1, %3 ]
ret i32 %10
}
int activation(double u) {
  if (u >= 1.0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<activation>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     112c <activation+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1133 <activation+0x33>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<activation>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @activation(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oge double %4, 1.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @activation(double %0) {
%2 = fcmp oge double %0, 1.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ UI_PopMenu();
void UI_BotSelectMenu_BackEvent(void *ptr, int event) {
  if (event != 3) {
    return;
  }
  UI_PopMenu();
}


x86 assembly (clang, -O0):
<UI_BotSelectMenu_BackEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
je     112e <UI_BotSelectMenu_BackEvent+0x1e>
jmp    1135 <UI_BotSelectMenu_BackEvent+0x25>
mov    $0x0,%al
call   1030 <UI_PopMenu@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_BotSelectMenu_BackEvent>:
cmp    $0x3,%esi
jne    111c <UI_BotSelectMenu_BackEvent+0xc>
xor    %eax,%eax
jmp    1030 <UI_PopMenu@plt>
ret

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

LLVM IR (-O2):
define void @UI_BotSelectMenu_BackEvent(i8* nocapture readnone %0, i32 %1) {
%3 = icmp eq i32 %1, 3
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @UI_PopMenu()
br label %6
6: ; preds = %2, %4
ret void
}
void gtk_text_view_get_pixels_inside_wrap() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_get_pixels_inside_wrap() {
ret void
}
/* Type definitions */
struct tl_scheme_object {
  int dummy;
};
struct tl_int_array {
  int dummy;
};
struct tl_compiler {
  int dummy;
};

/* Variables and functions */
int tl_expression_serialize_general(struct tl_compiler *,
                                    struct tl_scheme_object *, int,
                                    int /*<<< orphan*/ *,
                                    struct tl_int_array *);
int tl_expression_serialize(struct tl_compiler *C, struct tl_scheme_object *E,
                            struct tl_int_array *a) {
  return tl_expression_serialize_general(C, E, 1, NULL, a);
}


x86 assembly (clang, -O0):
<tl_expression_serialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%r8
mov    $0x1,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <tl_expression_serialize_general@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tl_expression_serialize>:
mov    %rdx,%r8
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    1030 <tl_expression_serialize_general@plt>

LLVM IR (-O0):
%struct.tl_compiler = type { i32 }
%struct.tl_scheme_object = type { i32 }
%struct.tl_int_array = type { i32 }
define i32 @tl_expression_serialize(%struct.tl_compiler* %0, %struct.tl_scheme_object* %1, %struct.tl_int_array* %2) {
%4 = alloca %struct.tl_compiler*
%5 = alloca %struct.tl_scheme_object*
%6 = alloca %struct.tl_int_array*
store %struct.tl_compiler* %0, %struct.tl_compiler** %4
store %struct.tl_scheme_object* %1, %struct.tl_scheme_object** %5
store %struct.tl_int_array* %2, %struct.tl_int_array** %6
%7 = load %struct.tl_compiler*, %struct.tl_compiler** %4
%8 = load %struct.tl_scheme_object*, %struct.tl_scheme_object** %5
%9 = load %struct.tl_int_array*, %struct.tl_int_array** %6
%10 = call i32 @tl_expression_serialize_general(%struct.tl_compiler* %7, %struct.tl_scheme_object* %8, i32 1, i32* null, %struct.tl_int_array* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.tl_compiler = type { i32 }
%struct.tl_scheme_object = type { i32 }
%struct.tl_int_array = type { i32 }
define i32 @tl_expression_serialize(%struct.tl_compiler* %0, %struct.tl_scheme_object* %1, %struct.tl_int_array* %2) {
%4 = tail call i32 @tl_expression_serialize_general(%struct.tl_compiler* %0, %struct.tl_scheme_object* %1, i32 1, i32* null, %struct.tl_int_array* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pclog(char *);
void iso_pause(void) {
  pclog("iso_pause stub\n");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"iso_pause stub\0A\00"
define void @iso_pause() {
%1 = tail call i32 @pclog(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_17int8_reg(signed char val) {
  return ((val) & (-0x17 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_17int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffe9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_17int8_reg>:
test   $0xe9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_17int8_reg(i8 signext %0) {
%2 = and i8 %0, -23
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int EOF;
int kputchar_null(int ch) { return EOF; }


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

x86 assembly (clang, -O2):
<kputchar_null>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @kputchar_null(i32 %0) {
%2 = load i32, i32* @EOF
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ a1(int);
int /*<<< orphan*/ a2(int, char);
int /*<<< orphan*/ a3();
int f(int arg1, char arg2) {
  a1(arg1);
  a2(arg1, arg2);
  a3();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <a1@plt>
mov    -0x8(%rbp),%edi
movsbl -0x9(%rbp),%esi
call   1050 <a2@plt>
mov    $0x0,%al
call   1040 <a3@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <a1@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <a2@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <a3@plt>

LLVM IR (-O0):
define i32 @f(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %4
store i8 %1, i8* %5
%6 = load i32, i32* %4
%7 = call i32 @a1(i32 %6)
%8 = load i32, i32* %4
%9 = load i8, i8* %5
%10 = call i32 @a2(i32 %8, i8 signext %9)
%11 = call i32 (...) @a3()
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @f(i32 %0, i8 signext %1) {
%3 = tail call i32 @a1(i32 %0)
%4 = tail call i32 @a2(i32 %0, i8 signext %1)
%5 = tail call i32 (...) @a3()
ret i32 undef
}
int bwn_is_bus_siba(struct bwn_mac *mac) { return 1; }


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

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

LLVM IR (-O0):
%struct.bwn_mac = type opaque
define i32 @bwn_is_bus_siba(%struct.bwn_mac* %0) {
%2 = alloca %struct.bwn_mac*
store %struct.bwn_mac* %0, %struct.bwn_mac** %2
ret i32 1
}

LLVM IR (-O2):
%struct.bwn_mac = type opaque
define i32 @bwn_is_bus_siba(%struct.bwn_mac* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ getbits(int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint32_t pak_get_bits_uint32(uint32_t value, uint8_t position,
                             uint8_t no_bits) {
  uint32_t i32;
  i32 = ntohl(value);
  return getbits(i32, position, no_bits);
}


x86 assembly (clang, -O0):
<pak_get_bits_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <getbits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pak_get_bits_uint32>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1040 <ntohl@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <getbits@plt>

LLVM IR (-O0):
define i32 @pak_get_bits_uint32(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @ntohl(i32 %8)
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @getbits(i32 %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @pak_get_bits_uint32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @ntohl(i32 %0)
%5 = tail call i32 @getbits(i32 %4, i32 %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void EPIIntDisable(unsigned long ulBase, unsigned long ulIntFlags) {
  DEBUG_ASSERT(ulBase == 0x400D0000);
  DEBUG_ASSERT(ulIntFlags < 16);
  (*((volatile unsigned long *)(ulBase + 0x00000210))) &= ~ulIntFlags;
}


x86 assembly (clang, -O0):
<EPIIntDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x400d0000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x10,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x210(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x210(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EPIIntDisable>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x400d0000,%r14
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x10,%rbx
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
not    %rbx
and    %rbx,0x210(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @EPIIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1074593792
%7 = zext i1 %6 to i32
%8 = call i32 @DEBUG_ASSERT(i32 %7)
%9 = load i64, i64* %4
%10 = icmp ult i64 %9, 16
%11 = zext i1 %10 to i32
%12 = call i32 @DEBUG_ASSERT(i32 %11)
%13 = load i64, i64* %4
%14 = xor i64 %13, -1
%15 = load i64, i64* %3
%16 = add i64 %15, 528
%17 = inttoptr i64 %16 to i64*
%18 = load volatile i64, i64* %17
%19 = and i64 %18, %14
store volatile i64 %19, i64* %17
ret void
}

LLVM IR (-O2):
define void @EPIIntDisable(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 1074593792
%4 = zext i1 %3 to i32
%5 = tail call i32 @DEBUG_ASSERT(i32 %4)
%6 = icmp ult i64 %1, 16
%7 = zext i1 %6 to i32
%8 = tail call i32 @DEBUG_ASSERT(i32 %7)
%9 = xor i64 %1, -1
%10 = add i64 %0, 528
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = and i64 %12, %9
store volatile i64 %13, i64* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_free_ex_index(int /*<<< orphan*/, int);
int /*<<< orphan*/ ERR_clear_error();
int /*<<< orphan*/ OPENSSL_INIT_LOAD_CRYPTO_STRINGS;
int /*<<< orphan*/ OPENSSL_init_crypto(int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
int FuzzerInitialize(int *argc, char ***argv) {
  OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  CRYPTO_free_ex_index(0, -1);
  ERR_clear_error();
  return 1;
}


x86 assembly (clang, -O0):
<FuzzerInitialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <OPENSSL_init_crypto@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1050 <CRYPTO_free_ex_index@plt>
mov    $0x0,%al
call   1030 <ERR_clear_error@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FuzzerInitialize>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <OPENSSL_init_crypto@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1050 <CRYPTO_free_ex_index@plt>
xor    %eax,%eax
call   1030 <ERR_clear_error@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* %0, i8*** %1) {
%3 = alloca i32*
%4 = alloca i8***
store i32* %0, i32** %3
store i8*** %1, i8**** %4
%5 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%6 = call i32 @OPENSSL_init_crypto(i32 %5, i32* null)
%7 = call i32 @CRYPTO_free_ex_index(i32 0, i32 -1)
%8 = call i32 (...) @ERR_clear_error()
ret i32 1
}

LLVM IR (-O2):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%4 = tail call i32 @OPENSSL_init_crypto(i32 %3, i32* null)
%5 = tail call i32 @CRYPTO_free_ex_index(i32 0, i32 -1)
%6 = tail call i32 (...) @ERR_clear_error()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "%s\n%s\n",
          "usage: ypwhich [-d domain] [[-t] -m [mname] | host]",
          "       ypwhich -x");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [52 x i8] c"usage: ypwhich [-d domain] [[-t] -m [mname] | host]\00"
@.str.2 = [18 x i8] c" ypwhich -x\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s\0A%s\0A\00"
@.str.1 = [52 x i8] c"usage: ypwhich [-d domain] [[-t] -m [mname] | host]\00"
@.str.2 = [18 x i8] c" ypwhich -x\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func2() { printf("This is second func, should be executed first.\n"); }


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"This is second func, should be executed first.\0A\00"
define void @func2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"This is second func, should be executed first.\00"
define void @func2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret void
}
void keep(void) {}


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

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

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

LLVM IR (-O2):
define void @keep() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void tre_free_pattern(wchar_t *wregex) { free(wregex); }


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

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

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

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