xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_python_unsupported_msg(void) {
  fprintf(stderr, "Python scripting not supported."
                  "  Install libpython and rebuild perf to enable it.\n"
                  "For example:\n  # apt-get install python-dev (ubuntu)"
                  "\n  # yum install python-devel (Fedora)"
                  "\n  etc.\n");
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [181 x i8] c"Python scripting not supported. Install libpython and rebuild perf to enable it.\0AFor example:\0A # apt-get install python-dev (ubuntu)\0A # yum install python-devel (Fedora)\0A etc.\0A\00"
define void @print_python_unsupported_msg() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [181 x i8] c"Python scripting not supported. Install libpython and rebuild perf to enable it.\0AFor example:\0A # apt-get install python-dev (ubuntu)\0A # yum install python-devel (Fedora)\0A etc.\0A\00"
define void @print_python_unsupported_msg() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ funca();
int /*<<< orphan*/ funcb();
int main() {
  int j;
  for (j = 0; j < 100; j++)
    funca();
  for (j = 0; j < 100; j++)
    funcb();
  funcb();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1155 <main+0x35>
mov    $0x0,%al
call   1030 <funca@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    117b <main+0x5b>
mov    $0x0,%al
call   1040 <funcb@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115c <main+0x3c>
mov    $0x0,%al
call   1040 <funcb@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <funca@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <funcb@plt>
add    $0xffffffff,%ebx
jne    1150 <main+0x30>
xor    %eax,%eax
call   1040 <funcb@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 (...) @funca()
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %1
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ 0, %1 ]
%8 = tail call i32 (...) @funcb()
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, 100
br i1 %10, label %11, label %6
11: ; preds = %6
%12 = tail call i32 (...) @funcb()
ret i32 0
}
void module1_section3_topic10() {}


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

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

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

LLVM IR (-O2):
define void @module1_section3_topic10() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
int _sleep(unsigned int time) {
  sleep(time);
  return 0;
}


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

x86 assembly (clang, -O2):
<_sleep>:
push   %rax
call   1030 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @_sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret i32 0
}
/* Type definitions */
struct yaffs_utimbuf {
  int dummy;
};

/* Variables and functions */
int yaffs_utime_reldir(int /*<<< orphan*/, char const *,
                       struct yaffs_utimbuf const *);
int yaffs_utime(const char *path, const struct yaffs_utimbuf *buf) {
  return yaffs_utime_reldir((0), path, buf);
}


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

x86 assembly (clang, -O2):
<yaffs_utime>:
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <yaffs_utime_reldir@plt>

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

LLVM IR (-O2):
%struct.yaffs_utimbuf = type { i32 }
define i32 @yaffs_utime(i8* %0, %struct.yaffs_utimbuf* %1) {
%3 = tail call i32 @yaffs_utime_reldir(i32 0, i8* %0, %struct.yaffs_utimbuf* %1)
ret i32 %3
}
int test6(int *p) {
  int z = 1 ? *p : 0;
  return z;
}


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

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

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

