xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ hton64(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(void *, int /*<<< orphan*/ *, int);
void writeInt64(int64_t v, void *p) {
  v = hton64(v);
  memcpy(p, &v, 8);
}


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

x86 assembly (clang, -O2):
<writeInt64>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
call   1030 <hton64@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x8,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @writeInt64(i32 %0, i8* %1) {
%3 = alloca i32
%4 = tail call i32 @hton64(i32 %0)
store i32 %4, i32* %3
%5 = call i32 @memcpy(i8* %1, i32* %3, i32 8)
ret void
}
void __finish() {}


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

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

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

LLVM IR (-O2):
define void @__finish() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bitmap_size(int);
int /*<<< orphan*/ memset(unsigned long *, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void bitmap_clear(unsigned long *addr, int nr_bits) {
  memset(addr, 0, bitmap_size(nr_bits));
}


x86 assembly (clang, -O0):
<bitmap_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <bitmap_size@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_clear>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <bitmap_size@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @bitmap_clear(i64* %0, i32 %1) {
%3 = tail call i32 @bitmap_size(i32 %1)
%4 = tail call i32 @memset(i64* %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
double atof(char *);
__attribute__((__weak__, __always___)) double softboundmpx_atof(char *ptr) {
  return atof(ptr);
}


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

x86 assembly (clang, -O2):
<softboundmpx_atof>:
jmp    1030 <atof@plt>

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

LLVM IR (-O2):
define weak double @softboundmpx_atof(i8* %0) {
%2 = tail call double @atof(i8* %0)
ret double %2
}
/* Variables and functions */
int chattr_full(char const *, int, unsigned int, unsigned int, unsigned int *,
                int /*<<< orphan*/ *, int);
int chattr_path(const char *path, unsigned value, unsigned mask,
                unsigned *previous) {
  return chattr_full(path, -1, value, mask, previous, NULL, false);
}


x86 assembly (clang, -O0):
<chattr_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    $0xffffffff,%esi
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <chattr_full@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chattr_path>:
push   %rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
movl   $0x0,(%rsp)
mov    $0xffffffff,%esi
xor    %r9d,%r9d
call   1030 <chattr_full@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @chattr_path(i8* %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @chattr_full(i8* %9, i32 -1, i32 %10, i32 %11, i32* %12, i32* null, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @chattr_path(i8* %0, i32 %1, i32 %2, i32* %3) {
%5 = tail call i32 @chattr_full(i8* %0, i32 -1, i32 %1, i32 %2, i32* %3, i32* null, i32 0)
ret i32 %5
}
int ti_todeg_start(double const *options) {
  (void)options;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @ti_todeg_start(double* nocapture readnone %0) {
ret i32 0
}
void gtk_accel_map_unlock_path() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_map_unlock_path() {
ret void
}
/* Variables and functions */
double __nv_fmod(double, double);
double fmod(double __a, double __b) { return __nv_fmod(__a, __b); }


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

x86 assembly (clang, -O2):
<fmod>:
jmp    1030 <__nv_fmod@plt>

LLVM IR (-O0):
define double @fmod(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 = call double @__nv_fmod(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @fmod(double %0, double %1) {
%3 = tail call double @__nv_fmod(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc == 1) {
    fprintf(stderr, "No argument");
  }
  execvp(argv[1], argv + 1);
  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)
cmpl   $0x1,-0x8(%rbp)
jne    1155 <main+0x35>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
call   1040 <execvp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x1,%edi
jne    113e <main+0x1e>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x8(%rbx),%rdi
add    $0x8,%rbx
mov    %rbx,%rsi
call   1040 <execvp@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"No argument\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = call i32 @execvp(i8* %14, i8** %16)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"No argument\00"
define i32 @main(i32 %0, i8** %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @execvp(i8* %9, i8** %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int main(void) {
  while (true)
    *(volatile uint32_t *)0x20000000 = *(volatile uint32_t *)0x20000000;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x20000000,%eax
mov    (%rax),%ecx
mov    $0x20000000,%eax
mov    %ecx,(%rax)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
mov    0x20000000,%eax
mov    %eax,0x20000000
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = load volatile i32, i32* inttoptr (i64 536870912 to i32*)
store volatile i32 %3, i32* inttoptr (i64 536870912 to i32*)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = load volatile i32, i32* inttoptr (i64 536870912 to i32*)
store volatile i32 %2, i32* inttoptr (i64 536870912 to i32*)
br label %1
}
/* Variables and functions */
char *reorder_lines(char *, unsigned int *);
int /*<<< orphan*/ replace_char(char, char, char *, unsigned int *);
char *replace_string(char *, char, char *, unsigned int *);
char *tradicional(char *data, unsigned int *size) {
  replace_char('\n', ' ', data, size);
  data = replace_string("**", '#', data, size);
  data = reorder_lines(data, size);
  return data;
}


x86 assembly (clang, -O0):
<tradicional>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0xa,%edi
mov    $0x20,%esi
call   1050 <replace_char@plt>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe9a(%rip),%rdi
mov    $0x23,%esi
call   1040 <replace_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <reorder_lines@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tradicional>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0xa,%edi
mov    $0x20,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <replace_char@plt>
lea    0xeaa(%rip),%rdi
mov    $0x23,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1040 <replace_string@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <reorder_lines@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"**\00"
define i8* @tradicional(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 @replace_char(i8 signext 10, i8 signext 32, i8* %5, i32* %6)
%8 = load i8*, i8** %3
%9 = load i32*, i32** %4
%10 = call i8* @replace_string(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 35, i8* %8, i32* %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i32*, i32** %4
%13 = call i8* @reorder_lines(i8* %11, i32* %12)
store i8* %13, i8** %3
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"**\00"
define i8* @tradicional(i8* %0, i32* %1) {
%3 = tail call i32 @replace_char(i8 signext 10, i8 signext 32, i8* %0, i32* %1)
%4 = tail call i8* @replace_string(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext 35, i8* %0, i32* %1)
%5 = tail call i8* @reorder_lines(i8* %4, i32* %1)
ret i8* %5
}
int rt_application_init() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rt_application_init() {
ret i32 0
}
/* Variables and functions */
unsigned int __native_popcnt(unsigned int);
unsigned int __native_clz(unsigned int x) {
  x |= (x >> 1);
  x |= (x >> 2);
  x |= (x >> 4);
  x |= (x >> 8);
  x |= (x >> 16);
  return (32 - __native_popcnt(x));
}


x86 assembly (clang, -O0):
<__native_clz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <__native_popcnt@plt>
mov    %eax,%ecx
mov    $0x20,%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__native_clz>:
push   %rax
mov    %edi,%eax
shr    %eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x8,%eax
or     %eax,%edi
mov    %edi,%eax
shr    $0x10,%eax
or     %eax,%edi
call   1030 <__native_popcnt@plt>
mov    $0x20,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @__native_clz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = load i32, i32* %2
%6 = or i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 2
%9 = load i32, i32* %2
%10 = or i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = lshr i32 %11, 4
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 16
%21 = load i32, i32* %2
%22 = or i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = call i32 @__native_popcnt(i32 %23)
%25 = sub i32 32, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @__native_clz(i32 %0) {
%2 = lshr i32 %0, 1
%3 = or i32 %2, %0
%4 = lshr i32 %3, 2
%5 = or i32 %4, %3
%6 = lshr i32 %5, 4
%7 = or i32 %6, %5
%8 = lshr i32 %7, 8
%9 = or i32 %8, %7
%10 = lshr i32 %9, 16
%11 = or i32 %10, %9
%12 = tail call i32 @__native_popcnt(i32 %11)
%13 = sub i32 32, %12
ret i32 %13
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_34(int Salt, int Parameter) {
  unsigned b = Salt * 0xDA5334F + 0x3AC7;
  return yahoo_M1Common(b, Parameter);
}


x86 assembly (clang, -O0):
<yahoo_f01_34>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0xda5334f,-0x4(%rbp),%eax
add    $0x3ac7,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <yahoo_M1Common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yahoo_f01_34>:
imul   $0xda5334f,%edi,%edi
add    $0x3ac7,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_34(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 228930383
%8 = add nsw i32 %7, 15047
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = call i32 @yahoo_M1Common(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @yahoo_f01_34(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 228930383
%4 = add nsw i32 %3, 15047
%5 = tail call i32 @yahoo_M1Common(i32 %4, i32 %1)
ret i32 %5
}
void free_argv(char **argv) {
  for (char **it = argv; *it; ++it)
    free(*it);
  free(argv);
}


x86 assembly (clang, -O0):
<free_argv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
je     114f <free_argv+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <free_argv+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_argv>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <free_argv+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <free_argv+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_argv(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 = %12, %1
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
br label %12
12: ; preds = %9
%13 = load i8**, i8*** %3
%14 = getelementptr inbounds i8*, i8** %13, i32 1
store i8** %14, i8*** %3
br label %5
15: ; preds = %5
%16 = load i8**, i8*** %2
%17 = bitcast i8** %16 to i8*
ret void
}

LLVM IR (-O2):
define void @free_argv(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %6, %1
%5 = bitcast i8** %0 to i8*
tail call void @free(i8* %5)
ret void
6: ; preds = %1, %6
%7 = phi i8* [ %10, %6 ], [ %2, %1 ]
%8 = phi i8** [ %9, %6 ], [ %0, %1 ]
tail call void @free(i8* %7)
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = icmp eq i8* %10, null
br i1 %11, label %4, label %6
}
/* Variables and functions */
int utf8_getsize_char(char const *);
bool utf8_validate(const char *str) {
  int c;
  for (; *str;) {
    c = utf8_getsize_char(str);
    if (c < 0)
      return false;
    str += c;
  }
  return true;
}


x86 assembly (clang, -O0):
<utf8_validate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1161 <utf8_validate+0x51>
mov    -0x10(%rbp),%rdi
call   1030 <utf8_getsize_char@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    114b <utf8_validate+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1168 <utf8_validate+0x58>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <utf8_validate+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_validate>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmpb   $0x0,(%rdi)
je     113c <utf8_validate+0x2c>
mov    %rdi,%rbx
mov    %rbx,%rdi
call   1030 <utf8_getsize_char@plt>
test   %eax,%eax
js     113a <utf8_validate+0x2a>
mov    %eax,%eax
cmpb   $0x0,(%rbx,%rax,1)
lea    (%rbx,%rax,1),%rbx
jne    1120 <utf8_validate+0x10>
jmp    113c <utf8_validate+0x2c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @utf8_validate(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %8
%5 = phi i8* [ %10, %8 ], [ %0, %1 ]
%6 = tail call i32 @utf8_getsize_char(i8* %5)
%7 = icmp slt i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = zext i32 %6 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %8, %1
%14 = phi i32 [ 1, %1 ], [ 1, %8 ], [ 0, %4 ]
ret i32 %14
}
/* Variables and functions */
size_t slash_len(const char *s) {
  const char *s0 = s;
  while (*s == '/')
    s++;
  return s - s0;
}


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

x86 assembly (clang, -O2):
<slash_len>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x2f,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
je     1110 <slash_len+0x10>
ret

LLVM IR (-O0):
define i64 @slash_len(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** %2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 47
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %5
13: ; preds = %5
%14 = load i8*, i8** %2
%15 = load i8*, i8** %3
%16 = ptrtoint i8* %14 to i64
%17 = ptrtoint i8* %15 to i64
%18 = sub i64 %16, %17
ret i64 %18
}

LLVM IR (-O2):
define i64 @slash_len(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, 47
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %2, label %7
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ EFD_NONBLOCK;
int eventfd(int /*<<< orphan*/, int /*<<< orphan*/);
int main(void) {
  int fd = eventfd(0, EFD_NONBLOCK);
  if (fd < 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <eventfd@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1148 <main+0x38>
movl   $0x1,-0x4(%rbp)
jmp    114f <main+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1030 <eventfd@plt>
shr    $0x1f,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EFD_NONBLOCK = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @EFD_NONBLOCK
%4 = call i32 @eventfd(i32 0, i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@EFD_NONBLOCK = global i32 0
define i32 @main() {
%1 = load i32, i32* @EFD_NONBLOCK
%2 = tail call i32 @eventfd(i32 0, i32 %1)
%3 = lshr i32 %2, 31
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ floor(double);
double lua_check_number(int, char *);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
void math_floor(void) {
  double d = lua_check_number(1, "floor");
  lua_pushnumber(floor(d));
}


x86 assembly (clang, -O0):
<math_floor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
call   1030 <lua_check_number@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <floor@plt>
mov    %eax,%edi
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_floor>:
push   %rax
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
call   1030 <lua_check_number@plt>
call   1050 <floor@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"floor\00"
define void @math_floor() {
%1 = alloca double
%2 = call double @lua_check_number(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store double %2, double* %1
%3 = load double, double* %1
%4 = call i32 @floor(double %3)
%5 = call i32 @lua_pushnumber(i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"floor\00"
define void @math_floor() {
%1 = tail call double @lua_check_number(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @floor(double %1)
%3 = tail call i32 @lua_pushnumber(i32 %2)
ret void
}
/* Type definitions */
typedef int fpu_control_t;

/* Variables and functions */
int FE_ALL_EXCEPT;
int /*<<< orphan*/ _FPU_GETCW(int);
int /*<<< orphan*/ _FPU_SETCW(int);
int fedisableexcept(int excepts) {
  fpu_control_t temp, old_exc;
  _FPU_GETCW(temp);
  old_exc = (temp >> 5) & FE_ALL_EXCEPT;
  excepts &= FE_ALL_EXCEPT;
  temp &= ~(excepts << 5);
  _FPU_SETCW(temp);
  return old_exc;
}


x86 assembly (clang, -O0):
<fedisableexcept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <_FPU_GETCW@plt>
mov    -0x8(%rbp),%eax
sar    $0x5,%eax
mov    0x2ea0(%rip),%rcx
and    (%rcx),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%eax
xor    $0xffffffff,%eax
and    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_FPU_SETCW@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fedisableexcept>:
push   %rax
call   1030 <_FPU_GETCW@plt>
xor    %edi,%edi
call   1040 <_FPU_SETCW@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@FE_ALL_EXCEPT = global i32 0
define i32 @fedisableexcept(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @_FPU_GETCW(i32 %5)
%7 = load i32, i32* %3
%8 = ashr i32 %7, 5
%9 = load i32, i32* @FE_ALL_EXCEPT
%10 = and i32 %8, %9
store i32 %10, i32* %4
%11 = load i32, i32* @FE_ALL_EXCEPT
%12 = load i32, i32* %2
%13 = and i32 %12, %11
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = shl i32 %14, 5
%16 = xor i32 %15, -1
%17 = load i32, i32* %3
%18 = and i32 %17, %16
store i32 %18, i32* %3
%19 = load i32, i32* %3
%20 = call i32 @_FPU_SETCW(i32 %19)
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@FE_ALL_EXCEPT = global i32 0
define i32 @fedisableexcept(i32 %0) {
%2 = tail call i32 @_FPU_GETCW(i32 undef)
%3 = tail call i32 @_FPU_SETCW(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ s2circxz(float, float, float, float, int, float);
void s2circxz_(float *px, float *py, float *pz, float *r, int *nseg,
               float *asp) {
  s2circxz(*px, *py, *pz, *r, *nseg, *asp);
}


x86 assembly (clang, -O0):
<s2circxz_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm3
mov    -0x28(%rbp),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm4
call   1030 <s2circxz@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2circxz_>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
movss  (%rdx),%xmm2
movss  (%rcx),%xmm3
mov    (%r8),%edi
movss  (%r9),%xmm4
jmp    1030 <s2circxz@plt>

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

LLVM IR (-O2):
define void @s2circxz_(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, i32* nocapture %4, float* nocapture %5) {
%7 = load float, float* %0
%8 = load float, float* %1
%9 = load float, float* %2
%10 = load float, float* %3
%11 = load i32, i32* %4
%12 = load float, float* %5
%13 = tail call i32 @s2circxz(float %7, float %8, float %9, float %10, i32 %11, float %12)
ret void
}
/* Variables and functions */
int strtoull(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int ret;
  if (argc <= 1) {
    ret = 1;
  } else {
    ret = strtoull(argv[1], NULL, 0);
  }
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     113c <main+0x2c>
movl   $0x1,-0x14(%rbp)
jmp    1152 <main+0x42>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <strtoull@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jge    111b <main+0xb>
mov    $0x1,%eax
ret
mov    0x8(%rsi),%rdi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <strtoull@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strtoull(i8* nocapture %6, i32* null, i32 0)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 1, %2 ]
ret i32 %9
}
const char *timeR_get_bin_name(unsigned int bin_id) { return ""; }


x86 assembly (clang, -O0):
<timeR_get_bin_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeR_get_bin_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @timeR_get_bin_name(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @timeR_get_bin_name(i32 %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ u64;
typedef int /*<<< orphan*/ src;
typedef int /*<<< orphan*/ dest;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ memcpy(unsigned long long *, double *, int);
int /*<<< orphan*/ write_u64(unsigned char *, unsigned long long);
void write_double64(unsigned char *dest, double src) {
  unsigned long long u64;
  assert(sizeof(src) == sizeof(u64));
  memcpy(&u64, &src, sizeof(dest));
  write_u64(dest, u64);
}


x86 assembly (clang, -O0):
<write_double64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <assert@plt>
lea    -0x18(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <write_u64@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_double64>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rsp,%rdi
lea    0x8(%rsp),%rsi
mov    $0x8,%edx
call   1050 <memcpy@plt>
mov    (%rsp),%rsi
mov    %rbx,%rdi
call   1030 <write_u64@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @write_double64(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca i64
store i8* %0, i8** %3
store double %1, double* %4
%6 = call i32 @assert(i32 1)
%7 = call i32 @memcpy(i64* %5, double* %4, i32 8)
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = call i32 @write_u64(i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @write_double64(i8* %0, double %1) {
%3 = alloca double
%4 = alloca i64
store double %1, double* %3
%5 = bitcast i64* %4 to i8*
%6 = tail call i32 @assert(i32 1)
%7 = call i32 @memcpy(i64* %4, double* %3, i32 8)
%8 = load i64, i64* %4
%9 = call i32 @write_u64(i8* %0, i64 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tmpl(char *);
void main() {
  int n;
  int i = 0;
  int k = 0;
  while (i < n) {
    tmpl("(le(i,j,k,n),le(i,j,k,n))");
    i = i + 2;
    k++;
  }
  int j = 0;
  while (j < n) {
    tmpl("(le(i,j,k,n),le(i,j,k,n))");
    if (k <= 0)
    ERROR:;
      j = j + 2;
    k--;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1155 <main+0x45>
lea    0xec7(%rip),%rdi
call   1030 <tmpl@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <main+0x16>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119f <main+0x8f>
lea    0xe91(%rip),%rdi
call   1030 <tmpl@plt>
cmpl   $0x0,-0xc(%rbp)
jg     1188 <main+0x78>
jmp    1183 <main+0x73>
jmp    1188 <main+0x78>
mov    -0x10(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    115c <main+0x4c>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"(le(i,j,k,n),le(i,j,k,n))\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %9, %0
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = call i32 @tmpl(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 2
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %5
15: ; preds = %5
store i32 0, i32* %4
br label %16
16: ; preds = %26, %15
%17 = load i32, i32* %4
%18 = load i32, i32* %1
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %31
20: ; preds = %16
%21 = call i32 @tmpl(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%22 = load i32, i32* %3
%23 = icmp sle i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %20
br label %25
25: ; preds = %24
br label %26
26: ; preds = %25, %20
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 2
store i32 %28, i32* %4
%29 = load i32, i32* %3
%30 = add nsw i32 %29, -1
store i32 %30, i32* %3
br label %16
31: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ psline(char *, ...);
void put_ps_fini(int pages) {
  psline("%%%%Trailer\n");
  psline("%%%%Pages: %i\n", pages);
  psline("%%%%EOF\n");
}


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

x86 assembly (clang, -O2):
<put_ps_fini>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <psline@plt>
lea    0xee5(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <psline@plt>
lea    0xee4(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <psline@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%%%%Trailer\0A\00"
@.str.1 = [15 x i8] c"%%%%Pages: %i\0A\00"
@.str.2 = [9 x i8] c"%%%%EOF\0A\00"
define void @put_ps_fini(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @psline(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @psline(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (i8*, ...) @psline(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%%%%Trailer\0A\00"
@.str.1 = [15 x i8] c"%%%%Pages: %i\0A\00"
@.str.2 = [9 x i8] c"%%%%EOF\0A\00"
define void @put_ps_fini(i32 %0) {
%2 = tail call i32 (i8*, ...) @psline(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @psline(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%4 = tail call i32 (i8*, ...) @psline(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strlen(char *);
int stringtest(char *str) {
  if (str == NULL)
    return -1;
  return strlen(str);
}


x86 assembly (clang, -O0):
<stringtest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <stringtest+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    113f <stringtest+0x2f>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringtest>:
test   %rdi,%rdi
je     111a <stringtest+0xa>
jmp    1030 <strlen@plt>
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @stringtest(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ -1, %1 ]
ret i32 %6
}
int test_imm_B2uint32_reg(unsigned int val) {
  return ((val) & (0xB2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B2uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xb2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B2uint32_reg>:
test   $0xb2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B2uint32_reg(i32 %0) {
%2 = and i32 %0, 178
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *str_comp(char *stream, char *sub_stream) {
  while (*sub_stream != '\0') {
    if (*stream != *sub_stream)
      return NULL;
    stream++;
    sub_stream++;
  }
  return stream;
}


x86 assembly (clang, -O0):
<str_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115c <str_comp+0x5c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     113f <str_comp+0x3f>
movq   $0x0,-0x8(%rbp)
jmp    1164 <str_comp+0x64>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <str_comp+0xc>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_comp>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1123 <str_comp+0x23>
add    $0x1,%rsi
nopl   (%rax)
cmp    %cl,(%rax)
jne    1124 <str_comp+0x24>
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <str_comp+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @str_comp(i8* %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %13, %11 ], [ %1, %2 ]
%8 = phi i8* [ %12, %11 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %6
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i8* [ %0, %2 ], [ %12, %11 ], [ null, %5 ]
ret i8* %17
}
void J420ToABGR() {}


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

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

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

LLVM IR (-O2):
define void @J420ToABGR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(int);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void *xmalloc(int size) {
  void *rv = malloc(size);
  if (size && !rv) {
    char *msg = "Failed to allocate memory - aborting\n";
    write(2, msg, strlen(msg));
    exit(3);
  }
  return rv;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11a2 <xmalloc+0x62>
cmpq   $0x0,-0x10(%rbp)
jne    11a2 <xmalloc+0x62>
lea    0xe8d(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x3,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %edi,%ebx
call   1050 <malloc@plt>
test   %ebx,%ebx
je     1151 <xmalloc+0x11>
test   %rax,%rax
je     1153 <xmalloc+0x13>
pop    %rbx
ret
lea    0xea6(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x3,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Failed to allocate memory - aborting\0A\00"
define i8* @xmalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @malloc(i32 %5)
store i8* %6, i8** %3
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = icmp ne i8* %10, null
br i1 %11, label %18, label %12
12: ; preds = %9
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %4
%15 = call i32 @strlen(i8* %14)
%16 = call i32 @write(i32 2, i8* %13, i32 %15)
%17 = call i32 @exit(i32 3)
unreachable
18: ; preds = %9, %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [38 x i8] c"Failed to allocate memory - aborting\0A\00"
define noalias i8* @xmalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i32 %0, 0
%4 = icmp ne i8* %2, null
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = tail call i32 @strlen(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @exit(i32 3)
unreachable
10: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t reverseBits_fun_uint8_t(uint8_t x) {
  uint8_t r = x;
  int i = 7;
  while (x >>= 1) {
    r = (r << 1) | (x & 1);
    --i;
  }
  return r << i;
}


x86 assembly (clang, -O0):
<reverseBits_fun_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1145 <reverseBits_fun_uint8_t+0x45>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1114 <reverseBits_fun_uint8_t+0x14>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseBits_fun_uint8_t>:
mov    $0x7,%ecx
cmp    $0x2,%edi
jae    110e <reverseBits_fun_uint8_t+0xe>
mov    %edi,%eax
jmp    1134 <reverseBits_fun_uint8_t+0x34>
mov    $0x7,%ecx
mov    %edi,%eax
mov    %edi,%edx
nopw   0x0(%rax,%rax,1)
sar    %edx
mov    %edx,%esi
and    $0x1,%esi
lea    (%rsi,%rax,2),%eax
add    $0xffffffff,%ecx
cmp    $0x3,%edi
mov    %edx,%edi
ja     1120 <reverseBits_fun_uint8_t+0x20>
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @reverseBits_fun_uint8_t(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %11, %3 ], [ 7, %1 ]
%6 = phi i32 [ %10, %3 ], [ %0, %1 ]
%7 = ashr i32 %4, 1
%8 = shl i32 %6, 1
%9 = and i32 %7, 1
%10 = or i32 %8, %9
%11 = add nsw i32 %5, -1
%12 = icmp ult i32 %4, 4
br i1 %12, label %13, label %3
13: ; preds = %3, %1
%14 = phi i32 [ %0, %1 ], [ %10, %3 ]
%15 = phi i32 [ 7, %1 ], [ %11, %3 ]
%16 = shl i32 %14, %15
ret i32 %16
}