xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SCL(int);
int /*<<< orphan*/ SDA(int);
void I2C_Init(void) {
  SCL(1);
  SDA(1);
}


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

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

LLVM IR (-O0):
define void @I2C_Init() {
%1 = call i32 @SCL(i32 1)
%2 = call i32 @SDA(i32 1)
ret void
}

LLVM IR (-O2):
define void @I2C_Init() {
%1 = tail call i32 @SCL(i32 1)
%2 = tail call i32 @SDA(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ keccak_squeezeblocks(unsigned char *, unsigned long long,
                                        int /*<<< orphan*/ *, int);
void cshake128_simple_squeezeblocks(unsigned char *output,
                                    unsigned long long nblocks, uint64_t *s) {
  keccak_squeezeblocks(output, nblocks, s, 168);
}


x86 assembly (clang, -O0):
<cshake128_simple_squeezeblocks>:
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
mov    $0xa8,%ecx
call   1030 <keccak_squeezeblocks@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cshake128_simple_squeezeblocks>:
mov    $0xa8,%ecx
jmp    1030 <keccak_squeezeblocks@plt>

LLVM IR (-O0):
define void @cshake128_simple_squeezeblocks(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32*, i32** %6
%10 = call i32 @keccak_squeezeblocks(i8* %7, i64 %8, i32* %9, i32 168)
ret void
}

LLVM IR (-O2):
define void @cshake128_simple_squeezeblocks(i8* %0, i64 %1, i32* %2) {
%4 = tail call i32 @keccak_squeezeblocks(i8* %0, i64 %1, i32* %2, i32 168)
ret void
}
char *test_read_n_minus_1_element() { return 0; }


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

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

LLVM IR (-O0):
define i8* @test_read_n_minus_1_element() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_read_n_minus_1_element() {
ret i8* null
}
/* Variables and functions */
int f92(int *);
int f93(int *p) { return f92(p); }


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

x86 assembly (clang, -O2):
<f93>:
jmp    1030 <f92@plt>

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

LLVM IR (-O2):
define i32 @f93(i32* %0) {
%2 = tail call i32 @f92(i32* %0)
ret i32 %2
}
int isPositive(int x) { return !((x >> 31) | (!x)); }


x86 assembly (clang, -O0):
<isPositive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
cmpl   $0x0,-0x4(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPositive>:
mov    %edi,%ecx
sar    $0x1f,%ecx
xor    %edx,%edx
test   %edi,%edi
sete   %dl
xor    %eax,%eax
or     %ecx,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @isPositive(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = or i32 %4, %8
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isPositive(i32 %0) {
%2 = ashr i32 %0, 31
%3 = icmp eq i32 %0, 0
%4 = zext i1 %3 to i32
%5 = or i32 %2, %4
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
int GetInt32(const char *ptr) {
  int val;
  val = (ptr[0] << 0) | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24);
  return val;
}


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

x86 assembly (clang, -O2):
<GetInt32>:
movsbl (%rdi),%eax
movsbl 0x1(%rdi),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movsbl 0x2(%rdi),%edx
shl    $0x10,%edx
movzbl 0x3(%rdi),%eax
shl    $0x18,%eax
or     %edx,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @GetInt32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = shl nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = shl nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
void test_four(int x, int y) {
#pragma omp target teams distribute simd collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      ;
}


x86 assembly (clang, -O0):
<test_four>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <test_four+0x56>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1143 <test_four+0x43>
jmp    1135 <test_four+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1124 <test_four+0x24>
jmp    1148 <test_four+0x48>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <test_four+0x11>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_four(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void load_tray2(FILE *fp) {}


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

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

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

LLVM IR (-O2):
define void @load_tray2(i32* nocapture %0) {
ret void
}
void printList(void) {}


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

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

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

LLVM IR (-O2):
define void @printList() {
ret void
}
int array_contains(int len, unsigned int *array, unsigned int elt) {
  for (int i = 0; i < len; i++) {
    if (array[i] == elt)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<array_contains>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1154 <array_contains+0x54>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jne    1141 <array_contains+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <array_contains+0x5b>
jmp    1146 <array_contains+0x46>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <array_contains+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_contains>:
test   %edi,%edi
jle    113a <array_contains+0x3a>
mov    $0x1,%eax
cmp    %edx,(%rsi)
je     1139 <array_contains+0x39>
mov    %edi,%ecx
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rdi
cmp    %rax,%rcx
je     1131 <array_contains+0x31>
lea    0x1(%rdi),%rax
cmp    %edx,(%rsi,%rdi,4)
jne    1120 <array_contains+0x20>
xor    %eax,%eax
cmp    %rcx,%rdi
setb   %al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @array_contains(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = zext i32 %0 to i64
%7 = zext i32 %0 to i64
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, %2
br i1 %9, label %21, label %10
10: ; preds = %5, %13
%11 = phi i64 [ %17, %13 ], [ 1, %5 ]
%12 = icmp eq i64 %11, %7
br i1 %12, label %18, label %13
13: ; preds = %10
%14 = getelementptr inbounds i32, i32* %1, i64 %11
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, %2
%17 = add nuw nsw i64 %11, 1
br i1 %16, label %18, label %10
18: ; preds = %10, %13
%19 = icmp ult i64 %11, %6
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %18, %5, %3
%22 = phi i32 [ 0, %3 ], [ 1, %5 ], [ %20, %18 ]
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ endpolygon();
void endpol_() { endpolygon(); }


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

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

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

LLVM IR (-O2):
define void @endpol_() {
%1 = tail call i32 (...) @endpolygon()
ret void
}
void XtAppAddTimeOut() {}


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

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

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

LLVM IR (-O2):
define void @XtAppAddTimeOut() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void set_tree_index(uint32_t addr[8], uint32_t tree_index) {
  addr[7] = tree_index;
}


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

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

LLVM IR (-O0):
define void @set_tree_index(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 7
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @set_tree_index(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %1, i32* %3
ret void
}
vdbrgb() {}


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

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

LLVM IR (-O0):
define i32 @vdbrgb() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @vdbrgb() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Title(void) {
  printf("\n"
         "MTE Search Tool v1.1\n"
         "Copyright (C) 2013 CUE\n"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"\0AMTE Search Tool v1.1\0ACopyright (C) 2013 CUE\0A\0A\00"
define void @Title() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [46 x i8] c"\0AMTE Search Tool v1.1\0ACopyright (C) 2013 CUE\0A\00"
define void @Title() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("*\n**\n***\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"*\0A**\0A***\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int add_uevent_var(char **envp, int num_envp, int *cur_index, char *buffer,
                   int buffer_size, int *cur_len, char const *format, void *x) {
  int a;
  return a;
}


x86 assembly (clang, -O0):
<add_uevent_var>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x34(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @add_uevent_var(i8** %0, i32 %1, i32* %2, i8* %3, i32 %4, i32* %5, i8* %6, i8* %7) {
%9 = alloca i8**
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32
store i8** %0, i8*** %9
store i32 %1, i32* %10
store i32* %2, i32** %11
store i8* %3, i8** %12
store i32 %4, i32* %13
store i32* %5, i32** %14
store i8* %6, i8** %15
store i8* %7, i8** %16
%18 = load i32, i32* %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @add_uevent_var(i8** nocapture readnone %0, i32 %1, i32* nocapture readnone %2, i8* nocapture readnone %3, i32 %4, i32* nocapture readnone %5, i8* nocapture readnone %6, i8* nocapture readnone %7) {
ret i32 undef
}
void test_five(int x, int y, int z) {
#pragma omp simd collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      for (int i = 0; i < z; i++)
        ;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117f <test_five+0x7f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <test_five+0x6c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <test_five+0x59>
jmp    114b <test_five+0x4b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <test_five+0x3a>
jmp    115e <test_five+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <test_five+0x27>
jmp    1171 <test_five+0x71>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_five+0x14>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test_five(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmx_traj(int, char **);
int main(int argc, char *argv[]) {
  gmx_traj(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_traj(i32 %0, i8** %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord3d(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void TexCoord3d(GLdouble s, GLdouble t, GLdouble r) { glTexCoord3d(s, t, r); }


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

x86 assembly (clang, -O2):
<TexCoord3d>:
jmp    1030 <glTexCoord3d@plt>

LLVM IR (-O0):
define void @TexCoord3d(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 @glTexCoord3d(i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @TexCoord3d(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glTexCoord3d(i32 %0, i32 %1, i32 %2)
ret void
}
int xmlUCSIsLetterlikeSymbols(int code) {
  return (((code >= 0x2100) && (code <= 0x214F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsLetterlikeSymbols>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2100,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsLetterlikeSymbols+0x26>
cmpl   $0x214f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsLetterlikeSymbols>:
add    $0xffffdf00,%edi
xor    %eax,%eax
cmp    $0x50,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsLetterlikeSymbols(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 8448
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 8527
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsLetterlikeSymbols(i32 %0) {
%2 = add i32 %0, -8448
%3 = icmp ult i32 %2, 80
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int check_prime(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N, c, p;
  scanf("%d", &N);
  for (p = N;; p++) {
    c = check_prime(p);
    if (c == 0)
      break;
  }
  printf("%d", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <check_prime@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    116f <main+0x3f>
jmp    1182 <main+0x52>
jmp    1174 <main+0x44>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <main+0x25>
mov    -0x10(%rbp),%esi
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <check_prime@plt>
add    $0x1,%ebx
test   %eax,%eax
jne    1150 <main+0x20>
add    $0xffffffff,%ebx
lea    0xe98(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%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
br label %5
5: ; preds = %5, %0
%6 = phi i32 [ %4, %0 ], [ %9, %5 ]
%7 = call i32 @check_prime(i32 %6)
%8 = icmp eq i32 %7, 0
%9 = add nsw i32 %6, 1
br i1 %8, label %10, label %5
10: ; preds = %5
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_charmatrix(char **m, long nrl, long ncl) {
  free((char *)(m[nrl] + ncl - 1));
  free((char *)(m + nrl - 1));
}


x86 assembly (clang, -O0):
<free_charmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
add    -0x18(%rbp),%rdi
add    $0xffffffffffffffff,%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_charmatrix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi,%rsi,8),%rax
lea    (%rax,%rdx,1),%rdi
add    $0xffffffffffffffff,%rdi
call   1030 <free@plt>
lea    (%rbx,%r14,8),%rdi
add    $0xfffffffffffffff8,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_charmatrix(i8** %0, i64 %1, i64 %2) {
%4 = alloca i8**
%5 = alloca i64
%6 = alloca i64
store i8** %0, i8*** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8**, i8*** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i8*, i8** %7, i64 %8
%10 = load i8*, i8** %9
%11 = load i64, i64* %6
%12 = getelementptr inbounds i8, i8* %10, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 -1
%14 = call i32 @free(i8* %13)
%15 = load i8**, i8*** %4
%16 = load i64, i64* %5
%17 = getelementptr inbounds i8*, i8** %15, i64 %16
%18 = getelementptr inbounds i8*, i8** %17, i64 -1
%19 = bitcast i8** %18 to i8*
%20 = call i32 @free(i8* %19)
ret void
}

LLVM IR (-O2):
define void @free_charmatrix(i8** nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i8*, i8** %0, i64 %1
%5 = load i8*, i8** %4
%6 = getelementptr inbounds i8, i8* %5, i64 %2
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = tail call i32 @free(i8* %7)
%9 = getelementptr inbounds i8*, i8** %4, i64 -1
%10 = bitcast i8** %9 to i8*
%11 = tail call i32 @free(i8* %10)
ret void
}
void testmuld_(double *z, double *x, double *y) { *z = *x * *y; }


x86 assembly (clang, -O0):
<testmuld_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<testmuld_>:
movsd  (%rsi),%xmm0
mulsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @testmuld_(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = load double, double* %7
%9 = load double*, double** %6
%10 = load double, double* %9
%11 = fmul double %8, %10
%12 = load double*, double** %4
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @testmuld_(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fmul double %4, %5
store double %6, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void quit_app(void) { exit(0); }


x86 assembly (clang, -O0):
<quit_app>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<quit_app>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @quit_app() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @quit_app() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
void INT_Excep_DMAC_DMAC3I(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_DMAC_DMAC3I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void pmembench_print_usage() {
  printf("Usage: $ pmembench [-h|--help] [-v|--version]"
         "\t[<benchmark>[<args>]]\n");
  printf("\t\t\t\t\t\t[<config>[<scenario>]]\n");
  printf("\t\t\t\t\t\t[<config>[<scenario>[<common_args>]]]\n");
}


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

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

LLVM IR (-O0):
@.str = [69 x i8] c"Usage: $ pmembench [-h|--help] [-v|--version]\09[<benchmark>[<args>]]\0A\00"
@.str.1 = [30 x i8] c"\09\09\09\09\09\09[<config>[<scenario>]]\0A\00"
@.str.2 = [45 x i8] c"\09\09\09\09\09\09[<config>[<scenario>[<common_args>]]]\0A\00"
define void @pmembench_print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [68 x i8] c"Usage: $ pmembench [-h|--help] [-v|--version]\09[<benchmark>[<args>]]\00"
@str.3 = [29 x i8] c"\09\09\09\09\09\09[<config>[<scenario>]]\00"
@str.4 = [44 x i8] c"\09\09\09\09\09\09[<config>[<scenario>[<common_args>]]]\00"
define void @pmembench_print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
scalar_t__ RAND_MAX;
int /*<<< orphan*/ cmp(int /*<<< orphan*/);
double rand();
void random_cast_double() {
  int rounds;
  double rand_max = (double)RAND_MAX;
  for (rounds = 0; rounds < 1000; ++rounds) {
    double val = rand() / rand_max;
    uint64_t vali = *((uint64_t *)(&val));
    cmp(vali);
  }
}


x86 assembly (clang, -O0):
<random_cast_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2eb9(%rip),%rax
cvtsi2sdq (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    117a <random_cast_double+0x5a>
mov    $0x0,%al
call   1040 <rand@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <cmp@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1140 <random_cast_double+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_cast_double>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ebc(%rip),%rax
cvtsi2sdq (%rax),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x3e8,%ebx
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <rand@plt>
divsd  0x8(%rsp),%xmm0
movq   %xmm0,%rdi
call   1030 <cmp@plt>
add    $0xffffffff,%ebx
jne    1140 <random_cast_double+0x20>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define void @random_cast_double() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i32
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to double
store double %6, double* %2
store i32 0, i32* %1
br label %7
7: ; preds = %18, %0
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 1000
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = call double (...) @rand()
%12 = load double, double* %2
%13 = fdiv double %11, %12
store double %13, double* %3
%14 = bitcast double* %3 to i32*
%15 = load i32, i32* %14
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = call i32 @cmp(i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
br label %7
21: ; preds = %7
ret void
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define void @random_cast_double() {
%1 = load i64, i64* @RAND_MAX
%2 = sitofp i64 %1 to double
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %10, %3 ]
%5 = tail call double (...) @rand()
%6 = fdiv double %5, %2
%7 = bitcast double %6 to i64
%8 = trunc i64 %7 to i32
%9 = tail call i32 @cmp(i32 %8)
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 1000
br i1 %11, label %12, label %3
12: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
int custom_module_init(void) {
  printk("custom_module_init called!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"custom_module_init called!\0A\00"
define i32 @custom_module_init() {
%1 = call i32 @printk(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"custom_module_init called!\0A\00"
define i32 @custom_module_init() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int palindrom2(const char *word, const int length) {
  if (length <= 1) {
    return 1;
  }
  return word[0] == word[length - 1] && palindrom2(word + 1, length - 2);
}


x86 assembly (clang, -O0):
<palindrom2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jg     1135 <palindrom2+0x25>
movl   $0x1,-0x4(%rbp)
jmp    1181 <palindrom2+0x71>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsbl (%rax,%rdx,1),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x15(%rbp)
jne    1176 <palindrom2+0x66>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x14(%rbp),%esi
sub    $0x2,%esi
call   1030 <palindrom2@plt>
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindrom2>:
push   %rax
mov    $0x1,%eax
cmp    $0x2,%esi
jl     113c <palindrom2+0x2c>
mov    (%rdi),%cl
lea    -0x1(%rsi),%edx
xor    %eax,%eax
cmp    (%rdi,%rdx,1),%cl
jne    113c <palindrom2+0x2c>
add    $0x1,%rdi
add    $0xfffffffe,%esi
call   1030 <palindrom2@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @palindrom2(i8* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 2
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = add nsw i32 %1, -1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %5, %9
br i1 %10, label %13, label %11
11: ; preds = %2, %4, %13
%12 = phi i32 [ %18, %13 ], [ 1, %2 ], [ 0, %4 ]
ret i32 %12
13: ; preds = %4
%14 = getelementptr inbounds i8, i8* %0, i64 1
%15 = add nsw i32 %1, -2
%16 = tail call i32 @palindrom2(i8* %14, i32 %15)
%17 = icmp ne i32 %16, 0
%18 = zext i1 %17 to i32
br label %11
}
/* Variables and functions */
int /*<<< orphan*/ getWinSize(int *, int *);
int /*<<< orphan*/ printf(char *);
void clearScreen() {
  int i, col, row;
  getWinSize(&col, &row);
  for (i = 0; i < row; i++) {
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<clearScreen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <getWinSize@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1162 <clearScreen+0x42>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113c <clearScreen+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearScreen>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <getWinSize@plt>
cmpl   $0x0,0x8(%rsp)
jle    1153 <clearScreen+0x33>
xor    %ebx,%ebx
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x8(%rsp),%ebx
jl     1140 <clearScreen+0x20>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @clearScreen() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @getWinSize(i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %0, %8
%9 = phi i32 [ %11, %8 ], [ 0, %0 ]
%10 = call i32 @putchar(i32 10)
%11 = add nuw nsw i32 %9, 1
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %8, label %14
14: ; preds = %8, %0
ret void
}
void f(double t, const double *y, double *yp) {
  (void)t;
  yp[0] = y[1];
  yp[1] = -y[0];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,(%rsi)
movsd  (%rdi),%xmm0
xorps  0xeec(%rip),%xmm0
movlps %xmm0,0x8(%rsi)
ret

LLVM IR (-O0):
define void @f(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double, double* %4
%8 = load double*, double** %5
%9 = getelementptr inbounds double, double* %8, i64 1
%10 = load double, double* %9
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 0
store double %10, double* %12
%13 = load double*, double** %5
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = fneg double %15
%17 = load double*, double** %6
%18 = getelementptr inbounds double, double* %17, i64 1
store double %16, double* %18
ret void
}

LLVM IR (-O2):
define void @f(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %4
store double %5, double* %2
%6 = load double, double* %1
%7 = fneg double %6
%8 = getelementptr inbounds double, double* %2, i64 1
store double %7, double* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned short);
void output(unsigned short num) { printf("OUT: %d\n", num); }


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    0xeda(%rip),%rdi
movzwl -0x2(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"OUT: %d\0A\00"
define void @output(i16 zeroext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i16 zeroext %0)
ret void
}
int cmp_uchar_lt(const void *a, const void *b) {
  unsigned char a_ = *(unsigned char *)a;
  unsigned char b_ = *(unsigned char *)b;
  if (a_ < b_)
    return -1;
  if (a_ > b_)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_uchar_lt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1a(%rbp)
movzbl -0x19(%rbp),%eax
movzbl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jge    113a <cmp_uchar_lt+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_uchar_lt+0x5d>
movzbl -0x19(%rbp),%eax
movzbl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jle    1156 <cmp_uchar_lt+0x56>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_uchar_lt+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_uchar_lt>:
mov    (%rdi),%al
xor    %ecx,%ecx
cmp    (%rsi),%al
seta   %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_uchar_lt(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ult i8 %3, %4
%6 = icmp ugt i8 %3, %4
%7 = zext i1 %6 to i32
%8 = select i1 %5, i32 -1, i32 %7
ret i32 %8
}
void init_bot() {}


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

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

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

LLVM IR (-O2):
define void @init_bot() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *skip_whitespace(const char *s) {
  for (; (*s != 0) && (isspace(*s)); s++)
    ;
  return (char *)s;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skip_whitespace+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skip_whitespace+0x47>
jmp    116d <skip_whitespace+0x5d>
jmp    115c <skip_whitespace+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_whitespace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skip_whitespace+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skip_whitespace+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_whitespace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_whitespace(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ post(char);
int /*<<< orphan*/ printf(char *, char *);
char *rate();
void die() {
  printf("bye.\nYour rating was %s.\n", rate());
  post(' ');
  exit(0);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rate@plt>
mov    %rax,%rsi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    $0x20,%edi
call   1050 <post@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
xor    %eax,%eax
call   1030 <rate@plt>
lea    0xeb1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    $0x20,%edi
call   1050 <post@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"bye.\0AYour rating was %s.\0A\00"
define void @die() {
%1 = call i8* (...) @rate()
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i32 @post(i8 signext 32)
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [26 x i8] c"bye.\0AYour rating was %s.\0A\00"
define void @die() {
%1 = tail call i8* (...) @rate()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @post(i8 signext 32)
%4 = tail call i32 @exit(i32 0)
unreachable
}