xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cgclear();
int /*<<< orphan*/ gen(char *);
void cgindb(void) {
  gen("movq\t%rax,%rdx");
  cgclear();
  gen("movb\t(%rdx),%al");
}


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

x86 assembly (clang, -O2):
<cgindb>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <gen@plt>
xor    %eax,%eax
call   1040 <cgclear@plt>
lea    0xed4(%rip),%rdi
pop    %rax
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"movq\09%rax,%rdx\00"
@.str.1 = [16 x i8] c"movb\09(%rdx),%al\00"
define void @cgindb() {
%1 = call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @cgclear()
%3 = call i32 @gen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"movq\09%rax,%rdx\00"
@.str.1 = [16 x i8] c"movb\09(%rdx),%al\00"
define void @cgindb() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @cgclear()
%3 = tail call i32 @gen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
int Strncpy(char *dest, const char *src, size_t n) {
  strncpy(dest, src, n);
  if (dest[n - 1] == '\0')
    return 0;
  dest[n - 1] = '\0';
  return -1;
}


x86 assembly (clang, -O0):
<Strncpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
jne    115a <Strncpy+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1171 <Strncpy+0x61>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strncpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <strncpy@plt>
cmpb   $0x0,-0x1(%r14,%rbx,1)
je     1134 <Strncpy+0x24>
movb   $0x0,-0x1(%rbx,%r14,1)
mov    $0xffffffff,%eax
jmp    1136 <Strncpy+0x26>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @Strncpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %2)
%5 = add i64 %2, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %3
store i8 0, i8* %6
br label %10
10: ; preds = %3, %9
%11 = phi i32 [ -1, %9 ], [ 0, %3 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/ *);
void write_byte(u_int8_t *b, FILE *f) { fwrite(b, 1, 1, f); }


x86 assembly (clang, -O0):
<write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_byte>:
movsbl (%rdi),%edi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @write_byte(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 @fwrite(i32* %5, i32 1, i32 1, i32* %6)
ret void
}

LLVM IR (-O2):
define void @write_byte(i32* nocapture %0, i32* nocapture %1) {
%3 = bitcast i32* %0 to i8*
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = tail call i32 @fputc(i32 %5, i32* %1)
ret void
}
void _int10_string10(int a0, int a1, int a2, int a3, int a4, const char *s0,
                     const char *s1, const char *s2, const char *s3,
                     const char *s4, int a5, int a6, int a7, int a8, int a9,
                     const char *s5, const char *s6, const char *s7,
                     const char *s8, const char *s9) {
  asm("nop");
}


x86 assembly (clang, -O0):
<_int10_string10>:
push   %rbp
mov    %rsp,%rbp
mov    0x78(%rbp),%rax
mov    0x70(%rbp),%rax
mov    0x68(%rbp),%rax
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%rax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9,-0x20(%rbp)
nop
pop    %rbp
ret

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

LLVM IR (-O0):
define void @_int10_string10(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* %5, i8* %6, i8* %7, i8* %8, i8* %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i8* %15, i8* %16, i8* %17, i8* %18, i8* %19) {
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i8*
%27 = alloca i8*
%28 = alloca i8*
%29 = alloca i8*
%30 = alloca i8*
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i8*
%37 = alloca i8*
%38 = alloca i8*
%39 = alloca i8*
%40 = alloca i8*
store i32 %0, i32* %21
store i32 %1, i32* %22
store i32 %2, i32* %23
store i32 %3, i32* %24
store i32 %4, i32* %25
store i8* %5, i8** %26
store i8* %6, i8** %27
store i8* %7, i8** %28
store i8* %8, i8** %29
store i8* %9, i8** %30
store i32 %10, i32* %31
store i32 %11, i32* %32
store i32 %12, i32* %33
store i32 %13, i32* %34
store i32 %14, i32* %35
store i8* %15, i8** %36
store i8* %16, i8** %37
store i8* %17, i8** %38
store i8* %18, i8** %39
store i8* %19, i8** %40
ret void
}

