xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int n_bits;

/* Variables and functions */
void bitmap_clearall(uint32_t *bitmap, size_t n_bits) {
  size_t blocks, i;
  blocks = (((n_bits) + 31) >> 5);
  for (i = 0; i < blocks; i++)
    bitmap[i] = 0;
}


x86 assembly (clang, -O0):
<bitmap_clearall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1f,%rax
shr    $0x5,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1153 <bitmap_clearall+0x53>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1124 <bitmap_clearall+0x24>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_clearall>:
mov    %rsi,%rdx
add    $0x1f,%rdx
cmp    $0x20,%rdx
jb     1131 <bitmap_clearall+0x21>
push   %rax
shr    $0x2,%rdx
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @bitmap_clearall(i64* nocapture writeonly %0, i64 %1) {
%3 = add i64 %1, 31
%4 = icmp ult i64 %3, 32
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = bitcast i64* %0 to i8*
%7 = lshr i64 %3, 2
%8 = and i64 %7, 4611686018427387896
br label %9
9: ; preds = %5, %2
ret void
}
void sp_end_sub_char_out() {}


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

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

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

LLVM IR (-O2):
define void @sp_end_sub_char_out() {
ret void
}
/* Variables and functions */
double strtod(char *, char **);
double t18(char **x) { return strtod("123.4", x); }


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

x86 assembly (clang, -O2):
<t18>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <strtod@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"123.4\00"
define double @t18(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call double @strtod(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %3)
ret double %4
}

