xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ F_OK;
int access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int fexist(char *file) {
  if (!file) {
    errno = EINVAL;
    return 0;
  }
  if (-1 == access(file, F_OK))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<fexist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1145 <fexist+0x35>
mov    0x2eaa(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea9(%rip),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1179 <fexist+0x69>
mov    -0x10(%rbp),%rdi
mov    0x2e78(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1172 <fexist+0x62>
movl   $0x0,-0x4(%rbp)
jmp    1179 <fexist+0x69>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fexist>:
push   %rax
test   %rdi,%rdi
je     1130 <fexist+0x20>
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
setne  %al
pop    %rcx
ret
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    0x2ea0(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
@F_OK = global i32 0
define i32 @fexist(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = load i32, i32* @EINVAL
store i32 %7, i32* @errno
store i32 0, i32* %2
br label %15
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i32, i32* @F_OK
%11 = call i32 @access(i8* %9, i32 %10)
%12 = icmp eq i32 -1, %11
br i1 %12, label %13, label %14
13: ; preds = %8
store i32 0, i32* %2
br label %15
14: ; preds = %8
store i32 1, i32* %2
br label %15
15: ; preds = %14, %13, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@F_OK = global i32 0
define i32 @fexist(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = load i32, i32* @EINVAL
store i32 %4, i32* @errno
br label %10
5: ; preds = %1
%6 = load i32, i32* @F_OK
%7 = tail call i32 @access(i8* %0, i32 %6)
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %3
%11 = phi i32 [ 0, %3 ], [ %9, %5 ]
ret i32 %11
}
void init_persist_data() {}


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

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

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

LLVM IR (-O2):
define void @init_persist_data() {
ret void
}
void f4(void) {
  char a;
  char b = 1;
  long long int c = 3LL;
#pragma omp atomic capture
  a = b = c << b;
  if (b != 6 || a != 6)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x1,-0x2(%rbp)
movq   $0x3,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl -0x2(%rbp),%ecx
mov    %ecx,%ecx
shl    %cl,%rax
mov    %al,-0x2(%rbp)
mov    %al,-0x1(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x6,%eax
jne    1151 <f4+0x41>
movsbl -0x1(%rbp),%eax
cmp    $0x6,%eax
je     1156 <f4+0x46>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f4() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i64
store i8 1, i8* %2
store i64 3, i64* %3
%4 = load i64, i64* %3
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = zext i32 %6 to i64
%8 = shl i64 %4, %7
%9 = trunc i64 %8 to i8
store i8 %9, i8* %2
store i8 %9, i8* %1
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 6
br i1 %12, label %17, label %13
13: ; preds = %0
%14 = load i8, i8* %1
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 6
br i1 %16, label %17, label %18
17: ; preds = %13, %0
unreachable
18: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @f4() {
ret void
}
void ILO_Trim_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @ILO_Trim_SaveConfig() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ hash(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main() {
  char input[200];
  fgets(input, 200, stdin);
  printf("%li", hash(input));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
mov    $0xc8,%esi
call   1050 <fgets@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <hash@plt>
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xea0(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%li\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 200, i32 %4)
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%7 = call i32 @hash(i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%li\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 200, i32 %3)
%5 = call i32 @hash(i8* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ system(char *);
int main() {
  char buffer[32];
  printf("Command: ");
  fgets(buffer, 32, stdin);
  system(buffer);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
mov    $0x20,%esi
call   1050 <fgets@plt>
lea    -0x30(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Command: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [32 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 32, i32 %5)
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Command: \00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 32, i32 %4)
%6 = call i32 @system(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ xfree(void *);
void rsa_free(void *ptr, size_t size) {
  memset(ptr, 0, size);
  xfree(ptr);
}


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

x86 assembly (clang, -O2):
<rsa_free>:
push   %rbx
mov    %rsi,%rdx
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <xfree@plt>

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

LLVM IR (-O2):
define void @rsa_free(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
%4 = tail call i32 @xfree(i8* %0)
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *rpl_malloc(size_t size) {
  if (!size)
    size++;
  return malloc(size);
}


x86 assembly (clang, -O0):
<rpl_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1133 <rpl_malloc+0x23>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpl_malloc>:
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @rpl_malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 1, i64 %0
%4 = tail call i8* @malloc(i64 %3)
ret i8* %4
}
/* Variables and functions */
void *dlvsym(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @dlvsym() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @dlvsym() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ qsort_r(void *, size_t, int (*)(void const *, void const *),
                           int /*<<< orphan*/, size_t);
void qsort(void *base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *)) {
  qsort_r(base, size, compar, 0, nmemb - 1);
}


x86 assembly (clang, -O0):
<qsort>:
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    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%r8
sub    $0x1,%r8
xor    %ecx,%ecx
call   1030 <qsort_r@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort>:
lea    -0x1(%rsi),%r8
mov    %rdx,%rsi
mov    %rcx,%rdx
xor    %ecx,%ecx
jmp    1030 <qsort_r@plt>

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

LLVM IR (-O2):
define void @qsort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = add i64 %1, -1
%6 = tail call i32 @qsort_r(i8* %0, i64 %2, i32 (i8*, i8*)* %3, i32 0, i64 %5)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ get_pixel;
};
struct TYPE_4__ {
  TYPE_1__ f;
};
typedef TYPE_2__ XImage;

/* Variables and functions */
void *get_XImage_f_get_pixel(void *_p) {
  return (void *)((XImage *)_p)->f.get_pixel;
}


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

x86 assembly (clang, -O2):
<get_XImage_f_get_pixel>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i8* @get_XImage_f_get_pixel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @get_XImage_f_get_pixel(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int smack_get_file(char **, char *);
int smack_get_onlycap(char **label) { return smack_get_file(label, "onlycap"); }


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

x86 assembly (clang, -O2):
<smack_get_onlycap>:
lea    0xee9(%rip),%rsi
jmp    1030 <smack_get_file@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"onlycap\00"
define i32 @smack_get_onlycap(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @smack_get_file(i8** %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"onlycap\00"
define i32 @smack_get_onlycap(i8** %0) {
%2 = tail call i32 @smack_get_file(i8** %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
void f(int j) {
  int i;
  for (i = 0; i < 9; i++) {
    j++;
    g(j);
    j = 9;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jge    1152 <f+0x42>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <g@plt>
movl   $0x9,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <f+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
add    $0x1,%edi
call   1030 <g@plt>
mov    $0xa,%edi
call   1030 <g@plt>
mov    $0xa,%edi
call   1030 <g@plt>
mov    $0xa,%edi
call   1030 <g@plt>
mov    $0xa,%edi
call   1030 <g@plt>
mov    $0xa,%edi
call   1030 <g@plt>
mov    $0xa,%edi
call   1030 <g@plt>
mov    $0xa,%edi
call   1030 <g@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = add i32 %0, 1
%3 = tail call i32 @g(i32 %2)
%4 = tail call i32 @g(i32 10)
%5 = tail call i32 @g(i32 10)
%6 = tail call i32 @g(i32 10)
%7 = tail call i32 @g(i32 10)
%8 = tail call i32 @g(i32 10)
%9 = tail call i32 @g(i32 10)
%10 = tail call i32 @g(i32 10)
%11 = tail call i32 @g(i32 10)
ret void
}
double box_filter(double t) {
  if ((t > -0.5) && (t <= 0.5))
    return (1.0);
  return (0.0);
}


x86 assembly (clang, -O0):
<box_filter>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1145 <box_filter+0x45>
movsd  0xee0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1145 <box_filter+0x45>
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114d <box_filter+0x4d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<box_filter>:
movsd  0xef8(%rip),%xmm1
cmpltsd %xmm0,%xmm1
cmplesd 0xef2(%rip),%xmm0
movsd  0xef2(%rip),%xmm2
andpd  %xmm2,%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @box_filter(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, -5.000000e-01
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp ole double %7, 5.000000e-01
br i1 %8, label %9, label %10
9: ; preds = %6
store double 1.000000e+00, double* %2
br label %11
10: ; preds = %6, %1
store double 0.000000e+00, double* %2
br label %11
11: ; preds = %10, %9
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @box_filter(double %0) {
%2 = fcmp ogt double %0, -5.000000e-01
%3 = fcmp ole double %0, 5.000000e-01
%4 = and i1 %2, %3
%5 = select i1 %4, double 1.000000e+00, double 0.000000e+00
ret double %5
}
int answerctcp(int usern, char *nick, char *ctcp) {
  char c = 1;
  char buf[300];
  return 0x0;
}


x86 assembly (clang, -O0):
<answerctcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0x1,-0x19(%rbp)
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @answerctcp(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8
%8 = alloca [300 x i8]
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i8 1, i8* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @answerctcp(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int lisp_init();
int module_lisp_init(void) { return lisp_init(); }


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

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

LLVM IR (-O0):
define i32 @module_lisp_init() {
%1 = call i32 (...) @lisp_init()
ret i32 %1
}

LLVM IR (-O2):
define i32 @module_lisp_init() {
%1 = tail call i32 (...) @lisp_init()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ pmu_set_sleep_clk(int, int, int, int);
void pmu_set_sleep_low() { pmu_set_sleep_clk(0x1, 0x1, 0x1, 0x1); }


x86 assembly (clang, -O0):
<pmu_set_sleep_low>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <pmu_set_sleep_clk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_set_sleep_low>:
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <pmu_set_sleep_clk@plt>

LLVM IR (-O0):
define void @pmu_set_sleep_low() {
%1 = call i32 @pmu_set_sleep_clk(i32 1, i32 1, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @pmu_set_sleep_low() {
%1 = tail call i32 @pmu_set_sleep_clk(i32 1, i32 1, i32 1, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void output_int64(int64_t v) { printf("%li\n", v); }


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

x86 assembly (clang, -O2):
<output_int64>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%li\0A\00"
define void @output_int64(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
unsigned long ccnl_ndntlv_nonNegInt(unsigned char *, int);
unsigned long int ccnl_lrpc_nonNegInt(unsigned char *buf, int vallen) {
  return ccnl_ndntlv_nonNegInt(buf, vallen);
}


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

x86 assembly (clang, -O2):
<ccnl_lrpc_nonNegInt>:
jmp    1030 <ccnl_ndntlv_nonNegInt@plt>

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

LLVM IR (-O2):
define i64 @ccnl_lrpc_nonNegInt(i8* %0, i32 %1) {
%3 = tail call i64 @ccnl_ndntlv_nonNegInt(i8* %0, i32 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *trap_MemAlloc(scalar_t__, char const *, int);
char *_CG_CopyString(const char *in, const char *filename, int fileline) {
  char *out;
  out = trap_MemAlloc(strlen(in) + 1, filename, fileline);
  strcpy(out, in);
  return out;
}


x86 assembly (clang, -O0):
<_CG_CopyString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <trap_MemAlloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_CG_CopyString>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <trap_MemAlloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @_CG_CopyString(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add nsw i64 %4, 1
%6 = tail call i8* @trap_MemAlloc(i64 %5, i8* %1, i32 %2)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
ret i8* %6
}
int fun1124() { return 1124; }


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

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

LLVM IR (-O0):
define i32 @fun1124() {
ret i32 1124
}

LLVM IR (-O2):
define i32 @fun1124() {
ret i32 1124
}
void rop3_212_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk2 = S ^ T;
  stk3 = T ^ *D;
  stk2 = stk2 & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_212_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_212_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_212_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8*, i8** %4
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = xor i32 %17, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %9
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = load i8, i8* %9
%26 = zext i8 %25 to i32
%27 = and i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %8
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = load i8, i8* %8
%32 = zext i8 %31 to i32
%33 = xor i32 %30, %32
%34 = trunc i32 %33 to i8
store i8 %34, i8* %7
%35 = load i8, i8* %7
%36 = zext i8 %35 to i32
%37 = load i8, i8* %5
%38 = zext i8 %37 to i32
%39 = xor i32 %38, -1
%40 = and i32 %36, %39
%41 = load i8, i8* %6
%42 = zext i8 %41 to i32
%43 = xor i32 %42, -1
%44 = and i32 %40, %43
%45 = load i8*, i8** %4
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = load i8, i8* %5
%49 = zext i8 %48 to i32
%50 = and i32 %47, %49
%51 = or i32 %44, %50
%52 = load i8*, i8** %4
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = load i8, i8* %6
%56 = zext i8 %55 to i32
%57 = and i32 %54, %56
%58 = or i32 %51, %57
%59 = trunc i32 %58 to i8
%60 = load i8*, i8** %4
store i8 %59, i8* %60
ret void
}

LLVM IR (-O2):
define void @rop3_212_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int *foo() {
  int i;
  int array[5];
  printf("%p\n", array);
  for (i = 0; i < 5; i++) {
    array[i] = 17;
  }
  return array;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rsi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1153 <foo+0x43>
movslq -0x4(%rbp),%rax
movl   $0x11,-0x20(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <foo+0x1f>
lea    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
sub    $0x20,%rsp
lea    0xee4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
define i32* @foo() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
ret i32* %3
}
/* Type definitions */
struct Layer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ layer_weight_rand(struct Layer *);
void neural_layer_convolutional_rand(struct Layer *l) { layer_weight_rand(l); }


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

x86 assembly (clang, -O2):
<neural_layer_convolutional_rand>:
jmp    1030 <layer_weight_rand@plt>

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

LLVM IR (-O2):
%struct.Layer = type { i32 }
define void @neural_layer_convolutional_rand(%struct.Layer* %0) {
%2 = tail call i32 @layer_weight_rand(%struct.Layer* %0)
ret void
}
int isterm(char c) { return (c == ' ') || (c == '\t'); }


x86 assembly (clang, -O0):
<isterm>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1129 <isterm+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isterm>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isterm(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void X509_VERIFY_PARAM_get_depth(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_VERIFY_PARAM_get_depth() {
ret void
}
void swap(int *n, int *m) {
  int temp = *n;
  *n = *m;
  *m = temp;
}


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

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

LLVM IR (-O0):
define void @swap(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* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void MM_Frame(int realmsec) {
  int *a = &realmsec;
  a = (int *)0;
}


x86 assembly (clang, -O0):
<MM_Frame>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @MM_Frame(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eating(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void *thinking(int duration, int philosopherNumber) {
  printf("The philosopher %d is gonna think for a while.\n", philosopherNumber);
  sleep(duration);
  eating(philosopherNumber);
}


x86 assembly (clang, -O0):
<thinking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
call   1050 <sleep@plt>
mov    -0x10(%rbp),%edi
call   1040 <eating@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thinking>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    %ebp,%edi
call   1050 <sleep@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <eating@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"The philosopher %d is gonna think for a while.\0A\00"
define i8* @thinking(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %4
%9 = call i32 @sleep(i32 %8)
%10 = load i32, i32* %5
%11 = call i32 @eating(i32 %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [48 x i8] c"The philosopher %d is gonna think for a while.\0A\00"
define noalias i8* @thinking(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @sleep(i32 %0)
%5 = tail call i32 @eating(i32 %1)
ret i8* undef
}
double fmin(double x, double y) {
  if (x < y)
    return x;
  else
    return y;
}


x86 assembly (clang, -O0):
<fmin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <fmin+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113b <fmin+0x3b>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmin>:
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fmin(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp olt double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %4
store double %10, double* %3
br label %13
11: ; preds = %2
%12 = load double, double* %5
store double %12, double* %3
br label %13
13: ; preds = %11, %9
%14 = load double, double* %3
ret double %14
}

LLVM IR (-O2):
define double @fmin(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
void sigpipe(int sig) {}


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

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

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

LLVM IR (-O2):
define void @sigpipe(i32 %0) {
ret void
}
int f2(int t, int v) {
  int a = t - 1U;
  int b = a * v;
  return v + b;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
ret i32 %3
}
signed int rt_mutex_unlock(union anon$40 *mp) {
  signed int status = 0;
  status = pthread_mutex_unlock(mp);
  return status;
}


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

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

LLVM IR (-O0):
%"union.anon$40" = type opaque
define i32 @rt_mutex_unlock(%"union.anon$40"* %0) {
%2 = alloca %"union.anon$40"*
%3 = alloca i32
store %"union.anon$40"* %0, %"union.anon$40"** %2
store i32 0, i32* %3
%4 = load %"union.anon$40"*, %"union.anon$40"** %2
%5 = call i32 (%"union.anon$40"*, ...) bitcast (i32 (...)* @pthread_mutex_unlock to i32 (%"union.anon$40"*, ...)*)(%"union.anon$40"* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%"union.anon$40" = type opaque
define i32 @rt_mutex_unlock(%"union.anon$40"* %0) {
%2 = tail call i32 (%"union.anon$40"*, ...) bitcast (i32 (...)* @pthread_mutex_unlock to i32 (%"union.anon$40"*, ...)*)(%"union.anon$40"* %0)
ret i32 %2
}
int Cyc_Callgraph_hash_fndecl(struct Cyc_Absyn_Fndecl *fd) {
  struct Cyc_Absyn_Fndecl *_T0;
  int _T1;
  _T0 = fd;
  _T1 = (int)_T0;
  return _T1;
}


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

x86 assembly (clang, -O2):
<Cyc_Callgraph_hash_fndecl>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.Cyc_Absyn_Fndecl = type opaque
define i32 @Cyc_Callgraph_hash_fndecl(%struct.Cyc_Absyn_Fndecl* %0) {
%2 = alloca %struct.Cyc_Absyn_Fndecl*
%3 = alloca %struct.Cyc_Absyn_Fndecl*
%4 = alloca i32
store %struct.Cyc_Absyn_Fndecl* %0, %struct.Cyc_Absyn_Fndecl** %2
%5 = load %struct.Cyc_Absyn_Fndecl*, %struct.Cyc_Absyn_Fndecl** %2
store %struct.Cyc_Absyn_Fndecl* %5, %struct.Cyc_Absyn_Fndecl** %3
%6 = load %struct.Cyc_Absyn_Fndecl*, %struct.Cyc_Absyn_Fndecl** %3
%7 = ptrtoint %struct.Cyc_Absyn_Fndecl* %6 to i32
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
%struct.Cyc_Absyn_Fndecl = type opaque
define i32 @Cyc_Callgraph_hash_fndecl(%struct.Cyc_Absyn_Fndecl* %0) {
%2 = ptrtoint %struct.Cyc_Absyn_Fndecl* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ isLucky(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 5;
  if (isLucky(x))
    printf("%d is a lucky no.", x);
  else
    printf("%d is not a lucky no.", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isLucky@plt>
cmp    $0x0,%rax
je     115c <main+0x3c>
mov    -0x8(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    116b <main+0x4b>
mov    -0x8(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <isLucky@plt>
test   %rax,%rax
lea    0xedd(%rip),%rax
lea    0xec4(%rip),%rdi
cmove  %rax,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%d is a lucky no.\00"
@.str.1 = [22 x i8] c"%d is not a lucky no.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isLucky(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %0
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [18 x i8] c"%d is a lucky no.\00"
@.str.1 = [22 x i8] c"%d is not a lucky no.\00"
define i32 @main() {
%1 = tail call i64 @isLucky(i32 5)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* %3, i32 5)
ret i32 0
}
/* Variables and functions */
char *mem_strdup(char *);
char *vis5d_strdup(char *str) { return mem_strdup(str); }


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

x86 assembly (clang, -O2):
<vis5d_strdup>:
jmp    1030 <mem_strdup@plt>

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

LLVM IR (-O2):
define i8* @vis5d_strdup(i8* %0) {
%2 = tail call i8* @mem_strdup(i8* %0)
ret i8* %2
}
int flagset(int val, int flag) { return ((val & flag) == flag); }


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

x86 assembly (clang, -O2):
<flagset>:
not    %edi
xor    %eax,%eax
test   %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @flagset(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 = and i32 %5, %6
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @flagset(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
void writeCrap(char *s) {
  *s = 'p';
  *(s + 1) = 'a';
  *(s + 2) = 'r';
  *(s + 3) = 'c';
}


x86 assembly (clang, -O0):
<writeCrap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x70,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x61,0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0x72,0x2(%rax)
mov    -0x8(%rbp),%rax
movb   $0x63,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeCrap>:
movl   $0x63726170,(%rdi)
ret

LLVM IR (-O0):
define void @writeCrap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
store i8 112, i8* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8 97, i8* %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 2
store i8 114, i8* %7
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 3
store i8 99, i8* %9
ret void
}

LLVM IR (-O2):
define void @writeCrap(i8* nocapture writeonly %0) {
store i8 112, i8* %0
%2 = getelementptr inbounds i8, i8* %0, i64 1
store i8 97, i8* %2
%3 = getelementptr inbounds i8, i8* %0, i64 2
store i8 114, i8* %3
%4 = getelementptr inbounds i8, i8* %0, i64 3
store i8 99, i8* %4
ret void
}
void gtk_window_set_has_frame() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_has_frame() {
ret void
}
int mutex_trylock(int *m) { return __sync_lock_test_and_set(m, 1); }


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

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

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

LLVM IR (-O2):
define i32 @mutex_trylock(i32* nocapture %0) {
%2 = atomicrmw xchg i32* %0, i32 1 seq_cst
ret i32 %2
}
void f4(void) { static int a4; }


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

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

LLVM IR (-O0):
@f4.a4 = internal global i32 0
define void @f4() {
ret void
}

LLVM IR (-O2):
define void @f4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ br_info_clear(char const *);
int /*<<< orphan*/ iptables_clear();
int clear_vpls_bridge(const char *br_name) {
  br_info_clear(br_name);
  iptables_clear();
  return 0;
}


x86 assembly (clang, -O0):
<clear_vpls_bridge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <br_info_clear@plt>
mov    $0x0,%al
call   1030 <iptables_clear@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @clear_vpls_bridge(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @br_info_clear(i8* %3)
%5 = call i32 (...) @iptables_clear()
ret i32 0
}

LLVM IR (-O2):
define i32 @clear_vpls_bridge(i8* %0) {
%2 = tail call i32 @br_info_clear(i8* %0)
%3 = tail call i32 (...) @iptables_clear()
ret i32 0
}