xunge/DecIR huggingface dataset:
/* Type definitions */
struct timeval {
  unsigned int tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ select(int /*<<< orphan*/, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          struct timeval *);
void dosleep(unsigned int msec) {
  struct timeval time;
  time.tv_sec = 0;
  time.tv_usec = msec;
  select(0, NULL, NULL, NULL, &time);
}


x86 assembly (clang, -O0):
<dosleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x18(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <select@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dosleep>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
mov    %edi,0x8(%rsp)
lea    0x8(%rsp),%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <select@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define void @dosleep(i32 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
store i32 %0, i32* %5
%6 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %2)
ret void
}
void RandomFunc(unsigned int input[1], unsigned int output[1]) {
  unsigned int state[1];
  {
    state[0UL] = input[0UL] + 4284877637U;
    if ((state[0UL] >> 4U) & 1U) {
      if ((state[0UL] >> 4U) & 1U) {
        state[0UL] += state[0UL];
      }
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = state[0UL] + 326587425U;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0xff660b45,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x4,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     114c <RandomFunc+0x4c>
mov    -0x14(%rbp),%eax
shr    $0x4,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1147 <RandomFunc+0x47>
mov    -0x14(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1155 <RandomFunc+0x55>
mov    -0x14(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
add    $0x13775421,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%eax
add    %eax,%eax
add    $0x12436aab,%eax
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [1 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = add i32 %8, -10089659
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
store i32 %9, i32* %10
%11 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%12 = load i32, i32* %11
%13 = lshr i32 %12, 4
%14 = and i32 %13, 1
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %29
16: ; preds = %2
%17 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%18 = load i32, i32* %17
%19 = lshr i32 %18, 4
%20 = and i32 %19, 1
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %16
%23 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%24 = load i32, i32* %23
%25 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%26 = load i32, i32* %25
%27 = add i32 %26, %24
store i32 %27, i32* %25
br label %28
28: ; preds = %22, %16
br label %35
29: ; preds = %2
%30 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%31 = load i32, i32* %30
%32 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%33 = load i32, i32* %32
%34 = add i32 %33, %31
store i32 %34, i32* %32
br label %35
35: ; preds = %29, %28
%36 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%37 = load i32, i32* %36
%38 = add i32 %37, 326587425
%39 = load i32*, i32** %4
%40 = getelementptr inbounds i32, i32* %39, i64 0
store i32 %38, i32* %40
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 1
%5 = add i32 %4, 306408107
store i32 %5, i32* %1
ret void
}
/* Type definitions */
struct AST_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AST_tree_recursive_print(struct AST_tree *);
void AST_tree_print(struct AST_tree *self) {
  AST_tree_recursive_print(self);
  return;
}


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

x86 assembly (clang, -O2):
<AST_tree_print>:
jmp    1030 <AST_tree_recursive_print@plt>

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

LLVM IR (-O2):
%struct.AST_tree = type { i32 }
define void @AST_tree_print(%struct.AST_tree* %0) {
%2 = tail call i32 @AST_tree_recursive_print(%struct.AST_tree* %0)
ret void
}
OP(fd, d8) {
  illegal_1();
  op_d8();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_d8@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_d8()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_d8()
ret i32 undef
}
int func(void) {
  int n = 3;
  int m = 5;
  n *m;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
matchtab(name, tab, n) char *name;
char **tab;
{
  int i;
  for (i = 0; i < n; ++i)
    if (match(name, tab[i]))
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<matchtab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1175 <matchtab+0x65>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    $0x0,%al
call   1030 <match@plt>
cmp    $0x0,%eax
je     1162 <matchtab+0x52>
movl   $0x1,-0x4(%rbp)
jmp    117c <matchtab+0x6c>
jmp    1167 <matchtab+0x57>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112a <matchtab+0x1a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matchtab>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    114b <matchtab+0x3b>
mov    %rsi,%r14
mov    %rdi,%r12
mov    %edx,%r15d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1030 <match@plt>
test   %eax,%eax
jne    114f <matchtab+0x3f>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <matchtab+0x20>
xor    %eax,%eax
jmp    1154 <matchtab+0x44>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @matchtab(i8* %0, i8** nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %16
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %15, %6
br i1 %8, label %16, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %15, %7 ]
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
%13 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @match to i32 (i8*, i8*, ...)*)(i8* %0, i8* %12)
%14 = icmp eq i32 %13, 0
%15 = add nuw nsw i64 %10, 1
br i1 %14, label %7, label %16
16: ; preds = %9, %7, %3
%17 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %17
}
/* Variables and functions */
char const *__GLeeGetExtStrPlat();
extern const char *GLeeGetExtStrGLX() { return __GLeeGetExtStrPlat(); }


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

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

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

LLVM IR (-O2):
define i8* @GLeeGetExtStrGLX() {
%1 = tail call i8* (...) @__GLeeGetExtStrPlat()
ret i8* %1
}
/* Variables and functions */
int strcmp(char const *, char const *);
int nameSort(const void *p1, const void *p2) {
  const char **s1;
  const char **s2;
  s1 = (const char **)p1;
  s2 = (const char **)p2;
  return strcmp(*s1, *s2);
}


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

x86 assembly (clang, -O2):
<nameSort>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @nameSort(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**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @nameSort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
void remove_char(char *base_string, char removeChar) {
  char *i = base_string;
  char *j = base_string;
  while (*j != 0) {
    *i = *j++;
    if (*i != removeChar)
      i++;
  }
  *i = 0;
}


x86 assembly (clang, -O0):
<remove_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1169 <remove_char+0x69>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
je     1164 <remove_char+0x64>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111e <remove_char+0x1e>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_char>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <remove_char+0x28>
lea    0x1(%rdi),%rax
nopw   0x0(%rax,%rax,1)
mov    %cl,(%rdi)
xor    %edx,%edx
cmp    %sil,%cl
setne  %dl
add    %rdx,%rdi
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <remove_char+0x10>
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @remove_char(i8* %0, i8 signext %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
store i8* %7, i8** %5
%8 = load i8*, i8** %3
store i8* %8, i8** %6
br label %9
9: ; preds = %28, %2
%10 = load i8*, i8** %6
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %29
14: ; preds = %9
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %6
%17 = load i8, i8* %15
%18 = load i8*, i8** %5
store i8 %17, i8* %18
%19 = load i8*, i8** %5
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %21, %23
br i1 %24, label %25, label %28
25: ; preds = %14
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %5
br label %28
28: ; preds = %25, %14
br label %9
29: ; preds = %9
%30 = load i8*, i8** %5
store i8 0, i8* %30
ret void
}

LLVM IR (-O2):
define void @remove_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %6, i8* %8
%10 = icmp ne i8 %6, %1
%11 = zext i1 %10 to i64
%12 = getelementptr i8, i8* %8, i64 %11
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ %0, %2 ], [ %12, %5 ]
store i8 0, i8* %16
ret void
}
/* Type definitions */
struct ptlrpc_cli_ctx {
  int dummy;
};

/* Variables and functions */
int cli_ctx_status(struct ptlrpc_cli_ctx *);
int cli_ctx_is_ready(struct ptlrpc_cli_ctx *ctx) {
  return (cli_ctx_status(ctx) == (1 << (1)));
}


x86 assembly (clang, -O0):
<cli_ctx_is_ready>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cli_ctx_status@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cli_ctx_is_ready>:
push   %rax
call   1030 <cli_ctx_status@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ptlrpc_cli_ctx = type { i32 }
define i32 @cli_ctx_is_ready(%struct.ptlrpc_cli_ctx* %0) {
%2 = alloca %struct.ptlrpc_cli_ctx*
store %struct.ptlrpc_cli_ctx* %0, %struct.ptlrpc_cli_ctx** %2
%3 = load %struct.ptlrpc_cli_ctx*, %struct.ptlrpc_cli_ctx** %2
%4 = call i32 @cli_ctx_status(%struct.ptlrpc_cli_ctx* %3)
%5 = icmp eq i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.ptlrpc_cli_ctx = type { i32 }
define i32 @cli_ctx_is_ready(%struct.ptlrpc_cli_ctx* %0) {
%2 = tail call i32 @cli_ctx_status(%struct.ptlrpc_cli_ctx* %0)
%3 = icmp eq i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ clear_keyboard_buffers();
int /*<<< orphan*/ outportb(int, int);
void reboot_me() {
  clear_keyboard_buffers();
  outportb(0x64, 0xFE);
}


x86 assembly (clang, -O0):
<reboot_me>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <clear_keyboard_buffers@plt>
mov    $0x64,%edi
mov    $0xfe,%esi
call   1040 <outportb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reboot_me>:
push   %rax
xor    %eax,%eax
call   1030 <clear_keyboard_buffers@plt>
mov    $0x64,%edi
mov    $0xfe,%esi
pop    %rax
jmp    1040 <outportb@plt>

LLVM IR (-O0):
define void @reboot_me() {
%1 = call i32 (...) @clear_keyboard_buffers()
%2 = call i32 @outportb(i32 100, i32 254)
ret void
}

LLVM IR (-O2):
define void @reboot_me() {
%1 = tail call i32 (...) @clear_keyboard_buffers()
%2 = tail call i32 @outportb(i32 100, i32 254)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void writeToFile(char *filename, char *value) {
  FILE *pFile;
  pFile = fopen(filename, "w");
  if (pFile != NULL) {
    fputs(value, pFile);
    fclose(pFile);
  }
}


x86 assembly (clang, -O0):
<writeToFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1175 <writeToFile+0x45>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeToFile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xec2(%rip),%rsi
call   1050 <fopen@plt>
test   %rax,%rax
je     1165 <writeToFile+0x35>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <fputs@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fclose@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define void @writeToFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i32*, i32** %5
%13 = call i32 @fputs(i8* %11, i32* %12)
%14 = load i32*, i32** %5
%15 = call i32 @fclose(i32* %14)
br label %16
16: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define void @writeToFile(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32* %3, null
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @fputs(i8* %1, i32* %3)
%7 = tail call i32 @fclose(i32* %3)
br label %8
8: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ info(char *);
void usage() {
  info("Usage");
  info("--host : Followed by the netplot server host address "
       "(default=127.0.0.1).");
  info("-d     : Enable debugging.");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <info@plt>
lea    0xee2(%rip),%rdi
call   1030 <info@plt>
lea    0xf20(%rip),%rdi
pop    %rax
jmp    1030 <info@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Usage\00"
@.str.1 = [74 x i8] c"--host : Followed by the netplot server host address (default=127.0.0.1).\00"
@.str.2 = [27 x i8] c"-d : Enable debugging.\00"
define void @usage() {
%1 = call i32 @info(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @info(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @info(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Usage\00"
@.str.1 = [74 x i8] c"--host : Followed by the netplot server host address (default=127.0.0.1).\00"
@.str.2 = [27 x i8] c"-d : Enable debugging.\00"
define void @usage() {
%1 = tail call i32 @info(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @info(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @info(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ X509_SIG;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int PEM_ASN1_write(int /*<<< orphan*/ *, int /*<<< orphan*/,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_PKCS8;
scalar_t__ i2d_X509_SIG;
int PEM_write_PKCS8(FILE *fp, X509_SIG *x) {
  return PEM_ASN1_write((i2d_of_void *)i2d_X509_SIG, PEM_STRING_PKCS8, fp, x,
                        NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_PKCS8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_PKCS8>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb7(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_X509_SIG = global i64 0
@PEM_STRING_PKCS8 = global i32 0
define i32 @PEM_write_PKCS8(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_X509_SIG
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PKCS8
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_X509_SIG = global i64 0
@PEM_STRING_PKCS8 = global i32 0
define i32 @PEM_write_PKCS8(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_X509_SIG
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_PKCS8
%6 = tail call i32 @PEM_ASN1_write(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
/* Type definitions */
struct vector {
  int dummy;
};

/* Variables and functions */
void *vector_take_at(struct vector *, int /*<<< orphan*/);
void *vector_take_front(struct vector *__restrict vec) {
  return vector_take_at(vec, 0);
}


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

x86 assembly (clang, -O2):
<vector_take_front>:
xor    %esi,%esi
jmp    1030 <vector_take_at@plt>

LLVM IR (-O0):
%struct.vector = type { i32 }
define i8* @vector_take_front(%struct.vector* noalias %0) {
%2 = alloca %struct.vector*
store %struct.vector* %0, %struct.vector** %2
%3 = load %struct.vector*, %struct.vector** %2
%4 = call i8* @vector_take_at(%struct.vector* %3, i32 0)
ret i8* %4
}

LLVM IR (-O2):
%struct.vector = type { i32 }
define i8* @vector_take_front(%struct.vector* noalias %0) {
%2 = tail call i8* @vector_take_at(%struct.vector* %0, i32 0)
ret i8* %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int pawnLeftAttacks(int, int, int);
int pawnRightAttacks(int, int, int);
uint64_t pawnAttackSpan(uint64_t pawns, uint64_t targets, int colour) {
  return pawnLeftAttacks(pawns, targets, colour) |
         pawnRightAttacks(pawns, targets, colour);
}


x86 assembly (clang, -O0):
<pawnAttackSpan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <pawnLeftAttacks@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <pawnRightAttacks@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pawnAttackSpan>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1040 <pawnLeftAttacks@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <pawnRightAttacks@plt>
or     %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pawnAttackSpan(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @pawnLeftAttacks(i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call i32 @pawnRightAttacks(i32 %11, i32 %12, i32 %13)
%15 = or i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @pawnAttackSpan(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pawnLeftAttacks(i32 %0, i32 %1, i32 %2)
%5 = tail call i32 @pawnRightAttacks(i32 %0, i32 %1, i32 %2)
%6 = or i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  printf("unix");
  fflush(stdout);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"unix\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ enum_t;
typedef enum sizecheck { ____Placeholder_sizecheck } sizecheck;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ xdr_int(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ xdr_long(int /*<<< orphan*/ *, long *);
int /*<<< orphan*/ xdr_short(int /*<<< orphan*/ *, short *);
bool_t xdr_enum(XDR *xdrs, enum_t *ep) {
  enum sizecheck { SIZEVAL };
  if (sizeof(enum sizecheck) == sizeof(long)) {
    return (xdr_long(xdrs, (long *)(void *)ep));
  } else if (sizeof(enum sizecheck) == sizeof(int)) {
    return (xdr_int(xdrs, (int *)(void *)ep));
  } else if (sizeof(enum sizecheck) == sizeof(short)) {
    return (xdr_short(xdrs, (short *)(void *)ep));
  } else {
    return (FALSE);
  }
}


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

x86 assembly (clang, -O2):
<xdr_enum>:
jmp    1030 <xdr_int@plt>

LLVM IR (-O0):
@FALSE = global i32 0
define i32 @xdr_enum(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 = bitcast i32* %6 to i8*
%8 = bitcast i8* %7 to i32*
%9 = call i32 @xdr_int(i32* %5, i32* %8)
ret i32 %9
}

LLVM IR (-O2):
@FALSE = global i32 0
define i32 @xdr_enum(i32* %0, i32* %1) {
%3 = tail call i32 @xdr_int(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
float sinf(float);
float HMM_SinF(float Radians) {
  ;
  float Result = sinf(Radians);
  return (Result);
}


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

x86 assembly (clang, -O2):
<HMM_SinF>:
jmp    1030 <sinf@plt>

LLVM IR (-O0):
define float @HMM_SinF(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = call float @sinf(float %4)
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @HMM_SinF(float %0) {
%2 = tail call float @sinf(float %0)
ret float %2
}
unsigned long uri_hash(char *str) {
  unsigned long hash = 5381;
  int c;
  c = *str++;
  while (c != 0 && c != '/') {
    hash = ((hash << 5) + hash) + c;
    c = *str++;
  }
  return hash;
}


x86 assembly (clang, -O0):
<uri_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x15(%rbp)
je     113e <uri_hash+0x3e>
cmpl   $0x2f,-0x14(%rbp)
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    114e <uri_hash+0x4e>
jmp    117f <uri_hash+0x7f>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    1125 <uri_hash+0x25>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uri_hash>:
mov    $0x1505,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movsbq (%rdi),%rcx
test   %rcx,%rcx
je     1134 <uri_hash+0x34>
cmp    $0x2f,%cl
je     1134 <uri_hash+0x34>
add    $0x1,%rdi
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
add    %rcx,%rdx
mov    %rdx,%rax
jmp    1110 <uri_hash+0x10>
ret

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

LLVM IR (-O2):
define i64 @uri_hash(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ 5381, %1 ], [ %10, %6 ]
%4 = phi i8* [ %0, %1 ], [ %7, %6 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 47, label %11
i8 0, label %11
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = mul i64 %3, 33
%9 = sext i8 %5 to i64
%10 = add i64 %8, %9
br label %2
11: ; preds = %2, %2
ret i64 %3
}
int ti_pvi_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_pvi_start(double* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn37() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn37");
  return result;
}


x86 assembly (clang, -O0):
<fn37>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn37>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn37\00"
define i8* @fn37() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn37\00"
define i8* @fn37() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int y_root;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
void set_XEnterWindowEvent_y_root(void *_p, int _v) {
  ((XEnterWindowEvent *)_p)->y_root = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEnterWindowEvent_y_root>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XEnterWindowEvent_y_root(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XEnterWindowEvent_y_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isprint(int);
int iscntrl(int c) { return !isprint(c); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isprint@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @iscntrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @isprint(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = tail call i32 @isprint(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *mallocz(size_t size) {
  void *mem = malloc(size);
  if (!mem)
    return mem;
  memset(mem, 0, size);
  return mem;
}


x86 assembly (clang, -O0):
<mallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1151 <mallocz+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1168 <mallocz+0x48>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallocz>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <mallocz+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @mallocz(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %1, %4
ret i8* %2
}
unsigned int blz_max_packed_size(unsigned int length) {
  return length + length / 8 + 64;
}


x86 assembly (clang, -O0):
<blz_max_packed_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shr    $0x3,%ecx
add    %ecx,%eax
add    $0x40,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blz_max_packed_size>:
mov    %edi,%eax
shr    $0x3,%eax
add    %edi,%eax
add    $0x40,%eax
ret

LLVM IR (-O0):
define i32 @blz_max_packed_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = udiv i32 %4, 8
%6 = add i32 %3, %5
%7 = add i32 %6, 64
ret i32 %7
}

LLVM IR (-O2):
define i32 @blz_max_packed_size(i32 %0) {
%2 = lshr i32 %0, 3
%3 = add i32 %0, 64
%4 = add i32 %3, %2
ret i32 %4
}
void DiskPerfSyncFilterWithTarget(int FilterDevice, int TargetDevice) {
  int FilterDevice__Flags;
  int TargetDevice__Characteristics;
  int FilterDevice__Characteristics;
  int propFlags;
  { return; }
}


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

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

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

LLVM IR (-O2):
define void @DiskPerfSyncFilterWithTarget(i32 %0, i32 %1) {
ret void
}
char CaesarDe(char c) {
  char out = c - 3;
  return out;
}


x86 assembly (clang, -O0):
<CaesarDe>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x3,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CaesarDe>:
lea    -0x3(%rdi),%eax
ret

LLVM IR (-O0):
define signext i8 @CaesarDe(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 3
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define signext i8 @CaesarDe(i8 signext %0) {
%2 = add i8 %0, -3
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *);
int /*<<< orphan*/ stderr;
void _fail(const char *file, int line, const char *msg) {
  fprintf(stderr, "!!! %s:%d fail(%s)\n", file, line, msg);
  abort();
}


x86 assembly (clang, -O0):
<_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_fail>:
push   %rax
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"!!! %s:%d fail(%s)\0A\00"
define void @_fail(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9, i8* %10)
%12 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"!!! %s:%d fail(%s)\0A\00"
define void @_fail(i8* %0, i32 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
%6 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int japi_windowlistener(int, int);
int j_windowlistener(int arg0, int arg1) {
  return (japi_windowlistener(arg0, arg1));
}


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

x86 assembly (clang, -O2):
<j_windowlistener>:
jmp    1030 <japi_windowlistener@plt>

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

LLVM IR (-O2):
define i32 @j_windowlistener(i32 %0, i32 %1) {
%3 = tail call i32 @japi_windowlistener(i32 %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct sigaction {
  int /*<<< orphan*/ sa_handler;
  scalar_t__ sa_flags;
  int /*<<< orphan*/ sa_mask;
};

/* Variables and functions */
int /*<<< orphan*/ SIGSEGV;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, struct sigaction *,
                             int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
void anemone_segv_remove_handler() {
  struct sigaction act;
  sigemptyset(&act.sa_mask);
  act.sa_flags = 0;
  act.sa_handler = SIG_DFL;
  sigaction(SIGSEGV, &act, 0);
}


x86 assembly (clang, -O0):
<anemone_segv_remove_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
add    $0x10,%rdi
call   1040 <sigemptyset@plt>
movq   $0x0,-0x10(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<anemone_segv_remove_handler>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
call   1040 <sigemptyset@plt>
movq   $0x0,0x8(%rsp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
%struct.sigaction = type { i32, i64, i32 }
@SIG_DFL = global i32 0
@SIGSEGV = global i32 0
define void @anemone_segv_remove_handler() {
%1 = alloca %struct.sigaction
%2 = bitcast %struct.sigaction* %1 to i8*
%3 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 2
%4 = call i32 @sigemptyset(i32* %3)
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 1
store i64 0, i64* %5
%6 = load i32, i32* @SIG_DFL
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %1, i64 0, i32 0
store i32 %6, i32* %7
%8 = load i32, i32* @SIGSEGV
%9 = call i32 @sigaction(i32 %8, %struct.sigaction* %1, i32 0)
ret void
}