LLVM IR (-O2):
@.str = [6 x i8] c"123.4\00"
define double @t18(i8** nocapture %0) {
%2 = tail call double @strtod(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ delete (char *, char *);
int main() {
  char *x;
  char *y;
  delete (x, y);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @delete(i8* undef, i8* undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Q_strncpyz(char *, char *, int);
char *Sys_GetClipboardData();
int /*<<< orphan*/ Z_Free(char *);
void GetClipboardData(char *buf, int buflen) {
  char *cbd;
  cbd = Sys_GetClipboardData();
  if (!cbd) {
    *buf = 0;
    return;
  }
  Q_strncpyz(buf, cbd, buflen);
  Z_Free(cbd);
}


x86 assembly (clang, -O0):
<GetClipboardData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <Sys_GetClipboardData@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <GetClipboardData+0x31>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
jmp    117a <GetClipboardData+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <Q_strncpyz@plt>
mov    -0x18(%rbp),%rdi
call   1030 <Z_Free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetClipboardData>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <Sys_GetClipboardData@plt>
test   %rax,%rax
je     1163 <GetClipboardData+0x33>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r14d,%edx
call   1050 <Q_strncpyz@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <Z_Free@plt>
movb   $0x0,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @GetClipboardData(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i8* (...) @Sys_GetClipboardData()
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = load i8*, i8** %3
store i8 0, i8* %10
br label %18
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = load i8*, i8** %5
%14 = load i32, i32* %4
%15 = call i32 @Q_strncpyz(i8* %12, i8* %13, i32 %14)
%16 = load i8*, i8** %5
%17 = call i32 @Z_Free(i8* %16)
br label %18
18: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
define void @GetClipboardData(i8* %0, i32 %1) {
%3 = tail call i8* (...) @Sys_GetClipboardData()
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %2
store i8 0, i8* %0
br label %9
6: ; preds = %2
%7 = tail call i32 @Q_strncpyz(i8* %0, i8* %3, i32 %1)
%8 = tail call i32 @Z_Free(i8* %3)
br label %9
9: ; preds = %6, %5
ret void
}
/* Variables and functions */
size_t fmt_int_base(char *, int, int);
size_t fmt_int(char *ptr, int val) { return fmt_int_base(ptr, val, 10); }


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

x86 assembly (clang, -O2):
<fmt_int>:
mov    $0xa,%edx
jmp    1030 <fmt_int_base@plt>

LLVM IR (-O0):
define i64 @fmt_int(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 i64 @fmt_int_base(i8* %5, i32 %6, i32 10)
ret i64 %7
}

LLVM IR (-O2):
define i64 @fmt_int(i8* %0, i32 %1) {
%3 = tail call i64 @fmt_int_base(i8* %0, i32 %1, i32 10)
ret i64 %3
}
unsigned long reg_r(void *base, int reg) {
  volatile unsigned short *regs = base;
  unsigned long val;
  val = regs[reg];
  val |= regs[reg + 2] << 16;
  return val;
}


x86 assembly (clang, -O0):
<reg_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,2),%ax
movzwl %ax,%eax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,2),%ax
movzwl %ax,%eax
shl    $0x10,%eax
cltq
or     -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_r>:
movslq %esi,%rax
movzwl (%rdi,%rax,2),%ecx
movzwl 0x4(%rdi,%rax,2),%eax
shl    $0x10,%eax
cltq
or     %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @reg_r(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i16*
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i16, i16* %3, i64 %4
%6 = load volatile i16, i16* %5
%7 = zext i16 %6 to i64
%8 = add nsw i32 %1, 2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i16, i16* %3, i64 %9
%11 = load volatile i16, i16* %10
%12 = zext i16 %11 to i32
%13 = shl nuw i32 %12, 16
%14 = sext i32 %13 to i64
%15 = or i64 %14, %7
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ PR_SET_NAME;
int /*<<< orphan*/ getchar();
int getpid();
int /*<<< orphan*/ prctl(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  printf("Process PID: %i\n", getpid());
  prctl(PR_SET_NAME, "Hello world");
  printf("Title changed, press enter\n");
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1060 <prctl@plt>
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getpid@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
lea    0xe99(%rip),%rsi
call   1070 <prctl@plt>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Process PID: %i\0A\00"
@PR_SET_NAME = global i32 0
@.str.1 = [12 x i8] c"Hello world\00"
@.str.2 = [28 x i8] c"Title changed, press enter\0A\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 = call i32 (...) @getpid()
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @PR_SET_NAME
%9 = call i32 @prctl(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Process PID: %i\0A\00"
@PR_SET_NAME = global i32 0
@.str.1 = [12 x i8] c"Hello world\00"
@str = [27 x i8] c"Title changed, press enter\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @PR_SET_NAME
%6 = tail call i32 @prctl(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ write_header(int /*<<< orphan*/ *, char *, unsigned int,
                                char *);
FILE *generate_output_file(char *fname, char *rng_name, unsigned int seed,
                           char *type) {
  FILE *f_out = fopen(fname, "w");
  write_header(f_out, rng_name, seed, type);
  return f_out;
}


x86 assembly (clang, -O0):
<generate_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1040 <write_header@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_output_file>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%r15d
mov    %rsi,%rbx
lea    0xec9(%rip),%rsi
call   1030 <fopen@plt>
mov    %rax,%rbp
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
call   1040 <write_header@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
define i32* @generate_output_file(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = load i8*, i8** %5
%11 = call i32* @fopen(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %11, i32** %9
%12 = load i32*, i32** %9
%13 = load i8*, i8** %6
%14 = load i32, i32* %7
%15 = load i8*, i8** %8
%16 = call i32 @write_header(i32* %12, i8* %13, i32 %14, i8* %15)
%17 = load i32*, i32** %9
ret i32* %17
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
define i32* @generate_output_file(i8* nocapture %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @write_header(i32* %5, i8* %1, i32 %2, i8* %3)
ret i32* %5
}
void __attribute__((__no__)) foo(void) { __asm__(""); }


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

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

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

LLVM IR (-O2):
define void @foo() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void arr2mat(short m[1988]) {
  int i, j, k;
  short M[1988][1988] = {0};
  for (i = 0; i < 1988; i++)
    M[i][m[i]] = 1;
}


x86 assembly (clang, -O0):
<arr2mat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x789c40,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x789c40(%rbp),%rdi
xor    %esi,%esi
mov    $0x789c20,%edx
call   1030 <memset@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x7c4,-0xc(%rbp)
jge    117c <arr2mat+0x6c>
movslq -0xc(%rbp),%rcx
lea    -0x789c40(%rbp),%rax
imul   $0xf88,%rcx,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movswq (%rcx,%rdx,2),%rcx
movw   $0x1,(%rax,%rcx,2)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <arr2mat+0x29>
add    $0x789c40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @arr2mat(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [1988 x [1988 x i16]]
store i16* %0, i16** %2
%7 = bitcast [1988 x [1988 x i16]]* %6 to i8*
store i32 0, i32* %3
br label %8
8: ; preds = %22, %1
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 1988
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [1988 x [1988 x i16]], [1988 x [1988 x i16]]* %6, i64 0, i64 %13
%15 = load i16*, i16** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i16, i16* %15, i64 %17
%19 = load i16, i16* %18
%20 = sext i16 %19 to i64
%21 = getelementptr inbounds [1988 x i16], [1988 x i16]* %14, i64 0, i64 %20
store i16 1, i16* %21
br label %22
22: ; preds = %11
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %8
25: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @arr2mat(i16* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ valid_seq(int, int *, int /*<<< orphan*/,
                             int /*<<< orphan*/);
void print_seq(int a) {
  int *arr;
  arr = (int *)malloc(a * sizeof(int));
  valid_seq(a, arr, 0, 0);
}


x86 assembly (clang, -O0):
<print_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <valid_seq@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_seq>:
push   %rbx
mov    %edi,%ebx
lea    0x0(,%rbx,4),%edi
call   1040 <malloc@plt>
mov    %ebx,%edi
mov    %rax,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
pop    %rbx
jmp    1030 <valid_seq@plt>

LLVM IR (-O0):
define void @print_seq(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %3
%10 = load i32, i32* %2
%11 = load i32*, i32** %3
%12 = call i32 @valid_seq(i32 %10, i32* %11, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @print_seq(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i32 @valid_seq(i32 %0, i32* %4, i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print_numbers(void) {
  char c;
  c = 47;
  while (++c < 58)
    ft_putchar(c);
}


x86 assembly (clang, -O0):
<ft_print_numbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x2f,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
movsbl %al,%eax
cmp    $0x3a,%eax
jge    113e <ft_print_numbers+0x2e>
movsbl -0x1(%rbp),%edi
call   1030 <ft_putchar@plt>
jmp    111c <ft_print_numbers+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_numbers>:
push   %rax
mov    $0x30,%edi
call   1030 <ft_putchar@plt>
mov    $0x31,%edi
call   1030 <ft_putchar@plt>
mov    $0x32,%edi
call   1030 <ft_putchar@plt>
mov    $0x33,%edi
call   1030 <ft_putchar@plt>
mov    $0x34,%edi
call   1030 <ft_putchar@plt>
mov    $0x35,%edi
call   1030 <ft_putchar@plt>
mov    $0x36,%edi
call   1030 <ft_putchar@plt>
mov    $0x37,%edi
call   1030 <ft_putchar@plt>
mov    $0x38,%edi
call   1030 <ft_putchar@plt>
mov    $0x39,%edi
pop    %rax
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_print_numbers() {
%1 = alloca i8
store i8 47, i8* %1
br label %2
2: ; preds = %7, %0
%3 = load i8, i8* %1
%4 = add i8 %3, 1
store i8 %4, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 58
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8, i8* %1
%9 = call i32 @ft_putchar(i8 signext %8)
br label %2
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @ft_print_numbers() {
%1 = tail call i32 @ft_putchar(i8 signext 48)
%2 = tail call i32 @ft_putchar(i8 signext 49)
%3 = tail call i32 @ft_putchar(i8 signext 50)
%4 = tail call i32 @ft_putchar(i8 signext 51)
%5 = tail call i32 @ft_putchar(i8 signext 52)
%6 = tail call i32 @ft_putchar(i8 signext 53)
%7 = tail call i32 @ft_putchar(i8 signext 54)
%8 = tail call i32 @ft_putchar(i8 signext 55)
%9 = tail call i32 @ft_putchar(i8 signext 56)
%10 = tail call i32 @ft_putchar(i8 signext 57)
ret void
}
int main(void) {
  int x;
  x = 5;
  do {
    int x23;
    x23 = ((x) * (x));
    printf("%i\n", x23);
  } while (0);
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
br label %4
4: ; preds = %0
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = mul nsw i32 %5, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 25)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void putline(char line[], int len) {
  int i;
  for (i = 0; i < len; ++i)
    putchar(line[i]);
}


x86 assembly (clang, -O0):
<putline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <putline+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <putline+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putline>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1143 <putline+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <putline+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @putline(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @putchar(i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
unsigned xrop3_133_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~T;
  stk3 = S | stk4;
  stk2 = D & stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_133_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_133_0_0>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    $0xff,%esi
or     %edi,%esi
xor    %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_133_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %6
%27 = load i32, i32* %11
%28 = or i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %5
%30 = load i32, i32* %10
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %7
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = xor i32 %35, -1
store i32 %36, i32* %8
%37 = load i32, i32* %8
ret i32 %37
}

LLVM IR (-O2):
define i32 @xrop3_133_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %4, 255
%7 = or i32 %6, %3
%8 = xor i32 %7, %5
%9 = xor i32 %8, -1
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ pwm_stop();
int registers_read_byte(int);
int /*<<< orphan*/ registers_write_byte(int, int);
void pwm_disable(void) {
  uint8_t flags_lo = registers_read_byte(0x05);
  registers_write_byte(0x05, flags_lo & ~(1 << 0x00));
  pwm_stop();
}


x86 assembly (clang, -O0):
<pwm_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
call   1040 <registers_read_byte@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
and    $0xfffffffe,%esi
mov    $0x5,%edi
call   1030 <registers_write_byte@plt>
mov    $0x0,%al
call   1050 <pwm_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pwm_disable>:
push   %rax
mov    $0x5,%edi
call   1040 <registers_read_byte@plt>
and    $0xfffffffe,%eax
mov    $0x5,%edi
mov    %eax,%esi
call   1030 <registers_write_byte@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <pwm_stop@plt>

LLVM IR (-O0):
define void @pwm_disable() {
%1 = alloca i32
%2 = call i32 @registers_read_byte(i32 5)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -2
%5 = call i32 @registers_write_byte(i32 5, i32 %4)
%6 = call i32 (...) @pwm_stop()
ret void
}

LLVM IR (-O2):
define void @pwm_disable() {
%1 = tail call i32 @registers_read_byte(i32 5)
%2 = and i32 %1, -2
%3 = tail call i32 @registers_write_byte(i32 5, i32 %2)
%4 = tail call i32 (...) @pwm_stop()
ret void
}
/* Variables and functions */
char *index(const char *p, int ch) {
  for (;; ++p) {
    if (*p == ch)
      return ((char *)p);
    if (!*p)
      return ((char *)NULL);
  }
}


x86 assembly (clang, -O0):
<index>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1128 <index+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <index+0x58>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1142 <index+0x42>
movq   $0x0,-0x8(%rbp)
jmp    1158 <index+0x58>
jmp    1147 <index+0x47>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <index+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @index(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, %1
br i1 %5, label %15, label %6
6: ; preds = %2, %10
%7 = phi i8 [ %12, %10 ], [ %3, %2 ]
%8 = phi i8* [ %11, %10 ], [ %0, %2 ]
%9 = icmp eq i8 %7, 0
br i1 %9, label %15, label %10
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, %1
br i1 %14, label %15, label %6
15: ; preds = %10, %6, %2
%16 = phi i8* [ %0, %2 ], [ null, %6 ], [ %11, %10 ]
ret i8* %16
}
/* Variables and functions */
int /*<<< orphan*/ bson_fatal_msg(int, char *);
void *bson_malloc_func(size_t);
void *bson_malloc(size_t size) {
  void *p;
  p = bson_malloc_func(size);
  bson_fatal_msg(!!p, "malloc() failed");
  return p;
}


x86 assembly (clang, -O0):
<bson_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bson_malloc_func@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
lea    0xeaf(%rip),%rsi
call   1040 <bson_fatal_msg@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bson_malloc>:
push   %rbx
call   1030 <bson_malloc_func@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
lea    0xec7(%rip),%rsi
call   1040 <bson_fatal_msg@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"malloc() failed\00"
define i8* @bson_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @bson_malloc_func(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = xor i1 %7, true
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = call i32 @bson_fatal_msg(i32 %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [16 x i8] c"malloc() failed\00"
define i8* @bson_malloc(i64 %0) {
%2 = tail call i8* @bson_malloc_func(i64 %0)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @bson_fatal_msg(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ yall_init();
void test_yall_init(void) { yall_init(); }


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

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

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

LLVM IR (-O2):
define void @test_yall_init() {
%1 = tail call i32 (...) @yall_init()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int __syscall_fchmod(int, int /*<<< orphan*/);
int fchmod(int fildes, mode_t mode) { return (__syscall_fchmod(fildes, mode)); }


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

x86 assembly (clang, -O2):
<fchmod>:
jmp    1030 <__syscall_fchmod@plt>

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

LLVM IR (-O2):
define i32 @fchmod(i32 %0, i32 %1) {
%3 = tail call i32 @__syscall_fchmod(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void DELAY(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


x86 assembly (clang, -O0):
<DELAY>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DELAY>:
xor    %edi,%edi
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
define void @DELAY() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @DELAY() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
unsigned int gt1_name_context_hash_func(const char *string) {
  unsigned int result;
  int c;
  int i;
  result = 0;
  for (i = 0; (c = ((const unsigned char *)string)[i]) != '\0'; i++)
    result += (result << 3) + c;
  return result;
}


x86 assembly (clang, -O0):
<gt1_name_context_hash_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     114b <gt1_name_context_hash_func+0x4b>
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1116 <gt1_name_context_hash_func+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt1_name_context_hash_func>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <gt1_name_context_hash_func+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,8),%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <gt1_name_context_hash_func+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @gt1_name_context_hash_func(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = zext i8 %6 to i32
%9 = mul i32 %7, 9
%10 = add i32 %9, %8
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %10, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: yank [-ilxv] [-d delim] [-g pattern] "
                  "[-- command [args]]\n");
  exit(2);
}


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    $0x2,%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    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [65 x i8] c"usage: yank [-ilxv] [-d delim] [-g pattern] [-- command [args]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [65 x i8] c"usage: yank [-ilxv] [-d delim] [-g pattern] [-- command [args]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
void *tree_balance(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ tree_insert(void *, void *, int, int);
void *tree_binsert(void *root, void *item, int label_offset, int link_offset) {
  return tree_balance(tree_insert(root, item, label_offset, link_offset),
                      label_offset, link_offset);
}


x86 assembly (clang, -O0):
<tree_binsert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <tree_insert@plt>
mov    %eax,%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <tree_balance@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tree_binsert>:
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebx
mov    %edx,%ebp
call   1030 <tree_insert@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <tree_balance@plt>

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

LLVM IR (-O2):
define i8* @tree_binsert(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @tree_insert(i8* %0, i8* %1, i32 %2, i32 %3)
%6 = tail call i8* @tree_balance(i32 %5, i32 %2, i32 %3)
ret i8* %6
}
/* Variables and functions */
double approx_sqrt(int);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int z;
  scanf("%d", &z);
  printf("%.4f", approx_sqrt(z));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <approx_sqrt@plt>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <approx_sqrt@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%.4f\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call double @approx_sqrt(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int wcrtomb(char *, int /*<<< orphan*/, int /*<<< orphan*/ *);
int wctomb(char *pwc, wchar_t s) { return wcrtomb(pwc, s, NULL); }


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

x86 assembly (clang, -O2):
<wctomb>:
xor    %edx,%edx
jmp    1030 <wcrtomb@plt>

LLVM IR (-O0):
define i32 @wctomb(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 @wcrtomb(i8* %5, i32 %6, i32* null)
ret i32 %7
}

LLVM IR (-O2):
define i32 @wctomb(i8* %0, i32 %1) {
%3 = tail call i32 @wcrtomb(i8* %0, i32 %1, i32* null)
ret i32 %3
}
int ui_init_tempsensorcmds(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ui_init_tempsensorcmds() {
ret i32 0
}
/* Variables and functions */
double exp(double);
double sinh(double x) { return (exp(x) - exp(-x)) * 0.5; }


x86 assembly (clang, -O0):
<sinh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xe9f(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinh>:
sub    $0x28,%rsp
movaps %xmm0,0x10(%rsp)
call   1030 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
xorpd  0xece(%rip),%xmm0
call   1030 <exp@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xec7(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @sinh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
%5 = load double, double* %2
%6 = fneg double %5
%7 = call double @exp(double %6)
%8 = fsub double %4, %7
%9 = fmul double %8, 5.000000e-01
ret double %9
}

LLVM IR (-O2):
define double @sinh(double %0) {
%2 = tail call double @exp(double %0)
%3 = fneg double %0
%4 = tail call double @exp(double %3)
%5 = fsub double %2, %4
%6 = fmul double %5, 5.000000e-01
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ val;
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
long htonl(size_t);
int send(int, long *, int, int /*<<< orphan*/);
void txsize(int sock, size_t sz) {
  long val;
  val = htonl(sz);
  ssize_t ret;
  ret = send(sock, &val, sizeof(val), 0);
  if (ret == -1)
    err(1, "error transmitting size");
}


x86 assembly (clang, -O0):
<txsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <htonl@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x8,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    117d <txsize+0x4d>
mov    $0x1,%edi
lea    0xe88(%rip),%rsi
call   1050 <err@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txsize>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %rsi,%rdi
call   1040 <htonl@plt>
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
mov    $0x8,%edx
xor    %ecx,%ecx
call   1030 <send@plt>
cmp    $0xffffffff,%eax
jne    116d <txsize+0x3d>
lea    0xe9d(%rip),%rsi
mov    $0x1,%edi
call   1050 <err@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"error transmitting size\00"
define void @txsize(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = call i64 @htonl(i64 %7)
store i64 %8, i64* %5
%9 = load i32, i32* %3
%10 = call i32 @send(i32 %9, i64* %5, i32 8, i32 0)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @err(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"error transmitting size\00"
define void @txsize(i32 %0, i64 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = tail call i64 @htonl(i64 %1)
store i64 %5, i64* %3
%6 = call i32 @send(i32 %0, i64* %3, i32 8, i32 0)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @err(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret void
}
isnumber(s) char *s;
{
  register int c;
  while (c = *s++)
    if (!isdigit(c))
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<isnumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     115c <isnumber+0x4c>
mov    -0x14(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1157 <isnumber+0x47>
movl   $0x0,-0x4(%rbp)
jmp    1163 <isnumber+0x53>
jmp    111c <isnumber+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isnumber>:
movsbl (%rdi),%eax
test   %eax,%eax
je     1116 <isnumber+0x16>
add    $0x1,%rdi
add    $0xffffffd0,%eax
cmp    $0xa,%eax
jb     1100 <isnumber>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @isnumber(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %8, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = sext i8 %4 to i32
%8 = getelementptr inbounds i8, i8* %3, i64 1
%9 = add nsw i32 %7, -48
%10 = icmp ult i32 %9, 10
br i1 %10, label %2, label %11
11: ; preds = %2, %6
%12 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int fatal(const char *msg) { printf("%s", msg); }


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

x86 assembly (clang, -O2):
<fatal>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @fatal(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 undef
}
int main() {
  int i;
  return __builtin_constant_p(&i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%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
ret i32 0
}

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