xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
int main() {
  char charsim = 0;
  int broqch = 0;
  while (broqch < 256) {
    printf("%d-%c \n", broqch, charsim);
    broqch++;
    charsim++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x100,-0xc(%rbp)
jge    1160 <main+0x50>
mov    -0xc(%rbp),%esi
lea    0xebf(%rip),%rdi
movsbl -0x5(%rbp),%edx
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    112a <main+0x1a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
movsbl %bl,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d-%c \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i8 0, i8* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 256
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i8, i8* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %8, i8 signext %9)
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
%13 = load i8, i8* %2
%14 = add i8 %13, 1
store i8 %14, i8* %2
br label %4
15: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d-%c \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2, i8 signext %3)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 256
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ two1(int, int);
int /*<<< orphan*/ two2(int, int);
int /*<<< orphan*/ two3(int, int);
int /*<<< orphan*/ two4(int, int);
int /*<<< orphan*/ two5(int, int);
main() {
  two1(1, 2);
  two2(1, 2);
  two3(1, 2);
  two4(1, 2);
  two5(1, 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <two1@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <two2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <two3@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1070 <two4@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <two5@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <two1@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <two2@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <two3@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1070 <two4@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <two5@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @two1(i32 1, i32 2)
%2 = call i32 @two2(i32 1, i32 2)
%3 = call i32 @two3(i32 1, i32 2)
%4 = call i32 @two4(i32 1, i32 2)
%5 = call i32 @two5(i32 1, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @two1(i32 1, i32 2)
%2 = tail call i32 @two2(i32 1, i32 2)
%3 = tail call i32 @two3(i32 1, i32 2)
%4 = tail call i32 @two4(i32 1, i32 2)
%5 = tail call i32 @two5(i32 1, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ errFlush(int *);
void err_flush_(int *const STATUS) {
  int status;
  errFlush(&status);
  *STATUS = status;
}


x86 assembly (clang, -O0):
<err_flush_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <errFlush@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_flush_>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%rdi
call   1030 <errFlush@plt>
mov    0xc(%rsp),%eax
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @err_flush_(i32* nocapture writeonly %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @errFlush(i32* %2)
%5 = load i32, i32* %2
store i32 %5, i32* %0
ret void
}
int test_imm_C5uint8_mem(unsigned char *val) {
  return ((*val) & (-0xC5 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C5uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 59
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ draw_border();
int /*<<< orphan*/ draw_snake();
int /*<<< orphan*/ new_apple();
int /*<<< orphan*/ reset_score();
void init() {
  draw_border();
  draw_snake();
  new_apple();
  reset_score();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <draw_border@plt>
mov    $0x0,%al
call   1060 <draw_snake@plt>
mov    $0x0,%al
call   1030 <new_apple@plt>
mov    $0x0,%al
call   1040 <reset_score@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1050 <draw_border@plt>
xor    %eax,%eax
call   1060 <draw_snake@plt>
xor    %eax,%eax
call   1030 <new_apple@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <reset_score@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 (...) @draw_border()
%2 = call i32 (...) @draw_snake()
%3 = call i32 (...) @new_apple()
%4 = call i32 (...) @reset_score()
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @draw_border()
%2 = tail call i32 (...) @draw_snake()
%3 = tail call i32 (...) @new_apple()
%4 = tail call i32 (...) @reset_score()
ret void
}
int test_imm_87uint32_mem(unsigned int *val) {
  return ((*val) & (0x87 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_87uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 135
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct c_stack_entry {
  int dummy;
};
struct c_stack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ c_stack_add_entry(struct c_stack *, struct c_stack_entry *);
struct c_stack_entry *c_stack_entry_new(void *);
int c_stack_push(struct c_stack *stack, void *value) {
  struct c_stack_entry *entry;
  entry = c_stack_entry_new(value);
  if (!entry)
    return -1;
  c_stack_add_entry(stack, entry);
  return 0;
}


x86 assembly (clang, -O0):
<c_stack_push>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <c_stack_entry_new@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1154 <c_stack_push+0x34>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <c_stack_push+0x48>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <c_stack_add_entry@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_stack_push>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <c_stack_entry_new@plt>
test   %rax,%rax
je     1140 <c_stack_push+0x20>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <c_stack_add_entry@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.c_stack = type { i32 }
%struct.c_stack_entry = type { i32 }
define i32 @c_stack_push(%struct.c_stack* %0, i8* %1) {
%3 = tail call %struct.c_stack_entry* @c_stack_entry_new(i8* %1)
%4 = icmp eq %struct.c_stack_entry* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @c_stack_add_entry(%struct.c_stack* %0, %struct.c_stack_entry* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 0, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void __print_sw_title(char *sw_name) {
  printf(" ----------- [%s] ----------- \n", sw_name);
  printf(" ::. Usage: %s <arg>\n\n", sw_name);
}


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

x86 assembly (clang, -O2):
<__print_sw_title>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c" ----------- [%s] ----------- \0A\00"
@.str.1 = [23 x i8] c" ::. Usage: %s <arg>\0A\0A\00"
define void @__print_sw_title(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c" ----------- [%s] ----------- \0A\00"
@.str.1 = [23 x i8] c" ::. Usage: %s <arg>\0A\0A\00"
define void @__print_sw_title(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int get_key(int /*<<< orphan*/ *, int, int, int, unsigned char *);
int get_RSA2048_N(FILE *fp, int *key_off, int *key_name_off,
                  unsigned char *RSA2048_N) {
  return get_key(fp, key_off[0] + 5, key_name_off[1], 256, RSA2048_N);
}


x86 assembly (clang, -O0):
<get_RSA2048_N>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
add    $0x5,%esi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x20(%rbp),%r8
mov    $0x100,%ecx
call   1030 <get_key@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_RSA2048_N>:
mov    %rcx,%r8
mov    (%rsi),%esi
add    $0x5,%esi
mov    0x4(%rdx),%edx
mov    $0x100,%ecx
jmp    1030 <get_key@plt>

LLVM IR (-O0):
define i32 @get_RSA2048_N(i32* %0, i32* %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 5
%14 = load i32*, i32** %7
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
%17 = load i8*, i8** %8
%18 = call i32 @get_key(i32* %9, i32 %13, i32 %16, i32 256, i8* %17)
ret i32 %18
}

LLVM IR (-O2):
define i32 @get_RSA2048_N(i32* %0, i32* nocapture %1, i32* nocapture %2, i8* %3) {
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 5
%7 = getelementptr inbounds i32, i32* %2, i64 1
%8 = load i32, i32* %7
%9 = tail call i32 @get_key(i32* %0, i32 %6, i32 %8, i32 256, i8* %3)
ret i32 %9
}
unsigned short int f29(unsigned short int x, unsigned int y) {
  return (x >> (8 * sizeof(unsigned short) - y)) ^ (x << y);
}


x86 assembly (clang, -O0):
<f29>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x10,%ecx
sub    %rdx,%rcx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f29>:
mov    $0x10,%cl
sub    %sil,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f29(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = sub i64 16, %8
%10 = trunc i64 %9 to i32
%11 = ashr i32 %6, %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i32, i32* %4
%15 = shl i32 %13, %14
%16 = xor i32 %11, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f29(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = sub i32 16, %1
%5 = lshr i32 %3, %4
%6 = shl i32 %3, %1
%7 = xor i32 %5, %6
%8 = trunc i32 %7 to i16
ret i16 %8
}
/* Type definitions */
struct key {
  int dummy;
};
struct hashtable_itr {
  int dummy;
};
struct hashtable {
  int dummy;
};

/* Variables and functions */
int hashtable_iterator_search(struct hashtable_itr *, struct hashtable *,
                              struct key *);
int search_itr_some(struct hashtable_itr *i, struct hashtable *h,
                    struct key *k) {
  return (hashtable_iterator_search(i, h, k));
}


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

x86 assembly (clang, -O2):
<search_itr_some>:
jmp    1030 <hashtable_iterator_search@plt>

LLVM IR (-O0):
%struct.hashtable_itr = type { i32 }
%struct.hashtable = type { i32 }
%struct.key = type { i32 }
define i32 @search_itr_some(%struct.hashtable_itr* %0, %struct.hashtable* %1, %struct.key* %2) {
%4 = alloca %struct.hashtable_itr*
%5 = alloca %struct.hashtable*
%6 = alloca %struct.key*
store %struct.hashtable_itr* %0, %struct.hashtable_itr** %4
store %struct.hashtable* %1, %struct.hashtable** %5
store %struct.key* %2, %struct.key** %6
%7 = load %struct.hashtable_itr*, %struct.hashtable_itr** %4
%8 = load %struct.hashtable*, %struct.hashtable** %5
%9 = load %struct.key*, %struct.key** %6
%10 = call i32 @hashtable_iterator_search(%struct.hashtable_itr* %7, %struct.hashtable* %8, %struct.key* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.hashtable_itr = type { i32 }
%struct.hashtable = type { i32 }
%struct.key = type { i32 }
define i32 @search_itr_some(%struct.hashtable_itr* %0, %struct.hashtable* %1, %struct.key* %2) {
%4 = tail call i32 @hashtable_iterator_search(%struct.hashtable_itr* %0, %struct.hashtable* %1, %struct.key* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, unsigned char);
int ChkOverflow(int idx, int sz, unsigned char len) {
  if (idx >= sz) {
    printf("  ERROR - FRU Buffer Overflow (%d >= %d), last len=%d\n", idx, sz,
           len);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<ChkOverflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1151 <ChkOverflow+0x41>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec4(%rip),%rdi
movzbl -0xd(%rbp),%ecx
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1158 <ChkOverflow+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChkOverflow>:
mov    %esi,%r8d
xor    %eax,%eax
cmp    %esi,%edi
jl     1137 <ChkOverflow+0x27>
push   %rax
mov    %edi,%esi
movzbl %dl,%ecx
lea    0xeda(%rip),%rdi
mov    %r8d,%edx
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [55 x i8] c" ERROR - FRU Buffer Overflow (%d >= %d), last len=%d\0A\00"
define i32 @ChkOverflow(i32 %0, i32 %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8 %2, i8* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp sge i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = load i8, i8* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %13, i8 zeroext %14)
store i32 1, i32* %4
br label %17
16: ; preds = %3
store i32 0, i32* %4
br label %17
17: ; preds = %16, %11
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
@.str = [55 x i8] c" ERROR - FRU Buffer Overflow (%d >= %d), last len=%d\0A\00"
define i32 @ChkOverflow(i32 %0, i32 %1, i8 zeroext %2) {
%4 = icmp slt i32 %0, %1
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i8 zeroext %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ 1, %5 ], [ 0, %3 ]
ret i32 %8
}
void f0(void *a, void *b) { __clear_cache(a, b); }


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1130 <__clear_cache>
add    $0x10,%rsp
pop    %rbp
ret
cs nopw 0x0(%rax,%rax,1)
nop

x86 assembly (clang, -O2):
<f0>:
xor    %eax,%eax
jmp    1110 <__clear_cache>
nopw   0x0(%rax,%rax,1)

LLVM IR (-O0):
define void @f0(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__clear_cache to i32 (i8*, i8*, ...)*)(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @f0(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @__clear_cache to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
ret void
}
int test_imm_FBuint8_mem(unsigned char *val) {
  return ((*val) & (-0xFB << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_FBuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 5
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int isxdigit(int c) {
  return (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f') ||
         (c >= '0' && c <= '9');
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     1120 <isxdigit+0x20>
mov    $0x1,%al
cmpl   $0x46,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
cmpl   $0x61,-0x4(%rbp)
jl     1139 <isxdigit+0x39>
mov    $0x1,%al
cmpl   $0x66,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isxdigit+0x58>
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <isxdigit+0x52>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x6,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 70
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 102
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 48
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 57
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 6
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct timeval {
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ deen_log_error_and_exit(char *);
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
time_t deen_seconds_since_epoc() {
  struct timeval tp;
  if (0 != gettimeofday(&tp, NULL)) {
    deen_log_error_and_exit("it was not possible to get the current time");
  }
  return tp.tv_sec;
}


x86 assembly (clang, -O0):
<deen_seconds_since_epoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     114f <deen_seconds_since_epoc+0x2f>
lea    0xeb6(%rip),%rdi
call   1040 <deen_log_error_and_exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deen_seconds_since_epoc>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
je     113c <deen_seconds_since_epoc+0x1c>
lea    0xec9(%rip),%rdi
call   1040 <deen_log_error_and_exit@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
@.str = [44 x i8] c"it was not possible to get the current time\00"
define i32 @deen_seconds_since_epoc() {
%1 = alloca %struct.timeval
%2 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = icmp ne i64 0, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @deen_log_error_and_exit(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@.str = [44 x i8] c"it was not possible to get the current time\00"
define i32 @deen_seconds_since_epoc() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @deen_log_error_and_exit(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ cgincglob(char *, char *, int);
void cgincgw(char *s) { cgincglob("add", s, 1); }


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

x86 assembly (clang, -O2):
<cgincgw>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
mov    $0x1,%edx
jmp    1030 <cgincglob@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"add\00"
define void @cgincgw(i8* %0) {
%2 = tail call i32 @cgincglob(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage:\n spruce_snd -h host -c capacity [-n # of pairs]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c"usage:\0A spruce_snd -h host -c capacity [-n # of pairs]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [56 x i8] c"usage:\0A spruce_snd -h host -c capacity [-n # of pairs]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int main() {
  int t, i, M[3][4];
  for (t = 0; t < 3; ++t)
    for (i = 0; i < 4; ++i)
      M[t][i] = (t * 4) + i + 1;
  for (t = 0; t < 3; ++t)
    return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1170 <main+0x70>
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    115d <main+0x5d>
mov    -0x8(%rbp),%edx
shl    $0x2,%edx
add    -0xc(%rbp),%edx
add    $0x1,%edx
movslq -0x8(%rbp),%rcx
lea    -0x40(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <main+0x23>
jmp    1162 <main+0x62>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1188 <main+0x88>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int IsEolnChar(char c) { return c == 13 || c == 10; }


x86 assembly (clang, -O0):
<IsEolnChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1129 <IsEolnChar+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsEolnChar>:
cmp    $0xd,%dil
sete   %al
cmp    $0xa,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @IsEolnChar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 13
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @IsEolnChar(i8 signext %0) {
%2 = icmp eq i8 %0, 13
%3 = icmp eq i8 %0, 10
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int makefile_init();
int module_makefile_init(void) { return makefile_init(); }


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

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

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

LLVM IR (-O2):
define i32 @module_makefile_init() {
%1 = tail call i32 (...) @makefile_init()
ret i32 %1
}
void initialization() {}


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

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

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

LLVM IR (-O2):
define void @initialization() {
ret void
}
/* Variables and functions */
int PAPI_add_events(int, int *, int);
void papif_add_events_(int *EventSet, int *Events, int *number, int *check) {
  *check = PAPI_add_events(*EventSet, Events, *number);
}


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

x86 assembly (clang, -O2):
<papif_add_events_>:
push   %rbx
mov    %rcx,%rbx
mov    (%rdi),%edi
mov    (%rdx),%edx
call   1030 <PAPI_add_events@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_add_events_(i32* nocapture %0, i32* %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = load i32, i32* %0
%6 = load i32, i32* %2
%7 = tail call i32 @PAPI_add_events(i32 %5, i32* %1, i32 %6)
store i32 %7, i32* %3
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
unsigned int tr_zeros(uint32_t val) {
  unsigned int res = 0;
  if (!val)
    return 0u;
  while (!(val & 0x1)) {
    ++res;
    val >>= 1;
  }
  return res;
}


x86 assembly (clang, -O0):
<tr_zeros>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <tr_zeros+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1161 <tr_zeros+0x61>
jmp    1129 <tr_zeros+0x29>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1144 <tr_zeros+0x44>
jmp    115b <tr_zeros+0x5b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <tr_zeros+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tr_zeros>:
xor    %eax,%eax
test   %edi,%edi
je     112d <tr_zeros+0x2d>
mov    %edi,%ecx
and    $0x1,%ecx
jne    112d <tr_zeros+0x2d>
xor    %eax,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
sar    %ecx
test   $0x2,%dil
mov    %ecx,%edi
je     1120 <tr_zeros+0x20>
ret

LLVM IR (-O0):
define i32 @tr_zeros(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 0, i32* %2
br label %21
8: ; preds = %1
br label %9
9: ; preds = %14, %8
%10 = load i32, i32* %3
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = load i32, i32* %4
%16 = add i32 %15, 1
store i32 %16, i32* %4
%17 = load i32, i32* %3
%18 = ashr i32 %17, 1
store i32 %18, i32* %3
br label %9
19: ; preds = %9
%20 = load i32, i32* %4
store i32 %20, i32* %2
br label %21
21: ; preds = %19, %7
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @tr_zeros(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
%5 = and i1 %2, %4
br i1 %5, label %6, label %13
6: ; preds = %1, %6
%7 = phi i32 [ %9, %6 ], [ 0, %1 ]
%8 = phi i32 [ %10, %6 ], [ %0, %1 ]
%9 = add i32 %7, 1
%10 = ashr i32 %8, 1
%11 = and i32 %8, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %6, %1
%14 = phi i32 [ 0, %1 ], [ %9, %6 ]
ret i32 %14
}
/* Type definitions */
struct linux_binprm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cap_bprm_apply_creds(struct linux_binprm *, int);
void security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe) {
  cap_bprm_apply_creds(bprm, unsafe);
}


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

x86 assembly (clang, -O2):
<security_bprm_apply_creds>:
jmp    1030 <cap_bprm_apply_creds@plt>

LLVM IR (-O0):
%struct.linux_binprm = type { i32 }
define void @security_bprm_apply_creds(%struct.linux_binprm* %0, i32 %1) {
%3 = alloca %struct.linux_binprm*
%4 = alloca i32
store %struct.linux_binprm* %0, %struct.linux_binprm** %3
store i32 %1, i32* %4
%5 = load %struct.linux_binprm*, %struct.linux_binprm** %3
%6 = load i32, i32* %4
%7 = call i32 @cap_bprm_apply_creds(%struct.linux_binprm* %5, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.linux_binprm = type { i32 }
define void @security_bprm_apply_creds(%struct.linux_binprm* %0, i32 %1) {
%3 = tail call i32 @cap_bprm_apply_creds(%struct.linux_binprm* %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ alloca(int);
int /*<<< orphan*/ memcpy(int *, int *, int);
int /*<<< orphan*/ printf(char *, int);
void goodG2B() {
  int *data;
  data = NULL;
  data = (int *)alloca(10 * sizeof(int));
  {
    int source[10] = {0};
    memcpy(data, source, 10 * sizeof(int));
    printf("%d\n", data[0]);
  }
}


x86 assembly (clang, -O0):
<goodG2B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x28,%edi
call   1050 <alloca@plt>
mov    %rax,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goodG2B>:
push   %rbx
sub    $0x30,%rsp
mov    $0x28,%edi
call   1040 <alloca@plt>
mov    %rax,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
mov    %rsp,%rsi
mov    %rax,%rdi
mov    $0x28,%edx
call   1050 <memcpy@plt>
mov    (%rbx),%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @goodG2B() {
%1 = alloca [10 x i32]
%2 = tail call i64 @alloca(i32 40)
%3 = inttoptr i64 %2 to i32*
%4 = bitcast [10 x i32]* %1 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @memcpy(i32* %3, i32* %5, i32 40)
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}
unsigned long get_ds(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @get_ds() {
ret i64 0
}

LLVM IR (-O2):
define i64 @get_ds() {
ret i64 0
}
/* Type definitions */
typedef int uintmax_t;

/* Variables and functions */
uintmax_t roundup(uintmax_t n, uintmax_t m) { return ((n + m - 1) / m) * m; }


x86 assembly (clang, -O0):
<roundup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundup>:
lea    (%rdi,%rsi,1),%ecx
add    $0xffffffff,%ecx
mov    %ecx,%eax
cltd
idiv   %esi
sub    %edx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @roundup(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 = add nsw i32 %5, %6
%8 = sub nsw i32 %7, 1
%9 = load i32, i32* %4
%10 = sdiv i32 %8, %9
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @roundup(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = srem i32 %4, %1
%6 = sub i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_write_solution_banner_to_defined_output_file(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(139, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_write_solution_banner_to_defined_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x8b,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_write_solution_banner_to_defined_output_file>:
mov    $0x8b,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_write_solution_banner_to_defined_output_file() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 139, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @solcon_write_solution_banner_to_defined_output_file() {
%1 = tail call i32 @_ada_use_c2phc(i32 139, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
char *strchr(char const *, int);
int strlen(char const *);
char *strchrnul(const char *s, int c) {
  char *r;
  return (r = strchr(s, c)) ? r : (char *)(s + strlen(s));
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1156 <strchrnul+0x36>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1177 <strchrnul+0x57>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strchr@plt>
test   %rax,%rax
je     1130 <strchrnul+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @strlen(i8* %0)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
br label %9
9: ; preds = %2, %5
%10 = phi i8* [ %8, %5 ], [ %3, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i;
  scanf("%d", &i);
  printf("\n%d", i * i);
  printf("\n%d", i * i * i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
imul   %esi,%esi
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%esi
imul   %eax,%esi
imul   %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, %7
%9 = mul nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
void swr_init() {}


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

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

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

LLVM IR (-O2):
define void @swr_init() {
ret void
}
OP(ed, f3) {}


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

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

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 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
void unload_texture(void const *filename, size_t len, void *data, void *link) {
  (void)filename;
  (void)len;
  (void)data;
  (void)link;
}


x86 assembly (clang, -O0):
<unload_texture>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @unload_texture(i8* nocapture %0, i64 %1, i8* nocapture %2, i8* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
void emulate_mouse_off(void) { error(1); }


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

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

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

LLVM IR (-O2):
define void @emulate_mouse_off() {
%1 = tail call i32 @error(i32 1)
ret void
}