xunge/DecIR huggingface dataset:
void iw(int gu, int mq, int r2) {
  int yn = 0;
  while (gu < 1) {
    for (;;)
      ;
  bb:;
    int ay = 0;
    while (yn < 1)
      ++mq;
  }
  if (yn != 0)
    goto up;
  if (0) {
  up:
    if (r2 == 0)
      goto bb;
  }
  goto up;
}


x86 assembly (clang, -O0):
<iw>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    114c <iw+0x4c>
jmp    1123 <iw+0x23>
jmp    1123 <iw+0x23>
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x10(%rbp)
jge    1147 <iw+0x47>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <iw+0x2f>
jmp    1114 <iw+0x14>
cmpl   $0x0,-0x10(%rbp)
je     115b <iw+0x5b>
jmp    116f <iw+0x6f>
xor    %eax,%eax
test   $0x1,%al
jne    116a <iw+0x6a>
jmp    1183 <iw+0x83>
jmp    116f <iw+0x6f>
cmpl   $0x0,-0xc(%rbp)
jne    117e <iw+0x7e>
jmp    1128 <iw+0x28>
jmp    1183 <iw+0x83>
jmp    116f <iw+0x6f>

x86 assembly (clang, -O2):
<iw>:
test   %edi,%edi
jle    1120 <iw+0x20>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1110 <iw+0x10>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1120 <iw+0x20>

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

LLVM IR (-O2):
define void @iw(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, 1
br i1 %4, label %5, label %6
5: ; preds = %3, %5
br label %5
6: ; preds = %3
%7 = icmp ne i32 %2, 0
br label %8
8: ; preds = %6, %8
br label %8
}
/* Type definitions */
typedef void lvar_leaf_entry;
struct iam_leaf {
  int dummy;
};

/* Variables and functions */
int e_size(struct iam_leaf const *, void const *);
struct lvar_leaf_entry *e_next(const struct iam_leaf *leaf,
                               const struct lvar_leaf_entry *ent) {
  return ((void *)ent) + e_size(leaf, ent);
}


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

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

LLVM IR (-O0):
%struct.iam_leaf = type { i32 }
%struct.lvar_leaf_entry = type opaque
define %struct.lvar_leaf_entry* @e_next(%struct.iam_leaf* %0, %struct.lvar_leaf_entry* %1) {
%3 = alloca %struct.iam_leaf*
%4 = alloca %struct.lvar_leaf_entry*
store %struct.iam_leaf* %0, %struct.iam_leaf** %3
store %struct.lvar_leaf_entry* %1, %struct.lvar_leaf_entry** %4
%5 = load %struct.lvar_leaf_entry*, %struct.lvar_leaf_entry** %4
%6 = bitcast %struct.lvar_leaf_entry* %5 to i8*
%7 = load %struct.iam_leaf*, %struct.iam_leaf** %3
%8 = load %struct.lvar_leaf_entry*, %struct.lvar_leaf_entry** %4
%9 = bitcast %struct.lvar_leaf_entry* %8 to i8*
%10 = call i32 @e_size(%struct.iam_leaf* %7, i8* %9)
%11 = sext i32 %10 to i64
%12 = getelementptr i8, i8* %6, i64 %11
%13 = bitcast i8* %12 to %struct.lvar_leaf_entry*
ret %struct.lvar_leaf_entry* %13
}

