xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ f_memcpy_impl(void *, void *, int *);
void f_memcpy_(void *restrict new, void *restrict old, int *length) {
  f_memcpy_impl(new, old, length);
  return;
}


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

x86 assembly (clang, -O2):
<f_memcpy_>:
jmp    1030 <f_memcpy_impl@plt>

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

LLVM IR (-O2):
define void @f_memcpy_(i8* noalias %0, i8* noalias %1, i32* %2) {
%4 = tail call i32 @f_memcpy_impl(i8* %0, i8* %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int misael2() { printf("hola mundo :3\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"hola mundo :3\0A\00"
define i32 @misael2() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [14 x i8] c"hola mundo :3\00"
define i32 @misael2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int in_slice(int label, int slice, int *position) {
  int a[2], fail;
  double *c;
  a[0] = label;
  a[1] = slice;
  fail = _ada_use_c2phc4c(58, a, position, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<in_slice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x3a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_slice>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x3a,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @in_slice(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca double*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%10 = load i32, i32* %4
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %5
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%15 = load i32*, i32** %6
%16 = load double*, double** %9
%17 = call i32 @_ada_use_c2phc4c(i32 58, i32* %14, i32* %15, double* %16, i32 0)
store i32 %17, i32* %8
%18 = load i32, i32* %8
ret i32 %18
}

LLVM IR (-O2):
define i32 @in_slice(i32 %0, i32 %1, i32* %2) {
%4 = alloca [2 x i32]
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %0, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %1, i32* %7
%8 = call i32 @_ada_use_c2phc4c(i32 58, i32* %6, i32* %2, double* undef, i32 0)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
char *xstrdup(char const *);
char *ltrim(const char *str) {
  while (*str)
    if (!isspace(*str))
      break;
    else
      str++;
  return xstrdup(str);
}


x86 assembly (clang, -O0):
<ltrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1164 <ltrim+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%eax
jne    1153 <ltrim+0x33>
jmp    1164 <ltrim+0x44>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <ltrim+0xc>
mov    -0x8(%rbp),%rdi
call   1030 <xstrdup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ltrim>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1148 <ltrim+0x28>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1040 <isspace@plt>
test   %eax,%eax
je     1148 <ltrim+0x28>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ltrim+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <xstrdup@plt>

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

LLVM IR (-O2):
define i8* @ltrim(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i32 @isspace(i8 signext %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %9, %4, %1
%14 = phi i8* [ %0, %1 ], [ %6, %4 ], [ %10, %9 ]
%15 = tail call i8* @xstrdup(i8* %14)
ret i8* %15
}
/* Variables and functions */
char *calloc(unsigned int, int);
int /*<<< orphan*/ done(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *mallocate(register unsigned n) {
  register char *block;
  block = calloc(n, 1);
  if (block == NULL) {
    fprintf(stderr, "bison: memory exhausted\n");
    done(1);
  }
  return (block);
}


x86 assembly (clang, -O0):
<mallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1176 <mallocate+0x46>
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1030 <done@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mallocate>:
push   %rbx
mov    $0x1,%esi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1162 <mallocate+0x32>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1030 <done@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"bison: memory exhausted\0A\00"
define i8* @mallocate(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @calloc(i32 %4, i32 1)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @done(i32 1)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"bison: memory exhausted\0A\00"
define noalias i8* @mallocate(i32 %0) {
%2 = tail call i8* @calloc(i32 %0, i32 1)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @done(i32 1)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCGETS;
scalar_t__ ioctl(int, int /*<<< orphan*/, struct termios *);
int isatty(int fd) {
  struct termios s;
  return ioctl(fd, TCGETS, &s) == 0;
}


x86 assembly (clang, -O0):
<isatty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isatty>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <ioctl@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCGETS = global i32 0
define i32 @isatty(i32 %0) {
%2 = alloca %struct.termios
%3 = bitcast %struct.termios* %2 to i8*
%4 = load i32, i32* @TCGETS
%5 = call i64 @ioctl(i32 %0, i32 %4, %struct.termios* %2)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  int y = __VERIFIER_nondet_int();
  while (x < y) {
    x = x + y;
    y = y / 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <main+0x4b>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_free(void *ptr) { printf("\nOpenSHMEM Analyzer\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_free(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _lseek_r(void *, long, int);
int devo_fseek(void *stream, long offset, int whence) {
  return _lseek_r(stream, offset, whence);
}


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

x86 assembly (clang, -O2):
<devo_fseek>:
jmp    1030 <_lseek_r@plt>

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

LLVM IR (-O2):
define i32 @devo_fseek(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @_lseek_r(i8* %0, i64 %1, i32 %2)
ret i32 %4
}
int main() {
  int a = 0;
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRF1_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRF1_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRF1_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int do_DummyFunction(void) { return (!0); }


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

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

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

LLVM IR (-O2):
define i32 @do_DummyFunction() {
ret i32 1
}
int ft_intlen(int n) {
  int l;
  l = 1;
  while (n > 9) {
    n /= 10;
    l++;
  }
  return (l);
}


x86 assembly (clang, -O0):
<ft_intlen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x9,-0x4(%rbp)
jle    1134 <ft_intlen+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ft_intlen+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_intlen>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <ft_intlen+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <ft_intlen+0x20>
ret

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

LLVM IR (-O2):
define i32 @ft_intlen(i32 %0) {
%2 = icmp sgt i32 %0, 9
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = udiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = icmp ugt i32 %5, 99
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ intrflush(int /*<<< orphan*/, int);
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ stdscr;
void initial() {
  initscr();
  cbreak();
  noecho();
  intrflush(stdscr, false);
  keypad(stdscr, true);
  refresh();
}


x86 assembly (clang, -O0):
<initial>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1080 <noecho@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1060 <intrflush@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initial>:
push   %rbx
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1080 <noecho@plt>
mov    0x2e6b(%rip),%rbx
mov    (%rbx),%edi
xor    %esi,%esi
call   1060 <intrflush@plt>
mov    (%rbx),%edi
mov    $0x1,%esi
call   1040 <keypad@plt>
xor    %eax,%eax
pop    %rbx
jmp    1070 <refresh@plt>

LLVM IR (-O0):
@stdscr = global i32 0
define void @initial() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = call i32 @intrflush(i32 %4, i32 0)
%6 = load i32, i32* @stdscr
%7 = call i32 @keypad(i32 %6, i32 1)
%8 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
define void @initial() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = tail call i32 @intrflush(i32 %4, i32 0)
%6 = load i32, i32* @stdscr
%7 = tail call i32 @keypad(i32 %6, i32 1)
%8 = tail call i32 (...) @refresh()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_();
void do0x28() { _I8080_(); }


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

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

LLVM IR (-O0):
define void @do0x28() {
%1 = call i32 (...) @_I8080_()
ret void
}

LLVM IR (-O2):
define void @do0x28() {
%1 = tail call i32 (...) @_I8080_()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void sig_interrupt(int sig_no) {
  printf("interrupt\n%% ");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<sig_interrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_interrupt>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"interrupt\0A%% \00"
@stdout = global i32 0
define void @sig_interrupt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"interrupt\0A%% \00"
@stdout = global i32 0
define void @sig_interrupt(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "9ls -d -p port addr path\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"9ls -d -p port addr path\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"9ls -d -p port addr path\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void *dlopen(const char *str, int x) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @dlopen(i8* nocapture readnone %0, i32 %1) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ stop();
void opcode_10() { stop(); }


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

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

LLVM IR (-O0):
define void @opcode_10() {
%1 = call i32 (...) @stop()
ret void
}

LLVM IR (-O2):
define void @opcode_10() {
%1 = tail call i32 (...) @stop()
ret void
}
int test_imm_C8int8_mem(signed char *val) {
  return ((*val) & (-0xC8 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C8int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff38,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C8int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff38,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C8int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -200
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Type definitions */
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mg_call(struct mg_connection *, int, char *);
void do_ssi_call(struct mg_connection *nc, char *tag) { mg_call(nc, 105, tag); }


x86 assembly (clang, -O0):
<do_ssi_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x69,%esi
call   1030 <mg_call@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_ssi_call>:
mov    %rsi,%rdx
mov    $0x69,%esi
jmp    1030 <mg_call@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @do_ssi_call(%struct.mg_connection* %0, i8* %1) {
%3 = alloca %struct.mg_connection*
%4 = alloca i8*
store %struct.mg_connection* %0, %struct.mg_connection** %3
store i8* %1, i8** %4
%5 = load %struct.mg_connection*, %struct.mg_connection** %3
%6 = load i8*, i8** %4
%7 = call i32 @mg_call(%struct.mg_connection* %5, i32 105, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @do_ssi_call(%struct.mg_connection* %0, i8* %1) {
%3 = tail call i32 @mg_call(%struct.mg_connection* %0, i32 105, i8* %1)
ret void
}
/* Variables and functions */
int Update(char *, char *, char *);
int HandleSubmitSYSINI(void) {
  return Update("SYSINI", "/local/etc/sysconfig/system.ini",
                "/bin/chmod 644 /local/etc/sysconfig/system.ini"
                " && "
                "/usr/bin/dos2unix /local/etc/sysconfig/system.ini");
}


x86 assembly (clang, -O0):
<HandleSubmitSYSINI>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xf29(%rip),%rsi
lea    0xede(%rip),%rdx
call   1030 <Update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleSubmitSYSINI>:
lea    0xee9(%rip),%rdi
lea    0xf2d(%rip),%rsi
lea    0xee2(%rip),%rdx
jmp    1030 <Update@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"SYSINI\00"
@.str.1 = [32 x i8] c"/local/etc/sysconfig/system.ini\00"
@.str.2 = [100 x i8] c"/bin/chmod 644 /local/etc/sysconfig/system.ini && /usr/bin/dos2unix /local/etc/sysconfig/system.ini\00"
define i32 @HandleSubmitSYSINI() {
%1 = call i32 @Update(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [7 x i8] c"SYSINI\00"
@.str.1 = [32 x i8] c"/local/etc/sysconfig/system.ini\00"
@.str.2 = [100 x i8] c"/bin/chmod 644 /local/etc/sysconfig/system.ini && /usr/bin/dos2unix /local/etc/sysconfig/system.ini\00"
define i32 @HandleSubmitSYSINI() {
%1 = tail call i32 @Update(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([100 x i8], [100 x i8]* @.str.2, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ pipe_buf;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ read(int, char *, int);
void read_from_pipe(char *pipe_name, char *pipe_buf) {
  memset(&pipe_buf[0], 0, sizeof(pipe_buf));
  int pipe_fd = open(pipe_name, O_RDONLY);
  read(pipe_fd, pipe_buf, 1024);
  close(pipe_fd);
}


x86 assembly (clang, -O0):
<read_from_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
call   1060 <open@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x400,%edx
call   1050 <read@plt>
mov    -0x14(%rbp),%edi
call   1040 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_from_pipe>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdi
call   1060 <open@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0x400,%edx
call   1050 <read@plt>
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <close@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
define void @read_from_pipe(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = call i32 @memset(i8* %7, i32 0, i32 8)
%9 = load i8*, i8** %3
%10 = load i32, i32* @O_RDONLY
%11 = call i32 @open(i8* %9, i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = load i8*, i8** %4
%14 = call i32 @read(i32 %12, i8* %13, i32 1024)
%15 = load i32, i32* %5
%16 = call i32 @close(i32 %15)
ret void
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define void @read_from_pipe(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @memset(i8* %1, i32 0, i32 8)
%4 = load i32, i32* @O_RDONLY
%5 = tail call i32 @open(i8* %0, i32 %4)
%6 = tail call i32 @read(i32 %5, i8* %1, i32 1024)
%7 = tail call i32 @close(i32 %5)
ret void
}
unsigned char *get_token_end_ck(unsigned char *token_start,
                                unsigned char *buf_end) {
  while ((token_start != buf_end) && ((*token_start) > ' ')) {
    token_start++;
  }
  return token_start;
}


x86 assembly (clang, -O0):
<get_token_end_ck>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x11(%rbp)
je     112f <get_token_end_ck+0x2f>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x20,%eax
setg   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    113f <get_token_end_ck+0x3f>
jmp    1150 <get_token_end_ck+0x50>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <get_token_end_ck+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_token_end_ck>:
mov    %rdi,%rax
cmp    %rsi,%rdi
je     1121 <get_token_end_ck+0x21>
nopl   0x0(%rax,%rax,1)
cmpb   $0x21,(%rax)
jb     1121 <get_token_end_ck+0x21>
add    $0x1,%rax
cmp    %rsi,%rax
jne    1110 <get_token_end_ck+0x10>
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @get_token_end_ck(i8* %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %4, %13
%10 = phi i8* [ %14, %13 ], [ %0, %4 ]
%11 = load i8, i8* %10
%12 = icmp ugt i8 %11, 32
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = getelementptr inbounds i8, i8* %10, i64 1
%15 = icmp eq i8* %14, %1
br i1 %15, label %16, label %9
16: ; preds = %9, %13, %2
%17 = phi i8* [ %0, %2 ], [ %8, %13 ], [ %10, %9 ]
ret i8* %17
}
int IsNumeric(const char *ccharptr_CharacterList) {
  for (; *ccharptr_CharacterList; ccharptr_CharacterList++)
    if (*ccharptr_CharacterList < '0' || *ccharptr_CharacterList > '9')
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<IsNumeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <IsNumeric+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1135 <IsNumeric+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1141 <IsNumeric+0x41>
movl   $0x0,-0x4(%rbp)
jmp    115e <IsNumeric+0x5e>
jmp    1146 <IsNumeric+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <IsNumeric+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsNumeric>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <IsNumeric+0x23>
add    $0x1,%rdi
nop
add    $0xc6,%cl
cmp    $0xf5,%cl
jbe    1124 <IsNumeric+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <IsNumeric+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @IsNumeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -58
%11 = icmp ult i8 %10, -10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
double perc(double part, double all) { return ((part / all) * (double)100.0); }


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

x86 assembly (clang, -O2):
<perc>:
divsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @perc(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fdiv double %5, %6
%8 = fmul double %7, 1.000000e+02
ret double %8
}

LLVM IR (-O2):
define double @perc(double %0, double %1) {
%3 = fdiv double %0, %1
%4 = fmul double %3, 1.000000e+02
ret double %4
}
void medium_priority_cb() {}


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

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

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

LLVM IR (-O2):
define void @medium_priority_cb() {
ret void
}
void F_GameEndDrawer(void) {}


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

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

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

LLVM IR (-O2):
define void @F_GameEndDrawer() {
ret void
}
int comp_double_modulus(const void *a, const void *b) {
  double am = (*(double *)a) * (*(double *)a);
  double bm = (*(double *)b) * (*(double *)b);
  if (am < bm)
    return (-1);
  if (am > bm)
    return (+1);
  return (0);
}


x86 assembly (clang, -O0):
<comp_double_modulus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1156 <comp_double_modulus+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    1179 <comp_double_modulus+0x79>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1172 <comp_double_modulus+0x72>
movl   $0x1,-0x4(%rbp)
jmp    1179 <comp_double_modulus+0x79>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_double_modulus>:
movsd  (%rdi),%xmm0
mulsd  %xmm0,%xmm0
movsd  (%rsi),%xmm1
mulsd  %xmm1,%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @comp_double_modulus(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
%14 = fmul double %10, %13
store double %14, double* %6
%15 = load i8*, i8** %5
%16 = bitcast i8* %15 to double*
%17 = load double, double* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to double*
%20 = load double, double* %19
%21 = fmul double %17, %20
store double %21, double* %7
%22 = load double, double* %6
%23 = load double, double* %7
%24 = fcmp olt double %22, %23
br i1 %24, label %25, label %26
25: ; preds = %2
store i32 -1, i32* %3
br label %32
26: ; preds = %2
%27 = load double, double* %6
%28 = load double, double* %7
%29 = fcmp ogt double %27, %28
br i1 %29, label %30, label %31
30: ; preds = %26
store i32 1, i32* %3
br label %32
31: ; preds = %26
store i32 0, i32* %3
br label %32
32: ; preds = %31, %30, %25
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @comp_double_modulus(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = bitcast i8* %1 to double*
%7 = load double, double* %6
%8 = fmul double %7, %7
%9 = fcmp olt double %5, %8
%10 = fcmp ogt double %5, %8
%11 = zext i1 %10 to i32
%12 = select i1 %9, i32 -1, i32 %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ finite(double const);
int isInfinite(const double pV) { return !finite(pV); }


x86 assembly (clang, -O0):
<isInfinite>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xefb(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  0xedf(%rip),%xmm1
ucomisd %xmm1,%xmm0
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isInfinite>:
andpd  0xef8(%rip),%xmm0
xor    %eax,%eax
ucomisd 0xefe(%rip),%xmm0
sete   %al
ret

LLVM IR (-O0):
define i32 @isInfinite(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fabs.f64(double %3)
%5 = fcmp one double %4, 0x7FF0000000000000
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isInfinite(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fcmp ueq double %2, 0x7FF0000000000000
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int strlen(const char *s) {
  const char *p;
  p = s;
  while (*p != '\0') {
    p++;
  }
  return p - s;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1131 <strlen+0x31>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strlen+0x10>
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %10, %1
%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 %13
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %3
br label %5
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = ptrtoint i8* %14 to i64
%17 = ptrtoint i8* %15 to i64
%18 = sub i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
/* Variables and functions */
double cos(double);
double Cos(double a, double b) { return cos(a); }


x86 assembly (clang, -O0):
<Cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cos>:
jmp    1030 <cos@plt>

LLVM IR (-O0):
define double @Cos(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @cos(double %5)
ret double %6
}

LLVM IR (-O2):
define double @Cos(double %0, double %1) {
%3 = tail call double @cos(double %0)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ busy_wait(int);
void blink(int n) {
  while (1) {
    *(volatile int *)(0xC022C184) = (0x138800);
    busy_wait(n);
    *(volatile int *)(0xC022C184) = (0x838C00);
    busy_wait(n);
  }
}


x86 assembly (clang, -O0):
<blink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xc022c184,%eax
movl   $0x138800,(%rax)
mov    -0x4(%rbp),%edi
call   1030 <busy_wait@plt>
mov    $0xc022c184,%eax
movl   $0x838c00,(%rax)
mov    -0x4(%rbp),%edi
call   1030 <busy_wait@plt>
jmp    111b <blink+0xb>

x86 assembly (clang, -O2):
<blink>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xc022c184,%r14d
nopl   0x0(%rax)
movl   $0x138800,(%r14)
mov    %ebx,%edi
call   1030 <busy_wait@plt>
movl   $0x838c00,(%r14)
mov    %ebx,%edi
call   1030 <busy_wait@plt>
jmp    1120 <blink+0x10>

LLVM IR (-O0):
define void @blink(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
store volatile i32 1280000, i32* inttoptr (i64 3223503236 to i32*)
%4 = load i32, i32* %2
%5 = call i32 @busy_wait(i32 %4)
store volatile i32 8621056, i32* inttoptr (i64 3223503236 to i32*)
%6 = load i32, i32* %2
%7 = call i32 @busy_wait(i32 %6)
br label %3
}

LLVM IR (-O2):
define void @blink(i32 %0) {
br label %2
2: ; preds = %1, %2
store volatile i32 1280000, i32* inttoptr (i64 3223503236 to i32*)
%3 = tail call i32 @busy_wait(i32 %0)
store volatile i32 8621056, i32* inttoptr (i64 3223503236 to i32*)
%4 = tail call i32 @busy_wait(i32 %0)
br label %2
}
/* Variables and functions */
int func(int);
int main() {
  long n = 5;
  return func(10);
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%edi
jmp    1030 <func@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func(i32 10)
ret i32 %1
}
int __attribute__((no, noclone)) ok(int a, int b, int c) {
  return a == 15 && b == 7 && c == 15 ? 0 : 1;
}


x86 assembly (clang, -O0):
<ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0xf,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    1135 <ok+0x35>
xor    %eax,%eax
cmpl   $0x7,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    1135 <ok+0x35>
cmpl   $0xf,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    $0x1,%eax
xor    %ecx,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ok>:
xor    $0xf,%edi
xor    $0x7,%esi
or     %edi,%esi
xor    $0xf,%edx
xor    %eax,%eax
or     %esi,%edx
setne  %al
ret

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

LLVM IR (-O2):
define i32 @ok(i32 %0, i32 %1, i32 %2) {
%4 = icmp ne i32 %0, 15
%5 = icmp ne i32 %1, 7
%6 = icmp ne i32 %2, 15
%7 = or i1 %4, %5
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
ret i32 %9
}
int ceph_fscache_register_fs(struct ceph_fs_client *fsc,
                             struct fs_context *fc) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.ceph_fs_client = type opaque
%struct.fs_context = type opaque
define i32 @ceph_fscache_register_fs(%struct.ceph_fs_client* nocapture readnone %0, %struct.fs_context* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
float abs(float);
float helpFindMinAbsFloat(float a, float b) {
  float aAbs = abs(a);
  float bAbs = abs(b);
  if (aAbs < bAbs) {
    return aAbs;
  } else {
    return bAbs;
  }
}


x86 assembly (clang, -O0):
<helpFindMinAbsFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <abs@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <abs@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1162 <helpFindMinAbsFloat+0x52>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116c <helpFindMinAbsFloat+0x5c>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @helpFindMinAbsFloat(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
%8 = load float, float* %4
%9 = call float @abs(float %8)
store float %9, float* %6
%10 = load float, float* %5
%11 = call float @abs(float %10)
store float %11, float* %7
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fcmp olt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load float, float* %6
store float %16, float* %3
br label %19
17: ; preds = %2
%18 = load float, float* %7
store float %18, float* %3
br label %19
19: ; preds = %17, %15
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @helpFindMinAbsFloat(float %0, float %1) {
%3 = tail call float @abs(float %0)
%4 = tail call float @abs(float %1)
%5 = fcmp olt float %3, %4
%6 = select i1 %5, float %3, float %4
ret float %6
}
DF(not_f) { err(16); }


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

x86 assembly (clang, -O2):
<DF>:
mov    $0x10,%edi
xor    %eax,%eax
jmp    1030 <err@plt>

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

LLVM IR (-O2):
define i32 @DF(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @err to i32 (i32, ...)*)(i32 16)
ret i32 undef
}