xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void help(char *pname) {
  printf("Usage: %s <source ip> <dest. ip> <router ip>\n", pname);
  printf("[Use x.x.x.x format]\n");
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Usage: %s <source ip> <dest. ip> <router ip>\0A\00"
@.str.1 = [22 x i8] c"[Use x.x.x.x format]\0A\00"
define void @help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [46 x i8] c"Usage: %s <source ip> <dest. ip> <router ip>\0A\00"
@str = [21 x i8] c"[Use x.x.x.x format]\00"
define void @help(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int proc1(int, char *);
int main(int argc, char *argv[]) {
  printf("%d\n", proc1(argc, argv[1]));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rsi
call   1040 <proc1@plt>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
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 @proc1(i32 %0, i8* %4)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
char *kvm_getfiles(void *kd, int op, int arg, int *cnt) {
  if (cnt)
    *cnt = 0;
  return (0);
}


x86 assembly (clang, -O0):
<kvm_getfiles>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1127 <kvm_getfiles+0x27>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kvm_getfiles>:
test   %rcx,%rcx
je     110b <kvm_getfiles+0xb>
movl   $0x0,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @kvm_getfiles(i8* nocapture readnone %0, i32 %1, i32 %2, i32* writeonly %3) {
%5 = icmp eq i32* %3, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 0, i32* %3
br label %7
7: ; preds = %6, %4
ret i8* null
}
void writeBuffer(char ch, void **buffer) {
  void *tmp = *buffer;
  *((char *)tmp) = ch;
  *buffer = tmp + 1;
}


x86 assembly (clang, -O0):
<writeBuffer>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeBuffer>:
mov    (%rsi),%rax
mov    %dil,(%rax)
add    $0x1,%rax
mov    %rax,(%rsi)
ret

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

LLVM IR (-O2):
define void @writeBuffer(i8 signext %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
store i8 %0, i8* %3
%4 = getelementptr i8, i8* %3, i64 1
store i8* %4, i8** %1
ret void
}
void gtk_widget_show() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_show() {
ret void
}
int word_count(char *s) {
  int i;
  int count = 1;
  for (i = 0; s[i] != '\0'; i++) {
    if (s[i] == ' ')
      count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<word_count>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115c <word_count+0x5c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    1149 <word_count+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114e <word_count+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <word_count+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<word_count>:
mov    $0x1,%eax
jmp    1117 <word_count+0x17>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x20,%cl
je     1110 <word_count+0x10>
test   %cl,%cl
jne    1113 <word_count+0x13>
ret

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

LLVM IR (-O2):
define i32 @word_count(i8* nocapture %0) {
br label %2
2: ; preds = %9, %1
%3 = phi i64 [ %11, %9 ], [ 0, %1 ]
%4 = phi i32 [ %10, %9 ], [ 1, %1 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
switch i8 %6, label %9 [
i8 0, label %12
i8 32, label %7
]
7: ; preds = %2
%8 = add nsw i32 %4, 1
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %8, %7 ], [ %4, %2 ]
%11 = add nuw i64 %3, 1
br label %2
12: ; preds = %2
ret i32 %4
}
/* Variables and functions */
int read_value_from_fcd(int, unsigned char *);
int fcdppGetLNA(unsigned char *state) {
  return read_value_from_fcd(150, state);
}


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

x86 assembly (clang, -O2):
<fcdppGetLNA>:
mov    %rdi,%rsi
mov    $0x96,%edi
jmp    1030 <read_value_from_fcd@plt>

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

LLVM IR (-O2):
define i32 @fcdppGetLNA(i8* %0) {
%2 = tail call i32 @read_value_from_fcd(i32 150, i8* %0)
ret i32 %2
}
void slab_slabclass_deinit(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ uwsgi_unlock_ipcsem(struct uwsgi_lock_item *);
void uwsgi_rwunlock_ipcsem(struct uwsgi_lock_item *uli) {
  uwsgi_unlock_ipcsem(uli);
}


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

x86 assembly (clang, -O2):
<uwsgi_rwunlock_ipcsem>:
jmp    1030 <uwsgi_unlock_ipcsem@plt>

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

LLVM IR (-O2):
%struct.uwsgi_lock_item = type { i32 }
define void @uwsgi_rwunlock_ipcsem(%struct.uwsgi_lock_item* %0) {
%2 = tail call i32 @uwsgi_unlock_ipcsem(%struct.uwsgi_lock_item* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cursor_address;
int /*<<< orphan*/ tgoto(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ tty_putp(int /*<<< orphan*/);
void tty_move_cursor_to(int y, int x) { tty_putp(tgoto(cursor_address, x, y)); }


x86 assembly (clang, -O0):
<tty_move_cursor_to>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1030 <tgoto@plt>
mov    %eax,%edi
call   1040 <tty_putp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_move_cursor_to>:
push   %rax
mov    %edi,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
call   1030 <tgoto@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <tty_putp@plt>

LLVM IR (-O0):
@cursor_address = global i32 0
define void @tty_move_cursor_to(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @cursor_address
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @tgoto(i32 %5, i32 %6, i32 %7)
%9 = call i32 @tty_putp(i32 %8)
ret void
}

LLVM IR (-O2):
@cursor_address = global i32 0
define void @tty_move_cursor_to(i32 %0, i32 %1) {
%3 = load i32, i32* @cursor_address
%4 = tail call i32 @tgoto(i32 %3, i32 %1, i32 %0)
%5 = tail call i32 @tty_putp(i32 %4)
ret void
}
int odsnan(double *din1, double *din2) {
  int ret_val;
  ret_val = *din1 != *din2;
  return ret_val;
}


x86 assembly (clang, -O0):
<odsnan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odsnan>:
movsd  (%rsi),%xmm0
cmpneqsd (%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @odsnan(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = load double, double* %8
%10 = fcmp une double %7, %9
%11 = zext i1 %10 to i32
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @odsnan(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fcmp une double %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ t1(int);
int t2(void) {
  int i;
  t1((i = 4096) + 4);
  return i;
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1000,-0x4(%rbp)
mov    $0x1004,%edi
call   1030 <t1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
push   %rax
mov    $0x1004,%edi
call   1030 <t1@plt>
mov    $0x1000,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @t2() {
%1 = alloca i32
store i32 4096, i32* %1
%2 = call i32 @t1(i32 4100)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @t2() {
%1 = tail call i32 @t1(i32 4100)
ret i32 4096
}
/* Variables and functions */
char const *_notif_get_error_message();
const char *notif_get_error_message(void) { return _notif_get_error_message(); }


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

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

LLVM IR (-O0):
define i8* @notif_get_error_message() {
%1 = call i8* (...) @_notif_get_error_message()
ret i8* %1
}

LLVM IR (-O2):
define i8* @notif_get_error_message() {
%1 = tail call i8* (...) @_notif_get_error_message()
ret i8* %1
}
/* Type definitions */
struct lemon {
  int dummy;
};

/* Variables and functions */
int input_set_file(struct lemon *, char const *);
int lemon_input_set_file(struct lemon *lemon, const char *filename) {
  return input_set_file(lemon, filename);
}


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

x86 assembly (clang, -O2):
<lemon_input_set_file>:
jmp    1030 <input_set_file@plt>

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

LLVM IR (-O2):
%struct.lemon = type { i32 }
define i32 @lemon_input_set_file(%struct.lemon* %0, i8* %1) {
%3 = tail call i32 @input_set_file(%struct.lemon* %0, i8* %1)
ret i32 %3
}
int SET_x(int n) { return n; }


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

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

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

LLVM IR (-O2):
define i32 @SET_x(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ x_init();
int /*<<< orphan*/ xaux_init();
pi_init() {
  x_init();
  xaux_init();
}


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

x86 assembly (clang, -O2):
<pi_init>:
push   %rax
xor    %eax,%eax
call   1040 <x_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <xaux_init@plt>

LLVM IR (-O0):
define i32 @pi_init() {
%1 = alloca i32
%2 = call i32 (...) @x_init()
%3 = call i32 (...) @xaux_init()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @pi_init() {
%1 = tail call i32 (...) @x_init()
%2 = tail call i32 (...) @xaux_init()
ret i32 undef
}
float blendOverlay(float base, float blend) {
  return base < 0.5f ? (2.0f * base * blend)
                     : (1.0f - 2.0f * (1.0f - base) * (1.0f - blend));
}


x86 assembly (clang, -O0):
<blendOverlay>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xeea(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    113c <blendOverlay+0x3c>
movss  0xee0(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1184 <blendOverlay+0x84>
movss  0xec0(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
movss  0xeb7(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  0xea7(%rip),%xmm1
subss  -0x8(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xe89(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<blendOverlay>:
movss  0xef8(%rip),%xmm2
ucomiss %xmm0,%xmm2
jbe    1116 <blendOverlay+0x16>
addss  %xmm0,%xmm0
mulss  %xmm1,%xmm0
ret
movss  0xee6(%rip),%xmm3
movaps %xmm3,%xmm2
subss  %xmm0,%xmm2
movaps %xmm3,%xmm0
subss  %xmm1,%xmm0
mulss  0xed4(%rip),%xmm2
mulss  %xmm0,%xmm2
addss  %xmm3,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @blendOverlay(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fcmp olt float %5, 5.000000e-01
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load float, float* %3
%9 = fmul float 2.000000e+00, %8
%10 = load float, float* %4
%11 = fmul float %9, %10
br label %20
12: ; preds = %2
%13 = load float, float* %3
%14 = fsub float 1.000000e+00, %13
%15 = fmul float 2.000000e+00, %14
%16 = load float, float* %4
%17 = fsub float 1.000000e+00, %16
%18 = fneg float %15
%19 = call float @llvm.fmuladd.f32(float %18, float %17, float 1.000000e+00)
br label %20
20: ; preds = %12, %7
%21 = phi float [ %11, %7 ], [ %19, %12 ]
ret float %21
}

LLVM IR (-O2):
define float @blendOverlay(float %0, float %1) {
%3 = fcmp olt float %0, 5.000000e-01
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = fmul float %0, 2.000000e+00
%6 = fmul float %5, %1
br label %12
7: ; preds = %2
%8 = fsub float 1.000000e+00, %0
%9 = fsub float 1.000000e+00, %1
%10 = fmul float %8, -2.000000e+00
%11 = tail call float @llvm.fmuladd.f32(float %10, float %9, float 1.000000e+00)
br label %12
12: ; preds = %7, %4
%13 = phi float [ %6, %4 ], [ %11, %7 ]
ret float %13
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
int main(void) {
  for (;;) {
    sleep(60);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3c,%edi
call   1030 <sleep@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x3c,%edi
call   1030 <sleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %2, %0
%3 = call i32 @sleep(i32 60)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @sleep(i32 60)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void SetHandShake() {
  SendChar((0XEE) & 0xFF);
  SendChar((0x04) & 0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<SetHandShake>:
push   %rbp
mov    %rsp,%rbp
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x4,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetHandShake>:
push   %rax
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x4,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rax
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @SetHandShake() {
%1 = call i32 @SendChar(i32 238)
%2 = call i32 @SendChar(i32 4)
%3 = call i32 @SendChar(i32 255)
%4 = call i32 @SendChar(i32 252)
%5 = call i32 @SendChar(i32 255)
%6 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @SetHandShake() {
%1 = tail call i32 @SendChar(i32 238)
%2 = tail call i32 @SendChar(i32 4)
%3 = tail call i32 @SendChar(i32 255)
%4 = tail call i32 @SendChar(i32 252)
%5 = tail call i32 @SendChar(i32 255)
%6 = tail call i32 @SendChar(i32 255)
ret void
}
__attribute__((no, noclone)) unsigned __int128 t154_3sub(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_sub_overflow((unsigned __int128)(0), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t154_3sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rax
xor    %ecx,%ecx
neg    %rdx
sbb    %rax,%rcx
setb   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1158 <t154_3sub+0x48>
jmp    115f <t154_3sub+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t154_3sub>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %r14d,%r14d
neg    %rbx
sbb    %rsi,%r14
jae    1129 <t154_3sub+0x19>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t154_3sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.usub.with.overflow.i128(i128 0, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t154_3sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.usub.with.overflow.i128(i128 0, i128 %6)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}
int buff2int(const char *buff) {
  return (((unsigned char)(*buff)) << 24) |
         (((unsigned char)(*(buff + 1))) << 16) |
         (((unsigned char)(*(buff + 2))) << 8) | ((unsigned char)(*(buff + 3)));
}


x86 assembly (clang, -O0):
<buff2int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @buff2int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = shl i32 %5, 24
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 16
%12 = or i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = or i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = or i32 %18, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @buff2int(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw i32 %3, 24
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i8, i8* %0, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
struct timespec {
  unsigned int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
void delay_ns(unsigned int ns) {
  struct timespec sleeper, dummy;
  sleeper.tv_sec = 0;
  sleeper.tv_nsec = ns;
  nanosleep(&sleeper, &dummy);
}


x86 assembly (clang, -O0):
<delay_ns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <nanosleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ns>:
sub    $0x28,%rsp
movq   $0x0,0x10(%rsp)
mov    %edi,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1030 <nanosleep@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @delay_ns(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
%4 = alloca %struct.timespec
store i32 %0, i32* %2
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i64 0, i64* %5
%6 = load i32, i32* %2
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %6, i32* %7
%8 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* %4)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @delay_ns(i32 %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = bitcast %struct.timespec* %3 to i8*
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %0, i32* %7
%8 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dtoi(float);
int /*<<< orphan*/ g2_ellipse(int /*<<< orphan*/, float, float, float, float);
void g2_ellipse_(float *dev, float *x, float *y, float *r1, float *r2) {
  g2_ellipse(dtoi(*dev), *x, *y, *r1, *r2);
}


x86 assembly (clang, -O0):
<g2_ellipse_>:
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),%rax
movss  (%rax),%xmm0
call   1030 <dtoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm3
call   1040 <g2_ellipse@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_ellipse_>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
movss  (%rdi),%xmm0
call   1030 <dtoi@plt>
movss  (%rbx),%xmm0
movss  (%r12),%xmm1
movss  (%r15),%xmm2
movss  (%r14),%xmm3
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <g2_ellipse@plt>

LLVM IR (-O0):
define void @g2_ellipse_(float* %0, float* %1, float* %2, float* %3, float* %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store float* %4, float** %10
%11 = load float*, float** %6
%12 = load float, float* %11
%13 = call i32 @dtoi(float %12)
%14 = load float*, float** %7
%15 = load float, float* %14
%16 = load float*, float** %8
%17 = load float, float* %16
%18 = load float*, float** %9
%19 = load float, float* %18
%20 = load float*, float** %10
%21 = load float, float* %20
%22 = call i32 @g2_ellipse(i32 %13, float %15, float %17, float %19, float %21)
ret void
}

LLVM IR (-O2):
define void @g2_ellipse_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, float* nocapture %4) {
%6 = load float, float* %0
%7 = tail call i32 @dtoi(float %6)
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load float, float* %4
%12 = tail call i32 @g2_ellipse(i32 %7, float %8, float %9, float %10, float %11)
ret void
}
void hi_stacktrace(int skip_count) {
  if (skip_count > 0) {
  }
}


x86 assembly (clang, -O0):
<hi_stacktrace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1116 <hi_stacktrace+0x16>
jmp    1116 <hi_stacktrace+0x16>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @hi_stacktrace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @hi_stacktrace(i32 %0) {
ret void
}
int less_than(int i0, int i1) { return i0 < i1; }


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

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

LLVM IR (-O0):
define i32 @less_than(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 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @less_than(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double UINT_MAX;
scalar_t__ randomMT();
double unif() { return ((double)randomMT() / UINT_MAX); }


x86 assembly (clang, -O0):
<unif>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <randomMT@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<unif>:
push   %rax
xor    %eax,%eax
call   1030 <randomMT@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@UINT_MAX = global double 0.000000e+00
define double @unif() {
%1 = call i64 (...) @randomMT()
%2 = sitofp i64 %1 to double
%3 = load double, double* @UINT_MAX
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@UINT_MAX = global double 0.000000e+00
define double @unif() {
%1 = tail call i64 (...) @randomMT()
%2 = sitofp i64 %1 to double
%3 = load double, double* @UINT_MAX
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ StopDrive(int);
int /*<<< orphan*/ wait1Msec(int);
void TimedStop(int time) {
  wait1Msec(time);
  StopDrive(1);
}


x86 assembly (clang, -O0):
<TimedStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <wait1Msec@plt>
mov    $0x1,%edi
call   1040 <StopDrive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimedStop>:
push   %rax
call   1030 <wait1Msec@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <StopDrive@plt>

LLVM IR (-O0):
define void @TimedStop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @wait1Msec(i32 %3)
%5 = call i32 @StopDrive(i32 1)
ret void
}

LLVM IR (-O2):
define void @TimedStop(i32 %0) {
%2 = tail call i32 @wait1Msec(i32 %0)
%3 = tail call i32 @StopDrive(i32 1)
ret void
}
void BIO_push(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_push() {
ret void
}
/* Variables and functions */
char *leet(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s[] =
      "Expect the best. Prepare for the worst. Capitalize on what comes.\n";
  char *p;
  p = leet(s);
  printf("%s", p);
  printf("%s", s);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x43,%edx
call   1040 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1050 <leet@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rsi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x50(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
movaps 0xf02(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeae(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xa2e73,0x3f(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <leet@plt>
lea    0xed3(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.s = [67 x i8] c"Expect the best. Prepare for the worst. Capitalize on what comes.\0A\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [67 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [67 x i8]* %2 to i8*
%5 = getelementptr inbounds [67 x i8], [67 x i8]* %2, i64 0, i64 0
%6 = call i8* @leet(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [67 x i8], [67 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [67 x i8] c"Expect the best. Prepare for the worst. Capitalize on what comes.\0A\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [67 x i8]
%2 = getelementptr inbounds [67 x i8], [67 x i8]* %1, i64 0, i64 0
%3 = call i8* @leet(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblock_new_pool() {
  printf("NOT IMPLEMENTED:"
         "pa_memblock_new_pool"
         "\n");
}


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

x86 assembly (clang, -O2):
<pa_memblock_new_pool>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_memblock_new_pool\00"
define i32 @pa_memblock_new_pool() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *x) {
  fprintf(stderr, "Usage: %s home.blocks primry.boot\n", x);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s home.blocks primry.boot\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: %s home.blocks primry.boot\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, const char *argv[]) {
  int p1[] = {0, 1, 2, 3, 4, 5};
  int *p2 = p1 + 2;
  printf("%d %d\n", *p1, (int)(*p2));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x30(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%esi
mov    -0x38(%rbp),%rax
mov    (%rax),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0, i32 2)
ret i32 0
}
int get_last_block_portion_size(int filesize) {
  const int partial = filesize % 512;
  return (partial > 0 ? partial : 512);
}


x86 assembly (clang, -O0):
<get_last_block_portion_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x200,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    112a <get_last_block_portion_size+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <get_last_block_portion_size+0x37>
mov    $0x200,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <get_last_block_portion_size+0x37>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_last_block_portion_size>:
lea    0x1ff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
and    $0xfffffe00,%eax
sub    %eax,%edi
test   %edi,%edi
mov    $0x200,%eax
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @get_last_block_portion_size(i32 %0) {
%2 = srem i32 %0, 512
%3 = icmp sgt i32 %2, 0
%4 = select i1 %3, i32 %2, i32 512
ret i32 %4
}
void exit(long exitCode) {
  asm("movq %0, %%rbx \n\t"
      "movq $1, %%rax \n\t"
      "int $0x80 \n\t"
      "hlt \n\t" ::"m"(exitCode));
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rbx
mov    $0x1,%rax
int    $0x80
hlt

x86 assembly (clang, -O2):
<exit>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rbx
mov    $0x1,%rax
int    $0x80
hlt

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

LLVM IR (-O2):
define void @exit(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
unreachable
}
/* Type definitions */
struct simpleConfig {
  int dummy;
};

/* Variables and functions */
struct simpleConfig *config_hookup() {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.simpleConfig = type { i32 }
define %struct.simpleConfig* @config_hookup() {
ret %struct.simpleConfig* null
}

LLVM IR (-O2):
%struct.simpleConfig = type { i32 }
define noalias %struct.simpleConfig* @config_hookup() {
ret %struct.simpleConfig* null
}
int test_imm_3Buint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x3B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Buint64_lowword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
and    $0x3b,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Buint64_lowword_mem>:
testb  $0x3b,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_3Buint64_lowword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = and i64 %4, 59
%6 = icmp ne i64 %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_3Buint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 59
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void g_unsetenv() {}


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

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

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

LLVM IR (-O2):
define void @g_unsetenv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World from PlatformIO!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Hello World from PlatformIO!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"Hello World from PlatformIO!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_break();
int /*<<< orphan*/ write_line(char *);
void html_itemize_item(void) {
  write_break();
  write_line("<LI>");
}


x86 assembly (clang, -O0):
<html_itemize_item>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <write_break@plt>
lea    0xece(%rip),%rdi
call   1040 <write_line@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_itemize_item>:
push   %rax
xor    %eax,%eax
call   1030 <write_break@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <write_line@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"<LI>\00"
define void @html_itemize_item() {
%1 = call i32 (...) @write_break()
%2 = call i32 @write_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"<LI>\00"
define void @html_itemize_item() {
%1 = tail call i32 (...) @write_break()
%2 = tail call i32 @write_line(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int int64_t;
typedef int int32_t;

/* Variables and functions */
int32_t ntt32_muln(int32_t x, int32_t y, int32_t n) {
  return (((int64_t)x) * ((int64_t)y)) % ((int64_t)n);
}


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

x86 assembly (clang, -O2):
<ntt32_muln>:
mov    %edx,%ecx
mov    %edi,%eax
imul   %esi,%eax
cltd
idiv   %ecx
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ntt32_muln(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, %0
%5 = srem i32 %4, %2
ret i32 %5
}
int setft_lbart_rdma_completion(void *para) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @setft_lbart_rdma_completion(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_lock(int /*<<< orphan*/ *);
int gen_posix_mutex_lock(pthread_mutex_t *mut) {
  return (pthread_mutex_lock(mut));
}


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

x86 assembly (clang, -O2):
<gen_posix_mutex_lock>:
jmp    1030 <pthread_mutex_lock@plt>

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

LLVM IR (-O2):
define i32 @gen_posix_mutex_lock(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
ret i32 %2
}