xunge/DecIR huggingface dataset:
int first_one01(unsigned int u0, unsigned int u1) {
  if (u0) {
    return __builtin_clz(u0) - 5;
  }
  return __builtin_clz(u1) + 22;
}


x86 assembly (clang, -O0):
<first_one01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1128 <first_one01+0x28>
mov    -0x8(%rbp),%eax
bsr    %eax,%eax
xor    $0x1f,%eax
sub    $0x5,%eax
mov    %eax,-0x4(%rbp)
jmp    1137 <first_one01+0x37>
mov    -0xc(%rbp),%eax
bsr    %eax,%eax
xor    $0x1f,%eax
add    $0x16,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<first_one01>:
test   %edi,%edi
cmovne %edi,%esi
bsr    %esi,%eax
xor    $0x1f,%eax
lea    0x16(%rax),%ecx
add    $0xfffffffb,%eax
test   %edi,%edi
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @first_one01(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @llvm.ctlz.i32(i32 %9, i1 true)
%11 = sub nsw i32 %10, 5
store i32 %11, i32* %3
br label %16
12: ; preds = %2
%13 = load i32, i32* %5
%14 = call i32 @llvm.ctlz.i32(i32 %13, i1 true)
%15 = add nsw i32 %14, 22
store i32 %15, i32* %3
br label %16
16: ; preds = %12, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @first_one01(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = select i1 %3, i32 %1, i32 %0
%5 = select i1 %3, i32 22, i32 -5
%6 = tail call i32 @llvm.ctlz.i32(i32 %4, i1 true)
%7 = add nsw i32 %6, %5
ret i32 %7
}
void paws(where) int where;
{
  mvaddstr(where, 0, "-- more --");
  rgetch();
}


x86 assembly (clang, -O0):
<paws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
lea    0xec9(%rip),%rdx
mov    $0x0,%al
call   1040 <mvaddstr@plt>
mov    $0x0,%al
call   1030 <rgetch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paws>:
push   %rax
lea    0xed8(%rip),%rdx
xor    %esi,%esi
xor    %eax,%eax
call   1040 <mvaddstr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <rgetch@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"-- more --\00"
define void @paws(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @mvaddstr to i32 (i32, i32, i8*, ...)*)(i32 %3, i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @rgetch()
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"-- more --\00"
define void @paws(i32 %0) {
%2 = tail call i32 (i32, i32, i8*, ...) bitcast (i32 (...)* @mvaddstr to i32 (i32, i32, i8*, ...)*)(i32 %0, i32 0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @rgetch()
ret void
}
/* Variables and functions */
char *strdup(char *);
char *strrchr(char const *, char);
char *cfilesystem_filename(const char *filepath) {
  char *result = NULL;
  char *last = strrchr(filepath, '/');
  if (last) {
    result = strdup(last);
  }
  return result;
}


x86 assembly (clang, -O0):
<cfilesystem_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115e <cfilesystem_filename+0x3e>
mov    -0x18(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfilesystem_filename>:
push   %rax
mov    $0x2f,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1139 <cfilesystem_filename+0x19>
mov    %rax,%rdi
pop    %rax
jmp    1040 <strdup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @cfilesystem_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%5 = load i8*, i8** %2
%6 = call i8* @strrchr(i8* %5, i8 signext 47)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %3
br label %12
12: ; preds = %9, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @cfilesystem_filename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @strdup(i8* %2)
br label %6
6: ; preds = %4, %1
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ arf();
fu(char *p, int x) {
  if (x)
    *p = 69;
  if (p)
    arf();
}


x86 assembly (clang, -O0):
<fu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1130 <fu+0x20>
mov    -0x10(%rbp),%rax
movb   $0x45,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     1142 <fu+0x32>
mov    $0x0,%al
call   1030 <arf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fu>:
push   %rax
test   %esi,%esi
je     111a <fu+0xa>
movb   $0x45,(%rdi)
jmp    111f <fu+0xf>
test   %rdi,%rdi
je     1126 <fu+0x16>
xor    %eax,%eax
call   1030 <arf@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fu(i8* writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
store i8 69, i8* %0
br label %7
5: ; preds = %2
%6 = icmp eq i8* %0, null
br i1 %6, label %9, label %7
7: ; preds = %4, %5
%8 = tail call i32 (...) @arf()
br label %9
9: ; preds = %7, %5
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ abort();
char *strdup(char const *);
char *xstrdup(const char *s) {
  char *t;
  t = strdup(s);
  if (!t)
    abort();
  return t;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114b <xstrdup+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1040 <strdup@plt>
test   %rax,%rax
je     112d <xstrdup+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define noalias i8* @xstrdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ initscr();
int main(void) {
  initscr();
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1040 <getch@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initscr()
%3 = call i32 (...) @getch()
%4 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @getch()
%3 = tail call i32 (...) @endwin()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ time_t;
struct tm {
  scalar_t__ tm_hour;
  scalar_t__ tm_min;
  scalar_t__ tm_sec;
};

/* Variables and functions */
scalar_t__ mktime(struct tm *);
time_t get_time_of_the_biginning_of_the_day(struct tm *tm) {
  tm->tm_sec = 0;
  tm->tm_min = 0;
  tm->tm_hour = 0;
  return mktime(tm) - 8 * 3600;
}


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

x86 assembly (clang, -O2):
<get_time_of_the_biginning_of_the_day>:
push   %rax
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
movq   $0x0,0x10(%rdi)
call   1030 <mktime@plt>
add    $0xffffffffffff8f80,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i64, i64, i64 }
define i64 @get_time_of_the_biginning_of_the_day(%struct.tm* %0) {
%2 = alloca %struct.tm*
store %struct.tm* %0, %struct.tm** %2
%3 = load %struct.tm*, %struct.tm** %2
%4 = getelementptr inbounds %struct.tm, %struct.tm* %3, i32 0, i32 2
store i64 0, i64* %4
%5 = load %struct.tm*, %struct.tm** %2
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 1
store i64 0, i64* %6
%7 = load %struct.tm*, %struct.tm** %2
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 0
store i64 0, i64* %8
%9 = load %struct.tm*, %struct.tm** %2
%10 = call i64 @mktime(%struct.tm* %9)
%11 = sub nsw i64 %10, 28800
ret i64 %11
}

LLVM IR (-O2):
%struct.tm = type { i64, i64, i64 }
define i64 @get_time_of_the_biginning_of_the_day(%struct.tm* nocapture %0) {
%2 = bitcast %struct.tm* %0 to i8*
%3 = tail call i64 @mktime(%struct.tm* %0)
%4 = add nsw i64 %3, -28800
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ nonpic_nothing();
int /*<<< orphan*/ pic_addr();
main() {
  pic_addr();
  nonpic_nothing();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <pic_addr@plt>
mov    $0x0,%al
call   1040 <nonpic_nothing@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <pic_addr@plt>
xor    %eax,%eax
call   1040 <nonpic_nothing@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @pic_addr()
%3 = call i32 (...) @nonpic_nothing()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @pic_addr()
%2 = tail call i32 (...) @nonpic_nothing()
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main(void) {
  f(0xff00);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 65280)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
void gen_unsigned_greater_or_equal(void) {
  gen_pop();
  gen_call("ccuge");
}


x86 assembly (clang, -O0):
<gen_unsigned_greater_or_equal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xece(%rip),%rdi
call   1040 <gen_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_unsigned_greater_or_equal>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ccuge\00"
define void @gen_unsigned_greater_or_equal() {
%1 = call i32 (...) @gen_pop()
%2 = call i32 @gen_call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ccuge\00"
define void @gen_unsigned_greater_or_equal() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void B() {}


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

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

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

LLVM IR (-O2):
define void @B() {
ret void
}
int is_flush(char *suits) {
  int i;
  for (i = 1; i < 5; i++)
    if (suits[i] != suits[0])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_flush>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    1153 <is_flush+0x53>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1140 <is_flush+0x40>
movl   $0x0,-0x4(%rbp)
jmp    115a <is_flush+0x5a>
jmp    1145 <is_flush+0x45>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <is_flush+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_flush>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    %cl,0x1(%rdi)
jne    111b <is_flush+0x1b>
cmp    %cl,0x2(%rdi)
jne    111b <is_flush+0x1b>
cmp    %cl,0x3(%rdi)
jne    111b <is_flush+0x1b>
xor    %eax,%eax
cmp    %cl,0x4(%rdi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_flush(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, %2
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, %2
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 3
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, %2
br i1 %13, label %14, label %19
14: ; preds = %10
%15 = getelementptr inbounds i8, i8* %0, i64 4
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, %2
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %14, %10, %6, %1
%20 = phi i32 [ 0, %1 ], [ 0, %6 ], [ 0, %10 ], [ %18, %14 ]
ret i32 %20
}
/* Variables and functions */
int fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int tty_puts(const char *s) { return fputs(s, stdout); }


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

x86 assembly (clang, -O2):
<tty_puts>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @tty_puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @tty_puts(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
struct solo5_block_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _assert_fail(char *, char *, char *);
void solo5_block_info(struct solo5_block_info *info __attribute__((unused))) {
  do {
    if (!(0))
      _assert_fail("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/Weichen81/solo5/refs/"
                   "heads/master/bindings/muen/muen-block.c",
                   "39", "0");
  } while (0);
}


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

x86 assembly (clang, -O2):
<solo5_block_info>:
lea    0xee9(%rip),%rdi
lea    0xf79(%rip),%rsi
lea    0xf75(%rip),%rdx
jmp    1030 <_assert_fail@plt>

LLVM IR (-O0):
%struct.solo5_block_info = type { i32 }
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Weichen81/solo5/refs/heads/master/bindings/muen/muen-block.c\00"
@.str.1 = [3 x i8] c"39\00"
@.str.2 = [2 x i8] c"0\00"
define void @solo5_block_info(%struct.solo5_block_info* %0) {
%2 = alloca %struct.solo5_block_info*
store %struct.solo5_block_info* %0, %struct.solo5_block_info** %2
br label %3
3: ; preds = %1
%4 = call i32 @_assert_fail(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.solo5_block_info = type { i32 }
@.str = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Weichen81/solo5/refs/heads/master/bindings/muen/muen-block.c\00"
@.str.1 = [3 x i8] c"39\00"
@.str.2 = [2 x i8] c"0\00"
define void @solo5_block_info(%struct.solo5_block_info* nocapture readnone %0) {
%2 = tail call i32 @_assert_fail(i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}
int st_internal_numhash(long n) { return n; }


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

x86 assembly (clang, -O2):
<st_internal_numhash>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32 @st_internal_numhash(i64 %0) {
%2 = trunc i64 %0 to i32
ret i32 %2
}
int Operand_xt_wbr15_label_ator(unsigned int *valp, unsigned int pc) {
  *valp -= pc;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_xt_wbr15_label_ator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_xt_wbr15_label_ator>:
sub    %esi,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Operand_xt_wbr15_label_ator(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = sub i32 %3, %1
store i32 %4, i32* %0
ret i32 0
}
int fmt_is_upper(char c) { return (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<fmt_is_upper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <fmt_is_upper+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmt_is_upper>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @fmt_is_upper(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @fmt_is_upper(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void testClosureSBrV(void (*closure)(short, char), short a1, char a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureSBrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %al,-0xb(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%cx
movswl %cx,%edi
movsbl -0xb(%rbp),%esi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureSBrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureSBrV(void (i16, i8)* %0, i16 signext %1, i8 signext %2) {
%4 = alloca void (i16, i8)*
%5 = alloca i16
%6 = alloca i8
store void (i16, i8)* %0, void (i16, i8)** %4
store i16 %1, i16* %5
store i8 %2, i8* %6
%7 = load void (i16, i8)*, void (i16, i8)** %4
%8 = load i16, i16* %5
%9 = load i8, i8* %6
ret void
}

LLVM IR (-O2):
define void @testClosureSBrV(void (i16, i8)* nocapture %0, i16 signext %1, i8 signext %2) {
tail call void %0(i16 signext %1, i8 signext %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t ltoh_u16(uint16_t littleval) { return littleval; }


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

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

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

LLVM IR (-O2):
define i32 @ltoh_u16(i32 returned %0) {
ret i32 %0
}
short int shortint_ignoring_unsignedlong(short int x, unsigned long y) {
  return x;
}


x86 assembly (clang, -O0):
<shortint_ignoring_unsignedlong>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @shortint_ignoring_unsignedlong(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @shortint_ignoring_unsignedlong(i16 returned signext %0, i64 %1) {
ret i16 %0
}
void __empty() {}


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

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

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

LLVM IR (-O2):
define void @__empty() {
ret void
}
/* Variables and functions */
void Sys_ShutdownStreamThread(void) {}


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

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

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

LLVM IR (-O2):
define void @Sys_ShutdownStreamThread() {
ret void
}
int sgIP_IP_RequiredHeaderSize() { return 5 * 4; }


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

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

LLVM IR (-O0):
define i32 @sgIP_IP_RequiredHeaderSize() {
ret i32 20
}

LLVM IR (-O2):
define i32 @sgIP_IP_RequiredHeaderSize() {
ret i32 20
}
/* Type definitions */
typedef int uint;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int *malloc(int);
int *newArrayI_uninit(uint sz) {
  assert(sz > 0);
  int *arr = malloc(sz * sizeof(int));
  assert(arr != NULL);
  return arr;
}


x86 assembly (clang, -O0):
<newArrayI_uninit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newArrayI_uninit>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setg   %dil
call   1030 <assert@plt>
shl    $0x2,%ebx
mov    %ebx,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @newArrayI_uninit(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 4
%11 = trunc i64 %10 to i32
%12 = call i32* @malloc(i32 %11)
store i32* %12, i32** %3
%13 = load i32*, i32** %3
%14 = icmp ne i32* %13, null
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32*, i32** %3
ret i32* %17
}

LLVM IR (-O2):
define noalias i32* @newArrayI_uninit(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = shl i32 %0, 2
%6 = tail call i32* @malloc(i32 %5)
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
ret i32* %6
}
int __attribute__((unused))
compare_and_swap(volatile long int *p, long int oldval, long int newval) {
  if (*p != oldval)
    return 0;
  *p = newval;
  return 1;
}


x86 assembly (clang, -O0):
<compare_and_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
je     112d <compare_and_swap+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    113f <compare_and_swap+0x3f>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_and_swap>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    %rsi,%rcx
jne    1112 <compare_and_swap+0x12>
mov    %rdx,(%rdi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @compare_and_swap(i64* %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64*, i64** %5
%9 = load volatile i64, i64* %8
%10 = load i64, i64* %6
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 0, i32* %4
br label %16
13: ; preds = %3
%14 = load i64, i64* %7
%15 = load i64*, i64** %5
store volatile i64 %14, i64* %15
store i32 1, i32* %4
br label %16
16: ; preds = %13, %12
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @compare_and_swap(i64* %0, i64 %1, i64 %2) {
%4 = load volatile i64, i64* %0
%5 = icmp eq i64 %4, %1
br i1 %5, label %6, label %7
6: ; preds = %3
store volatile i64 %2, i64* %0
br label %7
7: ; preds = %3, %6
%8 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errStackTooSmall(void) { error("Too small stack\n"); }


x86 assembly (clang, -O0):
<errStackTooSmall>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <error@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Too small stack\0A\00"
define void @errStackTooSmall() {
%1 = call i32 @error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Too small stack\0A\00"
define void @errStackTooSmall() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char lowercase(int);
bool is_hexsym(int c) {
  if (lowercase(c) == 'h') {
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<is_hexsym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <lowercase@plt>
movsbl %al,%eax
cmp    $0x68,%eax
jne    113b <is_hexsym+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <is_hexsym+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_hexsym>:
push   %rax
call   1030 <lowercase@plt>
xor    %ecx,%ecx
cmp    $0x68,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_hexsym(i32 %0) {
%2 = tail call signext i8 @lowercase(i32 %0)
%3 = icmp eq i8 %2, 104
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int strnlen(char const *, int);
void strnlen_constant5() {
  const char *a = "123456";
  if (strnlen(a, 3) != 3)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strnlen_constant5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <strnlen@plt>
cmp    $0x3,%eax
je     113a <strnlen_constant5+0x2a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strnlen_constant5>:
lea    0xee9(%rip),%rdi
mov    $0x3,%esi
jmp    1030 <strnlen@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"123456\00"
define void @strnlen_constant5() {
%1 = alloca i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @strnlen(i8* %2, i32 3)
%4 = icmp ne i32 %3, 3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8, i8* null
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"123456\00"
define void @strnlen_constant5() {
%1 = tail call i32 @strnlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
void version() {
  printf("'ga_RPKM' in genome analysis tools version: %d.%d.%d\n", 1, 0, 0);
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"'ga_RPKM' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [54 x i8] c"'ga_RPKM' in genome analysis tools version: %d.%d.%d\0A\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char **malloc(int);
int main() {
  char *stack_animals[] = {"Bear", "Cat", "Dog"};
  char **heap_animals = malloc(10 * sizeof(*heap_animals));
  heap_animals[1] = "Dolphin";
  heap_animals[3] = "Orca";
  heap_animals[5] = "Whale";
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cd4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x50,%edi
call   1030 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
lea    0xeb4(%rip),%rcx
mov    %rcx,0x8(%rax)
mov    -0x28(%rbp),%rax
lea    0xead(%rip),%rcx
mov    %rcx,0x18(%rax)
mov    -0x28(%rbp),%rax
lea    0xea3(%rip),%rcx
mov    %rcx,0x28(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"Bear\00"
@.str.1 = [4 x i8] c"Cat\00"
@.str.2 = [4 x i8] c"Dog\00"
@__const.main.stack_animals = [3 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0)]
@.str.3 = [8 x i8] c"Dolphin\00"
@.str.4 = [5 x i8] c"Orca\00"
@.str.5 = [6 x i8] c"Whale\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8*]
%3 = alloca i8**
store i32 0, i32* %1
%4 = bitcast [3 x i8*]* %2 to i8*
%5 = call i8** @malloc(i32 80)
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = getelementptr inbounds i8*, i8** %6, i64 1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = load i8**, i8*** %3
%9 = getelementptr inbounds i8*, i8** %8, i64 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %9
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i64 5
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8** @malloc(i32 80)
ret i32 0
}
long int labs(long int i) { return i >= 0 ? i : -i; }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jl     1120 <labs+0x20>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<labs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
int check_in_array(int *pn, int num) {
  while (*pn != -1) {
    if (num == *pn)
      return 1;
    ++pn;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_in_array>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
je     1144 <check_in_array+0x44>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jne    1133 <check_in_array+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114b <check_in_array+0x4b>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <check_in_array+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_in_array>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
je     111f <check_in_array+0x1f>
add    $0x4,%rdi
nopl   (%rax)
cmp    %esi,%ecx
je     1120 <check_in_array+0x20>
mov    (%rdi),%ecx
add    $0x4,%rdi
cmp    $0xffffffff,%ecx
jne    1110 <check_in_array+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @check_in_array(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, -1
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i32, i32* %12
%7 = icmp eq i32 %6, -1
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ %3, %2 ]
%10 = phi i32* [ %12, %5 ], [ %0, %2 ]
%11 = icmp eq i32 %9, %1
%12 = getelementptr inbounds i32, i32* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %2
%14 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, double);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
double eval_output(double num, double y) {
  fprintf(stdout, "#OUT(%d, %g)\n", (int)num, y);
  fflush(stdout);
  sleep(3);
  return y;
}


x86 assembly (clang, -O0):
<eval_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
cvttsd2si -0x8(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0xea4(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x3,%edi
call   1050 <sleep@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_output>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
mov    0x2e9e(%rip),%rbx
mov    (%rbx),%edi
cvttsd2si %xmm0,%edx
lea    0xeb1(%rip),%rsi
movaps %xmm1,%xmm0
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    $0x3,%edi
call   1050 <sleep@plt>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [14 x i8] c"#OUT(%d, %g)\0A\00"
define double @eval_output(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load i32, i32* @stdout
%6 = load double, double* %3
%7 = fptosi double %6 to i32
%8 = load double, double* %4
%9 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %7, double %8)
%10 = load i32, i32* @stdout
%11 = call i32 @fflush(i32 %10)
%12 = call i32 @sleep(i32 3)
%13 = load double, double* %4
ret double %13
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [14 x i8] c"#OUT(%d, %g)\0A\00"
define double @eval_output(double %0, double returned %1) {
%3 = load i32, i32* @stdout
%4 = fptosi double %0 to i32
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4, double %1)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
%8 = tail call i32 @sleep(i32 3)
ret double %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void __attribute__((weak))
usr_mlme_associate_conf(uint16_t AssocShortAddress, uint8_t status) {
  AssocShortAddress = AssocShortAddress;
  status = status;
}


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

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

LLVM IR (-O0):
define weak void @usr_mlme_associate_conf(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
store i32 %5, i32* %3
%6 = load i32, i32* %4
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define weak void @usr_mlme_associate_conf(i32 %0, i32 %1) {
ret void
}
f() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @f() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  assert((4 >> 1) == 2);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
sigset_t sig_setmask(sigset_t new) {
  sigset_t old;
  sigemptyset(&old);
  sigprocmask(SIG_SETMASK, &new, &old);
  return old;
}


x86 assembly (clang, -O0):
<sig_setmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_setmask>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rsi
mov    %rbx,%rdx
call   1030 <sigprocmask@plt>
mov    0x8(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
define i32 @sig_setmask(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* @SIG_SETMASK
%6 = call i32 @sigprocmask(i32 %5, i32* %2, i32* %3)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
define i32 @sig_setmask(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @sigemptyset(i32* %3)
%6 = load i32, i32* @SIG_SETMASK
%7 = call i32 @sigprocmask(i32 %6, i32* %2, i32* %3)
%8 = load i32, i32* %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) {
  fprintf(stderr, "%s", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
unsigned int bit_reverse(unsigned int);
unsigned int bit_rev(unsigned int n) { return bit_reverse(n); }


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

x86 assembly (clang, -O2):
<bit_rev>:
jmp    1030 <bit_reverse@plt>

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

LLVM IR (-O2):
define i32 @bit_rev(i32 %0) {
%2 = tail call i32 @bit_reverse(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _SC_PAGESIZE;
size_t sysconf(int /*<<< orphan*/);
size_t pagesize() { return sysconf(_SC_PAGESIZE); }


x86 assembly (clang, -O0):
<pagesize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <sysconf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pagesize>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_PAGESIZE = global i32 0
define i64 @pagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = call i64 @sysconf(i32 %1)
ret i64 %2
}

LLVM IR (-O2):
@_SC_PAGESIZE = global i32 0
define i64 @pagesize() {
%1 = load i32, i32* @_SC_PAGESIZE
%2 = tail call i64 @sysconf(i32 %1)
ret i64 %2
}
/* Variables and functions */
int funA(int);
int main(void) {
  int a;
  a = 2;
  return funA(a);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @funA(i32 2)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ setup_tcp_server_communication();
int main(int argc, char **argv) {
  setup_tcp_server_communication();
  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 <setup_tcp_server_communication@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @setup_tcp_server_communication()
ret i32 0
}