xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ isblank(char);
char *string_duplicate(char *);
void string_trim_left(char **text) {
  char *string_without_blank = *text;
  while (isblank(*string_without_blank)) {
    string_without_blank++;
  }
  char *new_string = string_duplicate(string_without_blank);
  free(*text);
  *text = new_string;
}


x86 assembly (clang, -O0):
<string_trim_left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isblank@plt>
cmp    $0x0,%rax
je     116e <string_trim_left+0x3e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1147 <string_trim_left+0x17>
mov    -0x10(%rbp),%rdi
call   1050 <string_duplicate@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_trim_left>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rbx
add    $0xffffffffffffffff,%rbx
xchg   %ax,%ax
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1040 <isblank@plt>
test   %rax,%rax
jne    1140 <string_trim_left+0x10>
mov    %rbx,%rdi
call   1050 <string_duplicate@plt>
mov    %rax,%rbx
mov    (%r14),%rdi
call   1030 <free@plt>
mov    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @string_trim_left(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
%4 = alloca i8*
store i8** %0, i8*** %2
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
store i8* %6, i8** %3
br label %7
7: ; preds = %12, %1
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = call i64 @isblank(i8 signext %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
br label %7
15: ; preds = %7
%16 = load i8*, i8** %3
%17 = call i8* @string_duplicate(i8* %16)
store i8* %17, i8** %4
%18 = load i8**, i8*** %2
%19 = load i8*, i8** %18
%20 = call i32 @free(i8* %19)
%21 = load i8*, i8** %4
%22 = load i8**, i8*** %2
store i8* %21, i8** %22
ret void
}

LLVM IR (-O2):
define void @string_trim_left(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %2, %1 ], [ %8, %3 ]
%5 = load i8, i8* %4
%6 = tail call i64 @isblank(i8 signext %5)
%7 = icmp eq i64 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = tail call i8* @string_duplicate(i8* %4)
%11 = load i8*, i8** %0
%12 = tail call i32 @free(i8* %11)
store i8* %10, i8** %0
ret void
}
long long uuzs() { return 0x7fff7fff0000ffffLL; }


x86 assembly (clang, -O0):
<uuzs>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fff7fff0000ffff,%rax
7f ff 7f
pop    %rbp
ret

x86 assembly (clang, -O2):
<uuzs>:
movabs $0x7fff7fff0000ffff,%rax
7f ff 7f
ret

LLVM IR (-O0):
define i64 @uuzs() {
ret i64 9223231295071518719
}

