xunge/DecIR huggingface dataset:
/* Variables and functions */
double measure_plaquette_sf_weights_improvement(int, double, double);
double measure_wilson_action_sf_weights_improvement(int t, double beta,
                                                    double cs, double ct) {
  double plaquette;
  double wilson;
  plaquette = measure_plaquette_sf_weights_improvement(t, cs, ct);
  wilson = -(beta / (2. * 3.)) * plaquette;
  return wilson;
}


x86 assembly (clang, -O0):
<measure_wilson_action_sf_weights_improvement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <measure_plaquette_sf_weights_improvement@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
divsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<measure_wilson_action_sf_weights_improvement>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
movaps %xmm2,%xmm1
call   1030 <measure_plaquette_sf_weights_improvement@plt>
movsd  (%rsp),%xmm1
divsd  0xed1(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @measure_wilson_action_sf_weights_improvement(i32 %0, double %1, double %2, double %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load i32, i32* %5
%12 = load double, double* %7
%13 = load double, double* %8
%14 = call double @measure_plaquette_sf_weights_improvement(i32 %11, double %12, double %13)
store double %14, double* %9
%15 = load double, double* %6
%16 = fdiv double %15, 6.000000e+00
%17 = fneg double %16
%18 = load double, double* %9
%19 = fmul double %17, %18
store double %19, double* %10
%20 = load double, double* %10
ret double %20
}

LLVM IR (-O2):
define double @measure_wilson_action_sf_weights_improvement(i32 %0, double %1, double %2, double %3) {
%5 = tail call double @measure_plaquette_sf_weights_improvement(i32 %0, double %2, double %3)
%6 = fdiv double %1, -6.000000e+00
%7 = fmul double %6, %5
ret double %7
}
void startMemory(unsigned char *memory, int memSize) {
  int count;
  for (count = 0; count < memSize; count++)
    memory[count] = 0;
}


x86 assembly (clang, -O0):
<startMemory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <startMemory+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <startMemory+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<startMemory>:
test   %esi,%esi
jle    1122 <startMemory+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @startMemory(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 = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
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
store i8 0, i8* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @startMemory(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ fatal(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ scsi_device_valid(int /*<<< orphan*/, int /*<<< orphan*/);
void target_check(uint8_t id, uint8_t lun) {
  if (!scsi_device_valid(id, lun)) {
    fatal("BIOS INT13 device on %02i:%02i has disappeared\n", id, lun);
  }
}


x86 assembly (clang, -O0):
<target_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <scsi_device_valid@plt>
cmp    $0x0,%eax
jne    1154 <target_check+0x34>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb1(%rip),%rdi
call   1040 <fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_check>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <scsi_device_valid@plt>
test   %eax,%eax
je     1137 <target_check+0x17>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xec2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fatal@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"BIOS INT13 device on %02i:%02i has disappeared\0A\00"
define void @target_check(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @scsi_device_valid(i32 %5, i32 %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @fatal(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"BIOS INT13 device on %02i:%02i has disappeared\0A\00"
define void @target_check(i32 %0, i32 %1) {
%3 = tail call i32 @scsi_device_valid(i32 %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @fatal(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int sqrt(int n) {
  int a, su, t;
  a = 0;
  su = 1;
  t = 1;
  while (su <= n) {
    a = a + 1;
    t = t + 2;
    su = su + t;
  }
  return a;
}


x86 assembly (clang, -O0):
<sqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1148 <sqrt+0x48>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    111c <sqrt+0x1c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt>:
xor    %eax,%eax
test   %edi,%edi
jle    111c <sqrt+0x1c>
mov    $0x1,%ecx
mov    $0x3,%edx
add    $0x1,%eax
add    %edx,%ecx
add    $0x2,%edx
cmp    %edi,%ecx
jle    1110 <sqrt+0x10>
ret

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

LLVM IR (-O2):
define i32 @sqrt(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 1, %1 ]
%5 = phi i32 [ %9, %3 ], [ 1, %1 ]
%6 = phi i32 [ %7, %3 ], [ 0, %1 ]
%7 = add nuw nsw i32 %6, 1
%8 = add nuw nsw i32 %4, 2
%9 = add nuw nsw i32 %8, %5
%10 = icmp sgt i32 %9, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ lwfree_var(void *);
int /*<<< orphan*/ lwgeom_init_allocators();
void init_freeor(void *mem) {
  lwgeom_init_allocators();
  lwfree_var(mem);
}


x86 assembly (clang, -O0):
<init_freeor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <lwgeom_init_allocators@plt>
mov    -0x8(%rbp),%rdi
call   1040 <lwfree_var@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_freeor>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <lwgeom_init_allocators@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <lwfree_var@plt>

LLVM IR (-O0):
define void @init_freeor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @lwgeom_init_allocators()
%4 = load i8*, i8** %2
%5 = call i32 @lwfree_var(i8* %4)
ret void
}

LLVM IR (-O2):
define void @init_freeor(i8* %0) {
%2 = tail call i32 (...) @lwgeom_init_allocators()
%3 = tail call i32 @lwfree_var(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putHex(char, unsigned long, int);
void gdb_write(char *data, int len) {
  (*(volatile unsigned *)0x7f08) &= ~0x1000;
  putHex('O', (unsigned long)(unsigned int)data, len);
  (*(volatile unsigned *)0x7f08) |= 0x1000;
}


x86 assembly (clang, -O0):
<gdb_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x7f08,%eax
mov    (%rax),%ecx
and    $0xffffefff,%ecx
mov    $0x7f08,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    %eax,%eax
mov    %eax,%esi
mov    -0xc(%rbp),%edx
mov    $0x4f,%edi
call   1030 <putHex@plt>
mov    $0x7f08,%eax
mov    (%rax),%ecx
or     $0x1000,%ecx
mov    $0x7f08,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdb_write>:
push   %rax
mov    %esi,%edx
andl   $0xffffefff,0x7f08
ff ef ff ff
mov    %edi,%esi
mov    $0x4f,%edi
call   1030 <putHex@plt>
orl    $0x1000,0x7f08
pop    %rax
ret

LLVM IR (-O0):
define void @gdb_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load volatile i32, i32* inttoptr (i64 32520 to i32*)
%6 = and i32 %5, -4097
store volatile i32 %6, i32* inttoptr (i64 32520 to i32*)
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i32
%9 = zext i32 %8 to i64
%10 = load i32, i32* %4
%11 = call i32 @putHex(i8 signext 79, i64 %9, i32 %10)
%12 = load volatile i32, i32* inttoptr (i64 32520 to i32*)
%13 = or i32 %12, 4096
store volatile i32 %13, i32* inttoptr (i64 32520 to i32*)
ret void
}

LLVM IR (-O2):
define void @gdb_write(i8* %0, i32 %1) {
%3 = load volatile i32, i32* inttoptr (i64 32520 to i32*)
%4 = and i32 %3, -4097
store volatile i32 %4, i32* inttoptr (i64 32520 to i32*)
%5 = ptrtoint i8* %0 to i64
%6 = and i64 %5, 4294967295
%7 = tail call i32 @putHex(i8 signext 79, i64 %6, i32 %1)
%8 = load volatile i32, i32* inttoptr (i64 32520 to i32*)
%9 = or i32 %8, 4096
store volatile i32 %9, i32* inttoptr (i64 32520 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("argc[%d] = %s\n", i, argv[i]);
  }
  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)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"argc[%d] = %s\0A\00"
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
store i32 0, i32* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i8**, i8*** %5
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %13, i64 %15
%17 = load i8*, i8** %16
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %17)
br label %19
19: ; preds = %11
%20 = load i32, i32* %6
%21 = add nsw i32 %20, 1
store i32 %21, i32* %6
br label %7
22: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"argc[%d] = %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void Print_Version_Information() {
  printf("i7z DEBUG: i7z version: %s\n", "svn-r77-(20-Nov-2011)");
}


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

x86 assembly (clang, -O2):
<Print_Version_Information>:
lea    0xee9(%rip),%rdi
lea    0xefe(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"i7z DEBUG: i7z version: %s\0A\00"
@.str.1 = [22 x i8] c"svn-r77-(20-Nov-2011)\00"
define void @Print_Version_Information() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"i7z DEBUG: i7z version: %s\0A\00"
@.str.1 = [22 x i8] c"svn-r77-(20-Nov-2011)\00"
define void @Print_Version_Information() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int cmp(const void *a, const void *b) {
  if (*(long long *)a - *(long long *)b < 0)
    return -1;
  if (*(long long *)a - *(long long *)b > 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
sub    (%rcx),%rax
cmp    $0x0,%rax
jge    1130 <cmp+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <cmp+0x5b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
sub    (%rcx),%rax
cmp    $0x0,%rax
jle    1154 <cmp+0x54>
movl   $0x1,-0x4(%rbp)
jmp    115b <cmp+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%rax
xor    %ecx,%ecx
cmp    (%rsi),%rax
setne  %cl
mov    $0xffffffff,%eax
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = icmp slt i64 %7, 0
%9 = icmp ne i64 %7, 0
%10 = zext i1 %9 to i32
%11 = select i1 %8, i32 -1, i32 %10
ret i32 %11
}
/* Type definitions */
struct binary_search_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert_exit(int /*<<< orphan*/);
int /*<<< orphan*/
binary_search_tree_structure_legal_p(struct binary_search_tree *);
int /*<<< orphan*/ memory_cache_free(struct binary_search_tree *);
void binary_search_tree_node_destroy(struct binary_search_tree *node) {
  assert_exit(binary_search_tree_structure_legal_p(node));
  memory_cache_free(node);
}


x86 assembly (clang, -O0):
<binary_search_tree_node_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <binary_search_tree_structure_legal_p@plt>
mov    %eax,%edi
call   1050 <assert_exit@plt>
mov    -0x8(%rbp),%rdi
call   1030 <memory_cache_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_search_tree_node_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <binary_search_tree_structure_legal_p@plt>
mov    %eax,%edi
call   1050 <assert_exit@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <memory_cache_free@plt>

LLVM IR (-O0):
%struct.binary_search_tree = type { i32 }
define void @binary_search_tree_node_destroy(%struct.binary_search_tree* %0) {
%2 = alloca %struct.binary_search_tree*
store %struct.binary_search_tree* %0, %struct.binary_search_tree** %2
%3 = load %struct.binary_search_tree*, %struct.binary_search_tree** %2
%4 = call i32 @binary_search_tree_structure_legal_p(%struct.binary_search_tree* %3)
%5 = call i32 @assert_exit(i32 %4)
%6 = load %struct.binary_search_tree*, %struct.binary_search_tree** %2
%7 = call i32 @memory_cache_free(%struct.binary_search_tree* %6)
ret void
}

LLVM IR (-O2):
%struct.binary_search_tree = type { i32 }
define void @binary_search_tree_node_destroy(%struct.binary_search_tree* %0) {
%2 = tail call i32 @binary_search_tree_structure_legal_p(%struct.binary_search_tree* %0)
%3 = tail call i32 @assert_exit(i32 %2)
%4 = tail call i32 @memory_cache_free(%struct.binary_search_tree* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sim_error(char *);
void cwai(void) { sim_error("CWAI - not supported yet!"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"CWAI - not supported yet!\00"
define void @cwai() {
%1 = call i32 @sim_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"CWAI - not supported yet!\00"
define void @cwai() {
%1 = tail call i32 @sim_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
void av_des_init() {}


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

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

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

LLVM IR (-O2):
define void @av_des_init() {
ret void
}
void VP8EncDspCostInitMIPSdspR2(void) {}


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

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

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

LLVM IR (-O2):
define void @VP8EncDspCostInitMIPSdspR2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _CcsFree_(void *ptr, const char *fname, int line) { free(ptr); }


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

x86 assembly (clang, -O2):
<_CcsFree_>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @_CcsFree_(i8* nocapture %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @free(i8* %0)
ret void
}
void s5pc100_default_sdhci0(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @s5pc100_default_sdhci0() {
ret void
}
void av_aes_init() {}


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

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

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

LLVM IR (-O2):
define void @av_aes_init() {
ret void
}
/* Variables and functions */
int partition(int *, int, int);
void quick_sort(int list[], int left, int right) {
  int i, j;
  if (left < right) {
    int j = partition(list, left, right);
    quick_sort(list, left, j - 1);
    quick_sort(list, j + 1, right);
  }
}


x86 assembly (clang, -O0):
<quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quick_sort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x1c(%rbp),%edx
sub    $0x1,%edx
call   1040 <quick_sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quick_sort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quick_sort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quick_sort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quick_sort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quick_sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quick_sort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ansi_out(char *);
void ansi_mouse(int flag) {
  if (flag)
    ansi_out("\033[?1000h");
  else
    ansi_out("\033[?1000l");
}


x86 assembly (clang, -O0):
<ansi_mouse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <ansi_mouse+0x26>
lea    0xed4(%rip),%rdi
call   1030 <ansi_out@plt>
jmp    1142 <ansi_mouse+0x32>
lea    0xecc(%rip),%rdi
call   1030 <ansi_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ansi_mouse>:
test   %edi,%edi
lea    0xef0(%rip),%rax
lea    0xee0(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <ansi_out@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[?1000h\00"
@.str.1 = [9 x i8] c"\1B[?1000l\00"
define void @ansi_mouse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @ansi_out(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @ansi_out(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[?1000h\00"
@.str.1 = [9 x i8] c"\1B[?1000l\00"
define void @ansi_mouse(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @ansi_out(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void timeout_handler(int unused __attribute__((unused))) {
  fprintf(stderr, "[error] Timeout\n");
  exit(1);
}


x86 assembly (clang, -O0):
<timeout_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"[error] Timeout\0A\00"
define void @timeout_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"[error] Timeout\0A\00"
define void @timeout_handler(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
void XDefaultScreenOfDisplay() {}


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

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

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

LLVM IR (-O2):
define void @XDefaultScreenOfDisplay() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_dup;
int syscall_1(int /*<<< orphan*/, int);
int dup(int oldfd) { return syscall_1(SYS_dup, oldfd); }


x86 assembly (clang, -O0):
<dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall_1@plt>

LLVM IR (-O0):
@SYS_dup = global i32 0
define i32 @dup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SYS_dup
%4 = load i32, i32* %2
%5 = call i32 @syscall_1(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SYS_dup = global i32 0
define i32 @dup(i32 %0) {
%2 = load i32, i32* @SYS_dup
%3 = tail call i32 @syscall_1(i32 %2, i32 %0)
ret i32 %3
}
void native_window_create_video() {}


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

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

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

LLVM IR (-O2):
define void @native_window_create_video() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(int, unsigned char *);
int /*<<< orphan*/ VIM_SIF_I2cWriteByte(int, int);
unsigned char CheckId_S5KA3AFX(void) {
  unsigned char temp1;
  unsigned char temp2;
  VIM_SIF_I2cWriteByte(0xef, 00);
  VIM_SIF_I2cReadByte(0xb2, &temp1);
  VIM_SIF_I2cReadByte(0xb3, &temp2);
  if ((temp1 == 0xc5) && (temp2 == 0x02))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CheckId_S5KA3AFX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xef,%edi
xor    %esi,%esi
call   1040 <VIM_SIF_I2cWriteByte@plt>
mov    $0xb2,%edi
lea    -0x2(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    $0xb3,%edi
lea    -0x3(%rbp),%rsi
call   1030 <VIM_SIF_I2cReadByte@plt>
movzbl -0x2(%rbp),%eax
cmp    $0xc5,%eax
jne    1175 <CheckId_S5KA3AFX+0x55>
movzbl -0x3(%rbp),%eax
cmp    $0x2,%eax
jne    1175 <CheckId_S5KA3AFX+0x55>
movb   $0x1,-0x1(%rbp)
jmp    1179 <CheckId_S5KA3AFX+0x59>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckId_S5KA3AFX>:
push   %rax
mov    $0xef,%edi
xor    %esi,%esi
call   1040 <VIM_SIF_I2cWriteByte@plt>
lea    0x7(%rsp),%rsi
mov    $0xb2,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
lea    0x6(%rsp),%rsi
mov    $0xb3,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
mov    0x7(%rsp),%al
xor    $0xc5,%al
mov    0x6(%rsp),%cl
xor    $0x2,%cl
or     %al,%cl
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @CheckId_S5KA3AFX() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @VIM_SIF_I2cWriteByte(i32 239, i32 0)
%5 = call i32 @VIM_SIF_I2cReadByte(i32 178, i8* %2)
%6 = call i32 @VIM_SIF_I2cReadByte(i32 179, i8* %3)
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 197
br i1 %9, label %10, label %15
10: ; preds = %0
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %15
14: ; preds = %10
store i8 1, i8* %1
br label %16
15: ; preds = %10, %0
store i8 0, i8* %1
br label %16
16: ; preds = %15, %14
%17 = load i8, i8* %1
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @CheckId_S5KA3AFX() {
%1 = alloca i8
%2 = alloca i8
%3 = tail call i32 @VIM_SIF_I2cWriteByte(i32 239, i32 0)
%4 = call i32 @VIM_SIF_I2cReadByte(i32 178, i8* %1)
%5 = call i32 @VIM_SIF_I2cReadByte(i32 179, i8* %2)
%6 = load i8, i8* %1
%7 = icmp eq i8 %6, -59
%8 = load i8, i8* %2
%9 = icmp eq i8 %8, 2
%10 = select i1 %7, i1 %9, i1 false
%11 = zext i1 %10 to i8
ret i8 %11
}
void reverse(int *nums, int begin, int end) {
  int tmp;
  while (begin < end) {
    tmp = nums[begin];
    nums[begin] = nums[end];
    nums[end] = tmp;
    begin++;
    end--;
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1163 <reverse+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <reverse+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
cmp    %edx,%esi
jge    112e <reverse+0x2e>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
mov    -0x4(%rdi,%rax,4),%edx
mov    (%rdi,%rcx,4),%esi
mov    %esi,-0x4(%rdi,%rax,4)
mov    %edx,(%rdi,%rcx,4)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rcx,%rax
mov    %rdx,%rax
jl     1110 <reverse+0x10>
ret

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

LLVM IR (-O2):
define void @reverse(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 %9
%14 = load i32, i32* %13
store i32 %14, i32* %11
store i32 %12, i32* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp slt i64 %15, %16
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Print(char *);
int /*<<< orphan*/ nap(int);
void outofstock(void) {
  Print("Sorry, but we are out of that item.");
  nap(2200);
}


x86 assembly (clang, -O0):
<outofstock>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <Print@plt>
mov    $0x898,%edi
call   1030 <nap@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<outofstock>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <Print@plt>
mov    $0x898,%edi
pop    %rax
jmp    1030 <nap@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Sorry, but we are out of that item.\00"
define void @outofstock() {
%1 = call i32 @Print(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @nap(i32 2200)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Sorry, but we are out of that item.\00"
define void @outofstock() {
%1 = tail call i32 @Print(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @nap(i32 2200)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fdup();
int /*<<< orphan*/ pull();
int /*<<< orphan*/ push();
int /*<<< orphan*/ swap();
void over() {
  push();
  fdup();
  pull();
  swap();
}


x86 assembly (clang, -O0):
<over>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <push@plt>
mov    $0x0,%al
call   1040 <fdup@plt>
mov    $0x0,%al
call   1030 <pull@plt>
mov    $0x0,%al
call   1060 <swap@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<over>:
push   %rax
xor    %eax,%eax
call   1050 <push@plt>
xor    %eax,%eax
call   1040 <fdup@plt>
xor    %eax,%eax
call   1030 <pull@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <swap@plt>

LLVM IR (-O0):
define void @over() {
%1 = call i32 (...) @push()
%2 = call i32 (...) @fdup()
%3 = call i32 (...) @pull()
%4 = call i32 (...) @swap()
ret void
}

LLVM IR (-O2):
define void @over() {
%1 = tail call i32 (...) @push()
%2 = tail call i32 (...) @fdup()
%3 = tail call i32 (...) @pull()
%4 = tail call i32 (...) @swap()
ret void
}
void fillWithZeros(int removed, int *arrnew, int num) {
  for (int i = (num - removed); i < num; i++) {
    arrnew[i] = 0;
  }
}


x86 assembly (clang, -O0):
<fillWithZeros>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1140 <fillWithZeros+0x40>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1117 <fillWithZeros+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fillWithZeros>:
test   %edi,%edi
jle    1144 <fillWithZeros+0x34>
push   %rax
mov    %edx,%eax
sub    %edi,%eax
movslq %eax,%rcx
lea    (%rsi,%rcx,4),%rax
add    $0x1,%ecx
cmp    %ecx,%edx
cmovg  %edx,%ecx
add    %edi,%ecx
not    %edx
add    %ecx,%edx
lea    0x4(,%rdx,4),%rdx
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @fillWithZeros(i32 %0, i32* nocapture writeonly %1, i32 %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %19
5: ; preds = %3
%6 = sub i32 %2, %0
%7 = sext i32 %6 to i64
%8 = getelementptr i32, i32* %1, i64 %7
%9 = bitcast i32* %8 to i8*
%10 = add i32 %2, 1
%11 = sub i32 %10, %0
%12 = call i32 @llvm.smax.i32(i32 %2, i32 %11)
%13 = add i32 %12, %0
%14 = xor i32 %2, -1
%15 = add i32 %13, %14
%16 = zext i32 %15 to i64
%17 = shl nuw nsw i64 %16, 2
%18 = add nuw nsw i64 %17, 4
br label %19
19: ; preds = %5, %3
ret void
}
int union_function(int a) { return a + 1; }


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

x86 assembly (clang, -O2):
<union_function>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @union_function(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @union_function(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ keytoid(unsigned int *, unsigned char *);
int cmp(unsigned char *a, unsigned char *b) {
  unsigned int na, nb;
  keytoid(&na, a);
  keytoid(&nb, b);
  return na - nb;
}


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

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

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @keytoid(i32* %5, i8* %7)
%9 = load i8*, i8** %4
%10 = call i32 @keytoid(i32* %6, i8* %9)
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sub i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @keytoid(i32* %3, i8* %0)
%8 = call i32 @keytoid(i32* %4, i8* %1)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub i32 %9, %10
ret i32 %11
}
const char *recupererNomRace(const unsigned int indexRace) {
  static const char *baseTypeRace[6] = {"Humain",  "Alien",    "Nain",
                                        "Sorcier", "Guerrier", "Ogre"};
  return baseTypeRace[indexRace];
}


x86 assembly (clang, -O0):
<recupererNomRace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0x2f1d(%rip),%rax
mov    (%rax,%rcx,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<recupererNomRace>:
mov    %edi,%eax
lea    0xef7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@recupererNomRace.baseTypeRace = internal global [6 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0)]
@.str = [7 x i8] c"Humain\00"
@.str.1 = [6 x i8] c"Alien\00"
@.str.2 = [5 x i8] c"Nain\00"
@.str.3 = [8 x i8] c"Sorcier\00"
@.str.4 = [9 x i8] c"Guerrier\00"
@.str.5 = [5 x i8] c"Ogre\00"
define i8* @recupererNomRace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [6 x i8*], [6 x i8*]* @recupererNomRace.baseTypeRace, i64 0, i64 %4
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
@reltable.recupererNomRace = internal unnamed_addr constant [6 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str to i64), i64 ptrtoint ([6 x i32]* @reltable.recupererNomRace to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.1 to i64), i64 ptrtoint ([6 x i32]* @reltable.recupererNomRace to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.2 to i64), i64 ptrtoint ([6 x i32]* @reltable.recupererNomRace to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.3 to i64), i64 ptrtoint ([6 x i32]* @reltable.recupererNomRace to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.4 to i64), i64 ptrtoint ([6 x i32]* @reltable.recupererNomRace to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.5 to i64), i64 ptrtoint ([6 x i32]* @reltable.recupererNomRace to i64)) to i32)]
@.str = [7 x i8] c"Humain\00"
@.str.1 = [6 x i8] c"Alien\00"
@.str.2 = [5 x i8] c"Nain\00"
@.str.3 = [8 x i8] c"Sorcier\00"
@.str.4 = [9 x i8] c"Guerrier\00"
@.str.5 = [5 x i8] c"Ogre\00"
define i8* @recupererNomRace(i32 %0) {
%2 = zext i32 %0 to i64
%3 = shl i64 %2, 2
%4 = call i8* @llvm.load.relative.i64(i8* bitcast ([6 x i32]* @reltable.recupererNomRace to i8*), i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(double *);
scalar_t__ calloc(size_t const, int);
double *dvector(const size_t n) {
  double *v = (double *)calloc(n, sizeof(double));
  assert(v);
  return v;
}


x86 assembly (clang, -O0):
<dvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvector>:
push   %rbx
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define double* @dvector(i64 %0) {
%2 = alloca i64
%3 = alloca double*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @calloc(i64 %4, i32 8)
%6 = inttoptr i64 %5 to double*
store double* %6, double** %3
%7 = load double*, double** %3
%8 = call i32 @assert(double* %7)
%9 = load double*, double** %3
ret double* %9
}

LLVM IR (-O2):
define double* @dvector(i64 %0) {
%2 = tail call i64 @calloc(i64 %0, i32 8)
%3 = inttoptr i64 %2 to double*
%4 = tail call i32 @assert(double* %3)
ret double* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ swap64(int /*<<< orphan*/);
uint64_t tobe64(uint64_t x) {
  return (*(uint16_t *)"\0\1" == 1) ? x : swap64(x);
}


x86 assembly (clang, -O0):
<tobe64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,0xede(%rip)
jne    1133 <tobe64+0x23>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    113e <tobe64+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <swap64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tobe64>:
jmp    1030 <swap64@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\00\01\00"
define i32 @tobe64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* bitcast ([3 x i8]* @.str to i32*)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 @swap64(i32 %8)
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @tobe64(i32 %0) {
%2 = tail call i32 @swap64(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(int /*<<< orphan*/, char *, char *, char *, int);
void gmx_tx(int nodeid, void *buf, int bufsize) {
  fatal_error(0, "Routine %s called in %s, %d", "gmx_tx",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/"
              "tests/test_07/network.c",
              59);
}


x86 assembly (clang, -O0):
<gmx_tx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %edi,%edi
lea    0xed5(%rip),%rsi
lea    0xeea(%rip),%rdx
lea    0xeea(%rip),%rcx
mov    $0x3b,%r8d
call   1030 <fatal_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_tx>:
lea    0xee9(%rip),%rsi
lea    0xefe(%rip),%rdx
lea    0xefe(%rip),%rcx
xor    %edi,%edi
mov    $0x3b,%r8d
jmp    1030 <fatal_error@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [7 x i8] c"gmx_tx\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_tx(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 59)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [7 x i8] c"gmx_tx\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_tx(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 59)
ret void
}