xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
double *malloc(int);
double *Obj_double_create(double const inVal) {
  double *const retVal = malloc(sizeof *retVal);
  assert(retVal != NULL);
  *retVal = inVal;
  return retVal;
}


x86 assembly (clang, -O0):
<Obj_double_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Obj_double_create>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x8,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double* @Obj_double_create(double %0) {
%2 = alloca double
%3 = alloca double*
store double %0, double* %2
%4 = call double* @malloc(i32 8)
store double* %4, double** %3
%5 = load double*, double** %3
%6 = icmp ne double* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load double, double* %2
%10 = load double*, double** %3
store double %9, double* %10
%11 = load double*, double** %3
ret double* %11
}

LLVM IR (-O2):
define noalias double* @Obj_double_create(double %0) {
%2 = tail call double* @malloc(i32 8)
%3 = icmp ne double* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
store double %0, double* %2
ret double* %2
}
/* Variables and functions */
int /*<<< orphan*/ print_letters(char *);
void print_arguments(int argc, char **argv) {
  int i;
  for (i = 1; i < argc; ++i)
    print_letters(argv[i]);
}


x86 assembly (clang, -O0):
<print_arguments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <print_arguments+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <print_letters@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <print_arguments+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_arguments>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <print_arguments+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <print_letters@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <print_arguments+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @print_arguments(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @print_letters(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
void error(char *str) { ; }


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

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

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

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
ret void
}
/* Variables and functions */
long double _mean(long double *, unsigned int);
void average(long double *result, const long double x, long double *acc) {
  static unsigned int i = 0;
  acc[i++] = x;
  *result = _mean(acc, i);
}


x86 assembly (clang, -O0):
<average>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    %rsi,-0x28(%rbp)
fldt   -0x20(%rbp)
mov    -0x28(%rbp),%rax
mov    0x2ef9(%rip),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,0x2eee(%rip)
shl    $0x4,%rcx
fstpt  (%rax,%rcx,1)
mov    -0x28(%rbp),%rdi
mov    0x2edd(%rip),%esi
call   1030 <_mean@plt>
mov    -0x8(%rbp),%rax
fstpt  (%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<average>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
fldt   0x10(%rsp)
mov    0x2f0b(%rip),%ecx
lea    0x1(%rcx),%esi
mov    %esi,0x2f02(%rip)
shl    $0x4,%rcx
fstpt  (%rax,%rcx,1)
mov    %rax,%rdi
call   1030 <_mean@plt>
fstpt  (%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@average.i = internal global i32 0
define void @average(x86_fp80* %0, x86_fp80 %1, x86_fp80* %2) {
%4 = alloca x86_fp80*
%5 = alloca x86_fp80
%6 = alloca x86_fp80*
store x86_fp80* %0, x86_fp80** %4
store x86_fp80 %1, x86_fp80* %5
store x86_fp80* %2, x86_fp80** %6
%7 = load x86_fp80, x86_fp80* %5
%8 = load x86_fp80*, x86_fp80** %6
%9 = load i32, i32* @average.i
%10 = add i32 %9, 1
store i32 %10, i32* @average.i
%11 = zext i32 %9 to i64
%12 = getelementptr inbounds x86_fp80, x86_fp80* %8, i64 %11
store x86_fp80 %7, x86_fp80* %12
%13 = load x86_fp80*, x86_fp80** %6
%14 = load i32, i32* @average.i
%15 = call x86_fp80 @_mean(x86_fp80* %13, i32 %14)
%16 = load x86_fp80*, x86_fp80** %4
store x86_fp80 %15, x86_fp80* %16
ret void
}

LLVM IR (-O2):
@average.i = internal unnamed_addr global i32 0
define void @average(x86_fp80* nocapture writeonly %0, x86_fp80 %1, x86_fp80* %2) {
%4 = load i32, i32* @average.i
%5 = add i32 %4, 1
store i32 %5, i32* @average.i
%6 = zext i32 %4 to i64
%7 = getelementptr inbounds x86_fp80, x86_fp80* %2, i64 %6
store x86_fp80 %1, x86_fp80* %7
%8 = tail call x86_fp80 @_mean(x86_fp80* %2, i32 %5)
store x86_fp80 %8, x86_fp80* %0
ret void
}
int int_comp(const void *a, const void *b) { return (*(int *)a - *(int *)b); }


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

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

LLVM IR (-O0):
define i32 @int_comp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @int_comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ add_node(char *);
void coda_add_history(char *str) {
  if (str == NULL || str[0] == '\0')
    return;
  add_node(str);
}


x86 assembly (clang, -O0):
<coda_add_history>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <coda_add_history+0x27>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113c <coda_add_history+0x2c>
jmp    1145 <coda_add_history+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <add_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coda_add_history>:
test   %rdi,%rdi
je     111f <coda_add_history+0xf>
cmpb   $0x0,(%rdi)
je     111f <coda_add_history+0xf>
jmp    1030 <add_node@plt>
ret

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

LLVM IR (-O2):
define void @coda_add_history(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @add_node(i8* %0)
br label %8
8: ; preds = %1, %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ata_get_string(unsigned char const *, int, int, char *);
void ata_get_ata_identify_model(const unsigned char *buf, char *out) {
  ata_get_string(buf, 27, 46, out);
}


x86 assembly (clang, -O0):
<ata_get_ata_identify_model>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1b,%esi
mov    $0x2e,%edx
call   1030 <ata_get_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ata_get_ata_identify_model>:
mov    %rsi,%rcx
mov    $0x1b,%esi
mov    $0x2e,%edx
jmp    1030 <ata_get_string@plt>

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

LLVM IR (-O2):
define void @ata_get_ata_identify_model(i8* %0, i8* %1) {
%3 = tail call i32 @ata_get_string(i8* %0, i32 27, i32 46, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
void nc_set_yx(int y, int x) { move(y, x); }


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

x86 assembly (clang, -O2):
<nc_set_yx>:
jmp    1030 <move@plt>

LLVM IR (-O0):
define void @nc_set_yx(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 @move(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @nc_set_yx(i32 %0, i32 %1) {
%3 = tail call i32 @move(i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
int main(void) {
  malloc(1);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @malloc(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @malloc(i32 1)
ret i32 0
}
int function(int x, int y) { return x / y; }


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

x86 assembly (clang, -O2):
<function>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @function(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @function(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
void foo245(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo245(i32 %0) {
ret void
}
/* Variables and functions */
char *malloc(int);
size_t malloc_usable_size(char *);
int /*<<< orphan*/ printf(char *, size_t);
int main(void) {
  int mallocSize = 321;
  printf("Allocating %d bytes with malloc()\n", mallocSize);
  char *m = malloc(mallocSize);
  size_t usableSize = malloc_usable_size(m);
  printf("Usable size: %zu\n", usableSize);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x141,-0x4(%rbp)
movslq -0x4(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc_usable_size@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    $0x141,%esi
call   1030 <printf@plt>
mov    $0x141,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
call   1040 <malloc_usable_size@plt>
lea    0xec8(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Allocating %d bytes with malloc()\0A\00"
@.str.1 = [18 x i8] c"Usable size: %zu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
store i32 321, i32* %1
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 %5)
%7 = load i32, i32* %1
%8 = call i8* @malloc(i32 %7)
store i8* %8, i8** %2
%9 = load i8*, i8** %2
%10 = call i64 @malloc_usable_size(i8* %9)
store i64 %10, i64* %3
%11 = load i64, i64* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i64 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Allocating %d bytes with malloc()\0A\00"
@.str.1 = [18 x i8] c"Usable size: %zu\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i64 321)
%2 = tail call dereferenceable_or_null(321) i8* @malloc(i32 321)
%3 = tail call i64 @malloc_usable_size(i8* %2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ create_drive_straight(int);
int /*<<< orphan*/ create_stop();
int /*<<< orphan*/ motor(int /*<<< orphan*/, int);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ off(int /*<<< orphan*/);
int /*<<< orphan*/ set_servo_position(int, int);
void putHangers() {
  motor(0, -100);
  msleep(500);
  off(0);
  create_drive_straight(200);
  msleep(450);
  create_stop();
  set_servo_position(3, 600);
  msleep(500);
  motor(0, -100);
  msleep(280);
  off(0);
}


x86 assembly (clang, -O0):
<putHangers>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x1f4,%edi
call   1060 <msleep@plt>
xor    %edi,%edi
call   1050 <off@plt>
mov    $0xc8,%edi
call   1070 <create_drive_straight@plt>
mov    $0x1c2,%edi
call   1060 <msleep@plt>
mov    $0x0,%al
call   1040 <create_stop@plt>
mov    $0x3,%edi
mov    $0x258,%esi
call   1080 <set_servo_position@plt>
mov    $0x1f4,%edi
call   1060 <msleep@plt>
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x118,%edi
call   1060 <msleep@plt>
xor    %edi,%edi
call   1050 <off@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<putHangers>:
push   %rax
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x1f4,%edi
call   1060 <msleep@plt>
xor    %edi,%edi
call   1050 <off@plt>
mov    $0xc8,%edi
call   1070 <create_drive_straight@plt>
mov    $0x1c2,%edi
call   1060 <msleep@plt>
xor    %eax,%eax
call   1040 <create_stop@plt>
mov    $0x3,%edi
mov    $0x258,%esi
call   1080 <set_servo_position@plt>
mov    $0x1f4,%edi
call   1060 <msleep@plt>
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x118,%edi
call   1060 <msleep@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <off@plt>

LLVM IR (-O0):
define void @putHangers() {
%1 = call i32 @motor(i32 0, i32 -100)
%2 = call i32 @msleep(i32 500)
%3 = call i32 @off(i32 0)
%4 = call i32 @create_drive_straight(i32 200)
%5 = call i32 @msleep(i32 450)
%6 = call i32 (...) @create_stop()
%7 = call i32 @set_servo_position(i32 3, i32 600)
%8 = call i32 @msleep(i32 500)
%9 = call i32 @motor(i32 0, i32 -100)
%10 = call i32 @msleep(i32 280)
%11 = call i32 @off(i32 0)
ret void
}

LLVM IR (-O2):
define void @putHangers() {
%1 = tail call i32 @motor(i32 0, i32 -100)
%2 = tail call i32 @msleep(i32 500)
%3 = tail call i32 @off(i32 0)
%4 = tail call i32 @create_drive_straight(i32 200)
%5 = tail call i32 @msleep(i32 450)
%6 = tail call i32 (...) @create_stop()
%7 = tail call i32 @set_servo_position(i32 3, i32 600)
%8 = tail call i32 @msleep(i32 500)
%9 = tail call i32 @motor(i32 0, i32 -100)
%10 = tail call i32 @msleep(i32 280)
%11 = tail call i32 @off(i32 0)
ret void
}
/* Variables and functions */
int ENOTSUP;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int domain_destroy(int domid, int force) {
  fprintf(stderr, "Compile with DOMLIB=xl or DOMLIB=xcl to enable this\n");
  return -ENOTSUP;
}


x86 assembly (clang, -O0):
<domain_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
mov    0x2eac(%rip),%rcx
sub    (%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<domain_destroy>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ebb(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [53 x i8] c"Compile with DOMLIB=xl or DOMLIB=xcl to enable this\0A\00"
@ENOTSUP = global i32 0
define i32 @domain_destroy(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @ENOTSUP
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [53 x i8] c"Compile with DOMLIB=xl or DOMLIB=xcl to enable this\0A\00"
@ENOTSUP = global i32 0
define i32 @domain_destroy(i32 %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @ENOTSUP
%6 = sub nsw i32 0, %5
ret i32 %6
}
void INT_Excep_SCI11_TEI11(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_SCI11_TEI11() {
ret void
}
void vga_dirty_log_start(void *s) {}


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

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

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

LLVM IR (-O2):
define void @vga_dirty_log_start(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ func_1b1c_c(int /*<<< orphan*/, int /*<<< orphan*/ *, int,
                               int /*<<< orphan*/);
int /*<<< orphan*/ func_d2c_c(int /*<<< orphan*/ *, int, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/ *);
void func_d80_c(uint32_t a0, uint32_t a1, uint32_t a2, uint32_t a3,
                uint8_t *out) {
  uint8_t scratch[32];
  func_1b1c_c(a0, scratch, 32, a1);
  func_d2c_c(scratch, 32, a2, a3, out);
}


x86 assembly (clang, -O0):
<func_d80_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xa0(%rbp),%rsi
mov    -0x8(%rbp),%ecx
mov    $0x20,%edx
call   1040 <func_1b1c_c@plt>
lea    -0xa0(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    $0x20,%esi
call   1030 <func_d2c_c@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_d80_c>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %r8,%r14
mov    %ecx,%ebp
mov    %edx,%ebx
mov    %esi,%ecx
mov    %rsp,%r15
mov    %r15,%rsi
mov    $0x20,%edx
call   1040 <func_1b1c_c@plt>
mov    %r15,%rdi
mov    $0x20,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    %r14,%r8
call   1030 <func_d2c_c@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @func_d80_c(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca [32 x i32]
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32* %4, i32** %10
%12 = load i32, i32* %6
%13 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%14 = load i32, i32* %7
%15 = call i32 @func_1b1c_c(i32 %12, i32* %13, i32 32, i32 %14)
%16 = getelementptr inbounds [32 x i32], [32 x i32]* %11, i64 0, i64 0
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = load i32*, i32** %10
%20 = call i32 @func_d2c_c(i32* %16, i32 32, i32 %17, i32 %18, i32* %19)
ret void
}

LLVM IR (-O2):
define void @func_d80_c(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4) {
%6 = alloca [32 x i32]
%7 = bitcast [32 x i32]* %6 to i8*
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %6, i64 0, i64 0
%9 = call i32 @func_1b1c_c(i32 %0, i32* %8, i32 32, i32 %1)
%10 = call i32 @func_d2c_c(i32* %8, i32 32, i32 %2, i32 %3, i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __clear_bit(long, unsigned long volatile *);
int /*<<< orphan*/ barrier();
void __clear_bit_unlock(long nr, volatile unsigned long *addr) {
  barrier();
  __clear_bit(nr, addr);
}


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

x86 assembly (clang, -O2):
<__clear_bit_unlock>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <barrier@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <__clear_bit@plt>

LLVM IR (-O0):
define void @__clear_bit_unlock(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = call i32 (...) @barrier()
%6 = load i64, i64* %3
%7 = load i64*, i64** %4
%8 = call i32 @__clear_bit(i64 %6, i64* %7)
ret void
}

LLVM IR (-O2):
define void @__clear_bit_unlock(i64 %0, i64* %1) {
%3 = tail call i32 (...) @barrier()
%4 = tail call i32 @__clear_bit(i64 %0, i64* %1)
ret void
}
char *strchrnul(const char *s, int c) {
  while (*s && *s != c)
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <strchrnul+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <strchrnul+0x40>
jmp    1151 <strchrnul+0x51>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <strchrnul+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchrnul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <strchrnul+0x20>
cmp    %esi,%ecx
jne    1110 <strchrnul+0x10>
ret

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

LLVM IR (-O2):
define i8* @strchrnul(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %4
}
char *coalesce(char *lhs, char *rhs) { return lhs ? lhs : rhs; }


x86 assembly (clang, -O0):
<coalesce>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1124 <coalesce+0x24>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112c <coalesce+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coalesce>:
mov    %rsi,%rax
test   %rdi,%rdi
cmovne %rdi,%rax
ret

LLVM IR (-O0):
define i8* @coalesce(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i8*, i8** %3
br label %11
9: ; preds = %2
%10 = load i8*, i8** %4
br label %11
11: ; preds = %9, %7
%12 = phi i8* [ %8, %7 ], [ %10, %9 ]
ret i8* %12
}

LLVM IR (-O2):
define i8* @coalesce(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, null
%4 = select i1 %3, i8* %1, i8* %0
ret i8* %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t max_uint32(uint32_t a, uint32_t b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<max_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max_uint32+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max_uint32+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_uint32>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max_uint32(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max_uint32(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double);
double squareRoot(int);
int main() {
  int num = 2;
  printf("sqrt(%d)=%f\n", num, squareRoot(num));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"sqrt(%d)=%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call double @squareRoot(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3, double %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"sqrt(%d)=%f\0A\00"
define i32 @main() {
%1 = tail call double @squareRoot(i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2, double %1)
ret i32 0
}
/* Variables and functions */
unsigned long errno;
long __syscall_ret(unsigned long r) {
  if (r > -4096UL) {
    errno = -r;
    return -1;
  }
  return r;
}


x86 assembly (clang, -O0):
<__syscall_ret>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0xfffffffffffff000,-0x10(%rbp)
ff
jbe    1135 <__syscall_ret+0x35>
xor    %eax,%eax
mov    %eax,%ecx
sub    -0x10(%rbp),%rcx
mov    0x2ebb(%rip),%rax
mov    %rcx,(%rax)
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    113d <__syscall_ret+0x3d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__syscall_ret>:
mov    %rdi,%rax
cmp    $0xfffffffffffff001,%rdi
jb     1120 <__syscall_ret+0x20>
neg    %rax
mov    0x2eca(%rip),%rcx
mov    %rax,(%rcx)
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
@errno = global i64 0
define i64 @__syscall_ret(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ugt i64 %4, -4096
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %3
%8 = sub i64 0, %7
store i64 %8, i64* @errno
store i64 -1, i64* %2
br label %11
9: ; preds = %1
%10 = load i64, i64* %3
store i64 %10, i64* %2
br label %11
11: ; preds = %9, %6
%12 = load i64, i64* %2
ret i64 %12
}

LLVM IR (-O2):
@errno = global i64 0
define i64 @__syscall_ret(i64 %0) {
%2 = icmp ugt i64 %0, -4096
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = sub nsw i64 0, %0
store i64 %4, i64* @errno
br label %5
5: ; preds = %1, %3
%6 = phi i64 [ -1, %3 ], [ %0, %1 ]
ret i64 %6
}
int test_imm_ACint64_midword_reg(long long val) {
  return ((val >> 16) & (0xAC << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_ACint64_midword_reg>:
test   $0xac0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_ACint64_midword_reg(i64 %0) {
%2 = and i64 %0, 11272192
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int main(void) {
  int x = 20;
  printf("address of x: %p\n", &x);
  int *y;
  y = &x;
  printf("address of y: %p\n", y);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x14,0xc(%rsp)
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"address of x: %p\0A\00"
@.str.1 = [18 x i8] c"address of y: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 20, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %2)
store i32* %2, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"address of x: %p\0A\00"
@.str.1 = [18 x i8] c"address of y: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 20, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32* %1)
ret i32 0
}
void copia(void) {
  extern char linea[], linea_max[];
  char *pointer = linea;
  char *target = linea_max;
  while (*pointer != '\0') {
    *target = *pointer;
    pointer += 1;
    target += 1;
  }
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ee5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ec2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1153 <copia+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111a <copia+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copia>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%cl
test   %cl,%cl
je     1130 <copia+0x30>
xor    %edx,%edx
mov    0x2ec2(%rip),%rsi
cs nopw 0x0(%rax,%rax,1)
mov    %cl,(%rsi,%rdx,1)
movzbl 0x1(%rax,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1120 <copia+0x20>
ret

LLVM IR (-O0):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea_max, i64 0, i64 0), i8** %2
br label %3
3: ; preds = %8, %0
%4 = load i8*, i8** %1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %3
%9 = load i8*, i8** %1
%10 = load i8, i8* %9
%11 = load i8*, i8** %2
store i8 %10, i8* %11
%12 = load i8*, i8** %1
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8* %13, i8** %1
%14 = load i8*, i8** %2
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %2
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = load i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %11, label %3
3: ; preds = %0, %3
%4 = phi i8 [ %9, %3 ], [ %1, %0 ]
%5 = phi i8* [ %8, %3 ], [ getelementptr inbounds ([0 x i8], [0 x i8]* @linea_max, i64 0, i64 0), %0 ]
%6 = phi i8* [ %7, %3 ], [ getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0), %0 ]
store i8 %4, i8* %5
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = getelementptr inbounds i8, i8* %5, i64 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %0
ret void
}
/* Variables and functions */
float _gerp(float, float, float);
float _bigeom_interpolate(float ll, float lr, float rl, float rr, float lambda1,
                          float lambda2) {
  float il = _gerp(ll, rl, lambda1);
  float ir = _gerp(lr, rr, lambda1);
  return _gerp(il, ir, lambda2);
}


x86 assembly (clang, -O0):
<_bigeom_interpolate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <_gerp@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <_gerp@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
call   1030 <_gerp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bigeom_interpolate>:
sub    $0x18,%rsp
movss  %xmm5,0x14(%rsp)
movss  %xmm4,0x4(%rsp)
movss  %xmm3,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
movaps %xmm2,%xmm1
movaps %xmm4,%xmm2
call   1030 <_gerp@plt>
movss  %xmm0,0x8(%rsp)
movss  0xc(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
call   1030 <_gerp@plt>
movaps %xmm0,%xmm1
movss  0x8(%rsp),%xmm0
movss  0x14(%rsp),%xmm2
add    $0x18,%rsp
jmp    1030 <_gerp@plt>

LLVM IR (-O0):
define float @_bigeom_interpolate(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%15 = load float, float* %7
%16 = load float, float* %9
%17 = load float, float* %11
%18 = call float @_gerp(float %15, float %16, float %17)
store float %18, float* %13
%19 = load float, float* %8
%20 = load float, float* %10
%21 = load float, float* %11
%22 = call float @_gerp(float %19, float %20, float %21)
store float %22, float* %14
%23 = load float, float* %13
%24 = load float, float* %14
%25 = load float, float* %12
%26 = call float @_gerp(float %23, float %24, float %25)
ret float %26
}

LLVM IR (-O2):
define float @_bigeom_interpolate(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call float @_gerp(float %0, float %2, float %4)
%8 = tail call float @_gerp(float %1, float %3, float %4)
%9 = tail call float @_gerp(float %7, float %8, float %5)
ret float %9
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_add(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
__attribute__((always_)) struct vec2i *
psvec2i_add(struct vec2i *result, struct vec2i *a, struct vec2i *b) {
  vec2i_add((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


x86 assembly (clang, -O0):
<psvec2i_add>:
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 <vec2i_add@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2i_add>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2i_add@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_add(%struct.vec2i* %0, %struct.vec2i* %1, %struct.vec2i* %2) {
%4 = alloca %struct.vec2i*
%5 = alloca %struct.vec2i*
%6 = alloca %struct.vec2i*
store %struct.vec2i* %0, %struct.vec2i** %4
store %struct.vec2i* %1, %struct.vec2i** %5
store %struct.vec2i* %2, %struct.vec2i** %6
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = load %struct.vec2i*, %struct.vec2i** %5
%10 = bitcast %struct.vec2i* %9 to i32*
%11 = load %struct.vec2i*, %struct.vec2i** %6
%12 = bitcast %struct.vec2i* %11 to i32*
%13 = call i32 @vec2i_add(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec2i*, %struct.vec2i** %4
ret %struct.vec2i* %14
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_add(%struct.vec2i* returned %0, %struct.vec2i* %1, %struct.vec2i* %2) {
%4 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec2i, %struct.vec2i* %2, i64 0, i32 0
%7 = tail call i32 @vec2i_add(i32* %4, i32* %5, i32* %6)
ret %struct.vec2i* %0
}
/* Type definitions */
struct img_pixmap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct img_pixmap *);
int /*<<< orphan*/ img_destroy(struct img_pixmap *);
void img_free(struct img_pixmap *img) {
  img_destroy(img);
  free(img);
}


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

x86 assembly (clang, -O2):
<img_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <img_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.img_pixmap = type { i32 }
define void @img_free(%struct.img_pixmap* %0) {
%2 = tail call i32 @img_destroy(%struct.img_pixmap* %0)
%3 = tail call i32 @free(%struct.img_pixmap* %0)
ret void
}
void MotorsInit(void) {}


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

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

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

LLVM IR (-O2):
define void @MotorsInit() {
ret void
}
unsigned int false_uint(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @false_uint() {
ret i32 0
}

LLVM IR (-O2):
define i32 @false_uint() {
ret i32 0
}
vt52hello() {}


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

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

LLVM IR (-O0):
define i32 @vt52hello() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @vt52hello() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ client_leave_group();
int leave_group(int argc, char **argv) {
  client_leave_group();
  return 0;
}


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

x86 assembly (clang, -O2):
<leave_group>:
push   %rax
xor    %eax,%eax
call   1030 <client_leave_group@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @leave_group(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @client_leave_group()
ret i32 0
}

LLVM IR (-O2):
define i32 @leave_group(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @client_leave_group()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printValue(int v) { printf("Value:%d", v); }


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

x86 assembly (clang, -O2):
<printValue>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"Value:%d\00"
define void @printValue(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int int16_t;

/* Variables and functions */
int TestBit(int, int);
int16_t ROR(int16_t n) {
  int16_t mask = TestBit(n, 15);
  return (n >> 1) | mask;
}


x86 assembly (clang, -O0):
<ROR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xf,%esi
call   1030 <TestBit@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ROR>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%esi
call   1030 <TestBit@plt>
sar    %ebx
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ROR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @TestBit(i32 %4, i32 15)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = ashr i32 %6, 1
%8 = load i32, i32* %3
%9 = or i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ROR(i32 %0) {
%2 = tail call i32 @TestBit(i32 %0, i32 15)
%3 = ashr i32 %0, 1
%4 = or i32 %2, %3
ret i32 %4
}
/* Type definitions */
struct wl_surface_listener {
  int dummy;
};
struct wl_surface {
  int dummy;
};
struct wl_proxy {
  int dummy;
};

/* Variables and functions */
int wl_proxy_add_listener(struct wl_proxy *, void (*)(), void *);
int wl_surface_add_listener(struct wl_surface *wl_surface,
                            const struct wl_surface_listener *listener,
                            void *data) {
  return wl_proxy_add_listener((struct wl_proxy *)wl_surface,
                               (void (**)(void))listener, data);
}


x86 assembly (clang, -O0):
<wl_surface_add_listener>:
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 <wl_proxy_add_listener@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_surface_add_listener>:
jmp    1030 <wl_proxy_add_listener@plt>

LLVM IR (-O0):
%struct.wl_surface = type { i32 }
%struct.wl_surface_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_surface_add_listener(%struct.wl_surface* %0, %struct.wl_surface_listener* %1, i8* %2) {
%4 = alloca %struct.wl_surface*
%5 = alloca %struct.wl_surface_listener*
%6 = alloca i8*
store %struct.wl_surface* %0, %struct.wl_surface** %4
store %struct.wl_surface_listener* %1, %struct.wl_surface_listener** %5
store i8* %2, i8** %6
%7 = load %struct.wl_surface*, %struct.wl_surface** %4
%8 = bitcast %struct.wl_surface* %7 to %struct.wl_proxy*
%9 = load %struct.wl_surface_listener*, %struct.wl_surface_listener** %5
%10 = bitcast %struct.wl_surface_listener* %9 to void ()**
%11 = bitcast void ()** %10 to void (...)*
%12 = load i8*, i8** %6
%13 = call i32 @wl_proxy_add_listener(%struct.wl_proxy* %8, void (...)* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.wl_surface = type { i32 }
%struct.wl_surface_listener = type { i32 }
%struct.wl_proxy = type { i32 }
define i32 @wl_surface_add_listener(%struct.wl_surface* %0, %struct.wl_surface_listener* %1, i8* %2) {
%4 = bitcast %struct.wl_surface* %0 to %struct.wl_proxy*
%5 = bitcast %struct.wl_surface_listener* %1 to void (...)*
%6 = tail call i32 @wl_proxy_add_listener(%struct.wl_proxy* %4, void (...)* %5, i8* %2)
ret i32 %6
}