xunge/DecIR huggingface dataset:
/* Variables and functions */
double exp(long);
long log(double);
double pdfGeometric(double p, long x) { return ((1.0 - p) * exp(x * log(p))); }


x86 assembly (clang, -O0):
<pdfGeometric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  0xec7(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <log@plt>
mov    -0x20(%rbp),%rdi
imul   %rax,%rdi
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdfGeometric>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  0xed0(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
call   1040 <log@plt>
imul   %rax,%rbx
mov    %rbx,%rdi
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @pdfGeometric(double %0, i64 %1) {
%3 = alloca double
%4 = alloca i64
store double %0, double* %3
store i64 %1, i64* %4
%5 = load double, double* %3
%6 = fsub double 1.000000e+00, %5
%7 = load i64, i64* %4
%8 = load double, double* %3
%9 = call i64 @log(double %8)
%10 = mul nsw i64 %7, %9
%11 = call double @exp(i64 %10)
%12 = fmul double %6, %11
ret double %12
}

LLVM IR (-O2):
define double @pdfGeometric(double %0, i64 %1) {
%3 = fsub double 1.000000e+00, %0
%4 = tail call i64 @log(double %0)
%5 = mul nsw i64 %4, %1
%6 = tail call double @exp(i64 %5)
%7 = fmul double %3, %6
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "%s\n%s\n", "usage: rcp [-46p] file1 file2",
                "       rcp [-46pr] file ... directory");
  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    0xee3(%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    0xee6(%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 = [30 x i8] c"usage: rcp [-46p] file1 file2\00"
@.str.2 = [38 x i8] c" rcp [-46pr] file ... directory\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 ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 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 = [30 x i8] c"usage: rcp [-46p] file1 file2\00"
@.str.2 = [38 x i8] c" rcp [-46pr] file ... directory\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 ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void nbrffree(void *ptr) { free((char *)ptr); }


x86 assembly (clang, -O0):
<nbrffree>:
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):
<nbrffree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @nbrffree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nolibc_exit(int /*<<< orphan*/);
void _start(void) { nolibc_exit(0); }


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <nolibc_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
xor    %edi,%edi
jmp    1030 <nolibc_exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = call i32 @nolibc_exit(i32 0)
ret void
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 @nolibc_exit(i32 0)
ret void
}
void file_destroy(void *a) { ; }


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

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

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

LLVM IR (-O2):
define void @file_destroy(i8* nocapture %0) {
ret void
}
void foo691() {}


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

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

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

LLVM IR (-O2):
define void @foo691() {
ret void
}
/* Type definitions */
struct st_options {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ run_csvconverter(char *, char *, struct st_options *);
int run_convert(int argc, char **argv, void *st_options) {
  struct st_options *nof = st_options;
  run_csvconverter(argv[2], argv[3], nof);
  return 0;
}


x86 assembly (clang, -O0):
<run_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <run_csvconverter@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_convert>:
push   %rax
mov    0x10(%rsi),%rdi
mov    0x18(%rsi),%rsi
call   1030 <run_csvconverter@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.st_options = type { i32 }
define i32 @run_convert(i32 %0, i8** %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca %struct.st_options*
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to %struct.st_options*
store %struct.st_options* %9, %struct.st_options** %7
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 3
%15 = load i8*, i8** %14
%16 = load %struct.st_options*, %struct.st_options** %7
%17 = call i32 @run_csvconverter(i8* %12, i8* %15, %struct.st_options* %16)
ret i32 0
}

LLVM IR (-O2):
%struct.st_options = type { i32 }
define i32 @run_convert(i32 %0, i8** nocapture %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.st_options*
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8*, i8** %1, i64 3
%8 = load i8*, i8** %7
%9 = tail call i32 @run_csvconverter(i8* %6, i8* %8, %struct.st_options* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, unsigned int);
void f3(int size) {
  char src[12] = "helloworld";
  char dest[12];
  if (size < 0)
    strncpy(dest, src, (unsigned)size);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1149 <f3+0x39>
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
sub    $0x18,%rsp
movabs $0x726f776f6c6c6568,%rax
77 6f 72
mov    %rax,(%rsp)
movl   $0x646c,0x8(%rsp)
test   %edi,%edi
js     1133 <f3+0x23>
add    $0x18,%rsp
ret
mov    %edi,%edx
lea    0xc(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <strncpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 %0, i32* %2
%5 = bitcast [12 x i8]* %3 to i8*
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @strncpy(i8* %9, i8* %10, i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%6 = icmp slt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @strncpy(i8* %5, i8* %4, i32 %0)
br label %9
9: ; preds = %7, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int onQuote(FILE *out_fp, const int sign) {
  if (sign == 1) {
    fprintf(out_fp, "<blockquote>\n");
  } else if (sign == 2) {
    fprintf(out_fp, "\n</blockquote>\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<onQuote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    113e <onQuote+0x2e>
mov    -0x8(%rbp),%rdi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
jmp    115d <onQuote+0x4d>
cmpl   $0x2,-0xc(%rbp)
jne    1158 <onQuote+0x48>
mov    -0x8(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1030 <fprintf@plt>
jmp    115d <onQuote+0x4d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onQuote>:
push   %rax
mov    %rdi,%rcx
cmp    $0x2,%esi
je     112c <onQuote+0x1c>
cmp    $0x1,%esi
jne    1142 <onQuote+0x32>
lea    0xedb(%rip),%rdi
mov    $0xd,%esi
jmp    1138 <onQuote+0x28>
lea    0xedb(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"<blockquote>\0A\00"
@.str.1 = [16 x i8] c"\0A</blockquote>\0A\00"
define i32 @onQuote(i32* nocapture %0, i32 %1) {
switch i32 %1, label %7 [
i32 1, label %3
i32 2, label %5
]
3: ; preds = %2
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 13, i64 1, i32* %0)
br label %7
5: ; preds = %2
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 15, i64 1, i32* %0)
br label %7
7: ; preds = %2, %5, %3
ret i32 0
}
/* Type definitions */
struct binary_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _in_order(struct binary_tree *, int);
void in_order(struct binary_tree *tree) { _in_order(tree, 1); }


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

x86 assembly (clang, -O2):
<in_order>:
mov    $0x1,%esi
jmp    1030 <_in_order@plt>

LLVM IR (-O0):
%struct.binary_tree = type { i32 }
define void @in_order(%struct.binary_tree* %0) {
%2 = alloca %struct.binary_tree*
store %struct.binary_tree* %0, %struct.binary_tree** %2
%3 = load %struct.binary_tree*, %struct.binary_tree** %2
%4 = call i32 @_in_order(%struct.binary_tree* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.binary_tree = type { i32 }
define void @in_order(%struct.binary_tree* %0) {
%2 = tail call i32 @_in_order(%struct.binary_tree* %0, i32 1)
ret void
}
/* Variables and functions */
int printDirectoryTree_(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int printDirectoryTree(const char *name) {
  printf("%s\n", name);
  return printDirectoryTree_(name, 0);
}


x86 assembly (clang, -O0):
<printDirectoryTree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <printDirectoryTree_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printDirectoryTree>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <printDirectoryTree_@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @printDirectoryTree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printDirectoryTree_(i8* %5, i32 0)
ret i32 %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @printDirectoryTree(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printDirectoryTree_(i8* %0, i32 0)
ret i32 %3
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int pthread_getschedparam(int /*<<< orphan*/, int *, struct sched_param *);
__attribute__((weak)) int
__real_pthread_getschedparam(pthread_t thread, int *policy,
                             struct sched_param *param) {
  return pthread_getschedparam(thread, policy, param);
}


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

x86 assembly (clang, -O2):
<__real_pthread_getschedparam>:
jmp    1030 <pthread_getschedparam@plt>

LLVM IR (-O0):
%struct.sched_param = type { i32 }
define weak i32 @__real_pthread_getschedparam(i32 %0, i32* %1, %struct.sched_param* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.sched_param*
store i32 %0, i32* %4
store i32* %1, i32** %5
store %struct.sched_param* %2, %struct.sched_param** %6
%7 = load i32, i32* %4
%8 = load i32*, i32** %5
%9 = load %struct.sched_param*, %struct.sched_param** %6
%10 = call i32 @pthread_getschedparam(i32 %7, i32* %8, %struct.sched_param* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
define weak i32 @__real_pthread_getschedparam(i32 %0, i32* %1, %struct.sched_param* %2) {
%4 = tail call i32 @pthread_getschedparam(i32 %0, i32* %1, %struct.sched_param* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_attach(int /*<<< orphan*/, int /*<<< orphan*/);
void g2_attach_(float *vd_dev, float *dev) {
  g2_attach(dtoi(*vd_dev), dtoi(*dev));
}


x86 assembly (clang, -O0):
<g2_attach_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <g2_attach@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_attach_>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%ebp
movss  (%rbx),%xmm0
call   1030 <dtoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <g2_attach@plt>

LLVM IR (-O0):
define void @g2_attach_(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = call i32 @dtoi(float %6)
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = call i32 @dtoi(float %9)
%11 = call i32 @g2_attach(i32 %7, i32 %10)
ret void
}

LLVM IR (-O2):
define void @g2_attach_(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = tail call i32 @dtoi(float %3)
%5 = load float, float* %1
%6 = tail call i32 @dtoi(float %5)
%7 = tail call i32 @g2_attach(i32 %4, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int bitpat_search(unsigned int source, unsigned int pattern, int n);
  unsigned int source = 0xe1f4;
  unsigned int pattern_1 = 0x5;
  unsigned int pattern_2 = 0xf;
  int index_1, index_2;
  index_1 = bitpat_search(source, pattern_1, 3);
  index_2 = bitpat_search(source, pattern_2, 4);
  printf("%i\n", index_1);
  printf("%i\n", index_2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xe1f4,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0xf,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x3,%edx
call   1030 <bitpat_search@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x4,%edx
call   1030 <bitpat_search@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe7d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0xe1f4,%edi
mov    $0x5,%esi
mov    $0x3,%edx
call   1030 <bitpat_search@plt>
mov    %eax,%ebx
mov    $0xe1f4,%edi
mov    $0xf,%esi
mov    $0x4,%edx
call   1030 <bitpat_search@plt>
mov    %eax,%ebp
lea    0xea9(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 57844, i32* %2
store i32 5, i32* %3
store i32 15, i32* %4
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = call i32 @bitpat_search(i32 %7, i32 %8, i32 3)
store i32 %9, i32* %5
%10 = load i32, i32* %2
%11 = load i32, i32* %4
%12 = call i32 @bitpat_search(i32 %10, i32 %11, i32 4)
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %6
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @bitpat_search(i32 57844, i32 5, i32 3)
%2 = tail call i32 @bitpat_search(i32 57844, i32 15, i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int _numDecodings(char *);
int numDecodings(char *s) {
  int ret = _numDecodings(s);
  return ret == -1 ? 0 : ret;
}


x86 assembly (clang, -O0):
<numDecodings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_numDecodings@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    113c <numDecodings+0x2c>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <numDecodings+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numDecodings>:
push   %rax
call   1030 <_numDecodings@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @numDecodings(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @_numDecodings(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
br label %11
9: ; preds = %1
%10 = load i32, i32* %3
br label %11
11: ; preds = %9, %8
%12 = phi i32 [ 0, %8 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @numDecodings(i8* %0) {
%2 = tail call i32 @_numDecodings(i8* %0)
%3 = icmp eq i32 %2, -1
%4 = select i1 %3, i32 0, i32 %2
ret i32 %4
}
int getgid() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @getgid() {
ret i32 0
}
int find_char(char *array, char c) {
  int i;
  i = 0;
  while (array[i]) {
    if (array[i] == c) {
      return (1);
    }
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<find_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1159 <find_char+0x59>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114b <find_char+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1160 <find_char+0x60>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <find_char+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_char>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <find_char+0x20>
add    $0x1,%rdi
nopl   0x0(%rax)
cmp    %sil,%cl
je     1121 <find_char+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <find_char+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @find_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %0, i64 %13
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %13, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = icmp eq i8 %11, %1
%13 = add nuw i64 %10, 1
br i1 %12, label %14, label %5
14: ; preds = %9, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %15
}
int alock_auth_passwd_deinit() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @alock_auth_passwd_deinit() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int suma(int, int);
int main() {
  int resultado = 0;
  resultado = suma(2, 2);
  printf("el resultado es: %d\n", resultado);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x2,%esi
mov    %esi,%edi
call   1040 <suma@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [21 x i8] c"el resultado es: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @suma(i32 2, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
long atoi(char *);
int /*<<< orphan*/ printf(char *, long, long, long);
int /*<<< orphan*/ sumstore(long, long, long *);
int main(int argc, char *argv[]) {
  long x = atoi(argv[1]);
  long y = atoi(argv[2]);
  long z;
  sumstore(x, y, &z);
  printf("%ld + %ld --> %ld\n", x, y, z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1050 <sumstore@plt>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %rax,%r14
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %rax,%rbx
mov    %rsp,%rdx
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <sumstore@plt>
mov    (%rsp),%rcx
lea    0xe98(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%ld + %ld --> %ld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i64 @atoi(i8* %11)
store i64 %12, i64* %6
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i64 @atoi(i8* %15)
store i64 %16, i64* %7
%17 = load i64, i64* %6
%18 = load i64, i64* %7
%19 = call i32 @sumstore(i64 %17, i64 %18, i64* %8)
%20 = load i64, i64* %6
%21 = load i64, i64* %7
%22 = load i64, i64* %8
%23 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %20, i64 %21, i64 %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"%ld + %ld --> %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i64 @atoi(i8* %5)
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = tail call i64 @atoi(i8* %8)
%10 = bitcast i64* %3 to i8*
%11 = call i32 @sumstore(i64 %6, i64 %9, i64* %3)
%12 = load i64, i64* %3
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %6, i64 %9, i64 %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a = 1;
  int b = 0x23;
  int c = 3;
  printf("%d %x %d\n", ~1, 3, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x23,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
lea    0xec5(%rip),%rdi
mov    $0xfffffffe,%esi
mov    $0x3,%ecx
mov    %ecx,%edx
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    $0xfffffffe,%esi
mov    $0x3,%edx
mov    $0x3,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %x %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 -2, i32 3, i32 3)
ret i32 0
}
/* Variables and functions */
char *get_glyph_gen(char *, char *, char, int /*<<< orphan*/);
char *get_glyph_nc(char *iptr, char *optr, char mchar) {
  return get_glyph_gen(iptr, optr, mchar, 0);
}


x86 assembly (clang, -O0):
<get_glyph_nc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %ecx,%ecx
movsbl -0x11(%rbp),%edx
call   1030 <get_glyph_gen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_glyph_nc>:
xor    %ecx,%ecx
jmp    1030 <get_glyph_gen@plt>

LLVM IR (-O0):
define i8* @get_glyph_nc(i8* %0, i8* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8, i8* %6
%10 = call i8* @get_glyph_gen(i8* %7, i8* %8, i8 signext %9, i32 0)
ret i8* %10
}

LLVM IR (-O2):
define i8* @get_glyph_nc(i8* %0, i8* %1, i8 signext %2) {
%4 = tail call i8* @get_glyph_gen(i8* %0, i8* %1, i8 signext %2, i32 0)
ret i8* %4
}
/* Type definitions */
struct _Locale_ctype {
  int dummy;
};

/* Variables and functions */
void _Locale_ctype_destroy(struct _Locale_ctype *lctype) {}


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

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

LLVM IR (-O0):
%struct._Locale_ctype = type { i32 }
define void @_Locale_ctype_destroy(%struct._Locale_ctype* %0) {
%2 = alloca %struct._Locale_ctype*
store %struct._Locale_ctype* %0, %struct._Locale_ctype** %2
ret void
}

LLVM IR (-O2):
%struct._Locale_ctype = type { i32 }
define void @_Locale_ctype_destroy(%struct._Locale_ctype* nocapture %0) {
ret void
}
/* Variables and functions */
int impair(unsigned int);
int pair(unsigned int i) {
  if (i == 0)
    return 1;
  else
    return impair(i - 1);
}


x86 assembly (clang, -O0):
<pair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <pair+0x21>
movl   $0x1,-0x4(%rbp)
jmp    113f <pair+0x2f>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <impair@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pair>:
test   %edi,%edi
je     111c <pair+0xc>
add    $0xffffffff,%edi
jmp    1030 <impair@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @pair(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = tail call i32 @impair(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 1, %1 ]
ret i32 %7
}
void testClosureBSLLrV(void (*closure)(char, short, long long), char a1,
                       short a2, long long a3) {
  (*closure)(a1, a2, a3);
}


x86 assembly (clang, -O0):
<testClosureBSLLrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %sil,%dl
mov    %rdi,-0x8(%rbp)
mov    %dl,-0x9(%rbp)
mov    %ax,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x9(%rbp),%sil
mov    -0xc(%rbp),%cx
mov    -0x18(%rbp),%rdx
movsbl %sil,%edi
movswl %cx,%esi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureBSLLrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
mov    %rcx,%rdx
jmp    *%rax

LLVM IR (-O0):
define void @testClosureBSLLrV(void (i8, i16, i64)* %0, i8 signext %1, i16 signext %2, i64 %3) {
%5 = alloca void (i8, i16, i64)*
%6 = alloca i8
%7 = alloca i16
%8 = alloca i64
store void (i8, i16, i64)* %0, void (i8, i16, i64)** %5
store i8 %1, i8* %6
store i16 %2, i16* %7
store i64 %3, i64* %8
%9 = load void (i8, i16, i64)*, void (i8, i16, i64)** %5
%10 = load i8, i8* %6
%11 = load i16, i16* %7
%12 = load i64, i64* %8
ret void
}

LLVM IR (-O2):
define void @testClosureBSLLrV(void (i8, i16, i64)* nocapture %0, i8 signext %1, i16 signext %2, i64 %3) {
tail call void %0(i8 signext %1, i16 signext %2, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ acc_free(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(int const);
int /*<<< orphan*/ stderr;
int main() {
  const int N = 108;
  char *h = (char *)malloc(N);
#pragma acc data create(h [0:N - 44])
  {
#pragma acc host_data use_device(h)
    {
      fprintf(stderr, "CheCKpOInT\n");
      acc_free(h);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6c,-0x8(%rbp)
mov    $0x6c,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1050 <acc_free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x6c,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <acc_free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
store i32 0, i32* %1
store i32 108, i32* %2
%4 = call i64 @malloc(i32 108)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %3
%9 = call i32 @acc_free(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"CheCKpOInT\0A\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 108)
%2 = inttoptr i64 %1 to i8*
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @acc_free(i8* %2)
ret i32 0
}
void foo_2_2_1_1_1_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_1_1_2_1_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_string(char *);
int main() {
  char s[100];
  read_string(s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <read_string@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
mov    %rsp,%rdi
call   1030 <read_string@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @read_string(i8* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @read_string(i8* %2)
ret i32 0
}
/* Variables and functions */
char *gettype(char *);
int /*<<< orphan*/ printf(char *, char *);
void test2(char *str) {
  char *typestr = NULL;
  while (*str != '\0') {
    typestr = gettype(str);
    printf("Type is %s \n", typestr);
    str++;
  }
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1172 <test2+0x52>
mov    -0x8(%rbp),%rdi
call   1040 <gettype@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <test2+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %r14
push   %rbx
push   %rax
cmpb   $0x0,(%rdi)
je     115d <test2+0x3d>
mov    %rdi,%rbx
lea    0xecd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <gettype@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1140 <test2+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"Type is %s \0A\00"
define void @test2(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %8, %4 ], [ %0, %1 ]
%6 = tail call i8* @gettype(i8* %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/);
int peekchar() {
  int c = getchar();
  ungetc(c, stdin);
  return c;
}


x86 assembly (clang, -O0):
<peekchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1040 <ungetc@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peekchar>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
call   1040 <ungetc@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @peekchar() {
%1 = alloca i32
%2 = call i32 (...) @getchar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* @stdin
%5 = call i32 @ungetc(i32 %3, i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @peekchar() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @stdin
%3 = tail call i32 @ungetc(i32 %1, i32 %2)
ret i32 %1
}
/* Type definitions */
struct llist_t {
  int dummy;
};

/* Variables and functions */
struct llist_t *llistRemove(struct llist_t *, struct llist_t *);
void llistDestroy(struct llist_t *head) {
  while (head)
    head = llistRemove(head, head);
}


x86 assembly (clang, -O0):
<llistDestroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113d <llistDestroy+0x2d>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <llistRemove@plt>
mov    %rax,-0x8(%rbp)
jmp    111c <llistDestroy+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llistDestroy>:
push   %rax
test   %rdi,%rdi
je     1130 <llistDestroy+0x20>
mov    %rdi,%rax
nopl   0x0(%rax)
mov    %rax,%rdi
mov    %rax,%rsi
call   1030 <llistRemove@plt>
test   %rax,%rax
jne    1120 <llistDestroy+0x10>
pop    %rax
ret

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

LLVM IR (-O2):
%struct.llist_t = type { i32 }
define void @llistDestroy(%struct.llist_t* %0) {
%2 = icmp eq %struct.llist_t* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi %struct.llist_t* [ %5, %3 ], [ %0, %1 ]
%5 = tail call %struct.llist_t* @llistRemove(%struct.llist_t* %4, %struct.llist_t* %4)
%6 = icmp eq %struct.llist_t* %5, null
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
int get_c(int x) {
  int abc[3];
  return abc[2];
}


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

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

LLVM IR (-O0):
define i32 @get_c(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @get_c(i32 %0) {
ret i32 undef
}
void ASN1_STRING_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_STRING_cmp() {
ret void
}
/* Variables and functions */
double sqrt(double);
double sqrtinv(double x) { return 1.0 / sqrt(x); }


x86 assembly (clang, -O0):
<sqrtinv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrtinv>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1121 <sqrtinv+0x11>
sqrtsd %xmm0,%xmm0
jmp    1126 <sqrtinv+0x16>
call   1030 <sqrt@plt>
movsd  0xed2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sqrtinv(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sqrt(double %3)
%5 = fdiv double 1.000000e+00, %4
ret double %5
}

LLVM IR (-O2):
define double @sqrtinv(double %0) {
%2 = tail call double @sqrt(double %0)
%3 = fdiv double 1.000000e+00, %2
ret double %3
}
void strcaat(char *s, char *t) {
  for (; *s != '\0'; s++)
    ;
  for (; (*s = *t) != '\0'; s++, t++)
    ;
}


x86 assembly (clang, -O0):
<strcaat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1132 <strcaat+0x32>
jmp    1121 <strcaat+0x21>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcaat+0xc>
jmp    1137 <strcaat+0x37>
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1171 <strcaat+0x71>
jmp    1154 <strcaat+0x54>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <strcaat+0x37>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcaat>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <strcaat>
mov    (%rsi),%al
mov    %al,-0x1(%rdi)
test   %al,%al
je     1130 <strcaat+0x30>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x1(%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1120 <strcaat+0x20>
ret

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

LLVM IR (-O2):
define void @strcaat(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
store i8 %9, i8* %4
%10 = icmp eq i8 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %8, %11
%12 = phi i8* [ %15, %11 ], [ %1, %8 ]
%13 = phi i8* [ %14, %11 ], [ %4, %8 ]
%14 = getelementptr inbounds i8, i8* %13, i64 1
%15 = getelementptr inbounds i8, i8* %12, i64 1
%16 = load i8, i8* %15
store i8 %16, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %11
18: ; preds = %11, %8
ret void
}
/* Variables and functions */
char *gu_str_append(char *, size_t *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *gu_str_table_set_name(char *str, size_t *off, const char *name) {
  return gu_str_append(str, off, name, strlen(name));
}


x86 assembly (clang, -O0):
<gu_str_table_set_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1040 <gu_str_append@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gu_str_table_set_name>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <gu_str_append@plt>

LLVM IR (-O0):
define i8* @gu_str_table_set_name(i8* %0, i64* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i8*
store i8* %0, i8** %4
store i64* %1, i64** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i64*, i64** %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i32 @strlen(i8* %10)
%12 = call i8* @gu_str_append(i8* %7, i64* %8, i8* %9, i32 %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @gu_str_table_set_name(i8* %0, i64* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %2)
%5 = tail call i8* @gu_str_append(i8* %0, i64* %1, i8* %2, i32 %4)
ret i8* %5
}