xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ usleep(int);
void foo(void) {
  usleep(5000);
  bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1388,%edi
call   1040 <usleep@plt>
mov    $0x0,%al
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
mov    $0x1388,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i32 @usleep(i32 5000)
%2 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 @usleep(i32 5000)
%2 = tail call i32 (...) @bar()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_mov_Rn(FILE *stream, unsigned char n) {
  fprintf(stream, "MOV   A, R%X                     ", n);
}


x86 assembly (clang, -O0):
<fprint_mov_Rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_mov_Rn>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"MOV A, R%X \00"
define void @fprint_mov_Rn(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOV A, R%X \00"
define void @fprint_mov_Rn(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
void CRYPTO_free_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_free_ex_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_version(void) {
  printf("gzip compression program v"
         "0.8"
         "\n"
         "Copyright 2016 Eric Biggers\n"
         "\n"
         "This program is free software which may be modified and/or "
         "redistributed\n"
         "under the terms of the MIT license.  There is NO WARRANTY, to the "
         "extent\n"
         "permitted by law.  See the COPYING file for details.\n");
}


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

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

LLVM IR (-O0):
@.str = [259 x i8] c"gzip compression program v0.8\0ACopyright 2016 Eric Biggers\0A\0AThis program is free software which may be modified and/or redistributed\0Aunder the terms of the MIT license. There is NO WARRANTY, to the extent\0Apermitted by law. See the COPYING file for details.\0A\00"
define void @show_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([259 x i8], [259 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [258 x i8] c"gzip compression program v0.8\0ACopyright 2016 Eric Biggers\0A\0AThis program is free software which may be modified and/or redistributed\0Aunder the terms of the MIT license. There is NO WARRANTY, to the extent\0Apermitted by law. See the COPYING file for details.\00"
define void @show_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([258 x i8], [258 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void put_string(const char *s) {
  while (*s)
    putchar(*s++);
}


x86 assembly (clang, -O0):
<put_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <put_string+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111c <put_string+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <put_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <put_string+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @put_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @putchar(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @put_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int array_cb(void *arg, unsigned size, void *dummy, void *data) {
  unsigned *total = arg;
  *total += size;
  return 0;
}


x86 assembly (clang, -O0):
<array_cb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x28(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_cb>:
add    %esi,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @array_cb(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to i32*
store i32* %11, i32** %9
%12 = load i32, i32* %6
%13 = load i32*, i32** %9
%14 = load i32, i32* %13
%15 = add i32 %14, %12
store i32 %15, i32* %13
ret i32 0
}

LLVM IR (-O2):
define i32 @array_cb(i8* nocapture %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
%7 = add i32 %6, %1
store i32 %7, i32* %5
ret i32 0
}
/* Variables and functions */
double EvalAngDist_p0_2plus_12minus_14926_L3(double);
double funcAngDist_p0_2plus_12minus_14926_L3(double *x, double *par) {
  double result;
  result = par[0] * EvalAngDist_p0_2plus_12minus_14926_L3(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngDist_p0_2plus_12minus_14926_L3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngDist_p0_2plus_12minus_14926_L3@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngDist_p0_2plus_12minus_14926_L3>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngDist_p0_2plus_12minus_14926_L3@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngDist_p0_2plus_12minus_14926_L3(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngDist_p0_2plus_12minus_14926_L3(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngDist_p0_2plus_12minus_14926_L3(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngDist_p0_2plus_12minus_14926_L3(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ list_devices();
scalar_t__ strcasecmp(char *, char *);
void interpret_command(char *cmd) {
  if (strcasecmp(cmd, "/l") == 0) {
    list_devices();
  }
}


x86 assembly (clang, -O0):
<interpret_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    114d <interpret_command+0x2d>
mov    $0x0,%al
call   1040 <list_devices@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpret_command>:
push   %rax
lea    0xed8(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     1134 <interpret_command+0x14>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <list_devices@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"/l\00"
define void @interpret_command(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcasecmp(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @list_devices()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"/l\00"
define void @interpret_command(i8* nocapture %0) {
%2 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @list_devices()
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ list_replace(struct list_head *, struct list_head *);
void list_replace_init(struct list_head *old, struct list_head *__new) {
  list_replace(old, __new);
  INIT_LIST_HEAD(old);
}


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

x86 assembly (clang, -O2):
<list_replace_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_replace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %4
%7 = call i32 @list_replace(%struct.list_head* %5, %struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @INIT_LIST_HEAD(%struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_replace(%struct.list_head* %0, %struct.list_head* %1)
%4 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
ret void
}
double distance(double x0, double y0, double x1, double y1, double x2,
                double y2) {
  return ((x1 - x0) * (y2 - y0)) - ((y1 - y0) * (x2 - x0));
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm3
subsd  -0x8(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm5
mulsd  %xmm2,%xmm5
subsd  %xmm1,%xmm3
subsd  %xmm0,%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm4,%xmm5
movapd %xmm5,%xmm0
ret

LLVM IR (-O0):
define double @distance(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %9
%14 = load double, double* %7
%15 = fsub double %13, %14
%16 = load double, double* %12
%17 = load double, double* %8
%18 = fsub double %16, %17
%19 = load double, double* %10
%20 = load double, double* %8
%21 = fsub double %19, %20
%22 = load double, double* %11
%23 = load double, double* %7
%24 = fsub double %22, %23
%25 = fmul double %21, %24
%26 = fneg double %25
%27 = call double @llvm.fmuladd.f64(double %15, double %18, double %26)
ret double %27
}

LLVM IR (-O2):
define double @distance(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fsub double %2, %0
%8 = fsub double %5, %1
%9 = fsub double %3, %1
%10 = fsub double %4, %0
%11 = fneg double %9
%12 = fmul double %10, %11
%13 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %12)
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ arr;

/* Variables and functions */
int fibMonaccianSearch(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int arr[] = {10, 22, 35, 40, 45, 50, 80, 82, 85, 90, 100};
  int n = sizeof(arr) / sizeof(arr[0]);
  int x = 85;
  printf("Found at index: %d", fibMonaccianSearch(arr, x, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x2c,%edx
call   1040 <memcpy@plt>
movl   $0xb,-0x34(%rbp)
movl   $0x55,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    -0x34(%rbp),%edx
call   1050 <fibMonaccianSearch@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x55,%esi
mov    $0xb,%edx
call   1040 <fibMonaccianSearch@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [11 x i32] [i32 10, i32 22, i32 35, i32 40, i32 45, i32 50, i32 80, i32 82, i32 85, i32 90, i32 100]
@.str = [19 x i8] c"Found at index: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [11 x i32]* %2 to i8*
store i32 11, i32* %3
store i32 85, i32* %4
%6 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 0
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = call i32 @fibMonaccianSearch(i32* %6, i32 %7, i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [11 x i32] [i32 10, i32 22, i32 35, i32 40, i32 45, i32 50, i32 80, i32 82, i32 85, i32 90, i32 100]
@.str = [19 x i8] c"Found at index: %d\00"
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @fibMonaccianSearch(i32* %3, i32 85, i32 11)
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ROT13(char *);
int /*<<< orphan*/ scanf(char *, char *);
void dec(char decr[600]) {
  scanf("%600s", decr);
  ROT13(decr);
}


x86 assembly (clang, -O0):
<dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ROT13@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <ROT13@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%600s\00"
define void @dec(i8* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @ROT13(i8* %0)
ret void
}
int rng_rand(int *mystate) {
  int n, l, lp, *reg;
  l = mystate[1];
  lp = mystate[6];
  reg = &(mystate[(9 + l - 1)]);
  n = (reg[lp] >> 1) & 0x7fffffff;
  return n;
}


x86 assembly (clang, -O0):
<rng_rand>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x9,%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sar    $0x1,%eax
and    $0x7fffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rng_rand>:
movslq 0x4(%rdi),%rax
movslq 0x18(%rdi),%rcx
lea    (%rdi,%rax,4),%rax
mov    0x20(%rax,%rcx,4),%eax
shr    %eax
ret

LLVM IR (-O0):
define i32 @rng_rand(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32* %0, i32** %2
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
store i32 %9, i32* %4
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 6
%12 = load i32, i32* %11
store i32 %12, i32* %5
%13 = load i32*, i32** %2
%14 = load i32, i32* %4
%15 = add nsw i32 9, %14
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %13, i64 %17
store i32* %18, i32** %6
%19 = load i32*, i32** %6
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = load i32, i32* %22
%24 = ashr i32 %23, 1
%25 = and i32 %24, 2147483647
store i32 %25, i32* %3
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @rng_rand(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 6
%5 = load i32, i32* %4
%6 = add nsw i32 %3, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = sext i32 %5 to i64
%10 = getelementptr inbounds i32, i32* %8, i64 %9
%11 = load i32, i32* %10
%12 = lshr i32 %11, 1
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ luaL_check_lstr(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ pushresult(int);
scalar_t__ remove(int /*<<< orphan*/);
void io_remove(void) { pushresult(remove((luaL_check_lstr((1), NULL))) == 0); }


x86 assembly (clang, -O0):
<io_remove>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <luaL_check_lstr@plt>
mov    %eax,%edi
call   1030 <remove@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <pushresult@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_remove>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <luaL_check_lstr@plt>
mov    %eax,%edi
call   1030 <remove@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1040 <pushresult@plt>

LLVM IR (-O0):
define void @io_remove() {
%1 = call i32 @luaL_check_lstr(i32 1, i32* null)
%2 = call i64 @remove(i32 %1)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
%5 = call i32 @pushresult(i32 %4)
ret void
}

LLVM IR (-O2):
define void @io_remove() {
%1 = tail call i32 @luaL_check_lstr(i32 1, i32* null)
%2 = tail call i64 @remove(i32 %1)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @pushresult(i32 %4)
ret void
}
/* Variables and functions */
int invert_matrix(size_t, double const *, double *);
int /*<<< orphan*/ mmv(size_t, size_t, double *, double const *, double *);
int lsolve(size_t n, const double *c, const double y[], double x[],
           double ci[]) {
  int status;
  if ((status = invert_matrix(n, c, ci)) != 0) {
  } else {
    mmv(n, n, ci, y, x);
  }
  return status;
}


x86 assembly (clang, -O0):
<lsolve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <invert_matrix@plt>
mov    %eax,-0x2c(%rbp)
cmp    $0x0,%eax
je     115e <lsolve+0x3e>
jmp    1177 <lsolve+0x57>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
call   1040 <mmv@plt>
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsolve>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%r12
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rdi,%rbx
mov    %r8,%rdx
call   1030 <invert_matrix@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1156 <lsolve+0x36>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
call   1040 <mmv@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @lsolve(i64 %0, double* %1, double* %2, double* %3, double* %4) {
%6 = tail call i32 @invert_matrix(i64 %0, double* %1, double* %4)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @mmv(i64 %0, i64 %0, double* %4, double* %2, double* %3)
br label %10
10: ; preds = %5, %8
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ iconv_t;

/* Variables and functions */
int /*<<< orphan*/ iconv_open(char *, char *);
int main(void) {
  iconv_t ret;
  ret = iconv_open("utf8", "ascii");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"utf8\00"
@.str.1 = [6 x i8] c"ascii\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @iconv_open(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
store i32 %3, i32* %2
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"utf8\00"
@.str.1 = [6 x i8] c"ascii\00"
define i32 @main() {
%1 = tail call i32 @iconv_open(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void deallocate_LearnerInfo(struct LearnerInfo *v) {}


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

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

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

LLVM IR (-O2):
%struct.LearnerInfo = type opaque
define void @deallocate_LearnerInfo(%struct.LearnerInfo* nocapture %0) {
ret void
}
void mdp4_overlay_dtv_set_perf(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_overlay_dtv_set_perf(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *zalloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr)
    memset(ptr, 0, size);
  return ptr;
}


x86 assembly (clang, -O0):
<zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <zalloc+0x33>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <zalloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @zalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i64, i64* %2
%11 = call i32 @memset(i8* %9, i32 0, i64 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @zalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
typedef scalar_t__ GLint;
typedef int /*<<< orphan*/ GLboolean;

/* Variables and functions */
int /*<<< orphan*/ GL_FALSE;
int /*<<< orphan*/ GL_TRUE;
GLboolean isLegalLevels(GLint userLevel, GLint baseLevel, GLint maxLevel,
                        GLint totalLevels) {
  if (baseLevel < 0 || baseLevel < userLevel || maxLevel < baseLevel ||
      totalLevels < maxLevel)
    return GL_FALSE;
  else
    return GL_TRUE;
}


x86 assembly (clang, -O0):
<isLegalLevels>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x18(%rbp)
jl     1149 <isLegalLevels+0x49>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jl     1149 <isLegalLevels+0x49>
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jl     1149 <isLegalLevels+0x49>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    115a <isLegalLevels+0x5a>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1166 <isLegalLevels+0x66>
mov    0x2e77(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLegalLevels>:
mov    0x2ee1(%rip),%r8
mov    %r8,%rax
cmp    %rdx,%rcx
jl     1116 <isLegalLevels+0x16>
mov    0x2ec2(%rip),%rax
cmp    %rsi,%rdx
cmovl  %r8,%rax
cmp    %rdi,%rsi
cmovl  %r8,%rax
test   %rsi,%rsi
cmovs  %r8,%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@GL_FALSE = global i32 0
@GL_TRUE = global i32 0
define i32 @isLegalLevels(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp slt i64 %1, 0
%6 = icmp slt i64 %1, %0
%7 = or i1 %5, %6
%8 = icmp slt i64 %2, %1
%9 = or i1 %7, %8
%10 = icmp slt i64 %3, %2
%11 = or i1 %9, %10
%12 = load i32, i32* @GL_FALSE
%13 = load i32, i32* @GL_TRUE
%14 = select i1 %11, i32 %12, i32 %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char const *, int);
void clear_screen(void) {
  if (1) {
    const char *ansi = "\e[1;1H\e[2J\n";
    write(STDOUT_FILENO, ansi, 12);
  }
}


x86 assembly (clang, -O0):
<clear_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    $0xc,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_screen>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0xc,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\1B[1;1H\1B[2J\0A\00"
@STDOUT_FILENO = global i32 0
define void @clear_screen() {
%1 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i32, i32* @STDOUT_FILENO
%3 = load i8*, i8** %1
%4 = call i32 @write(i32 %2, i8* %3, i32 12)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\1B[1;1H\1B[2J\0A\00"
@STDOUT_FILENO = global i32 0
define void @clear_screen() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 12)
ret void
}
/* Variables and functions */
int write(int, void const *, size_t);
int fd_write(int fd, const void *buf, size_t n) {
  int nwrite;
  nwrite = write(fd, buf, n);
  if (nwrite == -1)
    return -2;
  return nwrite;
}


x86 assembly (clang, -O0):
<fd_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    114c <fd_write+0x3c>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1152 <fd_write+0x42>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_write>:
push   %rax
call   1030 <write@plt>
cmp    $0xffffffff,%eax
mov    $0xfffffffe,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fd_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, -1
%6 = select i1 %5, i32 -2, i32 %4
ret i32 %6
}
const char *strprefix(const char *str, const char *prefix) {
  while (*prefix) {
    if (!(*str && *str == *prefix))
      return 0;
    prefix++;
    str++;
  }
  return str;
}


x86 assembly (clang, -O0):
<strprefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1169 <strprefix+0x69>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113f <strprefix+0x3f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     114c <strprefix+0x4c>
movq   $0x0,-0x8(%rbp)
jmp    1171 <strprefix+0x71>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strprefix+0xc>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strprefix>:
mov    (%rsi),%cl
test   %cl,%cl
je     1133 <strprefix+0x33>
add    $0x1,%rsi
nopw   0x0(%rax,%rax,1)
movzbl (%rdi),%edx
test   %dl,%dl
je     1137 <strprefix+0x37>
mov    $0x0,%eax
cmp    %cl,%dl
jne    1132 <strprefix+0x32>
add    $0x1,%rdi
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %rdi,%rax
test   %cl,%cl
jne    1110 <strprefix+0x10>
ret
mov    %rdi,%rax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strprefix(i8* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %13
%6 = phi i8 [ %16, %13 ], [ %3, %2 ]
%7 = phi i8* [ %14, %13 ], [ %1, %2 ]
%8 = phi i8* [ %15, %13 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
%11 = icmp eq i8 %9, %6
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = getelementptr inbounds i8, i8* %7, i64 1
%15 = getelementptr inbounds i8, i8* %8, i64 1
%16 = load i8, i8* %14
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %5, %13, %2
%19 = phi i8* [ %0, %2 ], [ %15, %13 ], [ null, %5 ]
ret i8* %19
}
/* Variables and functions */
int /*<<< orphan*/ PrintFromalib();
int /*<<< orphan*/ PrintFromalib2();
int /*<<< orphan*/ PrintHello();
int main() {
  PrintHello();
  PrintFromalib();
  PrintFromalib2();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @PrintHello()
%2 = tail call i32 (...) @PrintFromalib()
%3 = tail call i32 (...) @PrintFromalib2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_dl_free_symbolic(void **);
void umf4fsym_(void **Symbolic) { umfpack_dl_free_symbolic(Symbolic); }


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

x86 assembly (clang, -O2):
<umf4fsym_>:
jmp    1030 <umfpack_dl_free_symbolic@plt>

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

LLVM IR (-O2):
define void @umf4fsym_(i8** %0) {
%2 = tail call i32 @umfpack_dl_free_symbolic(i8** %0)
ret void
}
void cdrof3(ifilcd, idum) int *ifilcd;
int *idum;
{ cdrofs(ifilcd); }


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

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

LLVM IR (-O0):
define void @cdrof3(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 = call i32 (i32*, ...) bitcast (i32 (...)* @cdrofs to i32 (i32*, ...)*)(i32* %5)
ret void
}

LLVM IR (-O2):
define void @cdrof3(i32* %0, i32* nocapture readnone %1) {
%3 = tail call i32 (i32*, ...) bitcast (i32 (...)* @cdrofs to i32 (i32*, ...)*)(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(void *, int, size_t, int /*<<< orphan*/ *);
size_t CK_Cross_freadInt32LE(void *ptr, size_t count, FILE *stream) {
  count = fread(ptr, 4, count, stream);
  return count;
}


x86 assembly (clang, -O0):
<CK_Cross_freadInt32LE>:
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),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x4,%esi
call   1030 <fread@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CK_Cross_freadInt32LE>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x4,%esi
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i64 @CK_Cross_freadInt32LE(i8* nocapture %0, i64 %1, i32* nocapture %2) {
%4 = tail call i64 @fread(i8* %0, i32 4, i64 %1, i32* %2)
ret i64 %4
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t __bswap_64(uint64_t x) {
  return (
      ((x & 0xff00000000000000ULL) >> 56) |
      ((x & 0x00ff000000000000ULL) >> 40) |
      ((x & 0x0000ff0000000000ULL) >> 24) | ((x & 0x000000ff00000000ULL) >> 8) |
      ((x & 0x00000000ff000000ULL) << 8) | ((x & 0x0000000000ff0000ULL) << 24) |
      ((x & 0x000000000000ff00ULL) << 40) |
      ((x & 0x00000000000000ffULL) << 56));
}


x86 assembly (clang, -O0):
<__bswap_64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xff00000000000000,%rcx
and    %rcx,%rax
shr    $0x38,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000000000,%rdx
and    %rdx,%rcx
shr    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff0000000000,%rdx
and    %rdx,%rcx
shr    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000,%rdx
and    %rdx,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000,%rdx
and    %rdx,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
and    $0xff0000,%rcx
shl    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
and    $0xff,%rcx
shl    $0x38,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bswap_64>:
movslq %edi,%rax
bswap  %rax
ret

LLVM IR (-O0):
define i32 @__bswap_64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, -72057594037927936
%6 = lshr i64 %5, 56
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = and i64 %8, 71776119061217280
%10 = lshr i64 %9, 40
%11 = or i64 %6, %10
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = and i64 %13, 280375465082880
%15 = lshr i64 %14, 24
%16 = or i64 %11, %15
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = and i64 %18, 1095216660480
%20 = lshr i64 %19, 8
%21 = or i64 %16, %20
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = and i64 %23, 4278190080
%25 = shl i64 %24, 8
%26 = or i64 %21, %25
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = and i64 %28, 16711680
%30 = shl i64 %29, 24
%31 = or i64 %26, %30
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = and i64 %33, 65280
%35 = shl i64 %34, 40
%36 = or i64 %31, %35
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = and i64 %38, 255
%40 = shl i64 %39, 56
%41 = or i64 %36, %40
%42 = trunc i64 %41 to i32
ret i32 %42
}

LLVM IR (-O2):
define i32 @__bswap_64(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i64 @llvm.bswap.i64(i64 %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
int CharsCount(char *string) {
  int count = 0;
  while ((*string)) {
    count++;
    string++;
  }
  return count;
}


x86 assembly (clang, -O0):
<CharsCount>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1136 <CharsCount+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <CharsCount+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharsCount>:
cmpb   $0x0,(%rdi)
je     111c <CharsCount+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <CharsCount+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @CharsCount(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @CharsCount(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ emsSetl(char const *, int);
void msgSetl(const char *token, int lvalue) { emsSetl(token, lvalue); }


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

x86 assembly (clang, -O2):
<msgSetl>:
jmp    1030 <emsSetl@plt>

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

LLVM IR (-O2):
define void @msgSetl(i8* %0, i32 %1) {
%3 = tail call i32 @emsSetl(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SetScl(int);
int /*<<< orphan*/ SetSda(int);
void MasterAck(void) {
  SetSda(0);
  SetScl(1);
  SetScl(0);
  SetSda(1);
}


x86 assembly (clang, -O0):
<MasterAck>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <SetSda@plt>
mov    $0x1,%edi
call   1040 <SetScl@plt>
xor    %edi,%edi
call   1040 <SetScl@plt>
mov    $0x1,%edi
call   1030 <SetSda@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MasterAck>:
push   %rax
xor    %edi,%edi
call   1030 <SetSda@plt>
mov    $0x1,%edi
call   1040 <SetScl@plt>
xor    %edi,%edi
call   1040 <SetScl@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <SetSda@plt>

LLVM IR (-O0):
define void @MasterAck() {
%1 = call i32 @SetSda(i32 0)
%2 = call i32 @SetScl(i32 1)
%3 = call i32 @SetScl(i32 0)
%4 = call i32 @SetSda(i32 1)
ret void
}

LLVM IR (-O2):
define void @MasterAck() {
%1 = tail call i32 @SetSda(i32 0)
%2 = tail call i32 @SetScl(i32 1)
%3 = tail call i32 @SetScl(i32 0)
%4 = tail call i32 @SetSda(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_alarm;
unsigned int syscall_1(int /*<<< orphan*/, long);
unsigned int alarm(unsigned int seconds) {
  unsigned int ret;
  ret = syscall_1(SYS_alarm, ((long)seconds));
  return ret;
}


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

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

LLVM IR (-O0):
@SYS_alarm = global i32 0
define i32 @alarm(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @SYS_alarm
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = call i32 @syscall_1(i32 %4, i64 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
@SYS_alarm = global i32 0
define i32 @alarm(i32 %0) {
%2 = load i32, i32* @SYS_alarm
%3 = zext i32 %0 to i64
%4 = tail call i32 @syscall_1(i32 %2, i64 %3)
ret i32 %4
}