xunge/DecIR huggingface dataset:
/* Variables and functions */
int inotify_backend_watch(char const *);
int /*<<< orphan*/ inotify_map(int, char const *);
int inotify_watch(const char *path) {
  int wd = inotify_backend_watch(path);
  if (wd > 0)
    inotify_map(wd, path);
  return wd;
}


x86 assembly (clang, -O0):
<inotify_watch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <inotify_backend_watch@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114e <inotify_watch+0x2e>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1040 <inotify_map@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inotify_watch>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <inotify_backend_watch@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    113b <inotify_watch+0x1b>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <inotify_map@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @inotify_watch(i8* %0) {
%2 = tail call i32 @inotify_backend_watch(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @inotify_map(i32 %2, i8* %0)
br label %6
6: ; preds = %4, %1
ret i32 %2
}
unsigned int Hash_Key(const char *name, unsigned int modulus) {
  unsigned int key;
  for (key = 0; *name; name++)
    key += ((key << 3) + (key >> 28) + *name);
  return (key % modulus);
}


x86 assembly (clang, -O0):
<Hash_Key>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <Hash_Key+0x4d>
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
mov    -0x10(%rbp),%ecx
shr    $0x1c,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1112 <Hash_Key+0x12>
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hash_Key>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <Hash_Key+0x2c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shr    $0x1c,%edx
movsbl %cl,%ecx
add    %eax,%edx
lea    (%rdx,%rax,8),%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <Hash_Key+0x10>
jmp    112e <Hash_Key+0x2e>
xor    %eax,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @Hash_Key(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %16, %5 ], [ %3, %2 ]
%7 = phi i32 [ %14, %5 ], [ 0, %2 ]
%8 = phi i8* [ %15, %5 ], [ %0, %2 ]
%9 = shl i32 %7, 3
%10 = lshr i32 %7, 28
%11 = sext i8 %6 to i32
%12 = add i32 %10, %7
%13 = add i32 %12, %9
%14 = add i32 %13, %11
%15 = getelementptr inbounds i8, i8* %8, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %5, %2
%19 = phi i32 [ 0, %2 ], [ %14, %5 ]
%20 = urem i32 %19, %1
ret i32 %20
}
long double ifrac(x)
long double x;
{
  unsigned long lx;
  long double y, z;
  z = floorl(x);
  lx = z;
  y = x - z;
  printf(" int = %lx\n", lx);
  return (y);
}