LLVM IR (-O2):
define i32 @test6(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
scalar_t__ malloc(int);
char *strcpy(char *, char *);
int strlen(char *);
char *assign_string(char *a) {
  char *b;
  int n = 1 + strlen(a);
  b = (char *)malloc(n * sizeof(char));
  b = strcpy(b, a);
  return b;
}


x86 assembly (clang, -O0):
<assign_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_string>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @assign_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 1, %6
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 1
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = call i8* @strcpy(i8* %14, i8* %15)
store i8* %16, i8** %3
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
define i8* @assign_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mbedtls_free(void *p) { free(p); }


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

LLVM IR (-O0):
define void @mbedtls_free(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 @mbedtls_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void do_coproc_seg_over_run(void *x) {
  do {
    kprintf("Unsupport Now...[%s]\n", __FUNCTION__);
    while (1)
      ;
  } while (0);
  ;
}


x86 assembly (clang, -O0):
<do_coproc_seg_over_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xeec(%rip),%rsi
mov    $0x0,%al
call   1030 <kprintf@plt>
jmp    1131 <do_coproc_seg_over_run+0x21>

x86 assembly (clang, -O2):
<do_coproc_seg_over_run>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef7(%rip),%rsi
xor    %eax,%eax
call   1030 <kprintf@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    1130 <do_coproc_seg_over_run+0x20>

LLVM IR (-O0):
@.str = [22 x i8] c"Unsupport Now...[%s]\0A\00"
@__FUNCTION__.do_coproc_seg_over_run = [23 x i8] c"do_coproc_seg_over_run\00"
define void @do_coproc_seg_over_run(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.do_coproc_seg_over_run, i64 0, i64 0))
br label %5
5: ; preds = %3, %5
br label %5
6: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Unsupport Now...[%s]\0A\00"
@__FUNCTION__.do_coproc_seg_over_run = [23 x i8] c"do_coproc_seg_over_run\00"
define void @do_coproc_seg_over_run(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.do_coproc_seg_over_run, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
/* Variables and functions */
char *partnamebf(char *, int, int, int /*<<< orphan*/, int /*<<< orphan*/ *);
char *partname(char *dev, int pno, int lth) {
  return partnamebf(dev, pno, lth, 0, NULL);
}


x86 assembly (clang, -O0):
<partname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <partnamebf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<partname>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <partnamebf@plt>

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

LLVM IR (-O2):
define i8* @partname(i8* %0, i32 %1, i32 %2) {
%4 = tail call i8* @partnamebf(i8* %0, i32 %1, i32 %2, i32 0, i32* null)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ test_MurmurHash3_x86_128();
int /*<<< orphan*/ test_MurmurHash3_x86_32();
int main() {
  test_MurmurHash3_x86_32();
  test_MurmurHash3_x86_128();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_MurmurHash3_x86_32@plt>
xor    %eax,%eax
call   1030 <test_MurmurHash3_x86_128@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_MurmurHash3_x86_32()
%2 = tail call i32 (...) @test_MurmurHash3_x86_128()
ret i32 0
}
/* Variables and functions */
int i_mod(int *, int *);
int intr_wrap_386(int p1, int p2) { return i_mod(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_386>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <i_mod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_386>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <i_mod@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @intr_wrap_386(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @i_mod(i32* %3, i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @intr_wrap_386(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @i_mod(i32* %3, i32* %4)
ret i32 %5
}
void init_output() {
  int dtype;
  void init_audiodev();
  dtype = 6;
  init_audiodev(dtype);
}


x86 assembly (clang, -O0):
<init_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <init_audiodev@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_output>:
mov    $0x6,%edi
xor    %eax,%eax
jmp    1030 <init_audiodev@plt>

LLVM IR (-O0):
define void @init_output() {
%1 = alloca i32
store i32 6, i32* %1
%2 = load i32, i32* %1
ret void
}

LLVM IR (-O2):
define void @init_output() {
tail call void (i32, ...) bitcast (void (...)* @init_audiodev to void (i32, ...)*)(i32 6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ert_read(int, unsigned int *);
int /*<<< orphan*/ ert_write(int, unsigned short);
void writeFIFO(unsigned short addr, unsigned int value) {
  unsigned int tmp;
  ert_write(0x0844, value);
  ert_write(0x0848, addr | (1UL << (14)));
  do {
    ert_read(0x0848, &tmp);
  } while ((tmp & (1UL << (15))) == 0);
  ert_write(0x0848, 0);
}


x86 assembly (clang, -O0):
<writeFIFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x844,%edi
movzwl %ax,%esi
call   1030 <ert_write@plt>
movzwl -0x2(%rbp),%eax
or     $0x4000,%rax
mov    $0x848,%edi
movzwl %ax,%esi
call   1030 <ert_write@plt>
mov    $0x848,%edi
lea    -0xc(%rbp),%rsi
call   1040 <ert_read@plt>
mov    -0xc(%rbp),%eax
and    $0x8000,%rax
cmp    $0x0,%rax
je     1159 <writeFIFO+0x39>
mov    $0x848,%edi
xor    %esi,%esi
call   1030 <ert_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeFIFO>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movzwl %si,%esi
mov    $0x844,%edi
call   1030 <ert_write@plt>
or     $0x4000,%ebx
mov    $0x848,%edi
mov    %ebx,%esi
call   1030 <ert_write@plt>
lea    0xc(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x848,%edi
mov    %rbx,%rsi
call   1040 <ert_read@plt>
testb  $0x80,0xd(%rsp)
je     1150 <writeFIFO+0x30>
mov    $0x848,%edi
xor    %esi,%esi
call   1030 <ert_write@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @writeFIFO(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
%5 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = trunc i32 %6 to i16
%8 = call i32 @ert_write(i32 2116, i16 zeroext %7)
%9 = load i16, i16* %3
%10 = zext i16 %9 to i64
%11 = or i64 %10, 16384
%12 = trunc i64 %11 to i16
%13 = call i32 @ert_write(i32 2120, i16 zeroext %12)
br label %14
14: ; preds = %16, %2
%15 = call i32 @ert_read(i32 2120, i32* %5)
br label %16
16: ; preds = %14
%17 = load i32, i32* %5
%18 = zext i32 %17 to i64
%19 = and i64 %18, 32768
%20 = icmp eq i64 %19, 0
br i1 %20, label %14, label %21
21: ; preds = %16
%22 = call i32 @ert_write(i32 2120, i16 zeroext 0)
ret void
}

LLVM IR (-O2):
define void @writeFIFO(i16 zeroext %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = trunc i32 %1 to i16
%6 = tail call i32 @ert_write(i32 2116, i16 zeroext %5)
%7 = or i16 %0, 16384
%8 = tail call i32 @ert_write(i32 2120, i16 zeroext %7)
br label %9
9: ; preds = %9, %2
%10 = call i32 @ert_read(i32 2120, i32* %3)
%11 = load i32, i32* %3
%12 = and i32 %11, 32768
%13 = icmp eq i32 %12, 0
br i1 %13, label %9, label %14
14: ; preds = %9
%15 = call i32 @ert_write(i32 2120, i16 zeroext 0)
ret void
}
void X509_ATTRIBUTE_new(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ATTRIBUTE_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ increment_finished_count();
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void *thread_func1(void *arg) {
  write(STDOUT_FILENO, ".", 1);
  increment_finished_count();
  return 0;
}


x86 assembly (clang, -O0):
<thread_func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    $0x0,%al
call   1030 <increment_finished_count@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_func1>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
mov    $0x1,%edx
call   1040 <write@plt>
xor    %eax,%eax
call   1030 <increment_finished_count@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [2 x i8] c".\00"
define i8* @thread_func1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%5 = call i32 (...) @increment_finished_count()
ret i8* null
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [2 x i8] c".\00"
define noalias i8* @thread_func1(i8* nocapture readnone %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = tail call i32 @write(i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 (...) @increment_finished_count()
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ foobar(char *);
void __attribute__((no_instrument_function)) func2(void) {
  int i;
  for (i = 0; i < 10; i++)
    foobar("Hello world");
}


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    1143 <func2+0x33>
lea    0xed0(%rip),%rdi
call   1030 <foobar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <func2+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func2>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
call   1030 <foobar@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <foobar@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Hello world\00"
define void @func2() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello world\00"
define void @func2() {
%1 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @foobar(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local2;
  unsigned short local1;
  {
    state[0UL] = input[0UL] + (unsigned short)2885;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local2 = 0UL;
      while (local2 < (unsigned short)0) {
        local2 += 2UL;
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 371143069UL) - (unsigned short)30093;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0xb45,%eax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x16(%rbp)
movzwl -0x16(%rbp),%eax
cmp    $0x0,%eax
jge    1164 <RandomFunc+0x64>
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    1153 <RandomFunc+0x53>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1135 <RandomFunc+0x35>
movzwl -0x16(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x16(%rbp)
jmp    1122 <RandomFunc+0x22>
movzwl -0x12(%rbp),%eax
sub    $0x161f319d,%rax
sub    $0x758d,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    $0x641b,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
%7 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%8 = load i16*, i16** %3
%9 = getelementptr inbounds i16, i16* %8, i64 0
%10 = load i16, i16* %9
%11 = zext i16 %10 to i32
%12 = add nsw i32 %11, 2885
%13 = trunc i32 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %7
br label %15
15: ; preds = %29, %2
%16 = load i16, i16* %7
%17 = zext i16 %16 to i32
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %34
19: ; preds = %15
store i16 0, i16* %6
br label %20
20: ; preds = %24, %19
%21 = load i16, i16* %6
%22 = zext i16 %21 to i32
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %20
%25 = load i16, i16* %6
%26 = zext i16 %25 to i64
%27 = add i64 %26, 2
%28 = trunc i64 %27 to i16
store i16 %28, i16* %6
br label %20
29: ; preds = %20
%30 = load i16, i16* %7
%31 = zext i16 %30 to i64
%32 = add i64 %31, 2
%33 = trunc i64 %32 to i16
store i16 %33, i16* %7
br label %15
34: ; preds = %15
%35 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%36 = load i16, i16* %35
%37 = zext i16 %36 to i64
%38 = sub i64 %37, 371143069
%39 = sub i64 %38, 30093
%40 = trunc i64 %39 to i16
%41 = load i16*, i16** %4
%42 = getelementptr inbounds i16, i16* %41, i64 0
store i16 %40, i16* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = add i16 %3, 25627
store i16 %4, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ stdscr;
void display_start(void) {
  initscr();
  cbreak();
  noecho();
  keypad(stdscr, TRUE);
  nodelay(stdscr, TRUE);
}


x86 assembly (clang, -O0):
<display_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1070 <noecho@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    0x2e67(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
mov    0x2e50(%rip),%rax
mov    (%rax),%esi
call   1060 <nodelay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_start>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1070 <noecho@plt>
mov    0x2e78(%rip),%r14
mov    (%r14),%edi
mov    0x2e66(%rip),%rbx
mov    (%rbx),%esi
call   1040 <keypad@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <nodelay@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
define void @display_start() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = call i32 @keypad(i32 %4, i32 %5)
%7 = load i32, i32* @stdscr
%8 = load i32, i32* @TRUE
%9 = call i32 @nodelay(i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
define void @display_start() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = tail call i32 @keypad(i32 %4, i32 %5)
%7 = load i32, i32* @stdscr
%8 = load i32, i32* @TRUE
%9 = tail call i32 @nodelay(i32 %7, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ browser_up();
void cmd_browser_up(char *arg) { browser_up(); }


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

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

LLVM IR (-O0):
define void @cmd_browser_up(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @browser_up()
ret void
}

LLVM IR (-O2):
define void @cmd_browser_up(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @browser_up()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_ADI();
void do0xC6() { _I8080_ADI(); }


x86 assembly (clang, -O0):
<do0xC6>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <_I8080_ADI@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @do0xC6() {
%1 = call i32 (...) @_I8080_ADI()
ret void
}

LLVM IR (-O2):
define void @do0xC6() {
%1 = tail call i32 (...) @_I8080_ADI()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getegid();
int /*<<< orphan*/ geteuid();
scalar_t__ getgid();
scalar_t__ getuid();
int /*<<< orphan*/ root_warn();
int main(int argc, char *argv[]) {
  if ((getuid() && !geteuid()) || (getgid() && !getegid()))
    root_warn();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getuid@plt>
cmp    $0x0,%rax
je     1187 <main+0x37>
mov    $0x0,%al
call   1040 <geteuid@plt>
cmp    $0x0,%eax
je     11a8 <main+0x58>
mov    $0x0,%al
call   1060 <getgid@plt>
cmp    $0x0,%rax
je     11af <main+0x5f>
mov    $0x0,%al
call   1070 <getegid@plt>
cmp    $0x0,%eax
jne    11af <main+0x5f>
mov    $0x0,%al
call   1050 <root_warn@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
test   %rax,%rax
je     1168 <main+0x18>
xor    %eax,%eax
call   1040 <geteuid@plt>
test   %eax,%eax
je     117f <main+0x2f>
xor    %eax,%eax
call   1060 <getgid@plt>
test   %rax,%rax
je     1186 <main+0x36>
xor    %eax,%eax
call   1070 <getegid@plt>
test   %eax,%eax
jne    1186 <main+0x36>
xor    %eax,%eax
call   1050 <root_warn@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 (...) @getuid()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 (...) @geteuid()
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %8, %2
%12 = call i64 (...) @getgid()
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = call i32 (...) @getegid()
%16 = icmp ne i32 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %14, %8
%18 = call i32 (...) @root_warn()
br label %19
19: ; preds = %17, %14, %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @getuid()
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 (...) @geteuid()
%7 = icmp eq i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %5, %2
%9 = tail call i64 (...) @getgid()
%10 = icmp eq i64 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %8
%12 = tail call i32 (...) @getegid()
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11, %5
%15 = tail call i32 (...) @root_warn()
br label %16
16: ; preds = %14, %11, %8
ret i32 0
}
void output(short port, unsigned char byte) {
  asm volatile("outb %1,%0" ::"dN"(port), "a"(byte));
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x3(%rbp),%al
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @output(i16 signext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @output(i16 signext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $1,$0", "{dx}N,{ax},~{dirflag},~{fpsr},~{flags}"(i16 %0, i8 %1)
ret void
}
void INT_Excep_PERIB_INTB162(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB162() {
ret void
}
/* Variables and functions */
double omp_get_wtime();
double RCCE_wtime(void) { return (omp_get_wtime()); }


x86 assembly (clang, -O0):
<RCCE_wtime>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omp_get_wtime@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define double @RCCE_wtime() {
%1 = call double (...) @omp_get_wtime()
ret double %1
}

LLVM IR (-O2):
define double @RCCE_wtime() {
%1 = tail call double (...) @omp_get_wtime()
ret double %1
}
float bmi_calculator(float weight, float height) {
  return weight / (height * height);
}


x86 assembly (clang, -O0):
<bmi_calculator>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmi_calculator>:
mulss  %xmm1,%xmm1
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @bmi_calculator(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* %4
%7 = load float, float* %4
%8 = fmul float %6, %7
%9 = fdiv float %5, %8
ret float %9
}

LLVM IR (-O2):
define float @bmi_calculator(float %0, float %1) {
%3 = fmul float %1, %1
%4 = fdiv float %0, %3
ret float %4
}
/* Type definitions */
struct timeval {
  float tv_sec;
  double tv_usec;
};

/* Variables and functions */
float time_diff(const struct timeval *start, const struct timeval *stop) {
  return (stop->tv_sec - start->tv_sec) +
         (stop->tv_usec - start->tv_usec) / 1.0e6;
}


x86 assembly (clang, -O0):
<time_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
subss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm1
movsd  0xec6(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_diff>:
movss  (%rsi),%xmm0
subss  (%rdi),%xmm0
movsd  0x8(%rsi),%xmm1
subsd  0x8(%rdi),%xmm1
divsd  0xee6(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
%struct.timeval = type { float, double }
define float @time_diff(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%7 = load float, float* %6
%8 = load %struct.timeval*, %struct.timeval** %3
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load float, float* %9
%11 = fsub float %7, %10
%12 = fpext float %11 to double
%13 = load %struct.timeval*, %struct.timeval** %4
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %13, i32 0, i32 1
%15 = load double, double* %14
%16 = load %struct.timeval*, %struct.timeval** %3
%17 = getelementptr inbounds %struct.timeval, %struct.timeval* %16, i32 0, i32 1
%18 = load double, double* %17
%19 = fsub double %15, %18
%20 = fdiv double %19, 1.000000e+06
%21 = fadd double %12, %20
%22 = fptrunc double %21 to float
ret float %22
}

LLVM IR (-O2):
%struct.timeval = type { float, double }
define float @time_diff(%struct.timeval* nocapture %0, %struct.timeval* nocapture %1) {
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%4 = load float, float* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load float, float* %5
%7 = fsub float %4, %6
%8 = fpext float %7 to double
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load double, double* %9
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%12 = load double, double* %11
%13 = fsub double %10, %12
%14 = fdiv double %13, 1.000000e+06
%15 = fadd double %14, %8
%16 = fptrunc double %15 to float
ret float %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  struct punkt {
    int x;
    int y;
  };
  struct punkt p;
  p.x = 2;
  p.y = 3;
  printf("Mitt punkt p(%d,%d)\n", p.x, p.y);
  return 0;
}


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

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

LLVM IR (-O2):
@.str = [21 x i8] c"Mitt punkt p(%d,%d)\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 2, i32 3)
ret i32 0
}
/* Type definitions */
struct svc_req {
  int dummy;
};

/* Variables and functions */
int l2tp_system_get_1_svc(void *, struct svc_req *);
int _l2tp_system_get_1(void *argp, void *result, struct svc_req *rqstp) {
  return (l2tp_system_get_1_svc(result, rqstp));
}


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

x86 assembly (clang, -O2):
<_l2tp_system_get_1>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <l2tp_system_get_1_svc@plt>

LLVM IR (-O0):
%struct.svc_req = type { i32 }
define i32 @_l2tp_system_get_1(i8* %0, i8* %1, %struct.svc_req* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.svc_req*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.svc_req* %2, %struct.svc_req** %6
%7 = load i8*, i8** %5
%8 = load %struct.svc_req*, %struct.svc_req** %6
%9 = call i32 @l2tp_system_get_1_svc(i8* %7, %struct.svc_req* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
define i32 @_l2tp_system_get_1(i8* nocapture readnone %0, i8* %1, %struct.svc_req* %2) {
%4 = tail call i32 @l2tp_system_get_1_svc(i8* %1, %struct.svc_req* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
void omp_set_lock(omp_lock_t *lock) {}


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

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

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

LLVM IR (-O2):
define void @omp_set_lock(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int get_carry();
long long intLSR(long long);
long long mask_value(long long);
int /*<<< orphan*/ set_carry(long long);
long long topbit_mask();
long long int intRRC(long long int x) {
  const int cin = get_carry();
  set_carry(x & 1);
  x = intLSR(x);
  if (cin)
    x |= topbit_mask();
  return mask_value(x);
}


x86 assembly (clang, -O0):
<intRRC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1060 <get_carry@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
and    $0x1,%rdi
call   1030 <set_carry@plt>
mov    -0x8(%rbp),%rdi
call   1070 <intLSR@plt>
mov    %rax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1199 <intRRC+0x49>
mov    $0x0,%al
call   1050 <topbit_mask@plt>
or     -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mask_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intRRC>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <get_carry@plt>
mov    %eax,%ebp
mov    %ebx,%edi
and    $0x1,%edi
call   1030 <set_carry@plt>
mov    %rbx,%rdi
call   1070 <intLSR@plt>
mov    %rax,%rbx
test   %ebp,%ebp
je     1182 <intRRC+0x32>
xor    %eax,%eax
call   1050 <topbit_mask@plt>
or     %rax,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mask_value@plt>

LLVM IR (-O0):
define i64 @intRRC(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = call i32 (...) @get_carry()
store i32 %4, i32* %3
%5 = load i64, i64* %2
%6 = and i64 %5, 1
%7 = call i32 @set_carry(i64 %6)
%8 = load i64, i64* %2
%9 = call i64 @intLSR(i64 %8)
store i64 %9, i64* %2
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %1
%13 = call i64 (...) @topbit_mask()
%14 = load i64, i64* %2
%15 = or i64 %14, %13
store i64 %15, i64* %2
br label %16
16: ; preds = %12, %1
%17 = load i64, i64* %2
%18 = call i64 @mask_value(i64 %17)
ret i64 %18
}

LLVM IR (-O2):
define i64 @intRRC(i64 %0) {
%2 = tail call i32 (...) @get_carry()
%3 = and i64 %0, 1
%4 = tail call i32 @set_carry(i64 %3)
%5 = tail call i64 @intLSR(i64 %0)
%6 = icmp eq i32 %2, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = tail call i64 (...) @topbit_mask()
%9 = or i64 %8, %5
br label %10
10: ; preds = %7, %1
%11 = phi i64 [ %9, %7 ], [ %5, %1 ]
%12 = tail call i64 @mask_value(i64 %11)
ret i64 %12
}
const char *pl_get_type(void) {
  static const char *const type = "console";
  return type;
}


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

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

LLVM IR (-O0):
@pl_get_type.type = internal constant i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0)
@.str = [8 x i8] c"console\00"
define i8* @pl_get_type() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0)
}

LLVM IR (-O2):
@.str = [8 x i8] c"console\00"
define i8* @pl_get_type() {
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *, char *);
void get_request(char *p, char *path, char *arg, char *ar1) {
  snprintf(p, 1024,
           "GET /%s/files/shell.php?cmd=%s HTTP/1.1\r\nHost: %s\r\nUser-Agent: "
           "blueimp jquery exploit/9.22.0\r\nAccept: */*\r\n\r\n",
           path, ar1, arg);
}


x86 assembly (clang, -O0):
<get_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    $0x400,%esi
lea    0xebc(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_request>:
mov    %rcx,%r8
mov    %rdx,%r9
mov    %rsi,%rcx
lea    0xee0(%rip),%rdx
mov    $0x400,%esi
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [110 x i8] c"GET /%s/files/shell.php?cmd=%s HTTP/1.1\0D\0AHost: %s\0D\0AUser-Agent: blueimp jquery exploit/9.22.0\0D\0AAccept: */*\0D\0A\0D\0A\00"
define void @get_request(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** %8
%12 = load i8*, i8** %7
%13 = call i32 @snprintf(i8* %9, i32 1024, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [110 x i8] c"GET /%s/files/shell.php?cmd=%s HTTP/1.1\0D\0AHost: %s\0D\0AUser-Agent: blueimp jquery exploit/9.22.0\0D\0AAccept: */*\0D\0A\0D\0A\00"
define void @get_request(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @snprintf(i8* %0, i32 1024, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3, i8* %2)
ret void
}
int funct(const void *a, const void *b) { return (*(int *)a - *(int *)b); }


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

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

LLVM IR (-O0):
define i32 @funct(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @funct(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int sys_setpgid(int /*<<< orphan*/, int /*<<< orphan*/);
int sys_setpgrp(void) { return sys_setpgid(0, 0); }


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

x86 assembly (clang, -O2):
<sys_setpgrp>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <sys_setpgid@plt>

LLVM IR (-O0):
define i32 @sys_setpgrp() {
%1 = call i32 @sys_setpgid(i32 0, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @sys_setpgrp() {
%1 = tail call i32 @sys_setpgid(i32 0, i32 0)
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_5__ {
  TYPE_1__ *fts_statp;
};
struct TYPE_4__ {
  scalar_t__ st_ino;
  scalar_t__ st_dev;
};
typedef TYPE_2__ FTSENT;

/* Variables and functions */
char *r_name_make(char *, unsigned long, unsigned long);
char *ftsent_name(const FTSENT *el) {
  return r_name_make("%06lx:%06lu", (long unsigned)el->fts_statp->st_dev,
                     (long unsigned)el->fts_statp->st_ino);
}


x86 assembly (clang, -O0):
<ftsent_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rdx
lea    0xec8(%rip),%rdi
call   1030 <r_name_make@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftsent_name>:
mov    (%rdi),%rax
mov    (%rax),%rdx
mov    0x8(%rax),%rsi
lea    0xedf(%rip),%rdi
jmp    1030 <r_name_make@plt>

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__* }
%struct.TYPE_4__ = type { i64, i64 }
@.str = [12 x i8] c"%06lx:%06lu\00"
define i8* @ftsent_name(%struct.TYPE_5__* %0) {
%2 = alloca %struct.TYPE_5__*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %2
%3 = load %struct.TYPE_5__*, %struct.TYPE_5__** %2
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i32 0, i32 0
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 1
%7 = load i64, i64* %6
%8 = load %struct.TYPE_5__*, %struct.TYPE_5__** %2
%9 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %8, i32 0, i32 0
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %9
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 0
%12 = load i64, i64* %11
%13 = call i8* @r_name_make(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %7, i64 %12)
ret i8* %13
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__* }
%struct.TYPE_4__ = type { i64, i64 }
@.str = [12 x i8] c"%06lx:%06lu\00"
define i8* @ftsent_name(%struct.TYPE_5__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0
%3 = load %struct.TYPE_4__*, %struct.TYPE_4__** %2
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 1
%5 = load i64, i64* %4
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 0
%7 = load i64, i64* %6
%8 = tail call i8* @r_name_make(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %5, i64 %7)
ret i8* %8
}