xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ isalnum(char);
bool is_valid_scheme_ch(char ch) {
  switch (ch) {
  case '-':
  case '+':
  case '.':
    return true;
  default:
    if (isalnum(ch))
      return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<is_valid_scheme_ch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2b,%eax
je     1147 <is_valid_scheme_ch+0x37>
jmp    1133 <is_valid_scheme_ch+0x23>
mov    -0xc(%rbp),%eax
add    $0xffffffd3,%eax
sub    $0x1,%eax
ja     1153 <is_valid_scheme_ch+0x43>
jmp    1147 <is_valid_scheme_ch+0x37>
movl   $0x1,-0x4(%rbp)
jmp    117d <is_valid_scheme_ch+0x6d>
movsbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%eax
je     1171 <is_valid_scheme_ch+0x61>
movl   $0x1,-0x4(%rbp)
jmp    117d <is_valid_scheme_ch+0x6d>
jmp    1176 <is_valid_scheme_ch+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_scheme_ch>:
cmp    $0x2e,%edi
ja     112d <is_valid_scheme_ch+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x680000000000,%rdx
bt     %rcx,%rdx
jae    112d <is_valid_scheme_ch+0x1d>
ret
push   %rax
movsbl %dil,%edi
call   1030 <isalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @is_valid_scheme_ch(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 45, label %6
i32 43, label %6
i32 46, label %6
]
6: ; preds = %1, %1, %1
store i32 1, i32* %2
br label %14
7: ; preds = %1
%8 = load i8, i8* %3
%9 = call i32 @isalnum(i8 signext %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %14
12: ; preds = %7
br label %13
13: ; preds = %12
store i32 0, i32* %2
br label %14
14: ; preds = %13, %11, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @is_valid_scheme_ch(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 45, label %7
i32 43, label %7
i32 46, label %7
]
3: ; preds = %1
%4 = tail call i32 @isalnum(i8 signext %0)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1, %1, %1
%8 = phi i32 [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int strcmp(char *, char *);
int CompareFileName(const void *Raw1, const void *Raw2) {
  return (strcmp(((char *)Raw1), ((char *)Raw2)));
}


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

x86 assembly (clang, -O2):
<CompareFileName>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @CompareFileName(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_evolution_header() {
  printf("runID, g, W, M, T, N, V, p, d, p2, d2\n");
}


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"runID, g, W, M, T, N, V, p, d, p2, d2\0A\00"
define void @print_evolution_header() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"runID, g, W, M, T, N, V, p, d, p2, d2\00"
define void @print_evolution_header() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cleanup_screen();
int /*<<< orphan*/ demo();
int /*<<< orphan*/ setup_screen();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ timer_pause(int);
int main() {
  srand(time(NULL));
  setup_screen();
  demo();
  timer_pause(2500);
  cleanup_screen();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   1060 <setup_screen@plt>
mov    $0x0,%al
call   1040 <demo@plt>
mov    $0x9c4,%edi
call   1070 <timer_pause@plt>
mov    $0x0,%al
call   1030 <cleanup_screen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   1060 <setup_screen@plt>
xor    %eax,%eax
call   1040 <demo@plt>
mov    $0x9c4,%edi
call   1070 <timer_pause@plt>
xor    %eax,%eax
call   1030 <cleanup_screen@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @setup_screen()
%5 = call i32 (...) @demo()
%6 = call i32 @timer_pause(i32 2500)
%7 = call i32 (...) @cleanup_screen()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @setup_screen()
%4 = tail call i32 (...) @demo()
%5 = tail call i32 @timer_pause(i32 2500)
%6 = tail call i32 (...) @cleanup_screen()
ret i32 0
}
/* Variables and functions */
int strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ test(int);
int main(int argc, char **argv) {
  int n = argc > 1 ? strtol(argv[1], NULL, 0) : 100;
  test(n);
  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)
cmpl   $0x1,-0x8(%rbp)
jle    115b <main+0x3b>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %eax,-0x18(%rbp)
jmp    1168 <main+0x48>
mov    $0x64,%eax
mov    %eax,-0x18(%rbp)
jmp    1168 <main+0x48>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <test@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%eax
mov    $0x64,%edi
cmp    $0x2,%eax
jl     113c <main+0x1c>
mov    0x8(%rsi),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <strtol@plt>
mov    %eax,%edi
call   1040 <test@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**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @strtol(i8* %12, i32* null, i32 0)
br label %15
14: ; preds = %2
br label %15
15: ; preds = %14, %9
%16 = phi i32 [ %13, %9 ], [ 100, %14 ]
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = call i32 @test(i32 %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strtol(i8* nocapture %6, i32* null, i32 0)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 100, %2 ]
%10 = tail call i32 @test(i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void sig_int(int s) {
  printf("SIGINT\n");
  sleep(5);
}


x86 assembly (clang, -O0):
<sig_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_int>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"SIGINT\0A\00"
define void @sig_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @sleep(i32 5)
ret void
}

LLVM IR (-O2):
@str = [7 x i8] c"SIGINT\00"
define void @sig_int(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 5)
ret void
}
unsigned char reverse_bits(unsigned char b) {
  return (b * 0x0202020202ULL & 0x010884422010ULL) % 1023;
}


x86 assembly (clang, -O0):
<reverse_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
movabs $0x202020202,%rcx
imul   %rcx,%rax
movabs $0x10884422010,%rcx
and    %rcx,%rax
mov    $0x3ff,%ecx
xor    %edx,%edx
div    %rcx
mov    %dl,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_bits>:
mov    %edi,%eax
movabs $0x202020202,%rdx
imul   %rax,%rdx
movabs $0x10884422010,%rcx
and    %rdx,%rcx
movabs $0x40100401004011,%rdx
mov    %rcx,%rax
mul    %rdx
mov    %ecx,%eax
sub    %edx,%eax
shr    %eax
add    %edx,%eax
shr    $0x9,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @reverse_bits(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = mul i64 %4, 8623620610
%6 = and i64 %5, 1136090292240
%7 = urem i64 %6, 1023
%8 = trunc i64 %7 to i8
ret i8 %8
}

LLVM IR (-O2):
define zeroext i8 @reverse_bits(i8 zeroext %0) {
%2 = zext i8 %0 to i64
%3 = mul nuw nsw i64 %2, 8623620610
%4 = and i64 %3, 1136090292240
%5 = urem i64 %4, 1023
%6 = trunc i64 %5 to i8
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ list_release(void *);
int /*<<< orphan*/ xfree(void *);
void free_route_keylist_handler(void *key, void *value) {
  xfree(key);
  list_release(value);
}


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

x86 assembly (clang, -O2):
<free_route_keylist_handler>:
push   %rbx
mov    %rsi,%rbx
call   1040 <xfree@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <list_release@plt>

LLVM IR (-O0):
define void @free_route_keylist_handler(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 @xfree(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @list_release(i8* %7)
ret void
}

LLVM IR (-O2):
define void @free_route_keylist_handler(i8* %0, i8* %1) {
%3 = tail call i32 @xfree(i8* %0)
%4 = tail call i32 @list_release(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void funHello(void) { printf("Hello World \n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello World \0A\00"
define void @funHello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World \00"
define void @funHello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
void duparg(const char *key, const char *arg) {
  fprintf(stderr, "Error: duplicate \"%s\": \"%s\" is the second value.\n", key,
          arg);
  exit(-1);
}


x86 assembly (clang, -O0):
<duparg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<duparg>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"Error: duplicate \22%s\22: \22%s\22 is the second value.\0A\00"
define void @duparg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"Error: duplicate \22%s\22: \22%s\22 is the second value.\0A\00"
define void @duparg(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
unsigned long __reverse_parallel__(unsigned long v) {
  unsigned long s = 8 * sizeof(v);
  unsigned long mask = ~0;
  while ((s >>= 1) > 0) {
    mask ^= (mask << s);
    v = ((v >> s) & mask) | ((v << s) & ~mask);
  }
  return v;
}


x86 assembly (clang, -O0):
<__reverse_parallel__>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x40,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jbe    1175 <__reverse_parallel__+0x75>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    %cl,%rax
and    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
shl    %cl,%rdx
mov    %rdx,%rcx
mov    -0x18(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1118 <__reverse_parallel__+0x18>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__reverse_parallel__>:
bswap  %rdi
mov    %rdi,%rax
shr    $0x4,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
and    %rcx,%rdi
shl    $0x4,%rdi
or     %rax,%rdi
movabs $0x3333333333333333,%rax
33 33 33
mov    %rdi,%rcx
and    %rax,%rcx
shr    $0x2,%rdi
and    %rax,%rdi
lea    (%rdi,%rcx,4),%rax
movabs $0x5555555555555555,%rcx
55 55 55
mov    %rax,%rdx
and    %rcx,%rdx
shr    %rax
and    %rcx,%rax
lea    (%rax,%rdx,2),%rax
ret

LLVM IR (-O0):
define i64 @__reverse_parallel__(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 64, i64* %3
store i64 -1, i64* %4
br label %5
5: ; preds = %9, %1
%6 = load i64, i64* %3
%7 = lshr i64 %6, 1
store i64 %7, i64* %3
%8 = icmp ugt i64 %7, 0
br i1 %8, label %9, label %27
9: ; preds = %5
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = shl i64 %10, %11
%13 = load i64, i64* %4
%14 = xor i64 %13, %12
store i64 %14, i64* %4
%15 = load i64, i64* %2
%16 = load i64, i64* %3
%17 = lshr i64 %15, %16
%18 = load i64, i64* %4
%19 = and i64 %17, %18
%20 = load i64, i64* %2
%21 = load i64, i64* %3
%22 = shl i64 %20, %21
%23 = load i64, i64* %4
%24 = xor i64 %23, -1
%25 = and i64 %22, %24
%26 = or i64 %19, %25
store i64 %26, i64* %2
br label %5
27: ; preds = %5
%28 = load i64, i64* %2
ret i64 %28
}

LLVM IR (-O2):
define i64 @__reverse_parallel__(i64 %0) {
%2 = call i64 @llvm.bitreverse.i64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ echo();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ standend();
int /*<<< orphan*/ system(char *);
void cleanup_terminal_ncurses(void) {
  echo();
  system("setfont  >/dev/null 2>&1");
  system(
      "setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz  >/dev/null 2>&1");
  system("setterm -blank 10  >/dev/null 2>&1");
  standend();
  endwin();
  system("clear");
}


x86 assembly (clang, -O0):
<cleanup_terminal_ncurses>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <echo@plt>
lea    0xeae(%rip),%rdi
call   1050 <system@plt>
lea    0xebb(%rip),%rdi
call   1050 <system@plt>
lea    0xef4(%rip),%rdi
call   1050 <system@plt>
mov    $0x0,%al
call   1040 <standend@plt>
mov    $0x0,%al
call   1060 <endwin@plt>
lea    0xefd(%rip),%rdi
call   1050 <system@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_terminal_ncurses>:
push   %rax
xor    %eax,%eax
call   1030 <echo@plt>
lea    0xeb1(%rip),%rdi
call   1050 <system@plt>
lea    0xebe(%rip),%rdi
call   1050 <system@plt>
lea    0xef7(%rip),%rdi
call   1050 <system@plt>
xor    %eax,%eax
call   1040 <standend@plt>
xor    %eax,%eax
call   1060 <endwin@plt>
lea    0xf00(%rip),%rdi
pop    %rax
jmp    1050 <system@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"setfont >/dev/null 2>&1\00"
@.str.1 = [69 x i8] c"setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1\00"
@.str.2 = [35 x i8] c"setterm -blank 10 >/dev/null 2>&1\00"
@.str.3 = [6 x i8] c"clear\00"
define void @cleanup_terminal_ncurses() {
%1 = call i32 (...) @echo()
%2 = call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @standend()
%6 = call i32 (...) @endwin()
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"setfont >/dev/null 2>&1\00"
@.str.1 = [69 x i8] c"setfont /usr/share/consolefonts/Lat2-Fixed16.psf.gz >/dev/null 2>&1\00"
@.str.2 = [35 x i8] c"setterm -blank 10 >/dev/null 2>&1\00"
@.str.3 = [6 x i8] c"clear\00"
define void @cleanup_terminal_ncurses() {
%1 = tail call i32 (...) @echo()
%2 = tail call i32 @system(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 (...) @standend()
%6 = tail call i32 (...) @endwin()
%7 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void output_function_csv_post() {}


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

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

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

LLVM IR (-O2):
define void @output_function_csv_post() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ binary32(unsigned long long);
int /*<<< orphan*/ printf(char *);
void binary64(unsigned long long value) {
  binary32(value >> 32);
  printf("           ");
  binary32(value);
}


x86 assembly (clang, -O0):
<binary64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
shr    $0x20,%rdi
call   1040 <binary32@plt>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <binary32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary64>:
push   %rbx
mov    %rdi,%rbx
shr    $0x20,%rdi
call   1040 <binary32@plt>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <binary32@plt>

LLVM IR (-O0):
@.str = [12 x i8] c" \00"
define void @binary64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = call i32 @binary32(i64 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = load i64, i64* %2
%8 = call i32 @binary32(i64 %7)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c" \00"
define void @binary64(i64 %0) {
%2 = lshr i64 %0, 32
%3 = tail call i32 @binary32(i64 %2)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @binary32(i64 %0)
ret void
}
/* Type definitions */
typedef int off_t;

/* Variables and functions */
int ceil(double);
int GT0Offset(off_t numgts) { return ceil((double)(numgts * 4) / 0x00000200); }


x86 assembly (clang, -O0):
<GT0Offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cvtsi2sd %eax,%xmm0
movsd  0xed3(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <ceil@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GT0Offset>:
shl    $0x2,%edi
cvtsi2sd %edi,%xmm0
mulsd  0xee1(%rip),%xmm0
jmp    1030 <ceil@plt>

LLVM IR (-O0):
define i32 @GT0Offset(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 4
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 5.120000e+02
%7 = call i32 @ceil(double %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @GT0Offset(i32 %0) {
%2 = shl nsw i32 %0, 2
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3F60000000000000
%5 = tail call i32 @ceil(double %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ usart_put(char *);
void log_info(char *string) {
  usart_put(string);
  usart_put("\n");
}


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

x86 assembly (clang, -O2):
<log_info>:
push   %rax
call   1030 <usart_put@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <usart_put@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @log_info(i8* %0) {
%2 = tail call i32 @usart_put(i8* %0)
%3 = tail call i32 @usart_put(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo551(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo551(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
void Jump_If_Greater(char *label) { Inst_Printf("jg", "%s", label); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"jg\00"
@.str.1 = [3 x i8] c"%s\00"
define void @Jump_If_Greater(i8* %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ thd_pass();
void thrd_yield(void) { thd_pass(); }


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

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

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

LLVM IR (-O2):
define void @thrd_yield() {
%1 = tail call i32 (...) @thd_pass()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ld_c_relative_a();
void opcode_e2() { ld_c_relative_a(); }


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

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

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

LLVM IR (-O2):
define void @opcode_e2() {
%1 = tail call i32 (...) @ld_c_relative_a()
ret void
}
/* Type definitions */
struct servent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ endservent();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
struct servent *getservent();
int /*<<< orphan*/ printit(struct servent *);
int /*<<< orphan*/ setservent(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  struct servent *result;
  setservent(0);
  while ((result = getservent()))
    printit(result);
  endservent();
  exit(EXIT_SUCCESS);
}


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)
xor    %edi,%edi
call   1040 <setservent@plt>
mov    $0x0,%al
call   1030 <getservent@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1190 <main+0x40>
mov    -0x18(%rbp),%rdi
call   1050 <printit@plt>
jmp    116d <main+0x1d>
mov    $0x0,%al
call   1060 <endservent@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <setservent@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getservent@plt>
test   %rax,%rax
je     1176 <main+0x26>
mov    %rax,%rdi
call   1050 <printit@plt>
jmp    1160 <main+0x10>
xor    %eax,%eax
call   1060 <endservent@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
%struct.servent = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.servent*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @setservent(i32 0)
br label %8
8: ; preds = %11, %2
%9 = call %struct.servent* (...) @getservent()
store %struct.servent* %9, %struct.servent** %6
%10 = icmp ne %struct.servent* %9, null
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load %struct.servent*, %struct.servent** %6
%13 = call i32 @printit(%struct.servent* %12)
br label %8
14: ; preds = %8
%15 = call i32 (...) @endservent()
%16 = load i32, i32* @EXIT_SUCCESS
%17 = call i32 @exit(i32 %16)
unreachable
}

LLVM IR (-O2):
%struct.servent = type { i32 }
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @setservent(i32 0)
%4 = tail call %struct.servent* (...) @getservent()
%5 = icmp eq %struct.servent* %4, null
br i1 %5, label %11, label %6
6: ; preds = %2, %6
%7 = phi %struct.servent* [ %9, %6 ], [ %4, %2 ]
%8 = tail call i32 @printit(%struct.servent* %7)
%9 = tail call %struct.servent* (...) @getservent()
%10 = icmp eq %struct.servent* %9, null
br i1 %10, label %11, label %6
11: ; preds = %6, %2
%12 = tail call i32 (...) @endservent()
%13 = load i32, i32* @EXIT_SUCCESS
%14 = tail call i32 @exit(i32 %13)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ hal_pollPendingIRQs_helper();
void hal_pollPendingIRQs(void) { hal_pollPendingIRQs_helper(); }


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

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

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

LLVM IR (-O2):
define void @hal_pollPendingIRQs() {
%1 = tail call i32 (...) @hal_pollPendingIRQs_helper()
ret void
}
void XDrawLines() {}


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

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

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

LLVM IR (-O2):
define void @XDrawLines() {
ret void
}
const char *raptorial_def_content_dir(void) {
  return "/var/cache/apt/apt-file";
}


x86 assembly (clang, -O0):
<raptorial_def_content_dir>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"/var/cache/apt/apt-file\00"
define i8* @raptorial_def_content_dir() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [24 x i8] c"/var/cache/apt/apt-file\00"
define i8* @raptorial_def_content_dir() {
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("cd /mnt/user/code/CreateDriveTrain/bin && /mnt/user/jvm/java Main");
}


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

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

LLVM IR (-O0):
@.str = [66 x i8] c"cd /mnt/user/code/CreateDriveTrain/bin && /mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [66 x i8] c"cd /mnt/user/code/CreateDriveTrain/bin && /mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int get_barrier_syscall();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = get_barrier_syscall();
  printf("La funzione get_barrier ha ritornato %d\n", x);
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"La funzione get_barrier ha ritornato %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 (...) @get_barrier_syscall()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"La funzione get_barrier ha ritornato %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @get_barrier_syscall()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int isLeapYear(unsigned int year) {
  if (!(year % 400))
    return 1;
  return ((year % 100) && !(year % 4));
}


x86 assembly (clang, -O0):
<isLeapYear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    1128 <isLeapYear+0x28>
movl   $0x1,-0x4(%rbp)
jmp    115e <isLeapYear+0x5e>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
xor    %edx,%edx
div    %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x9(%rbp)
je     1153 <isLeapYear+0x53>
mov    -0x8(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLeapYear>:
imul   $0xc28f5c29,%edi,%eax
mov    %eax,%ecx
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
jb     112b <isLeapYear+0x2b>
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
setae  %al
test   $0x3,%dil
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isLeapYear(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = urem i32 %4, 400
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 1, i32* %2
br label %20
8: ; preds = %1
%9 = load i32, i32* %3
%10 = urem i32 %9, 100
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load i32, i32* %3
%14 = urem i32 %13, 4
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
br label %17
17: ; preds = %12, %8
%18 = phi i1 [ false, %8 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %7
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @isLeapYear(i32 %0) {
%2 = urem i32 %0, 400
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = urem i32 %0, 100
%6 = icmp ne i32 %5, 0
%7 = and i32 %0, 3
%8 = icmp eq i32 %7, 0
%9 = and i1 %6, %8
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %1, %4
%12 = phi i32 [ %10, %4 ], [ 1, %1 ]
ret i32 %12
}
/* Variables and functions */
int factorial(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter a positive integer: ");
  scanf("%d", &n);
  int result;
  result = factorial(n);
  printf("Factorial: %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <factorial@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <factorial@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Enter a positive integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"Factorial: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @factorial(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter a positive integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"Factorial: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @factorial(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __mode_t;
typedef int /*<<< orphan*/ __dev_t;

/* Variables and functions */
int /*<<< orphan*/ _MKNOD_VER;
int __xmknod(int /*<<< orphan*/, char const *, int /*<<< orphan*/,
             int /*<<< orphan*/ *);
int __mknod(__const char *path, __mode_t mode, __dev_t dev) {
  return __xmknod(_MKNOD_VER, path, mode, &dev);
}


x86 assembly (clang, -O0):
<__mknod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    -0x10(%rbp),%rcx
call   1030 <__xmknod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mknod>:
push   %rax
mov    %esi,%eax
mov    %rdi,%rsi
mov    %edx,0x4(%rsp)
mov    0x2ec7(%rip),%rcx
mov    (%rcx),%edi
lea    0x4(%rsp),%rcx
mov    %eax,%edx
call   1030 <__xmknod@plt>
pop    %rcx
ret

LLVM IR (-O0):
@_MKNOD_VER = global i32 0
define i32 @__mknod(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 i32, i32* @_MKNOD_VER
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @__xmknod(i32 %7, i8* %8, i32 %9, i32* %6)
ret i32 %10
}

LLVM IR (-O2):
@_MKNOD_VER = global i32 0
define i32 @__mknod(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = load i32, i32* @_MKNOD_VER
%6 = call i32 @__xmknod(i32 %5, i8* %0, i32 %1, i32* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  char slide_a[] = "Hello";
  char dont[] = {'A', 'B', 'C'};
  char slide_b[] = "World";
  puts(dont);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xed2(%rip),%ax
mov    %ax,-0xd(%rbp)
mov    0xeca(%rip),%al
mov    %al,-0xb(%rbp)
mov    0xeb9(%rip),%eax
mov    %eax,-0x13(%rbp)
mov    0xeb3(%rip),%ax
mov    %ax,-0xf(%rbp)
lea    -0xd(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x43,0x6(%rsp)
movw   $0x4241,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.slide_a = [6 x i8] c"Hello\00"
@__const.main.dont = [3 x i8] c"ABC"
@__const.main.slide_b = [6 x i8] c"World\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [3 x i8]
%4 = alloca [6 x i8]
store i32 0, i32* %1
%5 = bitcast [6 x i8]* %2 to i8*
%6 = bitcast [3 x i8]* %3 to i8*
%7 = bitcast [6 x i8]* %4 to i8*
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.dont = [3 x i8] c"ABC"
define i32 @main() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @puts(i8* %2)
ret i32 0
}
int MCD_getCodeSize(void) { return (0x1748); }


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

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

LLVM IR (-O0):
define i32 @MCD_getCodeSize() {
ret i32 5960
}

LLVM IR (-O2):
define i32 @MCD_getCodeSize() {
ret i32 5960
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int s(int, int);
uint32_t s_3(uint32_t x) { return s(x, 7) ^ s(x, 18) ^ (x >> 3); }


x86 assembly (clang, -O0):
<s_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1030 <s@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x12,%esi
call   1030 <s@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s_3>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x7,%esi
call   1030 <s@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <s@plt>
sar    $0x3,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s_3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @s(i32 %3, i32 7)
%5 = load i32, i32* %2
%6 = call i32 @s(i32 %5, i32 18)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 3
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @s_3(i32 %0) {
%2 = tail call i32 @s(i32 %0, i32 7)
%3 = tail call i32 @s(i32 %0, i32 18)
%4 = ashr i32 %0, 3
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
void main() {
  int z = 0;
  for (int i = 0; i < 10; i++) {
    z = z + 1;
    for (int j = 0; j < 10; j++)
      ;
    z = z + 1;
  }
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1160 <main+0x60>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1149 <main+0x49>
jmp    113b <main+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <main+0x2c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTMemCacheDestroy() {
ret void
}
/* Variables and functions */
int splx(int);
int splhigh(void) { return splx(1); }


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

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

LLVM IR (-O0):
define i32 @splhigh() {
%1 = call i32 @splx(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @splhigh() {
%1 = tail call i32 @splx(i32 1)
ret i32 %1
}
int main(void) {
  int x = 3;
  float y = x + 1.0f;
  float a = 2.2f;
  int b = (int)a;
  long int lb = (long int)b;
  return y == 0.0f;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  0xee5(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
cvttss2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i64
store i32 0, i32* %1
store i32 3, i32* %2
%7 = load i32, i32* %2
%8 = sitofp i32 %7 to float
%9 = fadd float %8, 1.000000e+00
store float %9, float* %3
store float 0x40019999A0000000, float* %4
%10 = load float, float* %4
%11 = fptosi float %10 to i32
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
store i64 %13, i64* %6
%14 = load float, float* %3
%15 = fcmp oeq float %14, 0.000000e+00
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void ScalePlane() {}


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

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

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

LLVM IR (-O2):
define void @ScalePlane() {
ret void
}
void EnableInterrupts() { *(volatile unsigned int *)(0xffffffb0 + 0x0) = 1; }


x86 assembly (clang, -O0):
<EnableInterrupts>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffb0,%eax
movl   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnableInterrupts>:
mov    $0xffffffb0,%eax
movl   $0x1,(%rax)
ret

LLVM IR (-O0):
define void @EnableInterrupts() {
store volatile i32 1, i32* inttoptr (i64 4294967216 to i32*)
ret void
}

LLVM IR (-O2):
define void @EnableInterrupts() {
store volatile i32 1, i32* inttoptr (i64 4294967216 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int read_dataflash(int, unsigned int volatile, char *);
int AT91F_LoadBoot(void) {
  volatile unsigned int SizeToDownload = 0x21400;
  volatile unsigned int AddressToDownload = 0x21F00000;
  if (read_dataflash(0xC0008000, SizeToDownload + 8,
                     (char *)AddressToDownload) != 0x01) {
    printf("F DF RD\n");
    return 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<AT91F_LoadBoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x21400,-0x8(%rbp)
movl   $0x21f00000,-0xc(%rbp)
mov    -0x8(%rbp),%esi
add    $0x8,%esi
mov    -0xc(%rbp),%eax
mov    %eax,%eax
mov    %eax,%edx
mov    $0xc0008000,%edi
call   1030 <read_dataflash@plt>
cmp    $0x1,%eax
je     116e <AT91F_LoadBoot+0x4e>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1175 <AT91F_LoadBoot+0x55>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AT91F_LoadBoot>:
push   %rax
movl   $0x21400,0x4(%rsp)
movl   $0x21f00000,(%rsp)
mov    0x4(%rsp),%esi
add    $0x8,%esi
mov    (%rsp),%edx
mov    $0xc0008000,%edi
call   1040 <read_dataflash@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x1,%ecx
je     1161 <AT91F_LoadBoot+0x41>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"F DF RD\0A\00"
define i32 @AT91F_LoadBoot() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store volatile i32 136192, i32* %2
store volatile i32 569376768, i32* %3
%4 = load volatile i32, i32* %2
%5 = add i32 %4, 8
%6 = load volatile i32, i32* %3
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = call i32 @read_dataflash(i32 -1073709056, i32 %5, i8* %8)
%10 = icmp ne i32 %9, 1
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %1
br label %14
13: ; preds = %0
store i32 -1, i32* %1
br label %14
14: ; preds = %13, %11
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@str = [8 x i8] c"F DF RD\00"
define i32 @AT91F_LoadBoot() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store volatile i32 136192, i32* %1
%4 = bitcast i32* %2 to i8*
store volatile i32 569376768, i32* %2
%5 = load volatile i32, i32* %1
%6 = add i32 %5, 8
%7 = load volatile i32, i32* %2
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @read_dataflash(i32 -1073709056, i32 %6, i8* %9)
%11 = icmp eq i32 %10, 1
br i1 %11, label %14, label %12
12: ; preds = %0
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %0, %12
%15 = phi i32 [ 1, %12 ], [ -1, %0 ]
ret i32 %15
}