xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isdigit(int);
int tolower(int);
int __get_raw(int v) {
  if (isdigit(v))
    return v - '0';
  v = tolower(v);
  return (v - 'a') + 10;
}


x86 assembly (clang, -O0):
<__get_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     114b <__get_raw+0x2b>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <__get_raw+0x42>
mov    -0x8(%rbp),%edi
call   1040 <tolower@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_raw>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
je     1132 <__get_raw+0x12>
add    $0xffffffd0,%ebx
jmp    113e <__get_raw+0x1e>
mov    %ebx,%edi
call   1040 <tolower@plt>
mov    %eax,%ebx
add    $0xffffffa9,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__get_raw(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isdigit(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 48
store i32 %9, i32* %2
br label %16
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i32 @tolower(i32 %11)
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 97
%15 = add nsw i32 %14, 10
store i32 %15, i32* %2
br label %16
16: ; preds = %10, %7
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @__get_raw(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -48
br label %9
6: ; preds = %1
%7 = tail call i32 @tolower(i32 %0)
%8 = add nsw i32 %7, -87
br label %9
9: ; preds = %6, %4
%10 = phi i32 [ %5, %4 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void *infinite_thread_fcn(void *parameter) {
  int i = 0;
  while (1) {
    printf("[infinite thread] > i currently equals %d \n", i);
    sleep(1);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<infinite_thread_fcn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    %eax,-0xc(%rbp)
jmp    1133 <infinite_thread_fcn+0x13>

x86 assembly (clang, -O2):
<infinite_thread_fcn>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xed3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
add    $0x1,%ebx
jmp    1130 <infinite_thread_fcn+0x10>

LLVM IR (-O0):
@.str = [44 x i8] c"[infinite thread] > i currently equals %d \0A\00"
define i8* @infinite_thread_fcn(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %1, %4
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @sleep(i32 1)
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
br label %4
}

LLVM IR (-O2):
@.str = [44 x i8] c"[infinite thread] > i currently equals %d \0A\00"
define noalias i8* @infinite_thread_fcn(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @sleep(i32 1)
%6 = add nuw nsw i32 %3, 1
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int g_DUMMY_cons_fgetc(FILE *file) {
  file = file;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @g_DUMMY_cons_fgetc(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parse(char *, char *, char *, int);
int main(void) {
  parse("BIFFRecordList"
        "_record"
        ".txt",
        "BIFFRecordList"
        "_record"
        ".h",
        "BIFFRecordList"
        ".c",
        1);
  parse("BIFFRecordList"
        "_number"
        ".txt",
        "BIFFRecordList"
        "_number"
        ".h",
        0, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xeed(%rip),%rsi
lea    0xefe(%rip),%rdx
mov    $0x1,%ecx
call   1030 <parse@plt>
lea    0xefe(%rip),%rdi
lea    0xf11(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <parse@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xefb(%rip),%rsi
lea    0xf0c(%rip),%rdx
mov    $0x1,%ecx
call   1030 <parse@plt>
lea    0xf0c(%rip),%rdi
lea    0xf1f(%rip),%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <parse@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"BIFFRecordList_record.txt\00"
@.str.1 = [24 x i8] c"BIFFRecordList_record.h\00"
@.str.2 = [17 x i8] c"BIFFRecordList.c\00"
@.str.3 = [26 x i8] c"BIFFRecordList_number.txt\00"
@.str.4 = [24 x i8] c"BIFFRecordList_number.h\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @parse(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 1)
%3 = call i32 @parse(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* null, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"BIFFRecordList_record.txt\00"
@.str.1 = [24 x i8] c"BIFFRecordList_record.h\00"
@.str.2 = [17 x i8] c"BIFFRecordList.c\00"
@.str.3 = [26 x i8] c"BIFFRecordList_number.txt\00"
@.str.4 = [24 x i8] c"BIFFRecordList_number.h\00"
define i32 @main() {
%1 = tail call i32 @parse(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 1)
%2 = tail call i32 @parse(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i8* null, i32 0)
ret i32 0
}
int wad_strlen(const char *s) {
  int count = 0;
  while (*(s++))
    count++;
  return count;
}


x86 assembly (clang, -O0):
<wad_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <wad_strlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <wad_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wad_strlen>:
cmpb   $0x0,(%rdi)
je     111c <wad_strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <wad_strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @wad_strlen(i8* nocapture %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 i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int run_test_suites(int /*<<< orphan*/, int, int, char **, int,
                    int /*<<< orphan*/);
int launch_process(int argc, char *argv[], int verbose) {
  int r = run_test_suites(0, 1, argc, argv, verbose, 0);
  if (-1 == verbose) {
    puts("");
  }
  return r;
}


x86 assembly (clang, -O0):
<launch_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
xor    %r9d,%r9d
mov    $0x1,%esi
mov    %r9d,%edi
call   1040 <run_test_suites@plt>
mov    %eax,-0x18(%rbp)
mov    $0xffffffff,%eax
cmp    -0x14(%rbp),%eax
jne    116a <launch_process+0x4a>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<launch_process>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rcx
mov    %edi,%edx
xor    %edi,%edi
mov    $0x1,%esi
mov    %ebp,%r8d
xor    %r9d,%r9d
call   1040 <run_test_suites@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%ebp
jne    114d <launch_process+0x2d>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @launch_process(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 @run_test_suites(i32 0, i32 1, i32 %8, i8** %9, i32 %10, i32 0)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = icmp eq i32 -1, %12
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @launch_process(i32 %0, i8** %1, i32 %2) {
%4 = tail call i32 @run_test_suites(i32 0, i32 1, i32 %0, i8** %1, i32 %2, i32 0)
%5 = icmp eq i32 %2, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @putchar(i32 10)
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ GLsizei;
typedef int GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gluPerspective(double, int, double, double);
void skaliraj(int w, int h) {
  glViewport(0, 0, (GLsizei)w, (GLsizei)h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(30.0, (GLfloat)w / (GLfloat)h, 1.0, 50.0);
}


x86 assembly (clang, -O0):
<skaliraj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%edi
movsd  0xe7d(%rip),%xmm0
movsd  0xe7d(%rip),%xmm1
movsd  0xe7d(%rip),%xmm2
call   1040 <gluPerspective@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skaliraj>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1060 <glViewport@plt>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
movsd  0xe8a(%rip),%xmm0
movsd  0xe8a(%rip),%xmm1
movsd  0xe8a(%rip),%xmm2
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <gluPerspective@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
define void @skaliraj(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 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = sdiv i32 %11, %12
%14 = call i32 @gluPerspective(double 3.000000e+01, i32 %13, double 1.000000e+00, double 5.000000e+01)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
define void @skaliraj(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = sdiv i32 %0, %1
%8 = tail call i32 @gluPerspective(double 3.000000e+01, i32 %7, double 1.000000e+00, double 5.000000e+01)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("(u)intmax_t not available - test skipped\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"(u)intmax_t not available - test skipped\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [41 x i8] c"(u)intmax_t not available - test skipped\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ LZ4F_freeDecompressionContext(void *);
void wrap_free_dctx(void **dctx) { LZ4F_freeDecompressionContext(*dctx); }


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

x86 assembly (clang, -O2):
<wrap_free_dctx>:
mov    (%rdi),%rdi
jmp    1030 <LZ4F_freeDecompressionContext@plt>

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

LLVM IR (-O2):
define void @wrap_free_dctx(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @LZ4F_freeDecompressionContext(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int dec = 39;
  printf("%d\n", dec);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 39)
ret i32 0
}
int bitcount(unsigned x) {
  int b;
  for (b = 0; x != 0; x &= x - 1) {
    b++;
  }
  return b;
}


x86 assembly (clang, -O0):
<bitcount>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <bitcount+0x32>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    110e <bitcount+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitcount>:
xor    %eax,%eax
test   %edi,%edi
je     111c <bitcount+0x1c>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
lea    -0x1(%rdi),%ecx
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <bitcount+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitcount(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = add i32 %5, -1
%8 = and i32 %7, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_2() {
  char *x = "abc";
  char *y = "Bcd";
  clang_analyzer_eval(strncasecmp(x, y, 3) < 0);
}


x86 assembly (clang, -O0):
<strncasecmp_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Bcd\00"
define void @strncasecmp_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncasecmp(i8* %3, i8* %4, i32 3)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"abc\00"
@.str.1 = [4 x i8] c"Bcd\00"
define void @strncasecmp_2() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
int baz(unsigned e, unsigned f) {
  unsigned t = e - f;
  return (t - 1) >= e;
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
cmp    -0x4(%rbp),%eax
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
xor    %eax,%eax
cmp    %edi,%esi
setae  %al
ret

LLVM IR (-O0):
define i32 @baz(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sub i32 %9, 1
%11 = load i32, i32* %3
%12 = icmp uge i32 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @baz(i32 %0, i32 %1) {
%3 = icmp uge i32 %1, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ order_dimms();
int /*<<< orphan*/ spd_set_dram_timing();
int /*<<< orphan*/ spd_set_ecc_mode();
int /*<<< orphan*/ spd_set_ram_size();
void sdram_set_spd_registers(void) {
  spd_set_ram_size();
  spd_set_dram_timing();
  spd_set_ecc_mode();
  order_dimms();
}


x86 assembly (clang, -O0):
<sdram_set_spd_registers>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <spd_set_ram_size@plt>
mov    $0x0,%al
call   1050 <spd_set_dram_timing@plt>
mov    $0x0,%al
call   1040 <spd_set_ecc_mode@plt>
mov    $0x0,%al
call   1060 <order_dimms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdram_set_spd_registers>:
push   %rax
xor    %eax,%eax
call   1030 <spd_set_ram_size@plt>
xor    %eax,%eax
call   1050 <spd_set_dram_timing@plt>
xor    %eax,%eax
call   1040 <spd_set_ecc_mode@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <order_dimms@plt>

LLVM IR (-O0):
define void @sdram_set_spd_registers() {
%1 = call i32 (...) @spd_set_ram_size()
%2 = call i32 (...) @spd_set_dram_timing()
%3 = call i32 (...) @spd_set_ecc_mode()
%4 = call i32 (...) @order_dimms()
ret void
}

LLVM IR (-O2):
define void @sdram_set_spd_registers() {
%1 = tail call i32 (...) @spd_set_ram_size()
%2 = tail call i32 (...) @spd_set_dram_timing()
%3 = tail call i32 (...) @spd_set_ecc_mode()
%4 = tail call i32 (...) @order_dimms()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ value;

/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ snprintf(char *, int, char *, int);
const char *plugin_api_info_pid_cb(const void *pointer, void *data,
                                   const char *info_name,
                                   const char *arguments) {
  static char value[32];
  (void)pointer;
  (void)data;
  (void)info_name;
  (void)arguments;
  snprintf(value, sizeof(value), "%d", (int)getpid());
  return value;
}


x86 assembly (clang, -O0):
<plugin_api_info_pid_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%ecx
lea    0x2ef8(%rip),%rdi
mov    $0x20,%esi
lea    0xeac(%rip),%rdx
call   1040 <snprintf@plt>
lea    0x2ee0(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_api_info_pid_cb>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0x2f11(%rip),%rbx
lea    0xeca(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %eax,%ecx
call   1040 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@plugin_api_info_pid_cb.value = internal global [32 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @plugin_api_info_pid_cb(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call i64 (...) @getpid()
%14 = trunc i64 %13 to i32
%15 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_pid_cb.value, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_pid_cb.value, i64 0, i64 0)
}

LLVM IR (-O2):
@plugin_api_info_pid_cb.value = internal global [32 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @plugin_api_info_pid_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i64 (...) @getpid()
%6 = trunc i64 %5 to i32
%7 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_pid_cb.value, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_pid_cb.value, i64 0, i64 0)
}
double fun4() { return 1.0; }


x86 assembly (clang, -O0):
<fun4>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun4>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @fun4() {
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @fun4() {
ret double 1.000000e+00
}
char *sccsid(void) {
  return ("@(#)sysstat-"
          "8.1.5"
          ": "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/"
          "embedded_rootfs/pkg_addon/sysstat-8.1.5/sadc.c"
          " compiled "
          "Mar 16 2022"
          " "
          "17:46:33");
}


x86 assembly (clang, -O0):
<sccsid>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sccsid>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [221 x i8] c"@(#)sysstat-8.1.5: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/embedded_rootfs/pkg_addon/sysstat-8.1.5/sadc.c compiled Mar 16 2022 17:46:33\00"
define i8* @sccsid() {
ret i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [221 x i8] c"@(#)sysstat-8.1.5: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/odit/rv042/refs/heads/master/linux/embedded_rootfs/pkg_addon/sysstat-8.1.5/sadc.c compiled Mar 16 2022 17:46:33\00"
define i8* @sccsid() {
ret i8* getelementptr inbounds ([221 x i8], [221 x i8]* @.str, i64 0, i64 0)
}
void ordenarListaIncrementalmentePorMatricula(struct _persona *lista,
                                              int cont) {}


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

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

LLVM IR (-O0):
%struct._persona = type opaque
define void @ordenarListaIncrementalmentePorMatricula(%struct._persona* %0, i32 %1) {
%3 = alloca %struct._persona*
%4 = alloca i32
store %struct._persona* %0, %struct._persona** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct._persona = type opaque
define void @ordenarListaIncrementalmentePorMatricula(%struct._persona* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void plot_bars(FILE *f, const char **opts, int sz, double d[]) {}


x86 assembly (clang, -O0):
<plot_bars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @plot_bars(i32* %0, i8** %1, i32 %2, double* %3) {
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca double*
store i32* %0, i32** %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store double* %3, double** %8
ret void
}

LLVM IR (-O2):
define void @plot_bars(i32* nocapture %0, i8** nocapture %1, i32 %2, double* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int MPI_Isend(void *buf, int count, int datatype, int source, int tag, int comm,
              int *request) {
  printf("MPI Stub WARNING: Should not send message to self\n");
  return 0;
}


x86 assembly (clang, -O0):
<MPI_Isend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [51 x i8] c"MPI Stub WARNING: Should not send message to self\0A\00"
define i32 @MPI_Isend(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32*
store i8* %0, i8** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32* %6, i32** %14
%15 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [50 x i8] c"MPI Stub WARNING: Should not send message to self\00"
define i32 @MPI_Isend(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* nocapture readnone %6) {
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *sr_skip_whitespace(const char *s) {
  while (isspace(*s))
    ++s;
  return (char *)s;
}


x86 assembly (clang, -O0):
<sr_skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <sr_skip_whitespace+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <sr_skip_whitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sr_skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <sr_skip_whitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @sr_skip_whitespace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @sr_skip_whitespace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int f189(int *);
int f190(int *p) { return f189(p); }


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

x86 assembly (clang, -O2):
<f190>:
jmp    1030 <f189@plt>

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

LLVM IR (-O2):
define i32 @f190(i32* %0) {
%2 = tail call i32 @f189(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ *EC_KEY_copy(int /*<<< orphan*/ *,
                                int /*<<< orphan*/ const *);
int /*<<< orphan*/ EC_KEY_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *EC_KEY_new();
EC_KEY *EC_KEY_dup(const EC_KEY *ec_key) {
  EC_KEY *ret = EC_KEY_new();
  if (ret == NULL)
    return NULL;
  if (EC_KEY_copy(ret, ec_key) == NULL) {
    EC_KEY_free(ret);
    return NULL;
  }
  return ret;
}


x86 assembly (clang, -O0):
<EC_KEY_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <EC_KEY_new@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115f <EC_KEY_dup+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1194 <EC_KEY_dup+0x64>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <EC_KEY_copy@plt>
cmp    $0x0,%rax
jne    118c <EC_KEY_dup+0x5c>
mov    -0x18(%rbp),%rdi
call   1040 <EC_KEY_free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1194 <EC_KEY_dup+0x64>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EC_KEY_dup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <EC_KEY_new@plt>
test   %rax,%rax
je     115e <EC_KEY_dup+0x2e>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <EC_KEY_copy@plt>
test   %rax,%rax
jne    1160 <EC_KEY_dup+0x30>
mov    %rbx,%rdi
call   1040 <EC_KEY_free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @EC_KEY_dup(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
%5 = call i32* (...) @EC_KEY_new()
store i32* %5, i32** %4
%6 = load i32*, i32** %4
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
store i32* null, i32** %2
br label %19
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = load i32*, i32** %3
%12 = call i32* @EC_KEY_copy(i32* %10, i32* %11)
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32*, i32** %4
%16 = call i32 @EC_KEY_free(i32* %15)
store i32* null, i32** %2
br label %19
17: ; preds = %9
%18 = load i32*, i32** %4
store i32* %18, i32** %2
br label %19
19: ; preds = %17, %14, %8
%20 = load i32*, i32** %2
ret i32* %20
}

LLVM IR (-O2):
define i32* @EC_KEY_dup(i32* %0) {
%2 = tail call i32* (...) @EC_KEY_new()
%3 = icmp eq i32* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32* @EC_KEY_copy(i32* %2, i32* %0)
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @EC_KEY_free(i32* %2)
br label %9
9: ; preds = %4, %1, %7
%10 = phi i32* [ null, %7 ], [ null, %1 ], [ %2, %4 ]
ret i32* %10
}
int sub(int x, int y, int z) { return x - y; }


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

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

LLVM IR (-O0):
define i32 @sub(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = sub nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @sub(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %0, %1
ret i32 %4
}
int test_klp_callbacks_mod_init(void) {
  pr_info("%s\n", __func__);
  return 0;
}


x86 assembly (clang, -O0):
<test_klp_callbacks_mod_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_info@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.test_klp_callbacks_mod_init = [28 x i8] c"test_klp_callbacks_mod_init\00"
define i32 @test_klp_callbacks_mod_init() {
%1 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.test_klp_callbacks_mod_init, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@__func__.test_klp_callbacks_mod_init = [28 x i8] c"test_klp_callbacks_mod_init\00"
define i32 @test_klp_callbacks_mod_init() {
%1 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @__func__.test_klp_callbacks_mod_init, i64 0, i64 0))
ret i32 0
}
int count_bit_set(unsigned int number, int count) {
  if (number) {
    if (number & 0x01)
      count++;
    return count_bit_set((number >> 1), count);
  }
  return count;
}


x86 assembly (clang, -O0):
<count_bit_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1156 <count_bit_set+0x46>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1140 <count_bit_set+0x30>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
shr    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1030 <count_bit_set@plt>
mov    %eax,-0x4(%rbp)
jmp    115c <count_bit_set+0x4c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_bit_set>:
mov    %esi,%eax
test   %edi,%edi
je     1120 <count_bit_set+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <count_bit_set+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_bit_set(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ %1, %2 ]
%6 = phi i32 [ %9, %4 ], [ %0, %2 ]
%7 = and i32 %6, 1
%8 = add nsw i32 %7, %5
%9 = lshr i32 %6, 1
%10 = icmp ult i32 %6, 2
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = phi i32 [ %1, %2 ], [ %8, %4 ]
ret i32 %12
}
char *write(char *out, char c) {
  *out++ = c;
  return out;
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    %sil,(%rdi)
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @write(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
store i8 %5, i8* %6
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @write(i8* writeonly %0, i8 signext %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %1, i8* %0
ret i8* %3
}
void linear(int a[], int n) {
  int i = 0, flag = 0, key;
  key = a[n];
  for (i = 0; i < 100000; i++) {
    if (a[i] == key) {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<linear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x186a0,-0x10(%rbp)
jge    1167 <linear+0x67>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1154 <linear+0x54>
jmp    1167 <linear+0x67>
jmp    1159 <linear+0x59>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112e <linear+0x2e>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @linear(i32* nocapture %0, i32 %1) {
ret void
}
void ARGBToJ400() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @ARGBToJ400() {
ret void
}
int main() {
  int x;
  x = 0;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char *skip_char_not_match(char ch, char *str) {
  while (*str != '\0' && *str != ch) {
    str++;
  }
  return str;
}


x86 assembly (clang, -O0):
<skip_char_not_match>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1136 <skip_char_not_match+0x36>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1146 <skip_char_not_match+0x46>
jmp    1157 <skip_char_not_match+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <skip_char_not_match+0xe>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_char_not_match>:
mov    %rsi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <skip_char_not_match+0x21>
cmp    %dil,%cl
jne    1110 <skip_char_not_match+0x10>
ret

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

LLVM IR (-O2):
define i8* @skip_char_not_match(i8 signext %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = icmp eq i8 %5, %0
%8 = or i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ sendComPrimitives(char);
int main() {
  sendComPrimitives('d');
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1030 <sendComPrimitives@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sendComPrimitives(i8 signext 100)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sendComPrimitives(i8 signext 100)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
void mallocCastToFP() {
  void *p = malloc(2);
  void (*fp)() = p;
  free(p);
}


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

x86 assembly (clang, -O2):
<mallocCastToFP>:
push   %rax
mov    $0x2,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @mallocCastToFP() {
%1 = alloca i8*
%2 = alloca void (...)*
%3 = call i8* @malloc(i32 2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = bitcast i8* %4 to void (...)*
store void (...)* %5, void (...)** %2
%6 = load i8*, i8** %1
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @mallocCastToFP() {
%1 = tail call dereferenceable_or_null(2) i8* @malloc(i32 2)
%2 = tail call i32 @free(i8* %1)
ret void
}
int ordering_lossy_lt(void) {
  return ((int)-(((int)0x37EF)
                 << (8 *
                     (((!!(((!!(sizeof(int))) * ((sizeof(int)) - 1)))) *
                       ((((!!(sizeof(int))) * ((sizeof(int)) - 1))) - 1))))));
}


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

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

LLVM IR (-O0):
define i32 @ordering_lossy_lt() {
ret i32 -938409984
}

LLVM IR (-O2):
define i32 @ordering_lossy_lt() {
ret i32 -938409984
}