x86 assembly (clang, -O0):
<ifrac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <floorl@plt>
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
flds   0xeb9(%rip)
fucomi %st(1),%st
setbe  %al
fldz
fcmovbe %st(1),%st
fstp   %st(1)
fsubrp %st,%st(1)
fnstcw -0x4a(%rbp)
movzwl -0x4a(%rbp),%ecx
or     $0xc00,%ecx
mov    %cx,-0x4c(%rbp)
fldcw  -0x4c(%rbp)
fistpll -0x48(%rbp)
fldcw  -0x4a(%rbp)
movzbl %al,%eax
mov    %eax,%ecx
shl    $0x3f,%rcx
mov    -0x48(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
fldt   -0x40(%rbp)
fsubrp %st,%st(1)
fstpt  -0x30(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe6c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
fldt   -0x30(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ifrac>:
sub    $0x28,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <floorl@plt>
flds   0xec4(%rip)
xor    %esi,%esi
fxch   %st(1)
fucomi %st(1),%st
setae  %sil
fldz
fcmovnb %st(2),%st
fstp   %st(2)
fsub   %st,%st(1)
fnstcw 0x10(%rsp)
movzwl 0x10(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x12(%rsp)
fldcw  0x12(%rsp)
fxch   %st(1)
fistpll 0x20(%rsp)
fldcw  0x10(%rsp)
shl    $0x3f,%rsi
xor    0x20(%rsp),%rsi
fldt   0x14(%rsp)
fsubp  %st,%st(1)
fstpt  0x14(%rsp)
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
fldt   0x14(%rsp)
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c" int = %lx\0A\00"
define x86_fp80 @ifrac(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i64
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%6 = load x86_fp80, x86_fp80* %2
%7 = call x86_fp80 @llvm.floor.f80(x86_fp80 %6)
store x86_fp80 %7, x86_fp80* %5
%8 = load x86_fp80, x86_fp80* %5
%9 = fptoui x86_fp80 %8 to i64
store i64 %9, i64* %3
%10 = load x86_fp80, x86_fp80* %2
%11 = load x86_fp80, x86_fp80* %5
%12 = fsub x86_fp80 %10, %11
store x86_fp80 %12, x86_fp80* %4
%13 = load i64, i64* %3
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %13)
%15 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %15
}

LLVM IR (-O2):
@.str = [12 x i8] c" int = %lx\0A\00"
define x86_fp80 @ifrac(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.floor.f80(x86_fp80 %0)
%3 = fptoui x86_fp80 %2 to i64
%4 = fsub x86_fp80 %0, %2
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %3)
ret x86_fp80 %4
}
void instruc_19() {}


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

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

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

LLVM IR (-O2):
define void @instruc_19() {
ret void
}
/* Type definitions */
struct aFILE {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ _get_actual_fp(struct aFILE *);
int /*<<< orphan*/ getdelim(char **, size_t *, int, int /*<<< orphan*/);
ssize_t my_getdelim(char **lineptr, size_t *n, int delimiter,
                    struct aFILE *fp) {
  return getdelim(lineptr, n, delimiter, _get_actual_fp(fp));
}


x86 assembly (clang, -O0):
<my_getdelim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <_get_actual_fp@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    %eax,%ecx
call   1040 <getdelim@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_getdelim>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %rcx,%rdi
call   1030 <_get_actual_fp@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <getdelim@plt>

LLVM IR (-O0):
%struct.aFILE = type { i32 }
define i32 @my_getdelim(i8** %0, i64* %1, i32 %2, %struct.aFILE* %3) {
%5 = alloca i8**
%6 = alloca i64*
%7 = alloca i32
%8 = alloca %struct.aFILE*
store i8** %0, i8*** %5
store i64* %1, i64** %6
store i32 %2, i32* %7
store %struct.aFILE* %3, %struct.aFILE** %8
%9 = load i8**, i8*** %5
%10 = load i64*, i64** %6
%11 = load i32, i32* %7
%12 = load %struct.aFILE*, %struct.aFILE** %8
%13 = call i32 @_get_actual_fp(%struct.aFILE* %12)
%14 = call i32 @getdelim(i8** %9, i64* %10, i32 %11, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.aFILE = type { i32 }
define i32 @my_getdelim(i8** %0, i64* %1, i32 %2, %struct.aFILE* %3) {
%5 = tail call i32 @_get_actual_fp(%struct.aFILE* %3)
%6 = tail call i32 @getdelim(i8** %0, i64* %1, i32 %2, i32 %5)
ret i32 %6
}
void avpriv_scalarproduct_float_c() {}


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

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

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

LLVM IR (-O2):
define void @avpriv_scalarproduct_float_c() {
ret void
}
void pm_sleep_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @pm_sleep_unlock() {
ret void
}
/* Variables and functions */
char *make_return_packet(int /*<<< orphan*/);
char *gdb_exited() { return (make_return_packet(0)); }


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

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

LLVM IR (-O0):
define i8* @gdb_exited() {
%1 = call i8* @make_return_packet(i32 0)
ret i8* %1
}

LLVM IR (-O2):
define i8* @gdb_exited() {
%1 = tail call i8* @make_return_packet(i32 0)
ret i8* %1
}
unsigned long int
unsignedlongint_ignoring_unsignedlongint(unsigned long int x,
                                         unsigned long int y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @unsignedlongint_ignoring_unsignedlongint(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @unsignedlongint_ignoring_unsignedlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ insertionSort(int *, int);
int /*<<< orphan*/ printArray(int *, int);
int main() {
  int arr[] = {4, 1, 8, 10, 5, 2, 3, 6};
  printArray(arr, 8);
  insertionSort(arr, 8);
  printArray(arr, 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1040 <printArray@plt>
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1030 <insertionSort@plt>
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <printArray@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <insertionSort@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <printArray@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.arr = [8 x i32] [i32 4, i32 1, i32 8, i32 10, i32 5, i32 2, i32 3, i32 6]
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i32]
store i32 0, i32* %1
%3 = bitcast [8 x i32]* %2 to i8*
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%5 = call i32 @printArray(i32* %4, i32 8)
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%7 = call i32 @insertionSort(i32* %6, i32 8)
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 0
%9 = call i32 @printArray(i32* %8, i32 8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [8 x i32] [i32 4, i32 1, i32 8, i32 10, i32 5, i32 2, i32 3, i32 6]
define i32 @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%4 = call i32 @printArray(i32* %3, i32 8)
%5 = call i32 @insertionSort(i32* %3, i32 8)
%6 = call i32 @printArray(i32* %3, i32 8)
ret i32 0
}
/* Variables and functions */
int HadTu_paddedSize(void const *);
void *HadTu_end(const void *my) {
  return (void *)((char *)my + HadTu_paddedSize(my));
}


x86 assembly (clang, -O0):
<HadTu_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <HadTu_paddedSize@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HadTu_end>:
push   %rbx
mov    %rdi,%rbx
call   1030 <HadTu_paddedSize@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @HadTu_end(i8* %0) {
%2 = tail call i32 @HadTu_paddedSize(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ process_pid(int /*<<< orphan*/);
int main(int argc, char **argv) {
  pid_t pid = atoi(argv[1]);
  printf("%s\n", argv[1]);
  process_pid(pid);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1050 <process_pid@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1040 <atoi@plt>
mov    %eax,%ebp
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebp,%edi
call   1050 <process_pid@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = tail call i32 @process_pid(i32 %5)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void gui_stop() {
  FILE *out;
  out = fopen("./signal_stop.dat", "w");
  fprintf(out, "Simulation finished\n");
  fclose(out);
}


x86 assembly (clang, -O0):
<gui_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    0xecc(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_stop>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xec6(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"./signal_stop.dat\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [21 x i8] c"Simulation finished\0A\00"
define void @gui_stop() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32*, i32** %1
%6 = call i32 @fclose(i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"./signal_stop.dat\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [21 x i8] c"Simulation finished\0A\00"
define void @gui_stop() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i64 20, i64 1, i32* %1)
%3 = tail call i32 @fclose(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a(int, int);
int /*<<< orphan*/ printf(char *, int, int);
main() {
  int i, j;
  i = 2;
  j = 10;
  printf("%d %d\n", i, j);
  a(i, j);
  printf("%d %d\n", i, j);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0xa,%esi
call   1040 <a@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 2, i32 10)
%2 = tail call i32 @a(i32 2, i32 10)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 2, i32 10)
ret i32 0
}
/* Variables and functions */
double sqrt(double);
double my_sqrt(double a) { return sqrt(a); }


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

x86 assembly (clang, -O2):
<my_sqrt>:
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     111f <my_sqrt+0xf>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

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

LLVM IR (-O2):
define double @my_sqrt(double %0) {
%2 = tail call double @sqrt(double %0)
ret double %2
}
void foo085() {}


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

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

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

LLVM IR (-O2):
define void @foo085() {
ret void
}
/* Type definitions */
typedef long clock_t;

/* Variables and functions */
long clock();
int /*<<< orphan*/ setup();
void stub1();
long runTest(void (*funPointer)(void)) {
  setup();
  clock_t startTime, endTime;
  startTime = clock();
  (*funPointer)();
  endTime = clock();
  return (endTime - startTime);
}


x86 assembly (clang, -O0):
<runTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <setup@plt>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x10(%rbp)
call   *-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runTest>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1040 <setup@plt>
xor    %eax,%eax
call   1030 <clock@plt>
mov    %rax,%rbx
call   *%r14
xor    %eax,%eax
call   1030 <clock@plt>
sub    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @runTest(void ()* %0) {
%2 = alloca void ()*
%3 = alloca i64
%4 = alloca i64
store void ()* %0, void ()** %2
%5 = call i32 (...) @setup()
%6 = call i64 (...) @clock()
store i64 %6, i64* %3
%7 = load void ()*, void ()** %2
%8 = call i64 (...) @clock()
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = load i64, i64* %3
%11 = sub nsw i64 %9, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @runTest(void ()* nocapture %0) {
%2 = tail call i32 (...) @setup()
%3 = tail call i64 (...) @clock()
tail call void %0()
%4 = tail call i64 (...) @clock()
%5 = sub nsw i64 %4, %3
ret i64 %5
}
/* Variables and functions */
size_t ZBUFFv05_recommendedDOutSize(void) { return (128 * (1 << 10)); }


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

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

LLVM IR (-O0):
define i64 @ZBUFFv05_recommendedDOutSize() {
ret i64 131072
}

LLVM IR (-O2):
define i64 @ZBUFFv05_recommendedDOutSize() {
ret i64 131072
}
/* Variables and functions */
int /*<<< orphan*/ sys_panic_assert(char const *, char const *, int);
void _kogata_assert(bool s, const char *ss, const char *ff, int l) {
  if (!s)
    sys_panic_assert(ss, ff, l);
}


x86 assembly (clang, -O0):
<_kogata_assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1140 <_kogata_assert+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <sys_panic_assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_kogata_assert>:
test   %edi,%edi
je     1115 <_kogata_assert+0x5>
ret
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <sys_panic_assert@plt>

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

LLVM IR (-O2):
define void @_kogata_assert(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @sys_panic_assert(i8* %1, i8* %2, i32 %3)
br label %8
8: ; preds = %6, %4
ret void
}
int checkType() {}


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

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

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

LLVM IR (-O2):
define i32 @checkType() {
ret i32 undef
}
int doubler_implementation(int in) { return in * 2; }


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

x86 assembly (clang, -O2):
<doubler_implementation>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @doubler_implementation(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int dtls_int_to_uint8(unsigned char *field, uint8_t value) {
  field[0] = value & 0xff;
  return 1;
}


x86 assembly (clang, -O0):
<dtls_int_to_uint8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @dtls_int_to_uint8(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
ret i32 1
}

LLVM IR (-O2):
define i32 @dtls_int_to_uint8(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ifmonMain(int, char **);
int main(int argc, char *argv[]) { ifmonMain(argc, argv); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @ifmonMain(i32 %0, i8** %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fnv_64a_64(int /*<<< orphan*/, int /*<<< orphan*/);
uint64_t sd_hash_next(uint64_t hval) { return fnv_64a_64(hval, hval); }


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

x86 assembly (clang, -O2):
<sd_hash_next>:
mov    %edi,%esi
jmp    1030 <fnv_64a_64@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
void tty_show_title(void *ui, const char *title) {
  FILE *tty = ui;
  fprintf(tty, "show_title: %s\r\n", title);
}


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

x86 assembly (clang, -O2):
<tty_show_title>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"show_title: %s\0D\0A\00"
define void @tty_show_title(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i8*, i8** %4
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"show_title: %s\0D\0A\00"
define void @tty_show_title(i8* nocapture %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __gpio_set_value(unsigned int, int);
void gpio_set_value(unsigned gpio, int value) { __gpio_set_value(gpio, value); }


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

x86 assembly (clang, -O2):
<gpio_set_value>:
jmp    1030 <__gpio_set_value@plt>

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

LLVM IR (-O2):
define void @gpio_set_value(i32 %0, i32 %1) {
%3 = tail call i32 @__gpio_set_value(i32 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_GENERALIZEDTIME;

/* Variables and functions */
int /*<<< orphan*/ ASN1_GENERALIZEDTIME_it;
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_new(void) {
  return (ASN1_GENERALIZEDTIME *)ASN1_item_new(&ASN1_GENERALIZEDTIME_it);
}


x86 assembly (clang, -O0):
<ASN1_GENERALIZEDTIME_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_GENERALIZEDTIME_new>:
mov    0x2ec1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@ASN1_GENERALIZEDTIME_it = global i32 0
define i32* @ASN1_GENERALIZEDTIME_new() {
%1 = call i64 @ASN1_item_new(i32* @ASN1_GENERALIZEDTIME_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@ASN1_GENERALIZEDTIME_it = global i32 0
define i32* @ASN1_GENERALIZEDTIME_new() {
%1 = tail call i64 @ASN1_item_new(i32* @ASN1_GENERALIZEDTIME_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
double fabs(double);
int point_equal(double x1, double y1, double x2, double y2, double eps) {
  return ((fabs(x1 - x2) <= eps) && (fabs(y1 - y2) <= eps));
}


x86 assembly (clang, -O0):
<point_equal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
movaps 0xed2(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd %xmm1,%xmm0
mov    %al,-0x29(%rbp)
jb     116a <point_equal+0x6a>
movsd  -0x10(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movaps 0xea9(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<point_equal>:
subsd  %xmm2,%xmm0
andpd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm4
jb     1129 <point_equal+0x29>
subsd  %xmm3,%xmm1
andpd  0xee0(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm4
setae  %al
ret

LLVM IR (-O0):
define i32 @point_equal(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %6
%12 = load double, double* %8
%13 = fsub double %11, %12
%14 = call double @llvm.fabs.f64(double %13)
%15 = load double, double* %10
%16 = fcmp ole double %14, %15
br i1 %16, label %17, label %24
17: ; preds = %5
%18 = load double, double* %7
%19 = load double, double* %9
%20 = fsub double %18, %19
%21 = call double @llvm.fabs.f64(double %20)
%22 = load double, double* %10
%23 = fcmp ole double %21, %22
br label %24
24: ; preds = %17, %5
%25 = phi i1 [ false, %5 ], [ %23, %17 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @point_equal(double %0, double %1, double %2, double %3, double %4) {
%6 = fsub double %0, %2
%7 = tail call double @llvm.fabs.f64(double %6)
%8 = fcmp ugt double %7, %4
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = fsub double %1, %3
%11 = tail call double @llvm.fabs.f64(double %10)
%12 = fcmp ole double %11, %4
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %9, %5
%15 = phi i32 [ 0, %5 ], [ %13, %9 ]
ret i32 %15
}
void thumb() {}


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

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

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

LLVM IR (-O2):
define void @thumb() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ curs_set(int);
void con_showCursor() { curs_set(1); }


x86 assembly (clang, -O0):
<con_showCursor>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <curs_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<con_showCursor>:
mov    $0x1,%edi
jmp    1030 <curs_set@plt>

LLVM IR (-O0):
define void @con_showCursor() {
%1 = call i32 @curs_set(i32 1)
ret void
}

LLVM IR (-O2):
define void @con_showCursor() {
%1 = tail call i32 @curs_set(i32 1)
ret void
}
char get_bit_from_blank(const char blank) { return (blank == ' ') ? 0 : 1; }


x86 assembly (clang, -O0):
<get_bit_from_blank>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x20,%edx
cmove  %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit_from_blank>:
cmp    $0x20,%dil
setne  %al
ret

LLVM IR (-O0):
define signext i8 @get_bit_from_blank(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
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 1
%8 = trunc i32 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @get_bit_from_blank(i8 signext %0) {
%2 = icmp ne i8 %0, 32
%3 = zext i1 %2 to i8
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int /*<<< orphan*/ setup();
void main() {
  setup();
  while (1) {
    loop();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <setup@plt>
mov    $0x0,%al
call   1030 <loop@plt>
jmp    112b <main+0xb>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <setup@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <loop@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @setup()
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @loop()
br label %2
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @setup()
br label %2
2: ; preds = %0, %2
%3 = tail call i32 (...) @loop()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
void *thr_fun(void *arg) {
  static int n = 0;
  printf("this is turn %d\n", n++);
  sleep(1);
  return NULL;
}


x86 assembly (clang, -O0):
<thr_fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2f02(%rip),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,0x2ef7(%rip)
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr_fun>:
push   %rax
mov    0x2f0d(%rip),%esi
lea    0x1(%rsi),%eax
mov    %eax,0x2f04(%rip)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@thr_fun.n = internal global i32 0
@.str = [17 x i8] c"this is turn %d\0A\00"
define i8* @thr_fun(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @thr_fun.n
%4 = add nsw i32 %3, 1
store i32 %4, i32* @thr_fun.n
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
%6 = call i32 @sleep(i32 1)
ret i8* null
}

LLVM IR (-O2):
@thr_fun.n = internal unnamed_addr global i32 0
@.str = [17 x i8] c"this is turn %d\0A\00"
define noalias i8* @thr_fun(i8* nocapture readnone %0) {
%2 = load i32, i32* @thr_fun.n
%3 = add nsw i32 %2, 1
store i32 %3, i32* @thr_fun.n
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %2)
%5 = tail call i32 @sleep(i32 1)
ret i8* null
}
void SIO1_writeMode32(unsigned long val) {}


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

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

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

LLVM IR (-O2):
define void @SIO1_writeMode32(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
void eiki_reraise_signal(int signum) {
  signal(signum, SIG_DFL);
  kill(getpid(), signum);
}


x86 assembly (clang, -O0):
<eiki_reraise_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%esi
call   1050 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eiki_reraise_signal>:
push   %rbx
mov    %edi,%ebx
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1050 <kill@plt>

LLVM IR (-O0):
@SIG_DFL = global i32 0
define void @eiki_reraise_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIG_DFL
%5 = call i32 @signal(i32 %3, i32 %4)
%6 = call i32 (...) @getpid()
%7 = load i32, i32* %2
%8 = call i32 @kill(i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@SIG_DFL = global i32 0
define void @eiki_reraise_signal(i32 %0) {
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @signal(i32 %0, i32 %2)
%4 = tail call i32 (...) @getpid()
%5 = tail call i32 @kill(i32 %4, i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ MC_avg2_8(int, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ const *, int, int, int);
void MC_avg_x_8_3dnow(uint8_t *dest, const uint8_t *ref, int stride,
                      int height) {
  MC_avg2_8(height, dest, ref, stride, 1, 1);
}


x86 assembly (clang, -O0):
<MC_avg_x_8_3dnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <MC_avg2_8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MC_avg_x_8_3dnow>:
mov    %edx,%eax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %ecx,%edi
mov    %eax,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <MC_avg2_8@plt>

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

LLVM IR (-O2):
define void @MC_avg_x_8_3dnow(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @MC_avg2_8(i32 %3, i32* %0, i32* %1, i32 %2, i32 1, i32 1)
ret void
}
unsigned char inb(short port) {
  unsigned char b;
  asm volatile("inb %1, %0\n" : "=a"(b) : "dN"(port));
  return b;
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define zeroext i8 @inb(i16 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i8 asm sideeffect "inb $1, $0\0A", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @inb(i16 signext %0) {
%2 = tail call i8 asm sideeffect "inb $1, $0\0A", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i8 %2
}
/* Variables and functions */
int PAPI_flips(float *, float *, long long *, float *);
void papif_flips(float *real_time, float *proc_time, long long *flpins,
                 float *mflips, int *check) {
  *check = PAPI_flips(real_time, proc_time, flpins, mflips);
}


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

x86 assembly (clang, -O2):
<papif_flips>:
push   %rbx
mov    %r8,%rbx
call   1030 <PAPI_flips@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @papif_flips(float* %0, float* %1, i64* %2, float* %3, i32* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca i64*
%9 = alloca float*
%10 = alloca i32*
store float* %0, float** %6
store float* %1, float** %7
store i64* %2, i64** %8
store float* %3, float** %9
store i32* %4, i32** %10
%11 = load float*, float** %6
%12 = load float*, float** %7
%13 = load i64*, i64** %8
%14 = load float*, float** %9
%15 = call i32 @PAPI_flips(float* %11, float* %12, i64* %13, float* %14)
%16 = load i32*, i32** %10
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @papif_flips(float* %0, float* %1, i64* %2, float* %3, i32* nocapture writeonly %4) {
%6 = tail call i32 @PAPI_flips(float* %0, float* %1, i64* %2, float* %3)
store i32 %6, i32* %4
ret void
}
int test_imm_64uint16_reg(unsigned short val) {
  return ((val) & (0x64 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_64uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x64,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_64uint16_reg>:
test   $0x64,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_64uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 100
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void XDrawArcs() {}


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

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

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

LLVM IR (-O2):
define void @XDrawArcs() {
ret void
}
/* Variables and functions */
scalar_t__ dcac_acl_ops(int, int, int, char const *, char const *);
int dcac_set_file_wracl(const char *file, const char *acl) {
  return (int)dcac_acl_ops(26, -1, -1, acl, file);
}


x86 assembly (clang, -O0):
<dcac_set_file_wracl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    $0x1a,%edi
mov    $0xffffffff,%edx
mov    %edx,%esi
call   1030 <dcac_acl_ops@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcac_set_file_wracl>:
mov    %rsi,%rcx
mov    %rdi,%r8
mov    $0x1a,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
jmp    1030 <dcac_acl_ops@plt>

LLVM IR (-O0):
define i32 @dcac_set_file_wracl(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @dcac_acl_ops(i32 26, i32 -1, i32 -1, i8* %5, i8* %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @dcac_set_file_wracl(i8* %0, i8* %1) {
%3 = tail call i64 @dcac_acl_ops(i32 26, i32 -1, i32 -1, i8* %1, i8* %0)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
struct lm {
  int dummy;
};

/* Variables and functions */
int lm_insert_n(struct lm *, char const *, int /*<<< orphan*/, char const *,
                int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int lm_insert(struct lm *map, const char *key, const char *value) {
  return lm_insert_n(map, key, strlen(key), value, strlen(value));
}


x86 assembly (clang, -O0):
<lm_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    %eax,%r8d
call   1040 <lm_insert_n@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lm_insert>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
mov    %r14,%rcx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <lm_insert_n@plt>

LLVM IR (-O0):
%struct.lm = type { i32 }
define i32 @lm_insert(%struct.lm* %0, i8* %1, i8* %2) {
%4 = alloca %struct.lm*
%5 = alloca i8*
%6 = alloca i8*
store %struct.lm* %0, %struct.lm** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.lm*, %struct.lm** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @strlen(i8* %9)
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @lm_insert_n(%struct.lm* %7, i8* %8, i32 %10, i8* %11, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.lm = type { i32 }
define i32 @lm_insert(%struct.lm* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @strlen(i8* %2)
%6 = tail call i32 @lm_insert_n(%struct.lm* %0, i8* %1, i32 %4, i8* %2, i32 %5)
ret i32 %6
}