xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ convert_number();
int /*<<< orphan*/ display_converted_number();
int /*<<< orphan*/ get_number_and_base();
int main(void) {
  get_number_and_base();
  convert_number();
  display_converted_number();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @get_number_and_base()
%3 = call i32 (...) @convert_number()
%4 = call i32 (...) @display_converted_number()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @get_number_and_base()
%2 = tail call i32 (...) @convert_number()
%3 = tail call i32 (...) @display_converted_number()
ret i32 0
}
/* Type definitions */
struct object {
  int dummy;
};

/* Variables and functions */
int object_cmp(struct object const *, struct object const *);
int object_cmp_v(const void *a, const void *b) {
  return object_cmp((const struct object *)a, (const struct object *)b);
}


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

x86 assembly (clang, -O2):
<object_cmp_v>:
jmp    1030 <object_cmp@plt>

LLVM IR (-O0):
%struct.object = type { i32 }
define i32 @object_cmp_v(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 = bitcast i8* %5 to %struct.object*
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to %struct.object*
%9 = call i32 @object_cmp(%struct.object* %6, %struct.object* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.object = type { i32 }
define i32 @object_cmp_v(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to %struct.object*
%4 = bitcast i8* %1 to %struct.object*
%5 = tail call i32 @object_cmp(%struct.object* %3, %struct.object* %4)
ret i32 %5
}
int SCE_String_ReplaceChar(char *str, char a, char b) {
  int rep = 0;
  while (*str) {
    if (*str == a) {
      *str = b;
      rep++;
    }
    str++;
  }
  return rep;
}


x86 assembly (clang, -O0):
<SCE_String_ReplaceChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115d <SCE_String_ReplaceChar+0x5d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    114c <SCE_String_ReplaceChar+0x4c>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111a <SCE_String_ReplaceChar+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCE_String_ReplaceChar>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <SCE_String_ReplaceChar+0x29>
add    $0x1,%rdi
xor    %eax,%eax
jmp    111b <SCE_String_ReplaceChar+0x1b>
xchg   %ax,%ax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
je     1128 <SCE_String_ReplaceChar+0x28>
cmp    %sil,%cl
jne    1110 <SCE_String_ReplaceChar+0x10>
mov    %dl,-0x1(%rdi)
add    $0x1,%eax
jmp    1110 <SCE_String_ReplaceChar+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @SCE_String_ReplaceChar(i8* nocapture %0, i8 signext %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %3, %13
%7 = phi i8 [ %16, %13 ], [ %4, %3 ]
%8 = phi i32 [ %14, %13 ], [ 0, %3 ]
%9 = phi i8* [ %15, %13 ], [ %0, %3 ]
%10 = icmp eq i8 %7, %1
br i1 %10, label %11, label %13
11: ; preds = %6
store i8 %2, i8* %9
%12 = add nsw i32 %8, 1
br label %13
13: ; preds = %11, %6
%14 = phi i32 [ %12, %11 ], [ %8, %6 ]
%15 = getelementptr inbounds i8, i8* %9, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %6
18: ; preds = %13, %3
%19 = phi i32 [ 0, %3 ], [ %14, %13 ]
ret i32 %19
}
void f(unsigned char x, unsigned char *r) { *r = 0x50 | (x >> 4); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
or     $0x50,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
shr    $0x4,%dil
or     $0x50,%dil
mov    %dil,(%rsi)
ret

LLVM IR (-O0):
define void @f(i8 zeroext %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 = zext i8 %5 to i32
%7 = ashr i32 %6, 4
%8 = or i32 80, %7
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %4
store i8 %9, i8* %10
ret void
}

LLVM IR (-O2):
define void @f(i8 zeroext %0, i8* nocapture writeonly %1) {
%3 = lshr i8 %0, 4
%4 = or i8 %3, 80
store i8 %4, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ more(unsigned int);
size_t more20(unsigned int);
char more_call2(char *p, unsigned int x) {
  more(x);
  more(x + 1);
  return p[more20(x)];
}


x86 assembly (clang, -O0):
<more_call2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <more@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <more@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <more20@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movsbl (%rax,%rcx,1),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<more_call2>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <more@plt>
lea    0x1(%rbx),%edi
call   1040 <more@plt>
mov    %ebx,%edi
call   1030 <more20@plt>
mov    (%r14,%rax,1),%al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define signext i8 @more_call2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @more(i32 %5)
%7 = load i32, i32* %4
%8 = add i32 %7, 1
%9 = call i32 @more(i32 %8)
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i64 @more20(i32 %11)
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
ret i8 %14
}

LLVM IR (-O2):
define signext i8 @more_call2(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @more(i32 %1)
%4 = add i32 %1, 1
%5 = tail call i32 @more(i32 %4)
%6 = tail call i64 @more20(i32 %1)
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
ret i8 %8
}
int indent_level(char *s) {
  int space = 0;
  while (*s) {
    if ('\t' == *s) {
      space += 4;
    }
    if (' ' == *s) {
      space++;
    }
    s++;
  }
  return space / 4;
}


x86 assembly (clang, -O0):
<indent_level>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1167 <indent_level+0x67>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x9,%eax
cmp    %ecx,%eax
jne    1139 <indent_level+0x39>
mov    -0xc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x20,%eax
cmp    %ecx,%eax
jne    1156 <indent_level+0x56>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <indent_level+0xf>
mov    -0xc(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent_level>:
xor    %ecx,%ecx
jmp    1120 <indent_level+0x20>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x4,%ecx
xor    %edx,%edx
cmp    $0x20,%al
sete   %dl
add    %edx,%ecx
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x9,%al
je     1110 <indent_level+0x10>
test   %al,%al
jne    1113 <indent_level+0x13>
lea    0x3(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @indent_level(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %13, %8 ]
%4 = phi i32 [ 0, %1 ], [ %12, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %14
i8 9, label %6
]
6: ; preds = %2
%7 = add nsw i32 %4, 4
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ %4, %2 ]
%10 = icmp eq i8 %5, 32
%11 = zext i1 %10 to i32
%12 = add nsw i32 %9, %11
%13 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
14: ; preds = %2
%15 = sdiv i32 %4, 4
ret i32 %15
}
/* Variables and functions */
int FuzzerInitialize(int *, char ***);
int LLVMFuzzerInitialize(int *argc, char ***argv) {
  return FuzzerInitialize(argc, argv);
}


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

x86 assembly (clang, -O2):
<LLVMFuzzerInitialize>:
jmp    1030 <FuzzerInitialize@plt>

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

LLVM IR (-O2):
define i32 @LLVMFuzzerInitialize(i32* %0, i8*** %1) {
%3 = tail call i32 @FuzzerInitialize(i32* %0, i8*** %1)
ret i32 %3
}
int countNeutrals(int groupSize, int phase) {
  return (phase > 1 ? 8 : 0) + groupSize - 3;
}


x86 assembly (clang, -O0):
<countNeutrals>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
xor    %eax,%eax
mov    $0x8,%ecx
cmp    $0x1,%edx
cmovg  %ecx,%eax
add    -0x4(%rbp),%eax
sub    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countNeutrals>:
xor    %eax,%eax
cmp    $0x2,%esi
setge  %al
lea    (%rdi,%rax,8),%eax
add    $0xfffffffd,%eax
ret

LLVM IR (-O0):
define i32 @countNeutrals(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 = icmp sgt i32 %5, 1
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 8, i32 0
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = sub nsw i32 %10, 3
ret i32 %11
}

LLVM IR (-O2):
define i32 @countNeutrals(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
%4 = select i1 %3, i32 8, i32 0
%5 = add i32 %0, -3
%6 = add i32 %5, %4
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Open Source SW Project \n");
  printf("First Github Tranning \n");
  printf(" \n");
  printf("2012244028 탄 \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>
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%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>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Open Source SW Project \0A\00"
@.str.1 = [24 x i8] c"First Github Tranning \0A\00"
@.str.2 = [3 x i8] c" \0A\00"
@.str.3 = [17 x i8] c"2012244028 \ED\83\84 \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Open Source SW Project \00"
@str.4 = [23 x i8] c"First Github Tranning \00"
@str.5 = [2 x i8] c" \00"
@str.6 = [16 x i8] c"2012244028 \ED\83\84 \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
bool str_equals(const char *str_a, const char *str_b) {
  return (bool)(strcmp(str_a, str_b) == 0);
}


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

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

LLVM IR (-O0):
define i32 @str_equals(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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @str_equals(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void drv_base_num(int x, int num) {}


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

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

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

LLVM IR (-O2):
define void @drv_base_num(i32 %0, i32 %1) {
ret void
}
int continueStatementFunction() {
  while (0) {
    continue;
  }
  return 0;
}


x86 assembly (clang, -O0):
<continueStatementFunction>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <continueStatementFunction+0x9>
xor    %eax,%eax
test   $0x1,%al
jne    1118 <continueStatementFunction+0x18>
jmp    111d <continueStatementFunction+0x1d>
jmp    1109 <continueStatementFunction+0x9>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @continueStatementFunction() {
br label %1
1: ; preds = %2, %0
br i1 false, label %2, label %3
2: ; preds = %1
br label %1
3: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @continueStatementFunction() {
ret i32 0
}
/* Variables and functions */
void *calloc(int, int);
int /*<<< orphan*/ free(void *);
void *malloc(int);
int /*<<< orphan*/ posix_memalign(void **, int, int);
void *realloc(void *, int);
void test_memory() {
  void *ptr = malloc(1024);
  free(ptr);
  ptr = calloc(1, 1024);
  ptr = realloc(ptr, 2048);
  free(ptr);
  posix_memalign(&ptr, 8, 1024);
}


x86 assembly (clang, -O0):
<test_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%edi
mov    $0x400,%esi
call   1040 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x800,%esi
call   1060 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
lea    -0x8(%rbp),%rdi
mov    $0x8,%esi
mov    $0x400,%edx
call   1070 <posix_memalign@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_memory>:
push   %rax
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    $0x1,%edi
mov    $0x400,%esi
call   1040 <calloc@plt>
mov    %rax,%rdi
mov    $0x800,%esi
call   1060 <realloc@plt>
mov    %rax,(%rsp)
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rsp,%rdi
mov    $0x8,%esi
mov    $0x400,%edx
call   1070 <posix_memalign@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_memory() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 1024)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @free(i8* %3)
%5 = call i8* @calloc(i32 1, i32 1024)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i8* @realloc(i8* %6, i32 2048)
store i8* %7, i8** %1
%8 = load i8*, i8** %1
%9 = call i32 @free(i8* %8)
%10 = call i32 @posix_memalign(i8** %1, i32 8, i32 1024)
ret void
}

LLVM IR (-O2):
define void @test_memory() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = tail call dereferenceable_or_null(1024) i8* @malloc(i32 1024)
%4 = tail call i32 @free(i8* %3)
%5 = tail call dereferenceable_or_null(1024) i8* @calloc(i32 1, i32 1024)
%6 = tail call i8* @realloc(i8* %5, i32 2048)
store i8* %6, i8** %1
%7 = tail call i32 @free(i8* %6)
%8 = call i32 @posix_memalign(i8** %1, i32 8, i32 1024)
ret void
}
long extract_nb(unsigned long insn, int *invalid) {
  long ret;
  ret = (insn >> 11) & 0x1f;
  if (ret == 0)
    ret = 32;
  return ret;
}


x86 assembly (clang, -O0):
<extract_nb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0xb,%rax
and    $0x1f,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    112f <extract_nb+0x2f>
movq   $0x20,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_nb>:
shr    $0xb,%edi
and    $0x1f,%edi
mov    $0x20,%eax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
define i64 @extract_nb(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca i64
store i64 %0, i64* %3
store i32* %1, i32** %4
%6 = load i64, i64* %3
%7 = lshr i64 %6, 11
%8 = and i64 %7, 31
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
store i64 32, i64* %5
br label %12
12: ; preds = %11, %2
%13 = load i64, i64* %5
ret i64 %13
}

LLVM IR (-O2):
define i64 @extract_nb(i64 %0, i32* nocapture readnone %1) {
%3 = lshr i64 %0, 11
%4 = and i64 %3, 31
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i64 32, i64 %4
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led2Toggle();
void TestM__Leds__led2Toggle(void) { LedsP__Leds__led2Toggle(); }


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

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

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

LLVM IR (-O2):
define void @TestM__Leds__led2Toggle() {
%1 = tail call i32 (...) @LedsP__Leds__led2Toggle()
ret void
}
/* Variables and functions */
int atol(char *);
int /*<<< orphan*/ printf(char *, unsigned int);
int main(int argc, char **argv) {
  int i = atol(argv[1]);
  unsigned int j = 0;
  if (i < 10) {
    j = i;
    if (j > 50) {
      printf("Surprise! Bad input : %x \n", j);
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1187 <main+0x67>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x32,-0x18(%rbp)
jbe    1182 <main+0x62>
mov    -0x18(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    118e <main+0x6e>
jmp    1187 <main+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
xor    %ecx,%ecx
test   %eax,%eax
jns    1143 <main+0x23>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Surprise! Bad input : %x \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atol(i8* %10)
store i32 %11, i32* %6
store i32 0, i32* %7
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %22
14: ; preds = %2
%15 = load i32, i32* %6
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = icmp ugt i32 %16, 50
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i32, i32* %7
%20 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %19)
store i32 1, i32* %3
br label %23
21: ; preds = %14
br label %22
22: ; preds = %21, %2
store i32 0, i32* %3
br label %23
23: ; preds = %22, %18
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
@.str = [27 x i8] c"Surprise! Bad input : %x \0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atol(i8* %4)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int _tigermain(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("\nExecuting!\n");
  printf("\nResult = %d\n", _tigermain(0));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <_tigermain@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"\0AExecuting!\0A\00"
@.str.1 = [14 x i8] c"\0AResult = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @_tigermain(i32 0)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"\0AResult = %d\0A\00"
@str = [12 x i8] c"\0AExecuting!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @_tigermain(i32 0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
struct s3c24x0_i2c *s3c24x0_get_base_i2c(void) {
  return (struct s3c24x0_i2c *)0x54000000;
}


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

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

LLVM IR (-O0):
%struct.s3c24x0_i2c = type opaque
define %struct.s3c24x0_i2c* @s3c24x0_get_base_i2c() {
ret %struct.s3c24x0_i2c* inttoptr (i64 1409286144 to %struct.s3c24x0_i2c*)
}

LLVM IR (-O2):
%struct.s3c24x0_i2c = type opaque
define %struct.s3c24x0_i2c* @s3c24x0_get_base_i2c() {
ret %struct.s3c24x0_i2c* inttoptr (i64 1409286144 to %struct.s3c24x0_i2c*)
}
/* Variables and functions */
int __io_putbuf(char *, int);
int _write(int file, char *ptr, int len) { return __io_putbuf(ptr, len); }


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <__io_putbuf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
mov    %rsi,%rdi
mov    %edx,%esi
jmp    1030 <__io_putbuf@plt>

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @__io_putbuf(i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int open(char const *, int, int);
int platform_open(const char *path, int flags, int mode) {
  return open(path, flags, mode);
}


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

x86 assembly (clang, -O2):
<platform_open>:
jmp    1030 <open@plt>

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

LLVM IR (-O2):
define i32 @platform_open(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i32 @open(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 0, b = 0, c = 0;
  a++;
  while (c < 5) {
    b++;
    c++;
    a++;
  };
  printf("%i\n", a);
  printf("%i\n", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    1167 <main+0x57>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x2d>
mov    -0x8(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
int DL_BeginDownload(const char *localName, const char *remoteName) {
  return 1;
}


x86 assembly (clang, -O0):
<DL_BeginDownload>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @DL_BeginDownload(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, char const *);
void err_exit(int err, const char *str, ...) {
  printf("%d %s\n", err, str);
  exit(err);
}


x86 assembly (clang, -O0):
<err_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_exit>:
push   %rbx
mov    %rsi,%rdx
mov    %edi,%ebx
lea    0xed3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%d %s\0A\00"
define void @err_exit(i32 %0, i8* %1, ...) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %6)
%8 = load i32, i32* %3
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %s\0A\00"
define void @err_exit(i32 %0, i8* %1, ...) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
%4 = tail call i32 @exit(i32 %0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ *getwin(int /*<<< orphan*/ *);
WINDOW *macro_getwin(const char *filename) {
  FILE *filep;
  WINDOW *newwin;
  filep = fopen(filename, "r");
  newwin = getwin(filep);
  fclose(filep);
  return (newwin);
}


x86 assembly (clang, -O0):
<macro_getwin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <getwin@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macro_getwin>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <getwin@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32* @macro_getwin(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = call i32* @getwin(i32* %7)
store i32* %8, i32** %4
%9 = load i32*, i32** %3
%10 = call i32 @fclose(i32* %9)
%11 = load i32*, i32** %4
ret i32* %11
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32* @macro_getwin(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32* @getwin(i32* %2)
%4 = tail call i32 @fclose(i32* %2)
ret i32* %3
}
/* Variables and functions */
char *xstrdup(char *);
char *shared_memory_dir(void) { return xstrdup("/dev/shm"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"/dev/shm\00"
define i8* @shared_memory_dir() {
%1 = call i8* @xstrdup(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [9 x i8] c"/dev/shm\00"
define i8* @shared_memory_dir() {
%1 = tail call i8* @xstrdup(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int /*<<< orphan*/ tmpl(char *);
void main() {
  int n, j, i, k;
  tmpl("(le(i,j,k,n),le(i,j,k,n))");
  i = 0;
  k = 0;
  assume(j <= n);
  while (j <= n) {
    assume(i >= 0);
    j++;
  }
  assert(i >= 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <tmpl@plt>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assume@plt>
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1190 <main+0x60>
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assume@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1165 <main+0x35>
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <tmpl@plt>
xor    %edi,%edi
call   1040 <assume@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1040 <assume@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [26 x i8] c"(le(i,j,k,n),le(i,j,k,n))\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @tmpl(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
store i32 0, i32* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = icmp sle i32 %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 @assume(i32 %9)
br label %11
11: ; preds = %15, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %22
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 0
%18 = zext i1 %17 to i32
%19 = call i32 @assume(i32 %18)
%20 = load i32, i32* %2
%21 = add nsw i32 %20, 1
store i32 %21, i32* %2
br label %11
22: ; preds = %11
%23 = load i32, i32* %3
%24 = icmp sge i32 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"(le(i,j,k,n),le(i,j,k,n))\00"
define void @main() {
%1 = tail call i32 @tmpl(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @assume(i32 0)
br label %3
3: ; preds = %3, %0
%4 = tail call i32 @assume(i32 1)
br label %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int main(int argc, char **argv) {
  double a[10000][10000];
  int i, j;
  FILE *ff;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2faf07a0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
add    $0x2faf07a0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [10000 x [10000 x double]]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 %0, i32* %3
store i8** %1, i8*** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
float gk_vector_evaluate(unsigned int);
float _gk_ga_evaluate(void *dna) {
  return gk_vector_evaluate(*((unsigned int *)dna));
}


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

x86 assembly (clang, -O2):
<_gk_ga_evaluate>:
mov    (%rdi),%edi
jmp    1030 <gk_vector_evaluate@plt>

LLVM IR (-O0):
define float @_gk_ga_evaluate(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call float @gk_vector_evaluate(i32 %5)
ret float %6
}

LLVM IR (-O2):
define float @_gk_ga_evaluate(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call float @gk_vector_evaluate(i32 %3)
ret float %4
}
void do_fsave_interesting_stuff(void *p) {
  asm __volatile__("fninit");
  asm __volatile__("fldpi");
  asm __volatile__("fld1");
  asm __volatile__("fldln2");
  asm __volatile__("fsave (%0)" : : "r"(p) : "memory");
}


x86 assembly (clang, -O0):
<do_fsave_interesting_stuff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
fninit
fldpi
fld1
fldln2
mov    -0x8(%rbp),%rax
fsave  (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_fsave_interesting_stuff>:
fninit
fldpi
fld1
fldln2
fsave  (%rdi)
ret

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

LLVM IR (-O2):
define void @do_fsave_interesting_stuff(i8* %0) {
tail call void asm sideeffect "fninit", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldpi", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fld1", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fldln2", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "fsave ($0)", "r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int weight;
  scanf("%d", &weight);
  if (weight % 2 == 0 && weight != 2) {
    printf("YES");
  } else {
    printf("NO");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116e <main+0x4e>
cmpl   $0x2,-0x8(%rbp)
je     116e <main+0x4e>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    117a <main+0x5a>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
test   $0x1,%al
lea    0xec4(%rip),%rdi
lea    0xec1(%rip),%rcx
cmovne %rcx,%rdi
cmp    $0x2,%eax
cmove  %rcx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\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 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 2
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %7, %0
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"YES\00"
@.str.2 = [3 x i8] c"NO\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 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
%7 = icmp ne i32 %4, 2
%8 = and i1 %7, %6
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0)
%10 = call i32 @printf(i8* dereferenceable(1) %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void PrintFirstNameAndLastName(char firstName[], char lastName[]) {
  printf("My first name is: %s\n", firstName);
  printf("My lastname is: %s\n", lastName);
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"My first name is: %s\0A\00"
@.str.1 = [20 x i8] c"My lastname is: %s\0A\00"
define void @PrintFirstNameAndLastName(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 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"My first name is: %s\0A\00"
@.str.1 = [20 x i8] c"My lastname is: %s\0A\00"
define void @PrintFirstNameAndLastName(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ getchar();
wint_t getwchar(void) { return getchar(); }


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

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

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

LLVM IR (-O2):
define i32 @getwchar() {
%1 = tail call i32 (...) @getchar()
ret i32 %1
}
/* Variables and functions */
double atan2(double, double);
double atgn2_(double *x, double *y) {
  if ((*x == 0.0) && (*y == 0.0)) {
    return 0.0;
  }
  return atan2(*x, *y);
}


x86 assembly (clang, -O0):
<atgn2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1163 <atgn2_+0x53>
jp     1163 <atgn2_+0x53>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1163 <atgn2_+0x53>
jp     1163 <atgn2_+0x53>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117d <atgn2_+0x6d>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atgn2_>:
movsd  (%rdi),%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
movsd  (%rsi),%xmm1
jne    1131 <atgn2_+0x21>
jp     1131 <atgn2_+0x21>
ucomisd %xmm2,%xmm1
jne    1131 <atgn2_+0x21>
jp     1131 <atgn2_+0x21>
xorpd  %xmm0,%xmm0
ret
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @atgn2_(double* %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = fcmp oeq double %7, 0.000000e+00
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load double*, double** %5
%11 = load double, double* %10
%12 = fcmp oeq double %11, 0.000000e+00
br i1 %12, label %13, label %14
13: ; preds = %9
store double 0.000000e+00, double* %3
br label %20
14: ; preds = %9, %2
%15 = load double*, double** %4
%16 = load double, double* %15
%17 = load double*, double** %5
%18 = load double, double* %17
%19 = call double @atan2(double %16, double %18)
store double %19, double* %3
br label %20
20: ; preds = %14, %13
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @atgn2_(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = fcmp oeq double %3, 0.000000e+00
%5 = load double, double* %1
%6 = fcmp oeq double %5, 0.000000e+00
%7 = select i1 %4, i1 %6, i1 false
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call double @atan2(double %3, double %5)
br label %10
10: ; preds = %2, %8
%11 = phi double [ %9, %8 ], [ 0.000000e+00, %2 ]
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ quick_sort_median_sub(int *, int /*<<< orphan*/, int);
void quick_sort_median(register int a[], register int length) {
  quick_sort_median_sub(a, 0, length - 1);
}


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

x86 assembly (clang, -O2):
<quick_sort_median>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <quick_sort_median_sub@plt>

LLVM IR (-O0):
define void @quick_sort_median(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 = sub nsw i32 %6, 1
%8 = call i32 @quick_sort_median_sub(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @quick_sort_median(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @quick_sort_median_sub(i32* %0, i32 0, i32 %3)
ret void
}