xunge/DecIR huggingface dataset:
/* Type definitions */
struct userdel_cmdline_parser_params {
  int dummy;
};
struct userdel_args_info {
  int dummy;
};

/* Variables and functions */
int userdel_cmdline_parser_internal(int, char **, struct userdel_args_info *,
                                    struct userdel_cmdline_parser_params *,
                                    int /*<<< orphan*/);
int userdel_cmdline_parser_ext(int argc, char **argv,
                               struct userdel_args_info *args_info,
                               struct userdel_cmdline_parser_params *params) {
  int result;
  result = userdel_cmdline_parser_internal(argc, argv, args_info, params, 0);
  return result;
}


x86 assembly (clang, -O0):
<userdel_cmdline_parser_ext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <userdel_cmdline_parser_internal@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<userdel_cmdline_parser_ext>:
xor    %r8d,%r8d
jmp    1030 <userdel_cmdline_parser_internal@plt>

LLVM IR (-O0):
%struct.userdel_args_info = type { i32 }
%struct.userdel_cmdline_parser_params = type { i32 }
define i32 @userdel_cmdline_parser_ext(i32 %0, i8** %1, %struct.userdel_args_info* %2, %struct.userdel_cmdline_parser_params* %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca %struct.userdel_args_info*
%8 = alloca %struct.userdel_cmdline_parser_params*
%9 = alloca i32
store i32 %0, i32* %5
store i8** %1, i8*** %6
store %struct.userdel_args_info* %2, %struct.userdel_args_info** %7
store %struct.userdel_cmdline_parser_params* %3, %struct.userdel_cmdline_parser_params** %8
%10 = load i32, i32* %5
%11 = load i8**, i8*** %6
%12 = load %struct.userdel_args_info*, %struct.userdel_args_info** %7
%13 = load %struct.userdel_cmdline_parser_params*, %struct.userdel_cmdline_parser_params** %8
%14 = call i32 @userdel_cmdline_parser_internal(i32 %10, i8** %11, %struct.userdel_args_info* %12, %struct.userdel_cmdline_parser_params* %13, i32 0)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
%struct.userdel_args_info = type { i32 }
%struct.userdel_cmdline_parser_params = type { i32 }
define i32 @userdel_cmdline_parser_ext(i32 %0, i8** %1, %struct.userdel_args_info* %2, %struct.userdel_cmdline_parser_params* %3) {
%5 = tail call i32 @userdel_cmdline_parser_internal(i32 %0, i8** %1, %struct.userdel_args_info* %2, %struct.userdel_cmdline_parser_params* %3, i32 0)
ret i32 %5
}
void unsigned_char_xor_signed_char_unsigned_char(unsigned char *LHS,
                                                 unsigned char RHS) {
  (*LHS) ^= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_xor_signed_char_unsigned_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
xor    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_xor_signed_char_unsigned_char>:
xor    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_xor_signed_char_unsigned_char(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = xor i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @unsigned_char_xor_signed_char_unsigned_char(i8* nocapture %0, i8 zeroext %1) {
%3 = load i8, i8* %0
%4 = xor i8 %3, %1
store i8 %4, i8* %0
ret void
}
__attribute__((no)) void inner(void) {
  __asm__ __volatile__("movl $0x101, %%eax\n"
                       "movl $0x102, %%ebx\n"
                       "movl $0x103, %%ecx\n"
                       "movl $0x104, %%edx\n"
                       "movl $0x105, %%esi\n"
                       "movl $0x106, %%edi\n"
                       "movl $0x108, %%esp\n"
                       "movl $0x1234, (%%eax)\n"
                       "ud2"
                       :
                       :
                       : "memory", "%eax", "%ebx", "%ecx", "%edx", "%esi",
                         "%edi", "%esp");
}


x86 assembly (clang, -O0):
<inner>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    $0x101,%eax
mov    $0x102,%ebx
mov    $0x103,%ecx
mov    $0x104,%edx
mov    $0x105,%esi
mov    $0x106,%edi
mov    $0x108,%esp
movl   $0x1234,(%eax)
ud2
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<inner>:
push   %rbx
mov    $0x101,%eax
mov    $0x102,%ebx
mov    $0x103,%ecx
mov    $0x104,%edx
mov    $0x105,%esi
mov    $0x106,%edi
mov    $0x108,%esp
movl   $0x1234,(%eax)
ud2
pop    %rbx
ret

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

LLVM IR (-O2):
define void @inner() {
tail call void asm sideeffect "movl $$0x101, %eax\0Amovl $$0x102, %ebx\0Amovl $$0x103, %ecx\0Amovl $$0x104, %edx\0Amovl $$0x105, %esi\0Amovl $$0x106, %edi\0Amovl $$0x108, %esp\0Amovl $$0x1234, (%eax)\0Aud2", "~{memory},~{eax},~{ebx},~{ecx},~{edx},~{esi},~{edi},~{esp},~{dirflag},~{fpsr},~{flags}"()
ret void
}
double millimetresToMiles(double millimetres) {
  return millimetres * 0.000000621371;
}


x86 assembly (clang, -O0):
<millimetresToMiles>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<millimetresToMiles>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @millimetresToMiles(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 6.213710e-07
ret double %4
}

LLVM IR (-O2):
define double @millimetresToMiles(double %0) {
%2 = fmul double %0, 6.213710e-07
ret double %2
}
/* Variables and functions */
void *getnext(void *);
void *walk(void *list, size_t ext) {
  size_t rem;
  void *cur, *prev;
  rem = ext;
  cur = list;
  while (--rem) {
    prev = cur;
    cur = getnext(cur);
    if (!cur)
      return prev;
  }
  return cur;
}


x86 assembly (clang, -O0):
<walk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
je     1178 <walk+0x68>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <getnext@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1173 <walk+0x63>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <walk+0x70>
jmp    1130 <walk+0x20>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<walk>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%rax
nopw   0x0(%rax,%rax,1)
mov    %rax,%r14
add    $0xffffffffffffffff,%rbx
je     1136 <walk+0x26>
mov    %r14,%rdi
call   1030 <getnext@plt>
test   %rax,%rax
jne    1120 <walk+0x10>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @walk(i8* %0, i64 %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i64 [ %1, %2 ], [ %6, %8 ]
%5 = phi i8* [ %0, %2 ], [ %9, %8 ]
%6 = add i64 %4, -1
%7 = icmp eq i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = tail call i8* @getnext(i8* %5)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %3
11: ; preds = %3, %8
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Hello, world!\n");
  printf("We're so creative.\n");
  printf("Goodbye, world!\n");
  do {
    int a = (42 + 5);
    printf("macro:a: %d", a);
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2f,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeda(%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    0xee4(%rip),%rdi
call   1030 <puts@plt>
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb4(%rip),%rdi
mov    $0x2f,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
@.str.1 = [20 x i8] c"We're so creative.\0A\00"
@.str.2 = [17 x i8] c"Goodbye, world!\0A\00"
@.str.3 = [12 x i8] c"macro:a: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %6
6: ; preds = %0
store i32 47, i32* %2
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [12 x i8] c"macro:a: %d\00"
@str = [14 x i8] c"Hello, world!\00"
@str.4 = [19 x i8] c"We're so creative.\00"
@str.5 = [16 x i8] c"Goodbye, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 47)
ret i32 0
}
int func(int in) { return 12; }


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

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

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

LLVM IR (-O2):
define i32 @func(i32 %0) {
ret i32 12
}
/* Type definitions */
struct cpuusage_jiffies_stat {
  int dummy;
};

/* Variables and functions */
struct cpuusage_jiffies_stat *proc_get_jiffies_stat(unsigned int);
struct cpuusage_jiffies_stat *cpuusage_get_jiffies_stat(unsigned int cpuid) {
  struct cpuusage_jiffies_stat *jiffies_stat = NULL;
  jiffies_stat = proc_get_jiffies_stat(cpuid);
  return jiffies_stat;
}


x86 assembly (clang, -O0):
<cpuusage_get_jiffies_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <proc_get_jiffies_stat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuusage_get_jiffies_stat>:
jmp    1030 <proc_get_jiffies_stat@plt>

LLVM IR (-O0):
%struct.cpuusage_jiffies_stat = type { i32 }
define %struct.cpuusage_jiffies_stat* @cpuusage_get_jiffies_stat(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.cpuusage_jiffies_stat*
store i32 %0, i32* %2
store %struct.cpuusage_jiffies_stat* null, %struct.cpuusage_jiffies_stat** %3
%4 = load i32, i32* %2
%5 = call %struct.cpuusage_jiffies_stat* @proc_get_jiffies_stat(i32 %4)
store %struct.cpuusage_jiffies_stat* %5, %struct.cpuusage_jiffies_stat** %3
%6 = load %struct.cpuusage_jiffies_stat*, %struct.cpuusage_jiffies_stat** %3
ret %struct.cpuusage_jiffies_stat* %6
}

LLVM IR (-O2):
%struct.cpuusage_jiffies_stat = type { i32 }
define %struct.cpuusage_jiffies_stat* @cpuusage_get_jiffies_stat(i32 %0) {
%2 = tail call %struct.cpuusage_jiffies_stat* @proc_get_jiffies_stat(i32 %0)
ret %struct.cpuusage_jiffies_stat* %2
}
/* Variables and functions */
int rpathy_value();
int main() { return !(rpathy_value() == 57); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <rpathy_value@plt>
xor    %ecx,%ecx
cmp    $0x39,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @rpathy_value()
%3 = icmp eq i32 %2, 57
%4 = xor i1 %3, true
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @rpathy_value()
%2 = icmp ne i32 %1, 57
%3 = zext i1 %2 to i32
ret i32 %3
}
void freeF(char **f, int len) {
  int i;
  for (i = 0; i < len; i++)
    free(f[i]);
  free(f);
}


x86 assembly (clang, -O0):
<freeF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <freeF+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <freeF+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeF>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <freeF+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <freeF+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @freeF(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_preferences_show(char *, char *);
void roadmap_preferences_edit(void) {
  roadmap_preferences_show("preferences", "Preferences");
}


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

x86 assembly (clang, -O2):
<roadmap_preferences_edit>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <roadmap_preferences_show@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"preferences\00"
@.str.1 = [12 x i8] c"Preferences\00"
define void @roadmap_preferences_edit() {
%1 = call i32 @roadmap_preferences_show(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"preferences\00"
@.str.1 = [12 x i8] c"Preferences\00"
define void @roadmap_preferences_edit() {
%1 = tail call i32 @roadmap_preferences_show(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printFileDetails(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  if (argc != 2) {
    printf("Usage: %s filename\n", argv[0]);
    exit(EXIT_SUCCESS);
  }
  printFileDetails(argv[1]);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1171 <main+0x41>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <printFileDetails@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    114a <main+0x1a>
mov    0x8(%rsi),%rdi
call   1040 <printFileDetails@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret
mov    (%rsi),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [20 x i8] c"Usage: %s filename\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_SUCCESS
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32 @printFileDetails(i8* %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xf9() {
  Assert_real((isdigit(249) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              1250, ("isdigit should be 0 for 0xf9"));
}


x86 assembly (clang, -O0):
<t_isdigit_0xf9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf9,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4e2,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0xf9>:
push   %rax
mov    $0xf9,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4e2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xf9\00"
define void @t_isdigit_0xf9() {
%1 = call i64 @isdigit(i32 249)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1250, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xf9\00"
define void @t_isdigit_0xf9() {
%1 = tail call i64 @isdigit(i32 249)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1250, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int systick_get_ms();
int twi_status();
int wait_twi_complete() {
  int status;
  int timeout = systick_get_ms() + 5;
  do {
    status = twi_status();
    if (status <= 0)
      return status;
  } while (systick_get_ms() < timeout);
  return status;
}


x86 assembly (clang, -O0):
<wait_twi_complete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <systick_get_ms@plt>
add    $0x5,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <twi_status@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     1154 <wait_twi_complete+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116f <wait_twi_complete+0x4f>
jmp    1159 <wait_twi_complete+0x39>
mov    $0x0,%al
call   1040 <systick_get_ms@plt>
cmp    -0xc(%rbp),%eax
jl     1135 <wait_twi_complete+0x15>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_twi_complete>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <systick_get_ms@plt>
mov    %eax,%ebx
add    $0x5,%ebx
nop
xor    %eax,%eax
call   1030 <twi_status@plt>
mov    %eax,%ebp
test   %eax,%eax
jle    1148 <wait_twi_complete+0x28>
xor    %eax,%eax
call   1040 <systick_get_ms@plt>
cmp    %ebx,%eax
jl     1130 <wait_twi_complete+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @wait_twi_complete() {
%1 = tail call i32 (...) @systick_get_ms()
%2 = add nsw i32 %1, 5
br label %3
3: ; preds = %6, %0
%4 = tail call i32 (...) @twi_status()
%5 = icmp slt i32 %4, 1
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 (...) @systick_get_ms()
%8 = icmp slt i32 %7, %2
br i1 %8, label %3, label %9
9: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ minHeapRestore(void *, int, int, int,
                                  int (*)(void *, void *));
void heapBuild(void *a, int n, int el_size,
               int (*compare)(void *one, void *two)) {
  for (int i = n / 2; i >= 1; i--) {
    minHeapRestore(a, i, n, el_size, compare);
  }
}


x86 assembly (clang, -O0):
<heapBuild>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jl     1162 <heapBuild+0x52>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
call   1030 <minHeapRestore@plt>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1134 <heapBuild+0x24>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<heapBuild>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x2,%esi
jl     114c <heapBuild+0x3c>
mov    %rcx,%r14
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%r12
mov    %esi,%ebp
shr    %ebp
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14,%r8
call   1030 <minHeapRestore@plt>
lea    -0x1(%rbp),%eax
cmp    $0x1,%ebp
mov    %eax,%ebp
ja     1130 <heapBuild+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @heapBuild(i8* %0, i32 %1, i32 %2, i32 (i8*, i8*)* %3) {
%5 = icmp sgt i32 %1, 1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = lshr i32 %1, 1
br label %9
8: ; preds = %9, %4
ret void
9: ; preds = %6, %9
%10 = phi i32 [ %12, %9 ], [ %7, %6 ]
%11 = tail call i32 @minHeapRestore(i8* %0, i32 %10, i32 %1, i32 %2, i32 (i8*, i8*)* %3)
%12 = add nsw i32 %10, -1
%13 = icmp ugt i32 %10, 1
br i1 %13, label %9, label %8
}
/* Variables and functions */
int a;
int /*<<< orphan*/ sum(int, int const *const);
int main() {
  const a;
  const int *const b;
  sum(4, b);
  sum(a, b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <sum@plt>
call   1030 <sum@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@a = global i32 0
define i32 @main() {
%1 = tail call i32 @sum(i32 4, i32* undef)
%2 = tail call i32 @sum(i32 undef, i32* undef)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ SHA512(int /*<<< orphan*/ const *, size_t,
                          int /*<<< orphan*/ *);
void ed25519_hash(uint8_t *hash, const uint8_t *in, size_t inlen) {
  SHA512(in, inlen, hash);
}


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

x86 assembly (clang, -O2):
<ed25519_hash>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
jmp    1030 <SHA512@plt>

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

LLVM IR (-O2):
define void @ed25519_hash(i32* %0, i32* %1, i64 %2) {
%4 = tail call i32 @SHA512(i32* %1, i64 %2, i32* %0)
ret void
}
int efx_init_debugfs_nic(struct efx_nic *efx) { return 0; }


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

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

LLVM IR (-O0):
%struct.efx_nic = type opaque
define i32 @efx_init_debugfs_nic(%struct.efx_nic* %0) {
%2 = alloca %struct.efx_nic*
store %struct.efx_nic* %0, %struct.efx_nic** %2
ret i32 0
}

LLVM IR (-O2):
%struct.efx_nic = type opaque
define i32 @efx_init_debugfs_nic(%struct.efx_nic* nocapture readnone %0) {
ret i32 0
}
int checker(int number) {
  if ((number % 2) == 0) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<checker>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <checker+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <checker+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @checker(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @checker(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
/* Variables and functions */
scalar_t__ clnt_sperrno(int);
char *sigar_rpc_strerror(int err) { return (char *)clnt_sperrno(err); }


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

x86 assembly (clang, -O2):
<sigar_rpc_strerror>:
jmp    1030 <clnt_sperrno@plt>

LLVM IR (-O0):
define i8* @sigar_rpc_strerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @clnt_sperrno(i32 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @sigar_rpc_strerror(i32 %0) {
%2 = tail call i64 @clnt_sperrno(i32 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
__attribute__((always_)) void zone_seqlock_init(struct zone *zone) {}


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

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

LLVM IR (-O0):
%struct.zone = type opaque
define void @zone_seqlock_init(%struct.zone* %0) {
%2 = alloca %struct.zone*
store %struct.zone* %0, %struct.zone** %2
ret void
}

LLVM IR (-O2):
%struct.zone = type opaque
define void @zone_seqlock_init(%struct.zone* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(char *);
main() {
  f("hex dec\n");
  for (int i;;)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <f@plt>
jmp    112b <main+0x1b>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <f@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [9 x i8] c"hex dec\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @f(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
br label %4
}

LLVM IR (-O2):
@.str = [9 x i8] c"hex dec\0A\00"
define i32 @main() {
%1 = tail call i32 @f(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ clearerr(int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
void rewind(FILE *stream) {
  fseek(stream, 0, SEEK_SET);
  clearerr(stream);
  return;
}


x86 assembly (clang, -O0):
<rewind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <clearerr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rewind>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <clearerr@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define void @rewind(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @SEEK_SET
%5 = call i32 @fseek(i32* %3, i32 0, i32 %4)
%6 = load i32*, i32** %2
%7 = call i32 @clearerr(i32* %6)
ret void
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define void @rewind(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_SET
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i32 @clearerr(i32* %0)
ret void
}
void gdk_cursor_new_from_pixbuf() {}


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

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

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

LLVM IR (-O2):
define void @gdk_cursor_new_from_pixbuf() {
ret void
}
void mwait(int extensions, int hints) {
  __asm __volatile__("mwait;" : : "a"(hints), "c"(extensions));
}


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

x86 assembly (clang, -O2):
<mwait>:
mov    %esi,%eax
mov    %edi,%ecx
mwait  %eax,%ecx
ret

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

LLVM IR (-O2):
define void @mwait(i32 %0, i32 %1) {
tail call void asm sideeffect "mwait;", "{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int sorteio_chapeu() {
  int s;
  do {
    s = (rand() % 19) - 9;
  } while (s == 0);
  printf(" Número Sorteado: %d\n", s);
  return s;
}


x86 assembly (clang, -O0):
<sorteio_chapeu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x13,%ecx
cltd
idiv   %ecx
sub    $0x9,%edx
mov    %edx,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1128 <sorteio_chapeu+0x8>
mov    -0x4(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sorteio_chapeu>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
movslq %eax,%rbx
imul   $0x6bca1af3,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rax
add    %ecx,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,2),%eax
sub    %eax,%ebx
add    $0xfffffff7,%ebx
je     1130 <sorteio_chapeu+0x10>
lea    0xe9e(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c" N\C3\BAmero Sorteado: %d\0A\00"
define i32 @sorteio_chapeu() {
%1 = alloca i32
br label %2
2: ; preds = %6, %0
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 19
%5 = sub nsw i32 %4, 9
store i32 %5, i32* %1
br label %6
6: ; preds = %2
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
br i1 %8, label %2, label %9
9: ; preds = %6
%10 = load i32, i32* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [23 x i8] c" N\C3\BAmero Sorteado: %d\0A\00"
define i32 @sorteio_chapeu() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 19
%4 = add nsw i32 %3, -9
%5 = icmp eq i32 %4, 0
br i1 %5, label %1, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 %4
}
int test_imm_ADint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xAD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_ADint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xad,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_ADint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 743029342208
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ right_uns_shfit32();
int main() {
  right_uns_shfit32();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <right_uns_shfit32@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @right_uns_shfit32()
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @right_uns_shfit32()
%2 = tail call i32 @exit(i32 0)
unreachable
}
void vd2(double d) { return; }


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

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

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

LLVM IR (-O2):
define void @vd2(double %0) {
ret void
}
/* Variables and functions */
int luaI_findstring(char *, char **);
int /*<<< orphan*/ luaL_verror(char *, char *);
int luaI_checkevent(char *name, char *list[]) {
  int e = luaI_findstring(name, list);
  if (e < 0)
    luaL_verror("`%s' is not a valid event name", name);
  return e;
}


x86 assembly (clang, -O0):
<luaI_checkevent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <luaI_findstring@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    115a <luaI_checkevent+0x3a>
mov    -0x8(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1040 <luaL_verror@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaI_checkevent>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <luaI_findstring@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1140 <luaI_checkevent+0x20>
lea    0xec8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <luaL_verror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [31 x i8] c"`%s' is not a valid event name\00"
define i32 @luaI_checkevent(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
%5 = alloca i32
store i8* %0, i8** %3
store i8** %1, i8*** %4
%6 = load i8*, i8** %3
%7 = load i8**, i8*** %4
%8 = call i32 @luaI_findstring(i8* %6, i8** %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 @luaL_verror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
@.str = [31 x i8] c"`%s' is not a valid event name\00"
define i32 @luaI_checkevent(i8* %0, i8** %1) {
%3 = tail call i32 @luaI_findstring(i8* %0, i8** %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @luaL_verror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGE_SIZE;
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sysconf(int /*<<< orphan*/);
int main() {
  printf("pg size %ld\n", sysconf(_SC_PAGE_SIZE));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"pg size %ld\0A\00"
@_SC_PAGE_SIZE = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @_SC_PAGE_SIZE
%3 = call i32 @sysconf(i32 %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"pg size %ld\0A\00"
@_SC_PAGE_SIZE = global i32 0
define i32 @main() {
%1 = load i32, i32* @_SC_PAGE_SIZE
%2 = tail call i32 @sysconf(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ReadWord(char *, int /*<<< orphan*/ *);
int SearchVocab(char *);
scalar_t__ feof(int /*<<< orphan*/ *);
int ReadWordIndex(FILE *fin) {
  char word[10000];
  ReadWord(word, fin);
  if (feof(fin))
    return -1;
  return SearchVocab(word);
}


x86 assembly (clang, -O0):
<ReadWordIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2720,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x2720(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ReadWord@plt>
mov    -0x10(%rbp),%rdi
call   1030 <feof@plt>
cmp    $0x0,%rax
je     116e <ReadWordIndex+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    117d <ReadWordIndex+0x4d>
lea    -0x2720(%rbp),%rdi
call   1050 <SearchVocab@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2720,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadWordIndex>:
push   %rbx
sub    $0x2710,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1040 <ReadWord@plt>
mov    %rbx,%rdi
call   1030 <feof@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    1163 <ReadWordIndex+0x33>
mov    %rsp,%rdi
call   1050 <SearchVocab@plt>
add    $0x2710,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ReadWordIndex(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca [10000 x i8]
store i32* %0, i32** %3
%5 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%6 = load i32*, i32** %3
%7 = call i32 @ReadWord(i8* %5, i32* %6)
%8 = load i32*, i32** %3
%9 = call i64 @feof(i32* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 -1, i32* %2
br label %15
12: ; preds = %1
%13 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%14 = call i32 @SearchVocab(i8* %13)
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %11
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @ReadWordIndex(i32* %0) {
%2 = alloca [10000 x i8]
%3 = getelementptr inbounds [10000 x i8], [10000 x i8]* %2, i64 0, i64 0
%4 = call i32 @ReadWord(i8* %3, i32* %0)
%5 = call i64 @feof(i32* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @SearchVocab(i8* %3)
br label %9
9: ; preds = %1, %7
%10 = phi i32 [ %8, %7 ], [ -1, %1 ]
ret i32 %10
}
/* Type definitions */
struct terminal_t {
  int dummy;
};
struct parm_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cr(struct terminal_t *);
int /*<<< orphan*/ move_cursor(struct terminal_t *, int, int /*<<< orphan*/);
int sum(struct parm_t *);
void curs_pl(struct terminal_t *term, struct parm_t *parm) {
  int num = sum(parm);
  if (num <= 0)
    num = 1;
  move_cursor(term, -num, 0);
  cr(term);
}


x86 assembly (clang, -O0):
<curs_pl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <sum@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115d <curs_pl+0x2d>
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
sub    -0x14(%rbp),%esi
xor    %edx,%edx
call   1050 <move_cursor@plt>
mov    -0x8(%rbp),%rdi
call   1030 <cr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_pl>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <sum@plt>
test   %eax,%eax
mov    $0x1,%esi
cmovg  %eax,%esi
neg    %esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1050 <move_cursor@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <cr@plt>

LLVM IR (-O0):
%struct.terminal_t = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_pl(%struct.terminal_t* %0, %struct.parm_t* %1) {
%3 = alloca %struct.terminal_t*
%4 = alloca %struct.parm_t*
%5 = alloca i32
store %struct.terminal_t* %0, %struct.terminal_t** %3
store %struct.parm_t* %1, %struct.parm_t** %4
%6 = load %struct.parm_t*, %struct.parm_t** %4
%7 = call i32 @sum(%struct.parm_t* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %5
br label %11
11: ; preds = %10, %2
%12 = load %struct.terminal_t*, %struct.terminal_t** %3
%13 = load i32, i32* %5
%14 = sub nsw i32 0, %13
%15 = call i32 @move_cursor(%struct.terminal_t* %12, i32 %14, i32 0)
%16 = load %struct.terminal_t*, %struct.terminal_t** %3
%17 = call i32 @cr(%struct.terminal_t* %16)
ret void
}

LLVM IR (-O2):
%struct.terminal_t = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_pl(%struct.terminal_t* %0, %struct.parm_t* %1) {
%3 = tail call i32 @sum(%struct.parm_t* %1)
%4 = icmp sgt i32 %3, 1
%5 = select i1 %4, i32 %3, i32 1
%6 = sub nsw i32 0, %5
%7 = tail call i32 @move_cursor(%struct.terminal_t* %0, i32 %6, i32 0)
%8 = tail call i32 @cr(%struct.terminal_t* %0)
ret void
}