xunge/DecIR huggingface dataset:
/* Type definitions */
struct evloop {
  int dummy;
};
struct ev {
  int dummy;
};

/* Variables and functions */
int _start_ev(struct evloop *, struct ev *);
int evio_start(struct evloop *loop, struct ev *ev) {
  return _start_ev(loop, ev);
}


x86 assembly (clang, -O0):
<evio_start>:
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   1030 <_start_ev@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evio_start>:
jmp    1030 <_start_ev@plt>

LLVM IR (-O0):
%struct.evloop = type { i32 }
%struct.ev = type { i32 }
define i32 @evio_start(%struct.evloop* %0, %struct.ev* %1) {
%3 = alloca %struct.evloop*
%4 = alloca %struct.ev*
store %struct.evloop* %0, %struct.evloop** %3
store %struct.ev* %1, %struct.ev** %4
%5 = load %struct.evloop*, %struct.evloop** %3
%6 = load %struct.ev*, %struct.ev** %4
%7 = call i32 @_start_ev(%struct.evloop* %5, %struct.ev* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.evloop = type { i32 }
%struct.ev = type { i32 }
define i32 @evio_start(%struct.evloop* %0, %struct.ev* %1) {
%3 = tail call i32 @_start_ev(%struct.evloop* %0, %struct.ev* %1)
ret i32 %3
}
/* Variables and functions */
char *mystrdup(char *);
char *convert_path(char *path) {
  char *newpath;
  newpath = mystrdup(path);
  return newpath;
}


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

x86 assembly (clang, -O2):
<convert_path>:
jmp    1030 <mystrdup@plt>

LLVM IR (-O0):
define i8* @convert_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @mystrdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @convert_path(i8* %0) {
%2 = tail call i8* @mystrdup(i8* %0)
ret i8* %2
}
void RTTarExtractAll(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTarExtractAll() {
ret void
}
/* Variables and functions */
int INT_MAX;
int log(int);
scalar_t__ pow(int, int);
bool isPowerOfThree2(int n) {
  int maxPowerOfThree = (int)pow(3, (int)(log(INT_MAX) / log(3)));
  return n > 0 && maxPowerOfThree % n == 0;
}


x86 assembly (clang, -O0):
<isPowerOfThree2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
call   1030 <log@plt>
mov    %eax,-0x10(%rbp)
mov    $0x3,%edi
call   1030 <log@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%esi
mov    $0x3,%edi
call   1040 <pow@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jle    117c <isPowerOfThree2+0x5c>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
cmp    $0x0,%edx
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPowerOfThree2>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
call   1030 <log@plt>
mov    %eax,%ebp
mov    $0x3,%edi
call   1030 <log@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
mov    $0x3,%edi
mov    %eax,%esi
call   1040 <pow@plt>
test   %ebx,%ebx
jle    1162 <isPowerOfThree2+0x42>
cltd
idiv   %ebx
xor    %eax,%eax
test   %edx,%edx
sete   %al
jmp    1164 <isPowerOfThree2+0x44>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@INT_MAX = global i32 0
define i32 @isPowerOfThree2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @INT_MAX
%5 = call i32 @log(i32 %4)
%6 = call i32 @log(i32 3)
%7 = sdiv i32 %5, %6
%8 = call i64 @pow(i32 3, i32 %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %1
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = srem i32 %13, %14
%16 = icmp eq i32 %15, 0
br label %17
17: ; preds = %12, %1
%18 = phi i1 [ false, %1 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @isPowerOfThree2(i32 %0) {
%2 = load i32, i32* @INT_MAX
%3 = tail call i32 @log(i32 %2)
%4 = tail call i32 @log(i32 3)
%5 = sdiv i32 %3, %4
%6 = tail call i64 @pow(i32 3, i32 %5)
%7 = icmp sgt i32 %0, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = trunc i64 %6 to i32
%10 = srem i32 %9, %0
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %8, %1
%14 = phi i32 [ 0, %1 ], [ %12, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int i;
  printf("Introduzca numero del 1 al 4:");
  scanf("%d", &i);
  if (i != 4) {
    printf("Es primo.\n");
  } else {
    printf("No es primo.\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x4,-0x4(%rbp)
je     115f <main+0x3f>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    116b <main+0x4b>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x4,0x4(%rsp)
lea    0xec7(%rip),%rax
lea    0xecd(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Introduzca numero del 1 al 4:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [11 x i8] c"Es primo.\0A\00"
@.str.3 = [14 x i8] c"No es primo.\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp ne i32 %4, 4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Introduzca numero del 1 al 4:\00"
@.str.1 = [3 x i8] c"%d\00"
@str = [13 x i8] c"No es primo.\00"
@str.4 = [10 x i8] c"Es primo.\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 4
%7 = select i1 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.4, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret void
}
void _freedeepdata(void *deepdata) {
  struct _deepdata {
    int s, *sa;
  };
  printf("\tFreeing deep data @ %p\n", deepdata);
  free(((struct _deepdata *)deepdata)->sa);
  free(deepdata);
}


x86 assembly (clang, -O0):
<_freedeepdata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_freedeepdata>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct._deepdata = type { i32, i32* }
@.str = [25 x i8] c"\09Freeing deep data @ %p\0A\00"
define void @_freedeepdata(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to %struct._deepdata*
%7 = getelementptr inbounds %struct._deepdata, %struct._deepdata* %6, i32 0, i32 1
%8 = load i32*, i32** %7
%9 = bitcast i32* %8 to i8*
%10 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"\09Freeing deep data @ %p\0A\00"
define void @_freedeepdata(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i8**
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
tail call void @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void freeExample(int *ptr) {
  free(ptr);
  ptr = NULL;
  if (ptr == NULL) {
  }
}


x86 assembly (clang, -O0):
<freeExample>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113d <freeExample+0x2d>
jmp    113d <freeExample+0x2d>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @freeExample(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *reallocf(void *ptr, size_t size) {
  void *result = realloc(ptr, size);
  if (result == NULL)
    free(ptr);
  return result;
}


x86 assembly (clang, -O0):
<reallocf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1155 <reallocf+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocf>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113c <reallocf+0x1c>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @reallocf(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void foo(const int *p) {
  printf("= Aufgabe 18.1 =\n");
  int x = 20;
  p = &x;
  printf("const int p => %d\n", *p);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x14,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
mov    $0x14,%esi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"= Aufgabe 18.1 =\0A\00"
@.str.1 = [19 x i8] c"const int p => %d\0A\00"
define void @foo(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 20, i32* %3
store i32* %3, i32** %2
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"const int p => %d\0A\00"
@str = [17 x i8] c"= Aufgabe 18.1 =\00"
define void @foo(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 20)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f1(int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int *y = NULL;
  f1(y);
  printf("%d", *y);
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @f1(i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void free_uint16_t(uint16_t _val) { return; }


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

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

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

LLVM IR (-O2):
define void @free_uint16_t(i32 %0) {
ret void
}
/* Variables and functions */
double strtod(char *, char **);
double utils_strtod(char *buffer) {
  char *se;
  return strtod(buffer, &se);
}


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

x86 assembly (clang, -O2):
<utils_strtod>:
push   %rax
mov    %rsp,%rsi
call   1030 <strtod@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @utils_strtod(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call double @strtod(i8* %4, i8** %3)
ret double %5
}

LLVM IR (-O2):
define double @utils_strtod(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call double @strtod(i8* %0, i8** %2)
ret double %4
}
int authless_inithandle(struct authhandle *auth, char *username) { return (0); }


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

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

LLVM IR (-O0):
%struct.authhandle = type opaque
define i32 @authless_inithandle(%struct.authhandle* %0, i8* %1) {
%3 = alloca %struct.authhandle*
%4 = alloca i8*
store %struct.authhandle* %0, %struct.authhandle** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.authhandle = type opaque
define i32 @authless_inithandle(%struct.authhandle* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ verbose(int, char *, ...);
int parse_done(char *msgbuf, size_t msglen) {
  if (msglen != 0) {
    verbose(0, "parse_done: bad size=%lld\n", (long long)msglen);
    exit(1);
  }
  verbose(1, "parse_done\n");
  return 0;
}


x86 assembly (clang, -O0):
<parse_done>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1159 <parse_done+0x39>
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1030 <verbose@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    $0x1,%edi
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1030 <verbose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_done>:
push   %rax
test   %rsi,%rsi
jne    113d <parse_done+0x1d>
lea    0xeee(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <verbose@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %rsi,%rdx
lea    0xeb9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <verbose@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"parse_done: bad size=%lld\0A\00"
@.str.1 = [12 x i8] c"parse_done\0A\00"
define i32 @parse_done(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i64, i64* %4
%9 = call i32 (i32, i8*, ...) @verbose(i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %8)
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = call i32 (i32, i8*, ...) @verbose(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"parse_done: bad size=%lld\0A\00"
@.str.1 = [12 x i8] c"parse_done\0A\00"
define i32 @parse_done(i8* nocapture readnone %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 (i32, i8*, ...) @verbose(i32 0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %1)
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = tail call i32 (i32, i8*, ...) @verbose(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ rand();
void fill(uint8_t *dst, size_t size) {
  for (size_t i = 0; i < size; ++i)
    dst[i] = rand();
}


x86 assembly (clang, -O0):
<fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115b <fill+0x4b>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <fill+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1144 <fill+0x34>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <fill+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @fill(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %15, %2
%7 = load i64, i64* %5
%8 = load i64, i64* %4
%9 = icmp ult i64 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = call i32 (...) @rand()
%12 = load i32*, i32** %3
%13 = load i64, i64* %5
%14 = getelementptr inbounds i32, i32* %12, i64 %13
store i32 %11, i32* %14
br label %15
15: ; preds = %10
%16 = load i64, i64* %5
%17 = add i64 %16, 1
store i64 %17, i64* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @fill(i32* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %2
ret void
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = tail call i32 (...) @rand()
%8 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %7, i32* %8
%9 = add nuw i64 %6, 1
%10 = icmp eq i64 %9, %1
br i1 %10, label %4, label %5
}
/* Variables and functions */
float smoothstep(float, float, float);
float bismoothstep_interp(float tl, float tr, float bl, float br,
                          float x_amount, float y_amount) {
  float left = smoothstep(tl, bl, y_amount);
  float right = smoothstep(tr, br, y_amount);
  return smoothstep(right, left, x_amount);
}


x86 assembly (clang, -O0):
<bismoothstep_interp>:
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  -0x18(%rbp),%xmm2
call   1030 <smoothstep@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x18(%rbp),%xmm2
call   1030 <smoothstep@plt>
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
movss  -0x1c(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
call   1030 <smoothstep@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @bismoothstep_interp(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* %12
%18 = call float @smoothstep(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* %12
%22 = call float @smoothstep(float %19, float %20, float %21)
store float %22, float* %14
%23 = load float, float* %14
%24 = load float, float* %13
%25 = load float, float* %11
%26 = call float @smoothstep(float %23, float %24, float %25)
ret float %26
}

LLVM IR (-O2):
define float @bismoothstep_interp(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call float @smoothstep(float %0, float %2, float %5)
%8 = tail call float @smoothstep(float %1, float %3, float %5)
%9 = tail call float @smoothstep(float %8, float %7, float %4)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ ImprimirMenu();
int LeerOpcion();
int Menu() {
  ImprimirMenu();
  int opcion = LeerOpcion();
}


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

x86 assembly (clang, -O2):
<Menu>:
push   %rax
xor    %eax,%eax
call   1040 <ImprimirMenu@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <LeerOpcion@plt>

LLVM IR (-O0):
define i32 @Menu() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @ImprimirMenu()
%4 = call i32 (...) @LeerOpcion()
store i32 %4, i32* %2
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @Menu() {
%1 = tail call i32 (...) @ImprimirMenu()
%2 = tail call i32 (...) @LeerOpcion()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ AttitudeSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void AttitudeSettingsRequestUpdate() {
  UAVObjRequestUpdate(AttitudeSettingsHandle());
}


x86 assembly (clang, -O0):
<AttitudeSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <AttitudeSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AttitudeSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <AttitudeSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @AttitudeSettingsRequestUpdate() {
%1 = call i32 (...) @AttitudeSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AttitudeSettingsRequestUpdate() {
%1 = tail call i32 (...) @AttitudeSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ environment();
int query_name();
int /*<<< orphan*/ set_heart_beat(int);
int /*<<< orphan*/ tell_room(int /*<<< orphan*/, char *);
void reconnect() {
  set_heart_beat(1);
  tell_room(environment(), "Reconnected.\n");
  tell_room(environment(), query_name() + " has reconnected.\n");
}


x86 assembly (clang, -O0):
<reconnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1050 <set_heart_beat@plt>
mov    $0x0,%al
call   1040 <environment@plt>
mov    %eax,%edi
lea    0xe9e(%rip),%rsi
call   1030 <tell_room@plt>
mov    $0x0,%al
call   1040 <environment@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <query_name@plt>
mov    -0x4(%rbp),%edi
cltq
lea    0xe8a(%rip),%rsi
add    %rax,%rsi
call   1030 <tell_room@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reconnect>:
push   %rbx
mov    $0x1,%edi
call   1050 <set_heart_beat@plt>
xor    %eax,%eax
call   1040 <environment@plt>
lea    0xea7(%rip),%rsi
mov    %eax,%edi
call   1030 <tell_room@plt>
xor    %eax,%eax
call   1040 <environment@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <query_name@plt>
cltq
lea    0xe95(%rip),%rsi
add    %rax,%rsi
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tell_room@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Reconnected.\0A\00"
@.str.1 = [19 x i8] c" has reconnected.\0A\00"
define void @reconnect() {
%1 = call i32 @set_heart_beat(i32 1)
%2 = call i32 (...) @environment()
%3 = call i32 @tell_room(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @environment()
%5 = call i32 (...) @query_name()
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i64 %6
%8 = call i32 @tell_room(i32 %4, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Reconnected.\0A\00"
@.str.1 = [19 x i8] c" has reconnected.\0A\00"
define void @reconnect() {
%1 = tail call i32 @set_heart_beat(i32 1)
%2 = tail call i32 (...) @environment()
%3 = tail call i32 @tell_room(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @environment()
%5 = tail call i32 (...) @query_name()
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [19 x i8], [19 x i8]* @.str.1, i64 0, i64 %6
%8 = tail call i32 @tell_room(i32 %4, i8* %7)
ret void
}
/* Variables and functions */
long double lgamma(long double);
long double lgammal(long double a1) { return lgamma(a1); }


x86 assembly (clang, -O0):
<lgammal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <lgamma@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lgammal>:
jmp    1030 <lgamma@plt>

LLVM IR (-O0):
define x86_fp80 @lgammal(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @lgamma(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @lgammal(x86_fp80 %0) {
%2 = tail call x86_fp80 @lgamma(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ unix2dos(int, char **);
int main(int argc, char *argv[]) {
  unix2dos(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @unix2dos(i32 %0, i8** %1)
ret i32 0
}
/* Variables and functions */
unsigned short bswap_16(unsigned short);
unsigned short VSSwapHostShortToLittle(unsigned short x) {
  return (bswap_16(x));
}


x86 assembly (clang, -O0):
<VSSwapHostShortToLittle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <bswap_16@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VSSwapHostShortToLittle>:
jmp    1030 <bswap_16@plt>

LLVM IR (-O0):
define zeroext i16 @VSSwapHostShortToLittle(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call zeroext i16 @bswap_16(i16 zeroext %3)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @VSSwapHostShortToLittle(i16 zeroext %0) {
%2 = tail call zeroext i16 @bswap_16(i16 zeroext %0)
ret i16 %2
}
void check_vidmode(void) {}


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

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

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

LLVM IR (-O2):
define void @check_vidmode() {
ret void
}
/* Type definitions */
struct bulentry {
  int dummy;
};

/* Variables and functions */
int xfrm_post_ba_mod_bule(struct bulentry *);
int post_ba_bul_update(struct bulentry *bule) {
  return xfrm_post_ba_mod_bule(bule);
}


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

x86 assembly (clang, -O2):
<post_ba_bul_update>:
jmp    1030 <xfrm_post_ba_mod_bule@plt>

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

LLVM IR (-O2):
%struct.bulentry = type { i32 }
define i32 @post_ba_bul_update(%struct.bulentry* %0) {
%2 = tail call i32 @xfrm_post_ba_mod_bule(%struct.bulentry* %0)
ret i32 %2
}
int g() {
  static int x = 1;
  return x;
}


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

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

LLVM IR (-O0):
@g.x = internal global i32 1
define i32 @g() {
%1 = load i32, i32* @g.x
ret i32 %1
}

LLVM IR (-O2):
define i32 @g() {
ret i32 1
}
void foo099(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo099(i32 %0) {
ret void
}
int compareFunction(const void *a, const void *b) {
  return (*(int *)a - *(int *)b);
}


x86 assembly (clang, -O0):
<compareFunction>:
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):
<compareFunction>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @compareFunction(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 @compareFunction(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
}
int f3(int x, unsigned y) { return (int)((unsigned)x | y); }


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

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

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

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
int NetClose(fd)
int fd;
{ return close(fd); }


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

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

LLVM IR (-O0):
define i32 @NetClose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @NetClose(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *, char const *);
void print_svar_change(const char *name, const char *val) {
  if (name && val)
    printf("export %s=\"${%s:-%s}\"\n", name, name, val);
}


x86 assembly (clang, -O0):
<print_svar_change>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114e <print_svar_change+0x3e>
cmpq   $0x0,-0x10(%rbp)
je     114e <print_svar_change+0x3e>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_svar_change>:
test   %rdi,%rdi
je     112f <print_svar_change+0x1f>
mov    %rsi,%rcx
test   %rsi,%rsi
je     112f <print_svar_change+0x1f>
mov    %rdi,%rdx
lea    0xed9(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [23 x i8] c"export %s=\22${%s:-%s}\22\0A\00"
define void @print_svar_change(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 %15
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = load i8*, i8** %3
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12, i8* %13)
br label %15
15: ; preds = %10, %7, %2
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"export %s=\22${%s:-%s}\22\0A\00"
define void @print_svar_change(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0, i8* %1)
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(double, double, double, double);
void init(void) {
  glClearColor(0.0, 0.0, 0.0, 0.0);
  return;
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1030 <glClearColor@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
jmp    1030 <glClearColor@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void NRerror(char error_text[]) {
  fprintf(stderr, "Numerical Recipes run-time error...\n");
  fprintf(stderr, "%s\n", error_text);
  fprintf(stderr, "...now exiting to system...\n");
  exit(1000);
}


x86 assembly (clang, -O0):
<NRerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x3e8,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<NRerror>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xedc(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x3e8,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"Numerical Recipes run-time error...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [29 x i8] c"...now exiting to system...\0A\00"
define void @NRerror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 1000)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"Numerical Recipes run-time error...\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [29 x i8] c"...now exiting to system...\0A\00"
define void @NRerror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1000)
unreachable
}
void free_noop(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @free_noop(i8* nocapture %0) {
ret void
}
t_size(n) int n;
{ n; }


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

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

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

LLVM IR (-O2):
define i32 @t_size(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ chargerPositionJoueurNiveau();
int /*<<< orphan*/ chargerSalleNiveau();
void chargerNiveau(void) {
  chargerSalleNiveau();
  chargerPositionJoueurNiveau();
}


x86 assembly (clang, -O0):
<chargerNiveau>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <chargerSalleNiveau@plt>
mov    $0x0,%al
call   1030 <chargerPositionJoueurNiveau@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chargerNiveau>:
push   %rax
xor    %eax,%eax
call   1040 <chargerSalleNiveau@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <chargerPositionJoueurNiveau@plt>

LLVM IR (-O0):
define void @chargerNiveau() {
%1 = call i32 (...) @chargerSalleNiveau()
%2 = call i32 (...) @chargerPositionJoueurNiveau()
ret void
}

LLVM IR (-O2):
define void @chargerNiveau() {
%1 = tail call i32 (...) @chargerSalleNiveau()
%2 = tail call i32 (...) @chargerPositionJoueurNiveau()
ret void
}
/* Type definitions */
struct emission {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ c_wrapper(struct emission *, int /*<<< orphan*/);
int cur_dens_c(struct emission *data) {
  c_wrapper(data, 0);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.emission = type { i32 }
define i32 @cur_dens_c(%struct.emission* %0) {
%2 = tail call i32 @c_wrapper(%struct.emission* %0, i32 0)
ret i32 0
}
/* Variables and functions */
float Ln(float);
float LogToBase(float x, float base) { return Ln(x) / Ln(base); }


x86 assembly (clang, -O0):
<LogToBase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <Ln@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <Ln@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LogToBase>:
push   %rax
movss  %xmm1,0x4(%rsp)
call   1030 <Ln@plt>
movss  %xmm0,(%rsp)
movss  0x4(%rsp),%xmm0
call   1030 <Ln@plt>
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @LogToBase(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = call float @Ln(float %5)
%7 = load float, float* %4
%8 = call float @Ln(float %7)
%9 = fdiv float %6, %8
ret float %9
}

LLVM IR (-O2):
define float @LogToBase(float %0, float %1) {
%3 = tail call float @Ln(float %0)
%4 = tail call float @Ln(float %1)
%5 = fdiv float %3, %4
ret float %5
}
void XGetStandardColormap() {}


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

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

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

LLVM IR (-O2):
define void @XGetStandardColormap() {
ret void
}
int flip_off(char *addr) {
  if ((addr[0] & 1) == 1) {
    addr[0] &= 0xfe;
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<flip_off>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    1136 <flip_off+0x36>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
and    $0xfe,%ecx
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    113d <flip_off+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<flip_off>:
mov    (%rdi),%cl
xor    %eax,%eax
test   $0x1,%cl
je     1113 <flip_off+0x13>
and    $0xfe,%cl
mov    %cl,(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @flip_off(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 1
%4 = icmp eq i8 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = and i8 %2, -2
store i8 %6, i8* %0
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ 1, %5 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ isspace(char);
char *lstrip(char *str) {
  while (isspace(*str))
    str++;
  return str;
}


x86 assembly (clang, -O0):
<lstrip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <lstrip+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <lstrip+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lstrip>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <lstrip+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @lstrip(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int access_file(const char *filename) {
  struct stat buffer;
  return (stat(filename, &buffer) == 0);
}


x86 assembly (clang, -O0):
<access_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<access_file>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @access_file(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @access_file(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}