LLVM IR (-O2):
define i64 @uuzs() {
ret i64 9223231295071518719
}
/* Variables and functions */
int aRead();
int main() {
  volatile unsigned char x;
  x = aRead() ^ 42;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <aRead@plt>
xor    $0x2a,%al
mov    %al,0x7(%rsp)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i8
%2 = call i32 (...) @aRead()
%3 = xor i32 %2, 42
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (...) @aRead()
%3 = trunc i32 %2 to i8
%4 = xor i8 %3, 42
store volatile i8 %4, i8* %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ ssh_logit(char *, int, int /*<<< orphan*/);
int dispatch_protocol_ignore(int type, u_int32_t seq, void *ssh) {
  ssh_logit("dispatch_protocol_ignore: type %d seq %u", type, seq);
  return 0;
}


x86 assembly (clang, -O0):
<dispatch_protocol_ignore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed1(%rip),%rdi
call   1030 <ssh_logit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dispatch_protocol_ignore>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
lea    0xee4(%rip),%rdi
call   1030 <ssh_logit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"dispatch_protocol_ignore: type %d seq %u\00"
define i32 @dispatch_protocol_ignore(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @ssh_logit(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"dispatch_protocol_ignore: type %d seq %u\00"
define i32 @dispatch_protocol_ignore(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @ssh_logit(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 0
}
void gtk_tree_model_sort_reset_default_sort_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_sort_reset_default_sort_func() {
ret void
}
void gtk_widget_set_child_visible() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_set_child_visible() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rush(int, int);
int main(void) {
  rush(7, 5);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @rush(i32 7, i32 5)
ret i32 0
}
/* Type definitions */
struct prb_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *prb_delete(struct prb_table *, void *);
void *(prb_assert_delete)(struct prb_table *table, void *item) {
  void *p = prb_delete(table, item);
  assert(p != NULL);
  return p;
}


x86 assembly (clang, -O0):
<prb_assert_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <prb_delete@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prb_assert_delete>:
push   %rbx
call   1040 <prb_delete@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.prb_table = type { i32 }
define i8* @prb_assert_delete(%struct.prb_table* %0, i8* %1) {
%3 = alloca %struct.prb_table*
%4 = alloca i8*
%5 = alloca i8*
store %struct.prb_table* %0, %struct.prb_table** %3
store i8* %1, i8** %4
%6 = load %struct.prb_table*, %struct.prb_table** %3
%7 = load i8*, i8** %4
%8 = call i8* @prb_delete(%struct.prb_table* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
%struct.prb_table = type { i32 }
define i8* @prb_assert_delete(%struct.prb_table* %0, i8* %1) {
%3 = tail call i8* @prb_delete(%struct.prb_table* %0, i8* %1)
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ print_timestamp_ext(char *, char *);
void print_timestamp_init(char *message) {
  print_timestamp_ext(message, "INIT");
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"INIT\00"
define void @print_timestamp_init(i8* %0) {
%2 = tail call i32 @print_timestamp_ext(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned long IsPowerOfTwo(unsigned long x) { return (x & (x - 1)) == 0; }


x86 assembly (clang, -O0):
<IsPowerOfTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsPowerOfTwo>:
lea    -0x1(%rdi),%rcx
xor    %eax,%eax
test   %rcx,%rdi
sete   %al
ret

LLVM IR (-O0):
define i64 @IsPowerOfTwo(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = sub i64 %4, 1
%6 = and i64 %3, %5
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = sext i32 %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @IsPowerOfTwo(i64 %0) {
%2 = tail call i64 @llvm.ctpop.i64(i64 %0)
%3 = icmp ult i64 %2, 2
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: \n"
         "   justup status\n"
         "   justup save\n"
         "   justup push\n"
         "   justup push <path1 path2 ...>\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [89 x i8] c"Usage: \0A justup status\0A justup save\0A justup push\0A justup push <path1 path2 ...>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [88 x i8] c"Usage: \0A justup status\0A justup save\0A justup push\0A justup push <path1 path2 ...>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @str, i64 0, i64 0))
ret void
}
void foo346(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo346(i32 %0) {
ret void
}
AR0AR1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((p0[10000000]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl 0x989680(%rax),%eax
mov    -0x20(%rbp),%rcx
movsbl 0x43d11(%rcx),%ecx
cmp    %ecx,%eax
jg     1148 <AR0AR1+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <AR0AR1+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AR1>:
mov    0x989680(%r8),%cl
xor    %eax,%eax
cmp    0x43d11(%r9),%cl
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AR0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture %5) {
%7 = getelementptr inbounds i8, i8* %4, i64 10000000
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %5, i64 277777
%10 = load i8, i8* %9
%11 = icmp sle i8 %8, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef unsigned char u_int32_t;

/* Variables and functions */
unsigned char *deserialize_u_int32_t(u_int32_t *dest, unsigned char *data) {
  *dest = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
  return data + 4;
}


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

x86 assembly (clang, -O2):
<deserialize_u_int32_t>:
mov    0x3(%rsi),%al
mov    %al,(%rdi)
lea    0x4(%rsi),%rax
ret

LLVM IR (-O0):
define i8* @deserialize_u_int32_t(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 24
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 16
%15 = add nsw i32 %9, %14
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = add nsw i32 %15, %20
%22 = load i8*, i8** %4
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = add nsw i32 %21, %25
%27 = trunc i32 %26 to i8
%28 = load i8*, i8** %3
store i8 %27, i8* %28
%29 = load i8*, i8** %4
%30 = getelementptr inbounds i8, i8* %29, i64 4
ret i8* %30
}

LLVM IR (-O2):
define i8* @deserialize_u_int32_t(i8* nocapture writeonly %0, i8* %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 3
%4 = load i8, i8* %3
store i8 %4, i8* %0
%5 = getelementptr inbounds i8, i8* %1, i64 4
ret i8* %5
}
main() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ASL8(int /*<<< orphan*/);
int /*<<< orphan*/ AbsoluteIndexedXX0(int);
void Op1EM1X0(void) { ASL8(AbsoluteIndexedXX0(3)); }


x86 assembly (clang, -O0):
<Op1EM1X0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
call   1030 <ASL8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op1EM1X0>:
push   %rax
mov    $0x3,%edi
call   1040 <AbsoluteIndexedXX0@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ASL8@plt>

LLVM IR (-O0):
define void @Op1EM1X0() {
%1 = call i32 @AbsoluteIndexedXX0(i32 3)
%2 = call i32 @ASL8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op1EM1X0() {
%1 = tail call i32 @AbsoluteIndexedXX0(i32 3)
%2 = tail call i32 @ASL8(i32 %1)
ret void
}
int xfuse_init() { return 0; }


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

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

LLVM IR (-O0):
define i32 @xfuse_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @xfuse_init() {
ret i32 0
}
void avpicture_alloc() {}


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

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

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

LLVM IR (-O2):
define void @avpicture_alloc() {
ret void
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned short)8426;
    local1 = 0UL;
    while (local1 < (unsigned short)0) {
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] + 707305405UL) * (unsigned short)58185;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0x30dd5ac,%rax
add    $0x20ea,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x0,%eax
jge    1147 <RandomFunc+0x47>
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1129 <RandomFunc+0x29>
movzwl -0x12(%rbp),%eax
add    $0x2a289fbd,%rax
imul   $0xe349,%rax,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = add i64 %10, 51238316
%12 = add i64 %11, 8426
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %19, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i32
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %15
%20 = load i16, i16* %6
%21 = zext i16 %20 to i64
%22 = add i64 %21, 2
%23 = trunc i64 %22 to i16
store i16 %23, i16* %6
br label %15
24: ; preds = %15
%25 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%26 = load i16, i16* %25
%27 = zext i16 %26 to i64
%28 = add i64 %27, 707305405
%29 = mul i64 %28, 58185
%30 = trunc i64 %29 to i16
%31 = load i16*, i16** %4
%32 = getelementptr inbounds i16, i16* %31, i64 0
store i16 %30, i16* %32
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = mul i16 %3, -7351
%5 = add i16 %4, 30379
store i16 %5, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i7(int /*<<< orphan*/, int, int, int, int, int, int);
void t() { i7(0, 1, 2, 3, 4, 5, 6); }


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
call   1030 <i7@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t>:
push   %rax
movl   $0x6,(%rsp)
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
call   1030 <i7@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @t() {
%1 = call i32 @i7(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6)
ret void
}

LLVM IR (-O2):
define void @t() {
%1 = tail call i32 @i7(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6)
ret void
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, long, int /*<<< orphan*/,
                         int /*<<< orphan*/);
void send_gunl(struct ship *ship, long a, long b) {
  Write(10, ship, a, b, 0, 0);
}


x86 assembly (clang, -O0):
<send_gunl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0xa,%edi
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_gunl>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xa,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_gunl(%struct.ship* %0, i64 %1, i64 %2) {
%4 = alloca %struct.ship*
%5 = alloca i64
%6 = alloca i64
store %struct.ship* %0, %struct.ship** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load %struct.ship*, %struct.ship** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i32 @Write(i32 10, %struct.ship* %7, i64 %8, i64 %9, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_gunl(%struct.ship* %0, i64 %1, i64 %2) {
%4 = tail call i32 @Write(i32 10, %struct.ship* %0, i64 %1, i64 %2, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeTCPConnectSocket(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<closeTCPConnectSocket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @closeTCPConnectSocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ malloc(int);
scalar_t__ nondet();
int main() {
  int *r;
  int y;
  r = (int *)malloc(4);
  *r = 0;
  while (nondet()) {
    *r = *r - 1;
  }
  y = *r;
  assert(y >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     117c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    1157 <main+0x27>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movl   $0x0,(%rax)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <nondet@plt>
test   %rax,%rax
je     1161 <main+0x31>
addl   $0xffffffff,(%rbx)
jmp    1150 <main+0x20>
mov    (%rbx),%edi
not    %edi
shr    $0x1f,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
store i32 0, i32* %6
br label %7
7: ; preds = %10, %0
%8 = call i64 (...) @nondet()
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
%13 = sub nsw i32 %12, 1
%14 = load i32*, i32** %2
store i32 %13, i32* %14
br label %7
15: ; preds = %7
%16 = load i32*, i32** %2
%17 = load i32, i32* %16
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = icmp sge i32 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 0, i32* %2
%3 = tail call i64 (...) @nondet()
%4 = icmp eq i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = load i32, i32* %2
%7 = add nsw i32 %6, -1
store i32 %7, i32* %2
%8 = tail call i64 (...) @nondet()
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %0
%11 = load i32, i32* %2
%12 = xor i32 %11, -1
%13 = lshr i32 %12, 31
%14 = tail call i32 @assert(i32 %13)
ret i32 0
}
void _infix_operator_mod_u8_u8(unsigned char lhs, unsigned char rhs,
                               unsigned char *__rval_1) {
  *__rval_1 = lhs % rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_mod_u8_u8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
cltd
idiv   %ecx
mov    %dl,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_mod_u8_u8>:
movzbl %dil,%eax
div    %sil
movzbl %ah,%eax
mov    %al,(%rdx)
ret

LLVM IR (-O0):
define void @_infix_operator_mod_u8_u8(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = srem i32 %8, %10
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %6
store i8 %12, i8* %13
ret void
}

LLVM IR (-O2):
define void @_infix_operator_mod_u8_u8(i8 zeroext %0, i8 zeroext %1, i8* nocapture writeonly %2) {
%4 = urem i8 %0, %1
store i8 %4, i8* %2
ret void
}
int test_imm_E2uint16_reg(unsigned short val) {
  return ((val) & (-0xE2 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E2uint16_reg>:
test   $0xff1e,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E2uint16_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, -226
%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_E2uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -226
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int cmp_struct(void *m1, void *m2) {
  char *n1 = *(char **)m1, *n2 = *(char **)m2;
  return !strcmp(n1, n2);
}


x86 assembly (clang, -O0):
<cmp_struct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_struct>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cmp_struct(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i32 @strcmp(i8* %13, i8* %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @cmp_struct(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
unsigned int *s_to_u_init(signed int *sp) {
  unsigned int *up = sp;
  return up;
}


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

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

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

LLVM IR (-O2):
define i32* @s_to_u_init(i32* readnone returned %0) {
ret i32* %0
}
long double cquat_norm2_l(const double *q) {
  long double sum =
      (q[0] * q[0]) + (q[1] * q[1]) + (q[2] * q[2]) + (q[3] * q[3]);
  return sum;
}


x86 assembly (clang, -O0):
<cquat_norm2_l>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0x8(%rax),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x10(%rax),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x18(%rax),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
fldl   -0x28(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cquat_norm2_l>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x10(%rdi),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x18(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rsp)
fldl   -0x8(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @cquat_norm2_l(double* %0) {
%2 = alloca double*
%3 = alloca x86_fp80
store double* %0, double** %2
%4 = load double*, double** %2
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %2
%11 = getelementptr inbounds double, double* %10, i64 1
%12 = load double, double* %11
%13 = load double*, double** %2
%14 = getelementptr inbounds double, double* %13, i64 1
%15 = load double, double* %14
%16 = fmul double %12, %15
%17 = call double @llvm.fmuladd.f64(double %6, double %9, double %16)
%18 = load double*, double** %2
%19 = getelementptr inbounds double, double* %18, i64 2
%20 = load double, double* %19
%21 = load double*, double** %2
%22 = getelementptr inbounds double, double* %21, i64 2
%23 = load double, double* %22
%24 = call double @llvm.fmuladd.f64(double %20, double %23, double %17)
%25 = load double*, double** %2
%26 = getelementptr inbounds double, double* %25, i64 3
%27 = load double, double* %26
%28 = load double*, double** %2
%29 = getelementptr inbounds double, double* %28, i64 3
%30 = load double, double* %29
%31 = call double @llvm.fmuladd.f64(double %27, double %30, double %24)
%32 = fpext double %31 to x86_fp80
store x86_fp80 %32, x86_fp80* %3
%33 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %33
}

LLVM IR (-O2):
define x86_fp80 @cquat_norm2_l(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = getelementptr inbounds double, double* %0, i64 3
%11 = load double, double* %10
%12 = tail call double @llvm.fmuladd.f64(double %11, double %11, double %9)
%13 = fpext double %12 to x86_fp80
ret x86_fp80 %13
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, char *, int);
void say_goodbye() {
  static int i = 0;
  printf("goodbye, %s's process! +%d\n", getenv("USER"), ++i);
}


x86 assembly (clang, -O0):
<say_goodbye>:
push   %rbp
mov    %rsp,%rbp
lea    0xef1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rsi
mov    0x2efb(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2ef2(%rip)
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<say_goodbye>:
push   %rax
lea    0xef4(%rip),%rdi
call   1030 <getenv@plt>
mov    0x2f01(%rip),%edx
add    $0x1,%edx
mov    %edx,0x2ef8(%rip)
lea    0xebd(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@say_goodbye.i = internal global i32 0
@.str = [28 x i8] c"goodbye, %s's process! +%d\0A\00"
@.str.1 = [5 x i8] c"USER\00"
define void @say_goodbye() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = load i32, i32* @say_goodbye.i
%3 = add nsw i32 %2, 1
store i32 %3, i32* @say_goodbye.i
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3)
ret void
}

LLVM IR (-O2):
@say_goodbye.i = internal unnamed_addr global i32 0
@.str = [28 x i8] c"goodbye, %s's process! +%d\0A\00"
@.str.1 = [5 x i8] c"USER\00"
define void @say_goodbye() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = load i32, i32* @say_goodbye.i
%3 = add nsw i32 %2, 1
store i32 %3, i32* @say_goodbye.i
%4 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void receive(char *data, int len) { puts(data); }


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

x86 assembly (clang, -O2):
<receive>:
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
define void @receive(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
unsigned long long flip_unsigned_long_long(unsigned long long);
int gob_encode_unsigned_long_long(char *, size_t, unsigned long long);
int /*<<< orphan*/ memcpy(char *, double *, int);
int gob_encode_double(char *buf, size_t buf_size, double d) {
  unsigned long long ull = 0;
  memcpy((char *)&ull, &d, sizeof(double));
  unsigned long long rev_ull = flip_unsigned_long_long(ull);
  return gob_encode_unsigned_long_long(buf, buf_size, rev_ull);
}


x86 assembly (clang, -O0):
<gob_encode_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rdi
call   1030 <flip_unsigned_long_long@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1050 <gob_encode_unsigned_long_long@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gob_encode_double>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    0x8(%rsp),%rdi
call   1030 <flip_unsigned_long_long@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1050 <gob_encode_unsigned_long_long@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @gob_encode_double(i8* %0, i64 %1, double %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca double
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store double %2, double* %6
store i64 0, i64* %7
%9 = bitcast i64* %7 to i8*
%10 = call i32 @memcpy(i8* %9, double* %6, i32 8)
%11 = load i64, i64* %7
%12 = call i64 @flip_unsigned_long_long(i64 %11)
store i64 %12, i64* %8
%13 = load i8*, i8** %4
%14 = load i64, i64* %5
%15 = load i64, i64* %8
%16 = call i32 @gob_encode_unsigned_long_long(i8* %13, i64 %14, i64 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @gob_encode_double(i8* %0, i64 %1, double %2) {
%4 = alloca double
%5 = alloca i64
store double %2, double* %4
%6 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%7 = call i32 @memcpy(i8* %6, double* %4, i32 8)
%8 = load i64, i64* %5
%9 = call i64 @flip_unsigned_long_long(i64 %8)
%10 = call i32 @gob_encode_unsigned_long_long(i8* %0, i64 %1, i64 %9)
ret i32 %10
}
int evfilt_user_init(struct filter *filt) { return (0); }


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

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

LLVM IR (-O0):
%struct.filter = type opaque
define i32 @evfilt_user_init(%struct.filter* %0) {
%2 = alloca %struct.filter*
store %struct.filter* %0, %struct.filter** %2
ret i32 0
}

LLVM IR (-O2):
%struct.filter = type opaque
define i32 @evfilt_user_init(%struct.filter* nocapture readnone %0) {
ret i32 0
}
const char *always_sampler_to_str(struct htrace_sampler *sampler) {
  return "AlwaysSampler";
}


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

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

LLVM IR (-O0):
%struct.htrace_sampler = type opaque
@.str = [14 x i8] c"AlwaysSampler\00"
define i8* @always_sampler_to_str(%struct.htrace_sampler* %0) {
%2 = alloca %struct.htrace_sampler*
store %struct.htrace_sampler* %0, %struct.htrace_sampler** %2
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.htrace_sampler = type opaque
@.str = [14 x i8] c"AlwaysSampler\00"
define i8* @always_sampler_to_str(%struct.htrace_sampler* nocapture readnone %0) {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
unsigned float_twice(unsigned uf) {
  unsigned f = uf;
  if ((f & 0x7f800000) == 0) {
    f = ((f & 0x007fffff) << 1) | (0x80000000 & f);
  } else if ((f & 0x7f800000) != 0x7f800000) {
    f += 0x00800000;
  }
  return f;
}


x86 assembly (clang, -O0):
<float_twice>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7f800000,%eax
cmp    $0x0,%eax
jne    113c <float_twice+0x3c>
mov    -0x8(%rbp),%eax
and    $0x7fffff,%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%ecx
and    $0x80000000,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    115f <float_twice+0x5f>
mov    -0x8(%rbp),%eax
and    $0x7f800000,%eax
cmp    $0x7f800000,%eax
je     115a <float_twice+0x5a>
mov    -0x8(%rbp),%eax
add    $0x800000,%eax
mov    %eax,-0x8(%rbp)
jmp    115f <float_twice+0x5f>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_twice>:
mov    %edi,%eax
mov    %edi,%ecx
and    $0x7f800000,%ecx
cmp    $0x7f800000,%ecx
je     112c <float_twice+0x2c>
test   %ecx,%ecx
jne    1127 <float_twice+0x27>
mov    %eax,%ecx
and    $0x7fffff,%ecx
and    $0x80000000,%eax
lea    (%rax,%rcx,2),%eax
ret
add    $0x800000,%eax
ret

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

LLVM IR (-O2):
define i32 @float_twice(i32 %0) {
%2 = and i32 %0, 2139095040
switch i32 %2, label %8 [
i32 0, label %3
i32 2139095040, label %10
]
3: ; preds = %1
%4 = shl i32 %0, 1
%5 = and i32 %4, 16777214
%6 = and i32 %0, -2147483648
%7 = or i32 %5, %6
br label %10
8: ; preds = %1
%9 = add i32 %0, 8388608
br label %10
10: ; preds = %1, %8, %3
%11 = phi i32 [ %7, %3 ], [ %9, %8 ], [ %0, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ shutdown_archiver();
void at_exit(int signum) { shutdown_archiver(); }


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

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

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

LLVM IR (-O2):
define void @at_exit(i32 %0) {
%2 = tail call i32 (...) @shutdown_archiver()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ challenge_any_one();
int /*<<< orphan*/ challenge_run();
int /*<<< orphan*/ challenge_startup();
int main() {
  challenge_startup();
  challenge_run();
  challenge_run();
  challenge_any_one();
  challenge_run();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @challenge_startup()
%3 = call i32 (...) @challenge_run()
%4 = call i32 (...) @challenge_run()
%5 = call i32 (...) @challenge_any_one()
%6 = call i32 (...) @challenge_run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @challenge_startup()
%2 = tail call i32 (...) @challenge_run()
%3 = tail call i32 (...) @challenge_run()
%4 = tail call i32 (...) @challenge_any_one()
%5 = tail call i32 (...) @challenge_run()
ret i32 0
}
void ADXL362_stop() {}


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

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

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

LLVM IR (-O2):
define void @ADXL362_stop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void onFinish(void *callbackContext) {
  printf("FINISH: [%s]\n", (const char *)callbackContext);
}


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

x86 assembly (clang, -O2):
<onFinish>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"FINISH: [%s]\0A\00"
define void @onFinish(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int xerbla_(char *srname, int *info) {
  printf(
      "xerbla: On entry to %6s, parameter number %2d had an illegal value.\n",
      srname, *info);
  return 0;
}


x86 assembly (clang, -O0):
<xerbla_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xerbla_>:
push   %rax
mov    %rdi,%rax
mov    (%rsi),%edx
lea    0xee3(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [69 x i8] c"xerbla: On entry to %6s, parameter number %2d had an illegal value.\0A\00"
define i32 @xerbla_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [69 x i8] c"xerbla: On entry to %6s, parameter number %2d had an illegal value.\0A\00"
define i32 @xerbla_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
ret i32 0
}
/* Variables and functions */
int update_crc32(int, unsigned char const *, size_t);
unsigned int crc32(const unsigned char *buf, size_t len) {
  return update_crc32(0xffffffff, buf, len) ^ 0xffffffff;
}


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

x86 assembly (clang, -O2):
<crc32>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
call   1030 <update_crc32@plt>
not    %eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @crc32(i8* %0, i64 %1) {
%3 = tail call i32 @update_crc32(i32 -1, i8* %0, i64 %1)
%4 = xor i32 %3, -1
ret i32 %4
}