LLVM IR (-O2):
define void @_int10_string10(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i8* nocapture readnone %5, i8* nocapture readnone %6, i8* nocapture readnone %7, i8* nocapture readnone %8, i8* nocapture readnone %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i8* nocapture readnone %15, i8* nocapture readnone %16, i8* nocapture readnone %17, i8* nocapture readnone %18, i8* nocapture readnone %19) {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct b6_tref {
  int dummy;
};
struct b6_tree {
  int dummy;
};

/* Variables and functions */
struct b6_tref *b6_tree_del(struct b6_tree *, struct b6_tref *, int);
struct b6_tref *b6_tree_parent(struct b6_tref *, int *);
struct b6_tref *do_del(struct b6_tree *tree, struct b6_tref *tref) {
  int dir;
  struct b6_tref *top = b6_tree_parent(tref, &dir);
  return b6_tree_del(tree, top, dir);
}


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

x86 assembly (clang, -O2):
<do_del>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0xc(%rsp),%rsi
mov    %rax,%rdi
call   1040 <b6_tree_parent@plt>
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <b6_tree_del@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.b6_tree = type { i32 }
%struct.b6_tref = type { i32 }
define %struct.b6_tref* @do_del(%struct.b6_tree* %0, %struct.b6_tref* %1) {
%3 = alloca %struct.b6_tree*
%4 = alloca %struct.b6_tref*
%5 = alloca i32
%6 = alloca %struct.b6_tref*
store %struct.b6_tree* %0, %struct.b6_tree** %3
store %struct.b6_tref* %1, %struct.b6_tref** %4
%7 = load %struct.b6_tref*, %struct.b6_tref** %4
%8 = call %struct.b6_tref* @b6_tree_parent(%struct.b6_tref* %7, i32* %5)
store %struct.b6_tref* %8, %struct.b6_tref** %6
%9 = load %struct.b6_tree*, %struct.b6_tree** %3
%10 = load %struct.b6_tref*, %struct.b6_tref** %6
%11 = load i32, i32* %5
%12 = call %struct.b6_tref* @b6_tree_del(%struct.b6_tree* %9, %struct.b6_tref* %10, i32 %11)
ret %struct.b6_tref* %12
}

LLVM IR (-O2):
%struct.b6_tree = type { i32 }
%struct.b6_tref = type { i32 }
define %struct.b6_tref* @do_del(%struct.b6_tree* %0, %struct.b6_tref* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call %struct.b6_tref* @b6_tree_parent(%struct.b6_tref* %1, i32* %3)
%6 = load i32, i32* %3
%7 = call %struct.b6_tref* @b6_tree_del(%struct.b6_tree* %0, %struct.b6_tref* %5, i32 %6)
ret %struct.b6_tref* %7
}
/* Variables and functions */
void bzero(char *dst, int size) {
  int i;
  for (i = 0; i < size; i++)
    *dst++ = 0;
}


x86 assembly (clang, -O0):
<bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113e <bzero+0x3e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <bzero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bzero>:
test   %esi,%esi
jle    1122 <bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
float int_as_float(int val) {
  union {
    float f;
    int i;
  } u;
  u.i = val;
  return u.f;
}


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

x86 assembly (clang, -O2):
<int_as_float>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { float }
define float @int_as_float(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @int_as_float(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void clear_screen() {
  printf("\x1b["
         "2J");
  printf("\x1b["
         "1;1H");
  fflush(stdout);
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
@.str.1 = [7 x i8] c"\1B[1;1H\00"
@stdout = global i32 0
define void @clear_screen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xany;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xany_type(void *_p, int _v) {
  ((XEvent *)_p)->xany.type = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xany_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xany_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xany_type(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 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xany_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int main(int argc, char *argv[]) {
  int baud;
  int mode;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
double f(double, double);
double h(double a, double b) { return f(f(a, a), f(b, b)); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
call   1030 <f@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <f@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
call   1030 <f@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movaps %xmm0,%xmm1
call   1030 <f@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
movaps %xmm0,%xmm1
call   1030 <f@plt>
movaps %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
jmp    1030 <f@plt>

LLVM IR (-O0):
define double @h(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = call double @f(double %5, double %6)
%8 = load double, double* %4
%9 = load double, double* %4
%10 = call double @f(double %8, double %9)
%11 = call double @f(double %7, double %10)
ret double %11
}

LLVM IR (-O2):
define double @h(double %0, double %1) {
%3 = tail call double @f(double %0, double %0)
%4 = tail call double @f(double %1, double %1)
%5 = tail call double @f(double %3, double %4)
ret double %5
}
int is_stackable(const int symbology) {
  int retval = 0;
  if (symbology < 55) {
    retval = 1;
  }
  switch (symbology) {
  case 60:
  case 69:
  case 72:
  case 75:
  case 77:
  case 86:
  case 87:
  case 89:
  case 129:
  case 74:
    retval = 1;
  }
  return retval;
}


x86 assembly (clang, -O0):
<is_stackable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x37,-0x4(%rbp)
jge    111f <is_stackable+0x1f>
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffc4,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x45,%eax
ja     114f <is_stackable+0x4f>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_stackable>:
xor    %eax,%eax
cmp    $0x37,%edi
setl   %al
add    $0xffffffc4,%edi
cmp    $0x45,%edi
ja     1125 <is_stackable+0x25>
lea    0xee9(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @is_stackable(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 55
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %3
br label %7
7: ; preds = %6, %1
%8 = load i32, i32* %2
switch i32 %8, label %10 [
i32 60, label %9
i32 69, label %9
i32 72, label %9
i32 75, label %9
i32 77, label %9
i32 86, label %9
i32 87, label %9
i32 89, label %9
i32 129, label %9
i32 74, label %9
]
9: ; preds = %7, %7, %7, %7, %7, %7, %7, %7, %7, %7
store i32 1, i32* %3
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @is_stackable(i32 %0) {
%2 = icmp slt i32 %0, 55
%3 = zext i1 %2 to i32
switch i32 %0, label %5 [
i32 60, label %4
i32 69, label %4
i32 72, label %4
i32 75, label %4
i32 77, label %4
i32 86, label %4
i32 87, label %4
i32 89, label %4
i32 129, label %4
i32 74, label %4
]
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
br label %5
5: ; preds = %4, %1
%6 = phi i32 [ %3, %1 ], [ 1, %4 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int test_ais_11(void) {
  fprintf(stderr, "test_ais_11() failed: Not Written\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<test_ais_11>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"test_ais_11() failed: Not Written\0A\00"
define i32 @test_ais_11() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"test_ais_11() failed: Not Written\0A\00"
define i32 @test_ais_11() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printBetween(int, int, int);
int /*<<< orphan*/ printRange(int, int, int);
int /*<<< orphan*/ printSingle(int, int);
void test() {
  printRange(1, 20, false);
  printRange(1, 20, true);
  printBetween(6000, 6100, false);
  printBetween(6000, 6100, true);
  printSingle(10000, false);
  printSingle(10000, true);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x14,%esi
xor    %edx,%edx
call   1050 <printRange@plt>
mov    $0x1,%edx
mov    $0x14,%esi
mov    %edx,%edi
call   1050 <printRange@plt>
mov    $0x1770,%edi
mov    $0x17d4,%esi
xor    %edx,%edx
call   1030 <printBetween@plt>
mov    $0x1770,%edi
mov    $0x17d4,%esi
mov    $0x1,%edx
call   1030 <printBetween@plt>
mov    $0x2710,%edi
xor    %esi,%esi
call   1040 <printSingle@plt>
mov    $0x2710,%edi
mov    $0x1,%esi
call   1040 <printSingle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x1,%edi
mov    $0x14,%esi
xor    %edx,%edx
call   1050 <printRange@plt>
mov    $0x1,%edi
mov    $0x14,%esi
mov    $0x1,%edx
call   1050 <printRange@plt>
mov    $0x1770,%edi
mov    $0x17d4,%esi
xor    %edx,%edx
call   1030 <printBetween@plt>
mov    $0x1770,%edi
mov    $0x17d4,%esi
mov    $0x1,%edx
call   1030 <printBetween@plt>
mov    $0x2710,%edi
xor    %esi,%esi
call   1040 <printSingle@plt>
mov    $0x2710,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <printSingle@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 @printRange(i32 1, i32 20, i32 0)
%2 = call i32 @printRange(i32 1, i32 20, i32 1)
%3 = call i32 @printBetween(i32 6000, i32 6100, i32 0)
%4 = call i32 @printBetween(i32 6000, i32 6100, i32 1)
%5 = call i32 @printSingle(i32 10000, i32 0)
%6 = call i32 @printSingle(i32 10000, i32 1)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @printRange(i32 1, i32 20, i32 0)
%2 = tail call i32 @printRange(i32 1, i32 20, i32 1)
%3 = tail call i32 @printBetween(i32 6000, i32 6100, i32 0)
%4 = tail call i32 @printBetween(i32 6000, i32 6100, i32 1)
%5 = tail call i32 @printSingle(i32 10000, i32 0)
%6 = tail call i32 @printSingle(i32 10000, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_write_16(unsigned int data) {
  unsigned int bank_offset = 0x0C20;
  unsigned int bit_index = 0;
  exynos_5410_gpio_write_mask(bank_offset, ((data & 1U) << bit_index),
                              (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_write_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xc20,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
and    $0x1,%esi
mov    -0xc(%rbp),%ecx
shl    %cl,%esi
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_write_16>:
mov    %edi,%esi
and    $0x1,%esi
mov    $0xc20,%edi
mov    $0x1,%edx
jmp    1030 <exynos_5410_gpio_write_mask@plt>

LLVM IR (-O0):
define void @odroid_xu_gpio_write_16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 3104, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = and i32 %6, 1
%8 = load i32, i32* %4
%9 = shl i32 %7, %8
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = call i32 @exynos_5410_gpio_write_mask(i32 %5, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_write_16(i32 %0) {
%2 = and i32 %0, 1
%3 = tail call i32 @exynos_5410_gpio_write_mask(i32 3104, i32 %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
void print_usage(char *tool_name) {
  fprintf(stdout, "usage: %s -f <filename>\n", tool_name);
  fprintf(stdout, "(version: 1.0.1)\n");
  exit(1);
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed5(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [25 x i8] c"usage: %s -f <filename>\0A\00"
@.str.1 = [18 x i8] c"(version: 1.0.1)\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stdout
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [25 x i8] c"usage: %s -f <filename>\0A\00"
@.str.1 = [18 x i8] c"(version: 1.0.1)\0A\00"
define void @print_usage(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stdout
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
unsigned int f28(unsigned int x, int y __attribute__((unused))) {
  return (x >> 1) ^ (x << (8 * sizeof(unsigned int) - 1));
}


x86 assembly (clang, -O0):
<f28>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1f,%ecx
xor    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f28(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 = lshr i32 %5, 1
%7 = load i32, i32* %3
%8 = shl i32 %7, 31
%9 = xor i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f28(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 31)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ chtype;

/* Variables and functions */
int /*<<< orphan*/ OK;
int /*<<< orphan*/ bkgdset(int /*<<< orphan*/);
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_bkgdset(int nargs, char **args) {
  chtype *ch;
  if (check_arg_count(nargs, 1) == 1)
    return;
  ch = (chtype *)args[0];
  bkgdset(ch[0]);
  report_count(1);
  report_return(OK);
}


x86 assembly (clang, -O0):
<cmd_bkgdset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    116a <cmd_bkgdset+0x2a>
jmp    1198 <cmd_bkgdset+0x58>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
call   1040 <bkgdset@plt>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
call   1030 <report_return@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_bkgdset>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1155 <cmd_bkgdset+0x15>
pop    %rbx
ret
mov    (%rbx),%rax
mov    (%rax),%edi
call   1040 <bkgdset@plt>
mov    $0x1,%edi
call   1060 <report_count@plt>
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
pop    %rbx
jmp    1030 <report_return@plt>

LLVM IR (-O0):
@OK = global i32 0
define void @cmd_bkgdset(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = call i32 @check_arg_count(i32 %6, i32 1)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %2
br label %22
10: ; preds = %2
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 0
%17 = load i32, i32* %16
%18 = call i32 @bkgdset(i32 %17)
%19 = call i32 @report_count(i32 1)
%20 = load i32, i32* @OK
%21 = call i32 @report_return(i32 %20)
br label %22
22: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
@OK = global i32 0
define void @cmd_bkgdset(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = bitcast i8** %1 to i32**
%7 = load i32*, i32** %6
%8 = load i32, i32* %7
%9 = tail call i32 @bkgdset(i32 %8)
%10 = tail call i32 @report_count(i32 1)
%11 = load i32, i32* @OK
%12 = tail call i32 @report_return(i32 %11)
br label %13
13: ; preds = %2, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ le16toh(int /*<<< orphan*/);
int16_t ld_i16_le(const void *x) { return le16toh(((int16_t *)x)[0]); }


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

x86 assembly (clang, -O2):
<ld_i16_le>:
mov    (%rdi),%edi
jmp    1030 <le16toh@plt>

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

LLVM IR (-O2):
define i32 @ld_i16_le(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @le16toh(i32 %3)
ret i32 %4
}
void _Jv_JVMPI_Notify_THREAD_START(void) {}


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

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

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

LLVM IR (-O2):
define void @_Jv_JVMPI_Notify_THREAD_START() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int num = 5;
  float fnum = 5.5f;
  char a = 'a';
  char b = 'b';
  char c = 'c';
  printf("Hello world!\n");
  printf("int: %d \nfloat: %f \nChar1: '%c'; Char2: '%c'; Char3: '%c'.", num,
         fnum, a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movb   $0x61,-0xd(%rbp)
movb   $0x62,-0xe(%rbp)
movb   $0x63,-0xf(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsbl -0xd(%rbp),%edx
movsbl -0xe(%rbp),%ecx
movsbl -0xf(%rbp),%r8d
lea    0xea5(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
movsd  0xec4(%rip),%xmm0
mov    $0x5,%esi
mov    $0x61,%edx
mov    $0x62,%ecx
mov    $0x63,%r8d
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
@.str.1 = [59 x i8] c"int: %d \0Afloat: %f \0AChar1: '%c'; Char2: '%c'; Char3: '%c'.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i32 0, i32* %1
store i32 5, i32* %2
store float 5.500000e+00, float* %3
store i8 97, i8* %4
store i8 98, i8* %5
store i8 99, i8* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = load float, float* %3
%10 = fpext float %9 to double
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = load i8, i8* %5
%14 = sext i8 %13 to i32
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 %8, double %10, i32 %12, i32 %14, i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [59 x i8] c"int: %d \0Afloat: %f \0AChar1: '%c'; Char2: '%c'; Char3: '%c'.\00"
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i32 5, double 5.500000e+00, i32 97, i32 98, i32 99)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __attribute__((constructor)) init(void) {
  printf("Chamado antes de main().\n");
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Chamado antes de main().\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
define void @init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @init, i8* null }]
@str = [25 x i8] c"Chamado antes de main().\00"
define void @init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
double ls_cost_nm2_twice(double x) { return x + x; }


x86 assembly (clang, -O0):
<ls_cost_nm2_twice>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm2_twice>:
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @ls_cost_nm2_twice(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fadd double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @ls_cost_nm2_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}
/* Variables and functions */
bool nrf51_errata_61(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf51_errata_61() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char num;
  num = 'c';
  printf("%d", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x63,-0x5(%rbp)
lea    0xed6(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @prop_unregister_handlers() {
ret void
}
int test_imm_4Euint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x4E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Euint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x4e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Euint64_highword_mem>:
testb  $0x4e,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Euint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 335007449088
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void RTTimeExplode(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimeExplode() {
ret void
}
/* Variables and functions */
void *malloc(int);
void *f8(int n) {
  if (n < 10)
    return malloc(n * sizeof(int));
  else
    return ((void *)0);
}


x86 assembly (clang, -O0):
<f8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    113d <f8+0x2d>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1145 <f8+0x35>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f8>:
cmp    $0x9,%edi
jg     111d <f8+0xd>
shl    $0x2,%edi
jmp    1030 <malloc@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @f8(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 4
%10 = trunc i64 %9 to i32
%11 = call i8* @malloc(i32 %10)
store i8* %11, i8** %2
br label %13
12: ; preds = %1
store i8* null, i8** %2
br label %13
13: ; preds = %12, %6
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @f8(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = shl i32 %0, 2
%5 = tail call i8* @malloc(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ %5, %3 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void packbin_print_help() {
  char *usage = "Usage: PACKBIN input_file image_type pad_to output_file\n"
                "    input_file    Name of the input binary image file.\n"
                "    image_type    [r|b|d] for [runtime|boot|root directory].\n"
                "    pad_to        Size of the output binary image. (0 means "
                "no padding)\n"
                "    output_file   Name of the output binary image file.\n";
  fprintf(stderr, "%s", usage);
}


x86 assembly (clang, -O0):
<packbin_print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xff6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [301 x i8] c"Usage: PACKBIN input_file image_type pad_to output_file\0A input_file Name of the input binary image file.\0A image_type [r|b|d] for [runtime|boot|root directory].\0A pad_to Size of the output binary image. (0 means no padding)\0A output_file Name of the output binary image file.\0A\00"
@stderr = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @packbin_print_help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([301 x i8], [301 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %1
%4 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [301 x i8] c"Usage: PACKBIN input_file image_type pad_to output_file\0A input_file Name of the input binary image file.\0A image_type [r|b|d] for [runtime|boot|root directory].\0A pad_to Size of the output binary image. (0 means no padding)\0A output_file Name of the output binary image file.\0A\00"
@stderr = global i32 0
@.str.1 = [3 x i8] c"%s\00"
define void @packbin_print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([301 x i8], [301 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int DestroyDB(int argc, char **argv) {
  printf("Calling from DestroyDB\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [23 x i8] c"Calling from DestroyDB\00"
define i32 @DestroyDB(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int read(int, void *, int);
int Read(int sockfd, void *buf, int max) {
  int n;
  n = read(sockfd, buf, max);
  if (n == -1) {
    perror("Read");
    exit(1);
  }
  return n;
}


x86 assembly (clang, -O0):
<Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1174 <Read+0x44>
lea    0xe9b(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read>:
push   %rax
call   1030 <read@plt>
cmp    $0xffffffff,%eax
je     113d <Read+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Read\00"
define i32 @Read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @read(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %3
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
@.str = [5 x i8] c"Read\00"
define i32 @Read(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void irc_close(int sock) { close(sock); }


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

x86 assembly (clang, -O2):
<irc_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @irc_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int totemmrp_ring_reenable();
int totempg_ring_reenable(void) {
  int res;
  res = totemmrp_ring_reenable();
  return (res);
}


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

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

LLVM IR (-O0):
define i32 @totempg_ring_reenable() {
%1 = alloca i32
%2 = call i32 (...) @totemmrp_ring_reenable()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @totempg_ring_reenable() {
%1 = tail call i32 (...) @totemmrp_ring_reenable()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ const *);
char *ctime_r(const time_t *timep, char *buf) {
  buf = asctime(localtime(timep));
  return buf;
}


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

x86 assembly (clang, -O2):
<ctime_r>:
push   %rax
call   1030 <localtime@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <asctime@plt>

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

LLVM IR (-O2):
define i8* @ctime_r(i32* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @localtime(i32* %0)
%4 = tail call i8* @asctime(i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_aligned(void *raw_data) {
  if (raw_data) {
    char *data = (char *)raw_data;
    data -= sizeof(size_t);
    data = (char *)(*((size_t *)data));
    free(data);
  }
}


x86 assembly (clang, -O0):
<free_aligned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114f <free_aligned+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_aligned>:
test   %rdi,%rdi
je     111e <free_aligned+0xe>
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @free_aligned(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @free(i8* %7)
br label %9
9: ; preds = %3, %1
ret void
}