LLVM IR (-O2):
%struct.iam_leaf = type { i32 }
%struct.lvar_leaf_entry = type opaque
define %struct.lvar_leaf_entry* @e_next(%struct.iam_leaf* %0, %struct.lvar_leaf_entry* %1) {
%3 = bitcast %struct.lvar_leaf_entry* %1 to i8*
%4 = tail call i32 @e_size(%struct.iam_leaf* %0, i8* %3)
%5 = sext i32 %4 to i64
%6 = getelementptr i8, i8* %3, i64 %5
%7 = bitcast i8* %6 to %struct.lvar_leaf_entry*
ret %struct.lvar_leaf_entry* %7
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr8setBank0(int);
int /*<<< orphan*/ prg16setBank0(int);
void m70_setParams(uint16_t addr, uint8_t val) {
  (void)addr;
  prg16setBank0((val >> 4) << 14);
  chr8setBank0((val & 0xF) << 13);
}


x86 assembly (clang, -O0):
<m70_setParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
shl    $0xe,%edi
call   1030 <prg16setBank0@plt>
mov    -0x8(%rbp),%edi
and    $0xf,%edi
shl    $0xd,%edi
call   1040 <chr8setBank0@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m70_setParams>:
push   %rbx
mov    %esi,%ebx
mov    %esi,%edi
and    $0xfffffff0,%edi
shl    $0xa,%edi
call   1030 <prg16setBank0@plt>
and    $0xf,%ebx
shl    $0xd,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1040 <chr8setBank0@plt>

LLVM IR (-O0):
define void @m70_setParams(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 = ashr i32 %6, 4
%8 = shl i32 %7, 14
%9 = call i32 @prg16setBank0(i32 %8)
%10 = load i32, i32* %4
%11 = and i32 %10, 15
%12 = shl i32 %11, 13
%13 = call i32 @chr8setBank0(i32 %12)
ret void
}

LLVM IR (-O2):
define void @m70_setParams(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = and i32 %3, -16384
%5 = tail call i32 @prg16setBank0(i32 %4)
%6 = shl i32 %1, 13
%7 = and i32 %6, 122880
%8 = tail call i32 @chr8setBank0(i32 %7)
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ exit_msg(char *, char const *, char const *, int);
void *_calloc_w(size_t size, const char *caller, const char *file, int line) {
  void *buffer;
  buffer = calloc(1, size);
  if (!buffer)
    exit_msg("Failed to allocate memory in %s() %s:%d", caller, file, line);
  ;
  return buffer;
}


x86 assembly (clang, -O0):
<_calloc_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    116b <_calloc_w+0x4b>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xe9a(%rip),%rdi
call   1040 <exit_msg@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_calloc_w>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115a <_calloc_w+0x3a>
lea    0xeb4(%rip),%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <exit_msg@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Failed to allocate memory in %s() %s:%d\00"
define i8* @_calloc_w(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i64 %0, i64* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i64, i64* %5
%11 = call i8* @calloc(i32 1, i64 %10)
store i8* %11, i8** %9
%12 = load i8*, i8** %9
%13 = icmp ne i8* %12, null
br i1 %13, label %19, label %14
14: ; preds = %4
%15 = load i8*, i8** %6
%16 = load i8*, i8** %7
%17 = load i32, i32* %8
%18 = call i32 @exit_msg(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %15, i8* %16, i32 %17)
br label %19
19: ; preds = %14, %4
%20 = load i8*, i8** %9
ret i8* %20
}

LLVM IR (-O2):
@.str = [40 x i8] c"Failed to allocate memory in %s() %s:%d\00"
define i8* @_calloc_w(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i8* @calloc(i32 1, i64 %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @exit_msg(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 %3)
br label %9
9: ; preds = %7, %4
ret i8* %5
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *mem_alloc_str(const char *orig) {
  int len = strlen(orig);
  char *ptr = malloc(len + 1);
  strcpy(ptr, orig);
  return ptr;
}


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

x86 assembly (clang, -O2):
<mem_alloc_str>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mem_alloc_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i8* @malloc(i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %4
ret i8* %13
}

LLVM IR (-O2):
define i8* @mem_alloc_str(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int mulhigh(unsigned a, unsigned b) { return (unsigned long long)a * b >> 32; }


x86 assembly (clang, -O0):
<mulhigh>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
shr    $0x20,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mulhigh>:
mov    %edi,%ecx
mov    %esi,%eax
imul   %rcx,%rax
shr    $0x20,%rax
ret

LLVM IR (-O0):
define i32 @mulhigh(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 = zext i32 %5 to i64
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = mul i64 %6, %8
%10 = lshr i64 %9, 32
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @mulhigh(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = zext i32 %1 to i64
%5 = mul nuw i64 %4, %3
%6 = lshr i64 %5, 32
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int fork();
int vfork(void) { return fork(); }


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

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

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

LLVM IR (-O2):
define i32 @vfork() {
%1 = tail call i32 (...) @fork()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ emit_adc(int, int);
int /*<<< orphan*/ emit_shrimm(int, int, int);
void emit_shrsr(int t, int sr) {
  emit_shrimm(sr, 1, sr);
  emit_shrimm(t, 1, t);
  emit_adc(sr, sr);
}


x86 assembly (clang, -O0):
<emit_shrsr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x1,%esi
call   1030 <emit_shrimm@plt>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%edx
mov    $0x1,%esi
call   1030 <emit_shrimm@plt>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <emit_adc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_shrsr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %esi,%edi
mov    $0x1,%esi
mov    %ebx,%edx
call   1030 <emit_shrimm@plt>
mov    %ebp,%edi
mov    $0x1,%esi
mov    %ebp,%edx
call   1030 <emit_shrimm@plt>
mov    %ebx,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <emit_adc@plt>

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

LLVM IR (-O2):
define void @emit_shrsr(i32 %0, i32 %1) {
%3 = tail call i32 @emit_shrimm(i32 %1, i32 1, i32 %1)
%4 = tail call i32 @emit_shrimm(i32 %0, i32 1, i32 %0)
%5 = tail call i32 @emit_adc(i32 %1, i32 %1)
ret void
}
int test(register const int a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @test(i32 returned %0) {
ret i32 %0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ int32Clear(int /*<<< orphan*/ *);
void int32Destroy(int32_t *data) {
  int32Clear(data);
  free(data);
}


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

x86 assembly (clang, -O2):
<int32Destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <int32Clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @int32Destroy(i32* %0) {
%2 = tail call i32 @int32Clear(i32* %0)
%3 = tail call i32 @free(i32* %0)
ret void
}
void RTAvlroGCPhysDestroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlroGCPhysDestroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *fg_queue_get(void *);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *fg_consumer(void *queue) {
  for (int i = 1; i < 5000000;)
    if ((fg_queue_get(queue) != NULL))
      ++i;
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<fg_consumer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x4c4b40,-0x14(%rbp)
jge    1161 <fg_consumer+0x41>
mov    -0x10(%rbp),%rdi
call   1040 <fg_queue_get@plt>
cmp    $0x0,%rax
je     115c <fg_consumer+0x3c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <fg_consumer+0x13>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fg_consumer>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <fg_queue_get@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
cmp    $0x4c4b40,%ebp
jb     1130 <fg_consumer+0x10>
xor    %edi,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @fg_consumer(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 1, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 5000000
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i8*, i8** %3
%10 = call i32* @fg_queue_get(i8* %9)
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %8
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
br label %15
15: ; preds = %12, %8
br label %5
16: ; preds = %5
%17 = call i32 @pthread_exit(i32* null)
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define noalias i8* @fg_consumer(i8* %0) {
br label %4
2: ; preds = %4
%3 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
4: ; preds = %1, %4
%5 = phi i32 [ 1, %1 ], [ %9, %4 ]
%6 = tail call i32* @fg_queue_get(i8* %0)
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %5, %8
%10 = icmp ult i32 %9, 5000000
br i1 %10, label %4, label %2
}
int hostappl_Backstop() { return -30; }


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

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

LLVM IR (-O0):
define i32 @hostappl_Backstop() {
ret i32 -30
}

LLVM IR (-O2):
define i32 @hostappl_Backstop() {
ret i32 -30
}
/* Type definitions */
struct ebpt_node {
  int dummy;
};
struct eb_root {
  int dummy;
};

/* Variables and functions */
struct ebpt_node *__ebpt_insert(struct eb_root *, struct ebpt_node *);
struct ebpt_node *ebpt_insert(struct eb_root *root, struct ebpt_node *new) {
  return __ebpt_insert(root, new);
}


x86 assembly (clang, -O0):
<ebpt_insert>:
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 <__ebpt_insert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebpt_insert>:
jmp    1030 <__ebpt_insert@plt>

LLVM IR (-O0):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
define %struct.ebpt_node* @ebpt_insert(%struct.eb_root* %0, %struct.ebpt_node* %1) {
%3 = alloca %struct.eb_root*
%4 = alloca %struct.ebpt_node*
store %struct.eb_root* %0, %struct.eb_root** %3
store %struct.ebpt_node* %1, %struct.ebpt_node** %4
%5 = load %struct.eb_root*, %struct.eb_root** %3
%6 = load %struct.ebpt_node*, %struct.ebpt_node** %4
%7 = call %struct.ebpt_node* @__ebpt_insert(%struct.eb_root* %5, %struct.ebpt_node* %6)
ret %struct.ebpt_node* %7
}

LLVM IR (-O2):
%struct.eb_root = type { i32 }
%struct.ebpt_node = type { i32 }
define %struct.ebpt_node* @ebpt_insert(%struct.eb_root* %0, %struct.ebpt_node* %1) {
%3 = tail call %struct.ebpt_node* @__ebpt_insert(%struct.eb_root* %0, %struct.ebpt_node* %1)
ret %struct.ebpt_node* %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void display_usage() {
  puts("Options:\n"
       "--help, -h\tshow this help\n"
       "--version, -v\tprint version\n"
       "--server,-s <addr>\tserver address(ipv4:[port])\n"
       "--concurrency, -c <count>\tconcurrent working clients\n"
       "--spawn-pause, -w <msecs>\t pause between client spawning(default:"
       "100"
       "ms)\n"
       "--repeat, -r <count>\trepeat <count> times\n"
       "--action-pause, -p <msecs>\t pause between activities (default:"
       "500"
       "ms)\n"
       "--offer, -O\toffer files\n"
       "--query, -Q\tsearch queries\n"
       "--source, -S\tsources requests");
}


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

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

LLVM IR (-O0):
@.str = [427 x i8] c"Options:\0A--help, -h\09show this help\0A--version, -v\09print version\0A--server,-s <addr>\09server address(ipv4:[port])\0A--concurrency, -c <count>\09concurrent working clients\0A--spawn-pause, -w <msecs>\09 pause between client spawning(default:100ms)\0A--repeat, -r <count>\09repeat <count> times\0A--action-pause, -p <msecs>\09 pause between activities (default:500ms)\0A--offer, -O\09offer files\0A--query, -Q\09search queries\0A--source, -S\09sources requests\00"
define void @display_usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([427 x i8], [427 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [427 x i8] c"Options:\0A--help, -h\09show this help\0A--version, -v\09print version\0A--server,-s <addr>\09server address(ipv4:[port])\0A--concurrency, -c <count>\09concurrent working clients\0A--spawn-pause, -w <msecs>\09 pause between client spawning(default:100ms)\0A--repeat, -r <count>\09repeat <count> times\0A--action-pause, -p <msecs>\09 pause between activities (default:500ms)\0A--offer, -O\09offer files\0A--query, -Q\09search queries\0A--source, -S\09sources requests\00"
define void @display_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([427 x i8], [427 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int xread(int fd, char *buff, int len) {
  int nb_read;
  if ((nb_read = read(fd, buff, len)) == -1)
    fprintf(stderr, "Couldn't read on filedescriptor %d.\n", fd);
  return (nb_read);
}


x86 assembly (clang, -O0):
<xread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1165 <xread+0x45>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xread>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <read@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
jne    1148 <xread+0x28>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
mov    %ebx,%edx
call   1040 <fprintf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Couldn't read on filedescriptor %d.\0A\00"
define i32 @xread(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @read(i32 %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i32, i32* @stderr
%15 = load i32, i32* %4
%16 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %13, %3
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Couldn't read on filedescriptor %d.\0A\00"
define i32 @xread(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %9
9: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bink();
int main(void) {
  while (1) {
    bink();
  }
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <bink@plt>
jmp    1120 <main+0x10>

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @bink()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ init_rand_port(long);
void setrandom(long int seed) { init_rand_port(seed); }


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

x86 assembly (clang, -O2):
<setrandom>:
jmp    1030 <init_rand_port@plt>

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

LLVM IR (-O2):
define void @setrandom(i64 %0) {
%2 = tail call i32 @init_rand_port(i64 %0)
ret void
}
/* Variables and functions */
bool is_reversible(long num) {
  while (num > 0) {
    if (num % 2 == 0)
      return false;
    num /= 10;
  }
  return true;
}


x86 assembly (clang, -O0):
<is_reversible>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    114e <is_reversible+0x4e>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1137 <is_reversible+0x37>
movl   $0x0,-0x4(%rbp)
jmp    1155 <is_reversible+0x55>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
jmp    1108 <is_reversible+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_reversible>:
mov    $0x1,%ecx
test   %rdi,%rdi
jle    1139 <is_reversible+0x39>
movabs $0xcccccccccccccccd,%rsi
cc cc cc
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   $0x1,%dil
je     113c <is_reversible+0x3c>
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
cmp    $0x9,%rdi
mov    %rdx,%rdi
ja     1120 <is_reversible+0x20>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_reversible(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
br label %4
4: ; preds = %12, %1
%5 = load i64, i64* %3
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i64, i64* %3
%9 = srem i64 %8, 2
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 0, i32* %2
br label %16
12: ; preds = %7
%13 = load i64, i64* %3
%14 = sdiv i64 %13, 10
store i64 %14, i64* %3
br label %4
15: ; preds = %4
store i32 1, i32* %2
br label %16
16: ; preds = %15, %11
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_reversible(i64 %0) {
%2 = icmp sgt i64 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %7
%4 = phi i64 [ %8, %7 ], [ %0, %1 ]
%5 = and i64 %4, 1
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = udiv i64 %4, 10
%9 = icmp ult i64 %4, 10
br i1 %9, label %10, label %3
10: ; preds = %3, %7, %1
%11 = phi i32 [ 1, %1 ], [ 1, %7 ], [ 0, %3 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ is_number_char(int /*<<< orphan*/);
int number_size(const char *s) {
  int result = 1;
  s++;
  while (is_number_char(*(s++)))
    result++;
  return result;
}


x86 assembly (clang, -O0):
<number_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <is_number_char@plt>
cmp    $0x0,%rax
je     115e <number_size+0x4e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <number_size+0x1f>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_size>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl 0x1(%r14,%rbx,1),%edi
call   1030 <is_number_char@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <number_size+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @number_size(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %2
br label %6
6: ; preds = %13, %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %2
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = call i64 @is_number_char(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %6
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %6
16: ; preds = %6
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @number_size(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %5, %2 ]
%4 = phi i32 [ 1, %1 ], [ %10, %2 ]
%5 = getelementptr inbounds i8, i8* %3, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = tail call i64 @is_number_char(i32 %7)
%9 = icmp eq i64 %8, 0
%10 = add nuw nsw i32 %4, 1
br i1 %9, label %11, label %2
11: ; preds = %2
ret i32 %4
}
void f4(void) {
  int w;
#pragma unused((w))
}


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

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

LLVM IR (-O0):
define void @f4() {
%1 = alloca i32
ret void
}

LLVM IR (-O2):
define void @f4() {
ret void
}
unsigned char AscToHex(unsigned char aHex) {
  if ((aHex >= 0) && (aHex <= 9))
    aHex += 0x30;
  else if ((aHex >= 10) && (aHex <= 15))
    aHex += 0x37;
  else
    aHex = 0xff;
  return aHex;
}


x86 assembly (clang, -O0):
<AscToHex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jl     1133 <AscToHex+0x33>
movzbl -0x1(%rbp),%eax
cmp    $0x9,%eax
jg     1133 <AscToHex+0x33>
movzbl -0x1(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1165 <AscToHex+0x65>
movzbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jl     115c <AscToHex+0x5c>
movzbl -0x1(%rbp),%eax
cmp    $0xf,%eax
jg     115c <AscToHex+0x5c>
movzbl -0x1(%rbp),%eax
add    $0x37,%eax
mov    %al,-0x1(%rbp)
jmp    1160 <AscToHex+0x60>
movb   $0xff,-0x1(%rbp)
jmp    1165 <AscToHex+0x65>
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AscToHex>:
lea    0x30(%rdi),%eax
lea    0x37(%rdi),%ecx
cmp    $0x10,%dil
movzbl %cl,%ecx
mov    $0xff,%edx
cmovb  %ecx,%edx
cmp    $0xa,%dil
movzbl %al,%eax
cmovae %edx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @AscToHex(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 9
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = add nsw i32 %12, 48
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %30
15: ; preds = %6, %1
%16 = load i8, i8* %2
%17 = zext i8 %16 to i32
%18 = icmp sge i32 %17, 10
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = load i8, i8* %2
%21 = zext i8 %20 to i32
%22 = icmp sle i32 %21, 15
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %2
%25 = zext i8 %24 to i32
%26 = add nsw i32 %25, 55
%27 = trunc i32 %26 to i8
store i8 %27, i8* %2
br label %29
28: ; preds = %19, %15
store i8 -1, i8* %2
br label %29
29: ; preds = %28, %23
br label %30
30: ; preds = %29, %10
%31 = load i8, i8* %2
ret i8 %31
}

LLVM IR (-O2):
define zeroext i8 @AscToHex(i8 zeroext %0) {
%2 = icmp ult i8 %0, 10
%3 = add i8 %0, 48
%4 = icmp ult i8 %0, 16
%5 = add i8 %0, 55
%6 = select i1 %4, i8 %5, i8 -1
%7 = select i1 %2, i8 %3, i8 %6
ret i8 %7
}
unsigned long long ft_absolute(long long n) { return (n < 0 ? -n : n); }


x86 assembly (clang, -O0):
<ft_absolute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <ft_absolute+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <ft_absolute+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @ft_absolute(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @ft_absolute(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void threadexits(void *ret) { pthread_exit(ret); }


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

x86 assembly (clang, -O2):
<threadexits>:
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define void @threadexits(i8* %0) {
%2 = tail call i32 @pthread_exit(i8* %0)
ret void
}
void maple_init() {
  (*(volatile unsigned long *)(0xa05f6c00 + (0x8c))) = 0x6155404f;
  (*(volatile unsigned long *)(0xa05f6c00 + (0x10))) = 0;
  (*(volatile unsigned long *)(0xa05f6c00 + (0x80))) = (50000 << 16) | 0;
  (*(volatile unsigned long *)(0xa05f6c00 + (0x14))) = 1;
}


x86 assembly (clang, -O0):
<maple_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa05f6c8c,%eax
movq   $0x6155404f,(%rax)
mov    $0xa05f6c10,%eax
movq   $0x0,(%rax)
mov    $0xa05f6c80,%eax
movq   $0xffffffffc3500000,(%rax)
mov    $0xa05f6c14,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<maple_init>:
mov    $0xa05f6c10,%eax
movq   $0x6155404f,0x7c(%rax)
61
movq   $0x0,(%rax)
movq   $0xffffffffc3500000,0x70(%rax)
c3
movq   $0x1,0x4(%rax)
ret

LLVM IR (-O0):
define void @maple_init() {
store volatile i64 1632976975, i64* inttoptr (i64 2690608268 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690608144 to i64*)
store volatile i64 -1018167296, i64* inttoptr (i64 2690608256 to i64*)
store volatile i64 1, i64* inttoptr (i64 2690608148 to i64*)
ret void
}

LLVM IR (-O2):
define void @maple_init() {
store volatile i64 1632976975, i64* inttoptr (i64 2690608268 to i64*)
store volatile i64 0, i64* inttoptr (i64 2690608144 to i64*)
store volatile i64 -1018167296, i64* inttoptr (i64 2690608256 to i64*)
store volatile i64 1, i64* inttoptr (i64 2690608148 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ x12_select_loopforever();
void x12_listen_evens_forever(void) { x12_select_loopforever(); }


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

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

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

LLVM IR (-O2):
define void @x12_listen_evens_forever() {
%1 = tail call i32 (...) @x12_select_loopforever()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
void writestuff(FILE *f) {
  fprintf(f, "hello world\n");
  fputc('y', f);
  putc('e', f);
}


x86 assembly (clang, -O0):
<writestuff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rsi
mov    $0x79,%edi
call   1030 <fputc@plt>
mov    -0x8(%rbp),%rsi
mov    $0x65,%edi
call   1040 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writestuff>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
mov    $0x79,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
mov    $0x65,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <putc@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define void @writestuff(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fputc(i8 signext 121, i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @putc(i8 signext 101, i32* %7)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world\0A\00"
define void @writestuff(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 12, i64 1, i32* %0)
%3 = tail call i32 @fputc(i8 signext 121, i32* %0)
%4 = tail call i32 @putc(i8 signext 101, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ran_start(long);
void ran_init(long seed) { ran_start(seed % ((1L << 30) - 2)); }


x86 assembly (clang, -O0):
<ran_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3ffffffe,%ecx
cqto
idiv   %rcx
mov    %rdx,%rdi
call   1030 <ran_start@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ran_init>:
movabs $0x8000000400000021,%rcx
mov    %rdi,%rax
imul   %rcx
lea    (%rdx,%rdi,1),%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x1d,%rax
add    %rcx,%rax
mov    %rax,%rcx
shl    $0x1e,%rcx
mov    %rax,%rdx
sub    %rcx,%rdx
add    %rax,%rdx
add    %rdx,%rdi
jmp    1030 <ran_start@plt>

LLVM IR (-O0):
define void @ran_init(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, 1073741822
%5 = call i32 @ran_start(i64 %4)
ret void
}

LLVM IR (-O2):
define void @ran_init(i64 %0) {
%2 = srem i64 %0, 1073741822
%3 = tail call i32 @ran_start(i64 %2)
ret void
}
int msg_getseq(const char *msg) { return msg[5] - '0'; }


x86 assembly (clang, -O0):
<msg_getseq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x5(%rax),%eax
sub    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_getseq>:
movsbl 0x5(%rdi),%eax
add    $0xffffffd0,%eax
ret

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

LLVM IR (-O2):
define i32 @msg_getseq(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 5
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, -48
ret i32 %5
}
/* Type definitions */
typedef char wchar_t;
struct _Locale_numeric {
  int dummy;
};

/* Variables and functions */
const wchar_t *_WLocale_false(struct _Locale_numeric *lnum
                              __attribute__((__unused__)),
                              wchar_t *buf __attribute__((__unused__)),
                              size_t bufSize __attribute__((__unused__))) {
  return L"false";
}


x86 assembly (clang, -O0):
<_WLocale_false>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xee9(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._Locale_numeric = type { i32 }
@.str = [6 x i32] [i32 102, i32 97, i32 108, i32 115, i32 101, i32 0]
define i8* @_WLocale_false(%struct._Locale_numeric* %0, i8* %1, i64 %2) {
%4 = alloca %struct._Locale_numeric*
%5 = alloca i8*
%6 = alloca i64
store %struct._Locale_numeric* %0, %struct._Locale_numeric** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret i8* bitcast ([6 x i32]* @.str to i8*)
}

LLVM IR (-O2):
%struct._Locale_numeric = type { i32 }
@.str = [6 x i32] [i32 102, i32 97, i32 108, i32 115, i32 101, i32 0]
define i8* @_WLocale_false(%struct._Locale_numeric* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
ret i8* bitcast ([6 x i32]* @.str to i8*)
}
char http_simple_hex(char c) {
  if (c < 10)
    return c + '0';
  return c - 10 + 'a';
}


x86 assembly (clang, -O0):
<http_simple_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jge    1126 <http_simple_hex+0x26>
movsbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1133 <http_simple_hex+0x33>
movsbl -0x2(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_simple_hex>:
cmp    $0xa,%dil
mov    $0x30,%ecx
mov    $0x57,%eax
cmovl  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @http_simple_hex(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, 48
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %18
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 10
%16 = add nsw i32 %15, 97
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %18
18: ; preds = %12, %7
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @http_simple_hex(i8 signext %0) {
%2 = icmp slt i8 %0, 10
%3 = select i1 %2, i8 48, i8 87
%4 = add i8 %3, %0
ret i8 %4
}
/* Type definitions */
struct pollfd {
  int dummy;
};
struct _session {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ msglog(int /*<<< orphan*/, char *, int);
int stop_session(int, struct pollfd *, struct pollfd *, struct _session *);
int outer_closed(int sesno, struct pollfd *in_fd, struct pollfd *out_fd,
                 struct _session *sess) {
  msglog(0, "[%i.?] <session closed>\n", sesno);
  return stop_session(sesno, in_fd, out_fd, sess);
}


x86 assembly (clang, -O0):
<outer_closed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edx
xor    %edi,%edi
lea    0xebd(%rip),%rsi
call   1030 <msglog@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <stop_session@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outer_closed>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec7(%rip),%rsi
xor    %edi,%edi
mov    %ebp,%edx
call   1030 <msglog@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <stop_session@plt>

LLVM IR (-O0):
%struct.pollfd = type { i32 }
%struct._session = type { i32 }
@.str = [25 x i8] c"[%i.?] <session closed>\0A\00"
define i32 @outer_closed(i32 %0, %struct.pollfd* %1, %struct.pollfd* %2, %struct._session* %3) {
%5 = alloca i32
%6 = alloca %struct.pollfd*
%7 = alloca %struct.pollfd*
%8 = alloca %struct._session*
store i32 %0, i32* %5
store %struct.pollfd* %1, %struct.pollfd** %6
store %struct.pollfd* %2, %struct.pollfd** %7
store %struct._session* %3, %struct._session** %8
%9 = load i32, i32* %5
%10 = call i32 @msglog(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %5
%12 = load %struct.pollfd*, %struct.pollfd** %6
%13 = load %struct.pollfd*, %struct.pollfd** %7
%14 = load %struct._session*, %struct._session** %8
%15 = call i32 @stop_session(i32 %11, %struct.pollfd* %12, %struct.pollfd* %13, %struct._session* %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
%struct._session = type { i32 }
@.str = [25 x i8] c"[%i.?] <session closed>\0A\00"
define i32 @outer_closed(i32 %0, %struct.pollfd* %1, %struct.pollfd* %2, %struct._session* %3) {
%5 = tail call i32 @msglog(i32 0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = tail call i32 @stop_session(i32 %0, %struct.pollfd* %1, %struct.pollfd* %2, %struct._session* %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void print_usage(const char *progName) {
  printf("\n"
         "Usage:\n"
         "$ %s <input_mtf> <output_dir>\n"
         "  Decompresses each file in the given MTF archive to the provided "
         "path.\n"
         "  Creates directories as needed. Existing files are overwritten.\n"
         "\n"
         "Usage:\n"
         "$ %s --help | -h\n"
         "  Prints this help text.\n"
         "\n",
         progName, progName);
}


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

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

LLVM IR (-O0):
@.str = [227 x i8] c"\0AUsage:\0A$ %s <input_mtf> <output_dir>\0A Decompresses each file in the given MTF archive to the provided path.\0A Creates directories as needed. Existing files are overwritten.\0A\0AUsage:\0A$ %s --help | -h\0A Prints this help text.\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [227 x i8] c"\0AUsage:\0A$ %s <input_mtf> <output_dir>\0A Decompresses each file in the given MTF archive to the provided path.\0A Creates directories as needed. Existing files are overwritten.\0A\0AUsage:\0A$ %s --help | -h\0A Prints this help text.\0A\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([227 x i8], [227 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ single_push_targets(int, int, int);
void single_push_targets_test(void **state) {
  assert_int_equal(
      0x0000001022810000ul,
      single_push_targets(0x000000001422C100ul, 0x0000001222810000ul, 0));
  assert_int_equal(
      0x0000631408000000ul,
      single_push_targets(0x00E3140800000000ul, 0x0000631408000000ul, 1));
}


x86 assembly (clang, -O0):
<single_push_targets_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1422c100,%edi
mov    $0x22810000,%esi
xor    %edx,%edx
call   1030 <single_push_targets@plt>
mov    %eax,%esi
mov    $0x22810000,%edi
call   1040 <assert_int_equal@plt>
xor    %edi,%edi
mov    $0x8000000,%esi
mov    $0x1,%edx
call   1030 <single_push_targets@plt>
mov    %eax,%esi
mov    $0x8000000,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<single_push_targets_test>:
push   %rax
mov    $0x1422c100,%edi
mov    $0x22810000,%esi
xor    %edx,%edx
call   1030 <single_push_targets@plt>
mov    $0x22810000,%edi
mov    %eax,%esi
call   1040 <assert_int_equal@plt>
xor    %edi,%edi
mov    $0x8000000,%esi
mov    $0x1,%edx
call   1030 <single_push_targets@plt>
mov    $0x8000000,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @single_push_targets_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @single_push_targets(i32 337821952, i32 578879488, i32 0)
%4 = call i32 @assert_int_equal(i32 578879488, i32 %3)
%5 = call i32 @single_push_targets(i32 0, i32 134217728, i32 1)
%6 = call i32 @assert_int_equal(i32 134217728, i32 %5)
ret void
}

LLVM IR (-O2):
define void @single_push_targets_test(i8** nocapture readnone %0) {
%2 = tail call i32 @single_push_targets(i32 337821952, i32 578879488, i32 0)
%3 = tail call i32 @assert_int_equal(i32 578879488, i32 %2)
%4 = tail call i32 @single_push_targets(i32 0, i32 134217728, i32 1)
%5 = tail call i32 @assert_int_equal(i32 134217728, i32 %4)
ret void
}
void X509_alias_set1(void) {}


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

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

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

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