xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ homundb_sql_delete(int);
int /*<<< orphan*/ mapif_delete_hom_ack(int, int /*<<< orphan*/);
int mapif_delete_hom(int fd, int homun_id) {
  mapif_delete_hom_ack(fd, homundb_sql_delete(homun_id));
  return 0;
}


x86 assembly (clang, -O0):
<mapif_delete_hom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <homundb_sql_delete@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <mapif_delete_hom_ack@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapif_delete_hom>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <homundb_sql_delete@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <mapif_delete_hom_ack@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mapif_delete_hom(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 @homundb_sql_delete(i32 %6)
%8 = call i32 @mapif_delete_hom_ack(i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @mapif_delete_hom(i32 %0, i32 %1) {
%3 = tail call i32 @homundb_sql_delete(i32 %1)
%4 = tail call i32 @mapif_delete_hom_ack(i32 %0, i32 %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, int const *, int);
void populateAtOffset(void *memory) {
  const uint32_t value = 0x11223344;
  memcpy((char *)memory + sizeof(uint32_t), &value, sizeof(value));
}


x86 assembly (clang, -O0):
<populateAtOffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x11223344,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<populateAtOffset>:
push   %rax
movl   $0x11223344,0x4(%rsp)
11
add    $0x4,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @populateAtOffset(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 287454020, i32* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 4
%6 = call i32 @memcpy(i8* %5, i32* %3, i32 4)
ret void
}

LLVM IR (-O2):
define void @populateAtOffset(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 287454020, i32* %2
%4 = getelementptr inbounds i8, i8* %0, i64 4
%5 = call i32 @memcpy(i8* %4, i32* %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, long);
void ovly_copy(unsigned long dst, unsigned long src, long size) {
  memcpy((void *)dst, (void *)src, size);
  return;
}


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

x86 assembly (clang, -O2):
<ovly_copy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @ovly_copy(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = inttoptr i64 %7 to i8*
%9 = load i64, i64* %5
%10 = inttoptr i64 %9 to i8*
%11 = load i64, i64* %6
%12 = call i32 @memcpy(i8* %8, i8* %10, i64 %11)
ret void
}

LLVM IR (-O2):
define void @ovly_copy(i64 %0, i64 %1, i64 %2) {
%4 = inttoptr i64 %0 to i8*
%5 = inttoptr i64 %1 to i8*
%6 = tail call i32 @memcpy(i8* %4, i8* %5, i64 %2)
ret void
}
/* Type definitions */
struct Logger {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int logger_flush_null(struct Logger *logger) {
  assert(logger != NULL);
  return 0;
}


x86 assembly (clang, -O0):
<logger_flush_null>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logger_flush_null>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.Logger = type { i32 }
define i32 @logger_flush_null(%struct.Logger* %0) {
%2 = alloca %struct.Logger*
store %struct.Logger* %0, %struct.Logger** %2
%3 = load %struct.Logger*, %struct.Logger** %2
%4 = icmp ne %struct.Logger* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
ret i32 0
}

LLVM IR (-O2):
%struct.Logger = type { i32 }
define i32 @logger_flush_null(%struct.Logger* readnone %0) {
%2 = icmp ne %struct.Logger* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret i32 0
}
void swap(int *x, int *y) {
  int t = *x;
  *x = *y;
  *y = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_fraction(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int i, t;
  scanf("%d", &t);
  while (t--) {
    scanf("%d", &i);
    { print_fraction(i); }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     1170 <main+0x50>
lea    0xea6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <print_fraction@plt>
jmp    113f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
subl   $0x1,(%rsp)
jb     116a <main+0x4a>
lea    0xec0(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <print_fraction@plt>
subl   $0x1,(%rsp)
jae    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strlen(char *);
char toupper(char);
void addWord(char *dest, char *src) {
  if (strlen(src) <= 0)
    return;
  src[0] = toupper(src[0]);
  strcat(dest, src);
}


x86 assembly (clang, -O0):
<addWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
jg     1158 <addWord+0x28>
jmp    1179 <addWord+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addWord>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
test   %rax,%rax
jle    1163 <addWord+0x33>
movsbl (%rbx),%edi
call   1030 <toupper@plt>
mov    %al,(%rbx)
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <strcat@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @addWord(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strlen(i8* %5)
%7 = icmp sle i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
br label %19
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = call signext i8 @toupper(i8 signext %12)
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 0
store i8 %13, i8* %15
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = call i32 @strcat(i8* %16, i8* %17)
br label %19
19: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @addWord(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = icmp slt i64 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8, i8* %1
%7 = tail call signext i8 @toupper(i8 signext %6)
store i8 %7, i8* %1
%8 = tail call i32 @strcat(i8* %0, i8* %1)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
double p(float);
int /*<<< orphan*/ printf(char *, float, double);
int main() {
  float i;
  for (i = -1; i <= 1; i = i + 0.1) {
    printf("p(%2.2f) = %2.2f.\n", i, p(i));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xec0(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1199 <main+0x79>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <p@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe81(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113c <main+0x1c>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movss  0xed3(%rip),%xmm1
lea    0xedc(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  %xmm1,0xc(%rsp)
movaps %xmm1,%xmm0
call   1030 <p@plt>
movaps %xmm0,%xmm1
mov    %rbx,%rdi
movss  0xc(%rsp),%xmm0
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xe97(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
movss  0xe84(%rip),%xmm0
ucomiss %xmm1,%xmm0
jae    1140 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"p(%2.2f) = %2.2f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
store float -1.000000e+00, float* %2
br label %3
3: ; preds = %11, %0
%4 = load float, float* %2
%5 = fcmp ole float %4, 1.000000e+00
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load float, float* %2
%8 = load float, float* %2
%9 = call double @p(float %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %7, double %9)
br label %11
11: ; preds = %6
%12 = load float, float* %2
%13 = fpext float %12 to double
%14 = fadd double %13, 1.000000e-01
%15 = fptrunc double %14 to float
store float %15, float* %2
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"p(%2.2f) = %2.2f.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi float [ -1.000000e+00, %0 ], [ %7, %1 ]
%3 = tail call double @p(float %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), float %2, double %3)
%5 = fpext float %2 to double
%6 = fadd double %5, 1.000000e-01
%7 = fptrunc double %6 to float
%8 = fcmp ugt float %7, 1.000000e+00
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
int InList(int key, int list[], int n) {
  int i;
  for (i = 0; i < n; i++)
    if (key == list[i])
      return 1;
  return 0;
}


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

x86 assembly (clang, -O2):
<InList>:
test   %edx,%edx
jle    111e <InList+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edi,(%rsi,%rcx,4)
je     1121 <InList+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <InList+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @InList(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %1, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ cpc_ClrScr();
int /*<<< orphan*/ printf(char *);
void menuJugar() {
  cpc_ClrScr();
  printf("1. Modo Arcade");
  printf("2. Modo Supervivencia");
  printf("3. Modo Multijugador");
  printf("4. Volver");
}


x86 assembly (clang, -O0):
<menuJugar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cpc_ClrScr@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<menuJugar>:
push   %rax
xor    %eax,%eax
call   1040 <cpc_ClrScr@plt>
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"1. Modo Arcade\00"
@.str.1 = [22 x i8] c"2. Modo Supervivencia\00"
@.str.2 = [21 x i8] c"3. Modo Multijugador\00"
@.str.3 = [10 x i8] c"4. Volver\00"
define void @menuJugar() {
%1 = call i32 (...) @cpc_ClrScr()
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"1. Modo Arcade\00"
@.str.1 = [22 x i8] c"2. Modo Supervivencia\00"
@.str.2 = [21 x i8] c"3. Modo Multijugador\00"
@.str.3 = [10 x i8] c"4. Volver\00"
define void @menuJugar() {
%1 = tail call i32 (...) @cpc_ClrScr()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t lwgeom_empty_length(int SRID) {
  int size = 5;
  if (SRID != 1)
    size += 4;
  return size;
}


x86 assembly (clang, -O0):
<lwgeom_empty_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     1121 <lwgeom_empty_length+0x21>
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
movslq -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lwgeom_empty_length>:
xor    %eax,%eax
cmp    $0x1,%edi
setne  %al
lea    0x5(,%rax,4),%rax
ret

LLVM IR (-O0):
define i64 @lwgeom_empty_length(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 5, i32* %3
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 4
store i32 %8, i32* %3
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
ret i64 %11
}

LLVM IR (-O2):
define i64 @lwgeom_empty_length(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i64 5, i64 9
ret i64 %3
}
f(int x[]) { return x[2]; }


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

x86 assembly (clang, -O2):
<f>:
mov    0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
scalar_t__ isBalanced(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (isBalanced(argv[1])) {
    printf("string is balanced\n");
  } else {
    printf("string is not balanced\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <isBalanced@plt>
cmp    $0x0,%rax
je     115e <main+0x3e>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    116a <main+0x4a>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <isBalanced@plt>
test   %rax,%rax
lea    0xecc(%rip),%rax
lea    0xedc(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"string is balanced\0A\00"
@.str.1 = [24 x i8] c"string is not balanced\0A\00"
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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i64 @isBalanced(i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@str = [23 x i8] c"string is not balanced\00"
@str.2 = [19 x i8] c"string is balanced\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @isBalanced(i8* %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.2, i64 0, i64 0)
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
/* Type definitions */
struct parsed_op {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ output_std_flag_s(int /*<<< orphan*/ *, struct parsed_op *,
                                     int *, char const *);
int /*<<< orphan*/ output_std_flag_z(int /*<<< orphan*/ *, struct parsed_op *,
                                     int *, char const *);
void output_std_flags(FILE *fout, struct parsed_op *po, int *pfomask,
                      const char *dst_opr_text) {
  output_std_flag_z(fout, po, pfomask, dst_opr_text);
  output_std_flag_s(fout, po, pfomask, dst_opr_text);
}


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

x86 assembly (clang, -O2):
<output_std_flags>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
call   1040 <output_std_flag_z@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <output_std_flag_s@plt>

LLVM IR (-O0):
%struct.parsed_op = type { i32 }
define void @output_std_flags(i32* %0, %struct.parsed_op* %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca %struct.parsed_op*
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store %struct.parsed_op* %1, %struct.parsed_op** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i32*, i32** %5
%10 = load %struct.parsed_op*, %struct.parsed_op** %6
%11 = load i32*, i32** %7
%12 = load i8*, i8** %8
%13 = call i32 @output_std_flag_z(i32* %9, %struct.parsed_op* %10, i32* %11, i8* %12)
%14 = load i32*, i32** %5
%15 = load %struct.parsed_op*, %struct.parsed_op** %6
%16 = load i32*, i32** %7
%17 = load i8*, i8** %8
%18 = call i32 @output_std_flag_s(i32* %14, %struct.parsed_op* %15, i32* %16, i8* %17)
ret void
}

LLVM IR (-O2):
%struct.parsed_op = type { i32 }
define void @output_std_flags(i32* %0, %struct.parsed_op* %1, i32* %2, i8* %3) {
%5 = tail call i32 @output_std_flag_z(i32* %0, %struct.parsed_op* %1, i32* %2, i8* %3)
%6 = tail call i32 @output_std_flag_s(i32* %0, %struct.parsed_op* %1, i32* %2, i8* %3)
ret void
}
double iColorReconstruct(unsigned char value) {
  if (value <= 0)
    return 0.0;
  if (value >= 255)
    return 1.0;
  return (((double)value + 0.5) / 256.0);
}


x86 assembly (clang, -O0):
<iColorReconstruct>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jg     1124 <iColorReconstruct+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116a <iColorReconstruct+0x6a>
movzbl -0x9(%rbp),%eax
cmp    $0xff,%eax
jl     1145 <iColorReconstruct+0x45>
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116a <iColorReconstruct+0x6a>
movzbl -0x9(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<iColorReconstruct>:
test   %edi,%edi
je     1113 <iColorReconstruct+0x13>
cmp    $0xff,%dil
jne    1117 <iColorReconstruct+0x17>
movsd  0xeee(%rip),%xmm0
ret
xorps  %xmm0,%xmm0
ret
movzbl %dil,%eax
cvtsi2sd %eax,%xmm0
addsd  0xee1(%rip),%xmm0
mulsd  0xee1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @iColorReconstruct(i8 zeroext %0) {
%2 = alloca double
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store double 0.000000e+00, double* %2
br label %18
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp sge i32 %10, 255
br i1 %11, label %12, label %13
12: ; preds = %8
store double 1.000000e+00, double* %2
br label %18
13: ; preds = %8
%14 = load i8, i8* %3
%15 = uitofp i8 %14 to double
%16 = fadd double %15, 5.000000e-01
%17 = fdiv double %16, 2.560000e+02
store double %17, double* %2
br label %18
18: ; preds = %13, %12, %7
%19 = load double, double* %2
ret double %19
}

LLVM IR (-O2):
define double @iColorReconstruct(i8 zeroext %0) {
switch i8 %0, label %3 [
i8 0, label %7
i8 -1, label %2
]
2: ; preds = %1
br label %7
3: ; preds = %1
%4 = uitofp i8 %0 to double
%5 = fadd double %4, 5.000000e-01
%6 = fmul double %5, 3.906250e-03
br label %7
7: ; preds = %1, %3, %2
%8 = phi double [ 1.000000e+00, %2 ], [ %6, %3 ], [ 0.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_gpio_fsel(int, int);
int /*<<< orphan*/ bcm2835_gpio_write(int, int);
scalar_t__ bcm2835_init();
int MMA8491Q_Enable() {
  if (bcm2835_init() == 0) {
    return 1;
  } else {
    bcm2835_gpio_fsel(25, 1);
    bcm2835_gpio_write(25, 1);
    return 0;
  }
}


x86 assembly (clang, -O0):
<MMA8491Q_Enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <bcm2835_init@plt>
cmp    $0x0,%rax
jne    1155 <MMA8491Q_Enable+0x25>
movl   $0x1,-0x4(%rbp)
jmp    117a <MMA8491Q_Enable+0x4a>
mov    $0x19,%edi
mov    $0x1,%esi
call   1040 <bcm2835_gpio_fsel@plt>
mov    $0x19,%edi
mov    $0x1,%esi
call   1030 <bcm2835_gpio_write@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMA8491Q_Enable>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <bcm2835_init@plt>
test   %rax,%rax
je     115f <MMA8491Q_Enable+0x2f>
mov    $0x19,%edi
mov    $0x1,%esi
call   1040 <bcm2835_gpio_fsel@plt>
mov    $0x19,%edi
mov    $0x1,%esi
call   1030 <bcm2835_gpio_write@plt>
jmp    1164 <MMA8491Q_Enable+0x34>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @MMA8491Q_Enable() {
%1 = alloca i32
%2 = call i64 (...) @bcm2835_init()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 1, i32* %1
br label %8
5: ; preds = %0
%6 = call i32 @bcm2835_gpio_fsel(i32 25, i32 1)
%7 = call i32 @bcm2835_gpio_write(i32 25, i32 1)
store i32 0, i32* %1
br label %8
8: ; preds = %5, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @MMA8491Q_Enable() {
%1 = tail call i64 (...) @bcm2835_init()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 @bcm2835_gpio_fsel(i32 25, i32 1)
%5 = tail call i32 @bcm2835_gpio_write(i32 25, i32 1)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *);
int /*<<< orphan*/ Label_Printf(char *);
void Dico_Long_Start(int nb_longs) {
  Label_Printf(".section\t.sdata");
  Inst_Printf(".align", "3");
}


x86 assembly (clang, -O0):
<Dico_Long_Start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <Label_Printf@plt>
lea    0xed2(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dico_Long_Start>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <Label_Printf@plt>
lea    0xedc(%rip),%rdi
lea    0xedc(%rip),%rsi
pop    %rax
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c".section\09.sdata\00"
@.str.1 = [7 x i8] c".align\00"
@.str.2 = [2 x i8] c"3\00"
define void @Dico_Long_Start(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @Label_Printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c".section\09.sdata\00"
@.str.1 = [7 x i8] c".align\00"
@.str.2 = [2 x i8] c"3\00"
define void @Dico_Long_Start(i32 %0) {
%2 = tail call i32 @Label_Printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned long, unsigned long);
char *util_print_time(unsigned long t) {
  static char s[40];
  (void)sprintf(s, "%lu.%02lu sec", t / 1000, (t % 1000) / 10);
  return s;
}


x86 assembly (clang, -O0):
<util_print_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0x2ee9(%rip),%rdi
lea    0xea2(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ed6(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_print_time>:
push   %rbx
mov    %rdi,%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
shr    $0x4,%rdx
imul   $0x3e8,%edx,%eax
sub    %eax,%edi
imul   $0xcccd,%edi,%ecx
shr    $0x13,%ecx
lea    0x2eff(%rip),%rbx
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@util_print_time.s = internal global [40 x i8] zeroinitializer
@.str = [14 x i8] c"%lu.%02lu sec\00"
define i8* @util_print_time(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = udiv i64 %3, 1000
%5 = load i64, i64* %2
%6 = urem i64 %5, 1000
%7 = udiv i64 %6, 10
%8 = call i32 @sprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @util_print_time.s, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %4, i64 %7)
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @util_print_time.s, i64 0, i64 0)
}

LLVM IR (-O2):
@util_print_time.s = internal global [40 x i8] zeroinitializer
@.str = [14 x i8] c"%lu.%02lu sec\00"
define i8* @util_print_time(i64 %0) {
%2 = udiv i64 %0, 1000
%3 = urem i64 %0, 1000
%4 = trunc i64 %3 to i16
%5 = udiv i16 %4, 10
%6 = zext i16 %5 to i64
%7 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @util_print_time.s, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %2, i64 %6)
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @util_print_time.s, i64 0, i64 0)
}
int init_profile() { return 1; }


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

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

LLVM IR (-O0):
define i32 @init_profile() {
ret i32 1
}

LLVM IR (-O2):
define i32 @init_profile() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ tell(char *);
void usage(void) {
  tell("Usage: loadfont fontfile\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <tell@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <tell@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: loadfont fontfile\0A\00"
define void @usage() {
%1 = call i32 @tell(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [26 x i8] c"Usage: loadfont fontfile\0A\00"
define void @usage() {
%1 = tail call i32 @tell(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int *, int);
int *memory_alloc(long, char *, int);
void *adt_copy_int(const void *data) {
  int *data2;
  ((data2) = memory_alloc((long)sizeof *(data2),
                          "/scratch/repos/new/home/jordi_armengol_estape/"
                          "c-scraper/outputs/2022-01-22/02-19-57/repos/"
                          "Jianlong-Peng/myADT/refs/heads/master/src/mtools.c",
                          29));
  memcpy(data2, (int *)data, sizeof(int));
  return (void *)data2;
}


x86 assembly (clang, -O0):
<adt_copy_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
lea    0xec8(%rip),%rsi
mov    $0x1d,%edx
call   1030 <memory_alloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adt_copy_int>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
mov    $0x4,%edi
mov    $0x1d,%edx
call   1030 <memory_alloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Jianlong-Peng/myADT/refs/heads/master/src/mtools.c\00"
define i8* @adt_copy_int(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32* @memory_alloc(i64 4, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 29)
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i32*
%8 = call i32 @memcpy(i32* %5, i32* %7, i32 4)
%9 = load i32*, i32** %3
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Jianlong-Peng/myADT/refs/heads/master/src/mtools.c\00"
define i8* @adt_copy_int(i8* %0) {
%2 = tail call i32* @memory_alloc(i64 4, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 29)
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @memcpy(i32* %2, i32* %3, i32 4)
%5 = bitcast i32* %2 to i8*
ret i8* %5
}
double lr_log_likelihood_from_deviance(double deviance, double likesat) {
  return likesat - (0.5 * deviance);
}


x86 assembly (clang, -O0):
<lr_log_likelihood_from_deviance>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xee0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @lr_log_likelihood_from_deviance(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %6, double %5)
ret double %7
}

LLVM IR (-O2):
define double @lr_log_likelihood_from_deviance(double %0, double %1) {
%3 = tail call double @llvm.fmuladd.f64(double %0, double -5.000000e-01, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ detect_cpu();
int showCPUinfo() {
  detect_cpu();
  return 1;
}


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

x86 assembly (clang, -O2):
<showCPUinfo>:
push   %rax
xor    %eax,%eax
call   1030 <detect_cpu@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @showCPUinfo() {
%1 = tail call i32 (...) @detect_cpu()
ret i32 1
}
unsigned char ZIP_FFS32(unsigned int v) {
  unsigned int t = 1;
  unsigned char r = 1;
  if (v == 0)
    return 0;
  while ((v & t) == 0) {
    t = t << 1;
    r++;
  }
  return r;
}


x86 assembly (clang, -O0):
<ZIP_FFS32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movb   $0x1,-0xd(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1125 <ZIP_FFS32+0x25>
movb   $0x0,-0x1(%rbp)
jmp    1155 <ZIP_FFS32+0x55>
jmp    112a <ZIP_FFS32+0x2a>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
jne    114f <ZIP_FFS32+0x4f>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xd(%rbp),%al
add    $0x1,%al
mov    %al,-0xd(%rbp)
jmp    112a <ZIP_FFS32+0x2a>
mov    -0xd(%rbp),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZIP_FFS32>:
test   %edi,%edi
je     1129 <ZIP_FFS32+0x29>
mov    $0x1,%al
test   $0x1,%dil
jne    1128 <ZIP_FFS32+0x28>
mov    $0x1,%ecx
mov    $0x1,%al
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    %ecx,%ecx
add    $0x1,%al
test   %edi,%ecx
je     1120 <ZIP_FFS32+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @ZIP_FFS32(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3, %6
%7 = phi i8 [ %10, %6 ], [ 1, %3 ]
%8 = phi i32 [ %9, %6 ], [ 1, %3 ]
%9 = shl i32 %8, 1
%10 = add i8 %7, 1
%11 = and i32 %9, %0
%12 = icmp eq i32 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %6, %3, %1
%14 = phi i8 [ 0, %1 ], [ 1, %3 ], [ %10, %6 ]
ret i8 %14
}
int nIsSort(int *s, int n) {
  for (int i = 1; i < n; i++) {
    if (s[i - 1] > s[i]) {
      return i;
    }
  }
  return (-1);
}


x86 assembly (clang, -O0):
<nIsSort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115d <nIsSort+0x5d>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jle    114a <nIsSort+0x4a>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <nIsSort+0x64>
jmp    114f <nIsSort+0x4f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <nIsSort+0x12>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nIsSort>:
mov    $0xffffffff,%eax
cmp    $0x2,%esi
jl     1132 <nIsSort+0x32>
mov    %esi,%r8d
mov    (%rdi),%esi
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %esi,%ecx
mov    (%rdi,%rdx,4),%esi
cmp    %esi,%ecx
jg     1133 <nIsSort+0x33>
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1120 <nIsSort+0x20>
ret
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @nIsSort(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 1, i32* %6
br label %7
7: ; preds = %27, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %30
11: ; preds = %7
%12 = load i32*, i32** %4
%13 = load i32, i32* %6
%14 = sub nsw i32 %13, 1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %12, i64 %15
%17 = load i32, i32* %16
%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 = icmp sgt i32 %17, %22
br i1 %23, label %24, label %26
24: ; preds = %11
%25 = load i32, i32* %6
store i32 %25, i32* %3
br label %31
26: ; preds = %11
br label %27
27: ; preds = %26
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %7
30: ; preds = %7
store i32 -1, i32* %3
br label %31
31: ; preds = %30, %24
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @nIsSort(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %18
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = load i32, i32* %0
br label %7
7: ; preds = %4, %13
%8 = phi i32 [ %6, %4 ], [ %11, %13 ]
%9 = phi i64 [ 1, %4 ], [ %14, %13 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp sgt i32 %8, %11
br i1 %12, label %16, label %13
13: ; preds = %7
%14 = add nuw nsw i64 %9, 1
%15 = icmp eq i64 %14, %5
br i1 %15, label %18, label %7
16: ; preds = %7
%17 = trunc i64 %9 to i32
br label %18
18: ; preds = %13, %16, %2
%19 = phi i32 [ -1, %2 ], [ %17, %16 ], [ -1, %13 ]
ret i32 %19
}
/* Variables and functions */
int LZ5_decompress_usingDict_generic(char const *, char *, int /*<<< orphan*/,
                                     int, int /*<<< orphan*/, char const *,
                                     int);
int LZ5_decompress_fast_usingDict(const char *source, char *dest,
                                  int originalSize, const char *dictStart,
                                  int dictSize) {
  return LZ5_decompress_usingDict_generic(source, dest, 0, originalSize, 0,
                                          dictStart, dictSize);
}


x86 assembly (clang, -O0):
<LZ5_decompress_fast_usingDict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r9
mov    -0x24(%rbp),%eax
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %eax,(%rsp)
call   1030 <LZ5_decompress_usingDict_generic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ5_decompress_fast_usingDict>:
push   %rax
mov    %rcx,%r9
mov    %edx,%ecx
mov    %r8d,(%rsp)
xor    %edx,%edx
xor    %r8d,%r8d
call   1030 <LZ5_decompress_usingDict_generic@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @LZ5_decompress_fast_usingDict(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @LZ5_decompress_usingDict_generic(i8* %0, i8* %1, i32 0, i32 %2, i32 0, i8* %3, i32 %4)
ret i32 %6
}
/* Type definitions */
struct test_series {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct test_series *);
void test_destroy(struct test_series *test) { free(test); }


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

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

LLVM IR (-O0):
%struct.test_series = type { i32 }
define void @test_destroy(%struct.test_series* %0) {
%2 = alloca %struct.test_series*
store %struct.test_series* %0, %struct.test_series** %2
%3 = load %struct.test_series*, %struct.test_series** %2
%4 = call i32 @free(%struct.test_series* %3)
ret void
}

LLVM IR (-O2):
%struct.test_series = type { i32 }
define void @test_destroy(%struct.test_series* nocapture %0) {
%2 = tail call i32 @free(%struct.test_series* %0)
ret void
}
/* Variables and functions */
int test5() { halt2(), (void)1; }


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <halt2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test5() {
%1 = alloca i32
%2 = call i32 (...) @halt2()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @test5() {
%1 = tail call i32 (...) @halt2()
ret i32 undef
}
/* Type definitions */
struct edo_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ edo_cmdline_parser_release(struct edo_args_info *);
void edo_cmdline_parser_free(struct edo_args_info *args_info) {
  edo_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<edo_cmdline_parser_free>:
jmp    1030 <edo_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.edo_args_info = type { i32 }
define void @edo_cmdline_parser_free(%struct.edo_args_info* %0) {
%2 = alloca %struct.edo_args_info*
store %struct.edo_args_info* %0, %struct.edo_args_info** %2
%3 = load %struct.edo_args_info*, %struct.edo_args_info** %2
%4 = call i32 @edo_cmdline_parser_release(%struct.edo_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.edo_args_info = type { i32 }
define void @edo_cmdline_parser_free(%struct.edo_args_info* %0) {
%2 = tail call i32 @edo_cmdline_parser_release(%struct.edo_args_info* %0)
ret void
}