xunge/DecIR huggingface dataset:
/* Variables and functions */
double exp(double);
double log(double);
double HillA(double x, double thresh, double n) {
  double r = exp(n * log(x / thresh));
  return r / (1 + r);
}


x86 assembly (clang, -O0):
<HillA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe8d(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HillA>:
push   %rax
movsd  %xmm2,(%rsp)
divsd  %xmm1,%xmm0
call   1040 <log@plt>
mulsd  (%rsp),%xmm0
call   1030 <exp@plt>
movsd  0xebf(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @HillA(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %6
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fdiv double %9, %10
%12 = call double @log(double %11)
%13 = fmul double %8, %12
%14 = call double @exp(double %13)
store double %14, double* %7
%15 = load double, double* %7
%16 = load double, double* %7
%17 = fadd double 1.000000e+00, %16
%18 = fdiv double %15, %17
ret double %18
}

LLVM IR (-O2):
define double @HillA(double %0, double %1, double %2) {
%4 = fdiv double %0, %1
%5 = tail call double @log(double %4)
%6 = fmul double %5, %2
%7 = tail call double @exp(double %6)
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double %7, %8
ret double %9
}
int vsprintf_help(unsigned c, void **ptr) {
  char *dst;
  dst = (char *)*ptr;
  *dst++ = (char)c;
  *ptr = dst;
  return 0;
}


x86 assembly (clang, -O0):
<vsprintf_help>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf_help>:
mov    (%rsi),%rax
mov    %dil,(%rax)
add    $0x1,%rax
mov    %rax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @vsprintf_help(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i32, i32* %3
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %5
store i8 %9, i8* %10
%12 = load i8*, i8** %5
%13 = load i8**, i8*** %4
store i8* %12, i8** %13
ret i32 0
}

LLVM IR (-O2):
define i32 @vsprintf_help(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = trunc i32 %0 to i8
%5 = getelementptr inbounds i8, i8* %3, i64 1
store i8 %4, i8* %3
store i8* %5, i8** %1
ret i32 0
}
/* Variables and functions */
unsigned int returnUnsigned();
void nonnegative_int() {
  unsigned int x = returnUnsigned();
  if (x < 0) {
    int y = x / 0;
  }
}


x86 assembly (clang, -O0):
<nonnegative_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <returnUnsigned@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jae    1138 <nonnegative_int+0x28>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @nonnegative_int() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @returnUnsigned()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp ult i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %1
%8 = udiv i32 %7, 0
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
define void @nonnegative_int() {
%1 = tail call i32 (...) @returnUnsigned()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fail(char *, size_t);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *p;
  if (size <= 0)
    fail("attempted to allocate %u bytes", size);
  p = malloc(size);
  if (!p)
    fail("cannot allocate %u bytes", size);
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
ja     1147 <xmalloc+0x27>
mov    -0x8(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <fail@plt>
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116f <xmalloc+0x4f>
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <fail@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rdi,%rdi
jne    113a <xmalloc+0x1a>
lea    0xecd(%rip),%rdi
xor    %esi,%esi
call   1030 <fail@plt>
mov    %r14,%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1159 <xmalloc+0x39>
lea    0xece(%rip),%rdi
mov    %r14,%rsi
call   1030 <fail@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [31 x i8] c"attempted to allocate %u bytes\00"
@.str.1 = [25 x i8] c"cannot allocate %u bytes\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = icmp ule i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %2
%8 = call i32 @fail(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 %7)
br label %9
9: ; preds = %6, %1
%10 = load i64, i64* %2
%11 = call i8* @malloc(i64 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = icmp ne i8* %12, null
br i1 %13, label %17, label %14
14: ; preds = %9
%15 = load i64, i64* %2
%16 = call i32 @fail(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 %15)
br label %17
17: ; preds = %14, %9
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [31 x i8] c"attempted to allocate %u bytes\00"
@.str.1 = [25 x i8] c"cannot allocate %u bytes\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @fail(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64 0)
br label %5
5: ; preds = %3, %1
%6 = tail call i8* @malloc(i64 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @fail(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i64 %0)
br label %10
10: ; preds = %8, %5
ret i8* %6
}
int *f() {
  int x = 5;
  return &x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x5,-0x4(%rbp)
lea    -0x4(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
lea    -0x4(%rsp),%rax
ret

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

LLVM IR (-O2):
define noalias i32* @f() {
%1 = alloca i32
ret i32* %1
}
void water_move_player() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ nuts_lv_set(struct nuts_lv *, char const *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void nuts_lv_set_cstr(struct nuts_lv *lv, const char *str) {
  nuts_lv_set(lv, str, strlen(str));
}


x86 assembly (clang, -O0):
<nuts_lv_set_cstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <nuts_lv_set@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nuts_lv_set_cstr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <nuts_lv_set@plt>

LLVM IR (-O0):
%struct.nuts_lv = type { i32 }
define void @nuts_lv_set_cstr(%struct.nuts_lv* %0, i8* %1) {
%3 = alloca %struct.nuts_lv*
%4 = alloca i8*
store %struct.nuts_lv* %0, %struct.nuts_lv** %3
store i8* %1, i8** %4
%5 = load %struct.nuts_lv*, %struct.nuts_lv** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @nuts_lv_set(%struct.nuts_lv* %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.nuts_lv = type { i32 }
define void @nuts_lv_set_cstr(%struct.nuts_lv* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @nuts_lv_set(%struct.nuts_lv* %0, i8* %1, i32 %3)
ret void
}
void kobject_put(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<kobject_put>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kobject_put>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.kobject_put = [12 x i8] c"kobject_put\00"
define void @kobject_put() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.kobject_put, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.kobject_put = [12 x i8] c"kobject_put\00"
define void @kobject_put() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.kobject_put, i64 0, i64 0))
ret void
}
char TestLE() {
  char r;
  __asm__("cmp $2, %1" : "=@ccle"(r) : "r"(1));
  if (r) {
    __asm__("cmp $0, %1" : "=@ccnle"(r) : "r"(1));
    if (r) {
      __asm__("cmp $1, %1" : "=@ccle"(r) : "r"(1));
      if (r)
        return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<TestLE>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
cmp    $0x2,%eax
setle  %al
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     115f <TestLE+0x5f>
mov    $0x1,%eax
cmp    $0x0,%eax
setg   %al
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     115a <TestLE+0x5a>
mov    $0x1,%eax
cmp    $0x1,%eax
setle  %al
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x2(%rbp)
je     1155 <TestLE+0x55>
movb   $0x1,-0x1(%rbp)
jmp    1163 <TestLE+0x63>
jmp    115a <TestLE+0x5a>
jmp    115f <TestLE+0x5f>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestLE>:
mov    $0x1,%eax
cmp    $0x2,%eax
jg     111c <TestLE+0x1c>
cmp    $0x0,%eax
jle    111c <TestLE+0x1c>
mov    $0x1,%eax
cmp    $0x1,%eax
mov    $0x1,%al
jg     111c <TestLE+0x1c>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @TestLE() {
%1 = alloca i8
%2 = alloca i8
%3 = call i8 asm "cmp $$2, $1", "={@ccle},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %17
6: ; preds = %0
%7 = call i8 asm "cmp $$0, $1", "={@ccnle},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
store i8 %7, i8* %2
%8 = load i8, i8* %2
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = call i8 asm "cmp $$1, $1", "={@ccle},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
store i8 %11, i8* %2
%12 = load i8, i8* %2
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %10
store i8 1, i8* %1
br label %18
15: ; preds = %10
br label %16
16: ; preds = %15, %6
br label %17
17: ; preds = %16, %0
store i8 0, i8* %1
br label %18
18: ; preds = %17, %14
%19 = load i8, i8* %1
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @TestLE() {
%1 = tail call i8 asm "cmp $$2, $1", "={@ccle},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
%2 = icmp eq i8 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = tail call i8 asm "cmp $$0, $1", "={@ccnle},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
%5 = icmp eq i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i8 asm "cmp $$1, $1", "={@ccle},r,~{dirflag},~{fpsr},~{flags}"(i32 1)
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3, %6, %0
br label %10
10: ; preds = %6, %9
%11 = phi i8 [ 0, %9 ], [ 1, %6 ]
ret i8 %11
}
int cmd_cluster_start(int fd, int argc, char *argv[]) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @cmd_cluster_start(i32 %0, i32 %1, i8** nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
char *strchr(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ tolower(int);
char *strcasechr(const char *haystack, int needle) {
  return (strchr(haystack, tolower(needle)));
}


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

x86 assembly (clang, -O2):
<strcasechr>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1040 <tolower@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define i8* @strcasechr(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 @tolower(i32 %6)
%8 = call i8* @strchr(i8* %5, i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @strcasechr(i8* %0, i32 %1) {
%3 = tail call i32 @tolower(i32 %1)
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ print(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ quicksort(int *, int /*<<< orphan*/, int);
int main() {
  int tab[10] = {10, 8, 9, 6, 4, 5, 1, 3, 2, 7};
  quicksort(&tab[0], 0, 9);
  print(&tab[0], 0, 9);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <quicksort@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1040 <print@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xef4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1030 <quicksort@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1040 <print@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.tab = [10 x i32] [i32 10, i32 8, i32 9, i32 6, i32 4, i32 5, i32 1, i32 3, i32 2, i32 7]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @quicksort(i32* %4, i32 0, i32 9)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @print(i32* %6, i32 0, i32 9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.tab = [10 x i32] [i32 10, i32 8, i32 9, i32 6, i32 4, i32 5, i32 1, i32 3, i32 2, i32 7]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @quicksort(i32* %3, i32 0, i32 9)
%5 = call i32 @print(i32* %3, i32 0, i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Hello world!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
float __ocml_sqrt_rtz_f32(float);
float __fsqrt_rz(float x) { return __ocml_sqrt_rtz_f32(x); }


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

x86 assembly (clang, -O2):
<__fsqrt_rz>:
jmp    1030 <__ocml_sqrt_rtz_f32@plt>

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

LLVM IR (-O2):
define float @__fsqrt_rz(float %0) {
%2 = tail call float @__ocml_sqrt_rtz_f32(float %0)
ret float %2
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int lstat(char const *, struct stat *);
int os_lstat(const char *path, struct stat *sb) { return lstat(path, sb); }


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

x86 assembly (clang, -O2):
<os_lstat>:
jmp    1030 <lstat@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @os_lstat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @lstat(i8* %0, %struct.stat* %1)
ret i32 %3
}
void rt_error(char *mesg, ...) { return; }


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

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

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

LLVM IR (-O2):
define void @rt_error(i8* nocapture %0, ...) {
ret void
}
void avcodec_parameters_copy() {}


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

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

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

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

/* Variables and functions */
scalar_t__ ether_addr_compare(struct ether_addr const *,
                              struct ether_addr const *);
bool ether_addr_equal(const struct ether_addr *a, const struct ether_addr *b) {
  return ether_addr_compare(a, b) == 0;
}


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

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

LLVM IR (-O0):
%struct.ether_addr = type { i32 }
define i32 @ether_addr_equal(%struct.ether_addr* %0, %struct.ether_addr* %1) {
%3 = alloca %struct.ether_addr*
%4 = alloca %struct.ether_addr*
store %struct.ether_addr* %0, %struct.ether_addr** %3
store %struct.ether_addr* %1, %struct.ether_addr** %4
%5 = load %struct.ether_addr*, %struct.ether_addr** %3
%6 = load %struct.ether_addr*, %struct.ether_addr** %4
%7 = call i64 @ether_addr_compare(%struct.ether_addr* %5, %struct.ether_addr* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.ether_addr = type { i32 }
define i32 @ether_addr_equal(%struct.ether_addr* %0, %struct.ether_addr* %1) {
%3 = tail call i64 @ether_addr_compare(%struct.ether_addr* %0, %struct.ether_addr* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int bar(char *x) {
  int y = (int)x;
  return y + 1;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @bar(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @bar(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = add nsw i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ kputc(char);
void taskb() {
  for (;;)
    kputc('B');
}


x86 assembly (clang, -O0):
<taskb>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <taskb+0x9>
mov    $0x42,%edi
call   1030 <kputc@plt>
jmp    1119 <taskb+0x9>

x86 assembly (clang, -O2):
<taskb>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x42,%edi
call   1030 <kputc@plt>
jmp    1120 <taskb+0x10>

LLVM IR (-O0):
define void @taskb() {
br label %1
1: ; preds = %1, %0
%2 = call i32 @kputc(i8 signext 66)
br label %1
}

LLVM IR (-O2):
define void @taskb() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @kputc(i8 signext 66)
br label %1
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ REG_UART_BASE(scalar_t__);
__attribute__((always_)) __attribute__((flatten)) uint32_t
UART_INT_RAW(uint32_t i) {
  return (REG_UART_BASE(i) + 0x4);
}


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

x86 assembly (clang, -O2):
<UART_INT_RAW>:
push   %rax
call   1030 <REG_UART_BASE@plt>
add    $0x4,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @UART_INT_RAW(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @REG_UART_BASE(i64 %3)
%5 = add nsw i64 %4, 4
ret i64 %5
}

LLVM IR (-O2):
define i64 @UART_INT_RAW(i64 %0) {
%2 = tail call i64 @REG_UART_BASE(i64 %0)
%3 = add nsw i64 %2, 4
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void I2C1_EV_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @I2C1_EV_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @I2C1_EV_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
void XrmMergeDatabases() {}


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

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

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

LLVM IR (-O2):
define void @XrmMergeDatabases() {
ret void
}
int leap(int year) {
  int leap;
  if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
    leap = 1;
  return (leap);
}


x86 assembly (clang, -O0):
<leap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112f <leap+0x2f>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <leap+0x43>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114a <leap+0x4a>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @leap(i32 %0) {
ret i32 1
}
void ELMECCSizeSet(unsigned int baseAddr, unsigned int eccSize) {
  (*((volatile unsigned int *)(baseAddr + (0x20)))) |=
      (eccSize << (0x00000010u));
}


x86 assembly (clang, -O0):
<ELMECCSizeSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
shl    $0x10,%edx
mov    -0x4(%rbp),%eax
add    $0x20,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ELMECCSizeSet>:
shl    $0x10,%esi
add    $0x20,%edi
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @ELMECCSizeSet(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 = shl i32 %5, 16
%7 = load i32, i32* %3
%8 = add i32 %7, 32
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, %6
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @ELMECCSizeSet(i32 %0, i32 %1) {
%3 = shl i32 %1, 16
%4 = add i32 %0, 32
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, %3
store volatile i32 %8, i32* %6
ret void
}
unsigned unlifted_a(unsigned *x) { return *x; }


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

x86 assembly (clang, -O2):
<unlifted_a>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @unlifted_a(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
int myCount(const void *v1, const void *v2) {
  return (*(int *)v1 - *(int *)v2);
}


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

x86 assembly (clang, -O2):
<myCount>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @myCount(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @myCount(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ kern_schedule();
void schedule(void) { kern_schedule(); }


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

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

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

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

/* Variables and functions */
int firstMissingPositive(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int ans;
  int arry[] = {3, 1, 2};
  int sz;
  sz = sizeof(arry) / sizeof(arry[0]);
  ans = firstMissingPositive(arry, sz);
  printf("ans: %d\n", ans);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xecf(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x3,-0x14(%rbp)
lea    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <firstMissingPositive@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
call   1040 <firstMissingPositive@plt>
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.arry = [3 x i32] [i32 3, i32 1, i32 2]
@.str = [9 x i8] c"ans: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca i32
%4 = bitcast [3 x i32]* %2 to i8*
store i32 3, i32* %3
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = load i32, i32* %3
%7 = call i32 @firstMissingPositive(i32* %5, i32 %6)
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arry = [3 x i32] [i32 3, i32 1, i32 2]
@.str = [9 x i8] c"ans: %d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @firstMissingPositive(i32* %3, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
int roundInt(float number) {
  float ret = (number >= 0.0) ? (number + 0.5) : (number - 0.5);
  return (int)ret;
}


x86 assembly (clang, -O0):
<roundInt>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     113e <roundInt+0x3e>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1158 <roundInt+0x58>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb1(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
cvttss2si -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundInt>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
setb   %al
cvtss2sd %xmm0,%xmm0
lea    0xeea(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvtsd2ss %xmm0,%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @roundInt(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fcmp oge double %5, 0.000000e+00
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fadd double %9, 5.000000e-01
br label %15
11: ; preds = %1
%12 = load float, float* %2
%13 = fpext float %12 to double
%14 = fsub double %13, 5.000000e-01
br label %15
15: ; preds = %11, %7
%16 = phi double [ %10, %7 ], [ %14, %11 ]
%17 = fptrunc double %16 to float
store float %17, float* %3
%18 = load float, float* %3
%19 = fptosi float %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @roundInt(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ult float %0, 0.000000e+00
%4 = select i1 %3, double -5.000000e-01, double 5.000000e-01
%5 = fadd double %4, %2
%6 = fptrunc double %5 to float
%7 = fptosi float %6 to i32
ret i32 %7
}
int bitParity(int a) {
  int b = 1;
  b = b ^ (a);
  b = b ^ (a >> 1);
  b = b ^ (a >> 2);
  b = b ^ (a >> 4);
  b = b ^ (a >> 5);
  b = b ^ (a >> 6);
  b = b ^ (a >> 7);
  return ((~b) & 1);
}


x86 assembly (clang, -O0):
<bitParity>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x2,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x6,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x7,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitParity>:
mov    %edi,%eax
sar    %eax
xor    %edi,%eax
mov    %edi,%ecx
sar    $0x2,%ecx
mov    %edi,%edx
shr    $0x4,%edx
xor    %ecx,%edx
xor    %eax,%edx
mov    %edi,%ecx
shr    $0x5,%ecx
mov    %edi,%eax
shr    $0x6,%eax
xor    %ecx,%eax
shr    $0x7,%edi
xor    %edi,%eax
xor    %edx,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bitParity(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
%4 = load i32, i32* %3
%5 = load i32, i32* %2
%6 = xor i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %2
%9 = ashr i32 %8, 1
%10 = xor i32 %7, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = ashr i32 %12, 2
%14 = xor i32 %11, %13
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = ashr i32 %16, 4
%18 = xor i32 %15, %17
store i32 %18, i32* %3
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = ashr i32 %20, 5
%22 = xor i32 %19, %21
store i32 %22, i32* %3
%23 = load i32, i32* %3
%24 = load i32, i32* %2
%25 = ashr i32 %24, 6
%26 = xor i32 %23, %25
store i32 %26, i32* %3
%27 = load i32, i32* %3
%28 = load i32, i32* %2
%29 = ashr i32 %28, 7
%30 = xor i32 %27, %29
store i32 %30, i32* %3
%31 = load i32, i32* %3
%32 = xor i32 %31, -1
%33 = and i32 %32, 1
ret i32 %33
}

LLVM IR (-O2):
define i32 @bitParity(i32 %0) {
%2 = ashr i32 %0, 1
%3 = xor i32 %2, %0
%4 = ashr i32 %0, 2
%5 = xor i32 %3, %4
%6 = lshr i32 %0, 4
%7 = xor i32 %5, %6
%8 = lshr i32 %0, 5
%9 = xor i32 %7, %8
%10 = lshr i32 %0, 6
%11 = xor i32 %9, %10
%12 = lshr i32 %0, 7
%13 = xor i32 %11, %12
%14 = and i32 %13, 1
ret i32 %14
}
void plt_surf_free_aux(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @plt_surf_free_aux(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(unsigned short, int);
void serial_enable_rda_interrupt(unsigned short com) { outb((com + 1), 0x01); }


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

x86 assembly (clang, -O2):
<serial_enable_rda_interrupt>:
add    $0x1,%edi
movzwl %di,%edi
mov    $0x1,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @serial_enable_rda_interrupt(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = add nsw i32 %4, 1
%6 = trunc i32 %5 to i16
%7 = call i32 @outb(i16 zeroext %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @serial_enable_rda_interrupt(i16 zeroext %0) {
%2 = add i16 %0, 1
%3 = tail call i32 @outb(i16 zeroext %2, i32 1)
ret void
}
int nautywrapper_is_isomorphic(int isdir, int n, int *adj1, int *adj2,
                               int *sigma) {
  return 0;
}


x86 assembly (clang, -O0):
<nautywrapper_is_isomorphic>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nautywrapper_is_isomorphic(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @nautywrapper_is_isomorphic(i32 %0, i32 %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32* nocapture readnone %4) {
ret i32 0
}
int do_200() { return 200; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0xc8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0xc8,%eax
ret

LLVM IR (-O0):
define i32 @do_200() {
ret i32 200
}

LLVM IR (-O2):
define i32 @do_200() {
ret i32 200
}
/* Variables and functions */
unsigned int O_EXCL;
unsigned int O_NONBLOCK;
int /*<<< orphan*/ exit(int);
int rmmod(char *, unsigned int);
int main(int argc, char *argv[]) {
  unsigned int flags = O_NONBLOCK | O_EXCL;
  int i, opt, all = 0;
  int ret, err;
  err = 0;
  ret = rmmod(argv[1], flags);
  if (ret != 0)
    err = 1;
  exit(err);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
mov    0x2e92(%rip),%rcx
or     (%rcx),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x14(%rbp),%esi
call   1030 <rmmod@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     117d <main+0x5d>
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rcx
mov    0x2ea9(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    0x8(%rsi),%rdi
mov    %eax,%esi
call   1030 <rmmod@plt>
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1040 <exit@plt>

LLVM IR (-O0):
@O_NONBLOCK = global i32 0
@O_EXCL = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = load i32, i32* @O_NONBLOCK
%13 = load i32, i32* @O_EXCL
%14 = or i32 %12, %13
store i32 %14, i32* %6
store i32 0, i32* %9
store i32 0, i32* %11
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i32, i32* %6
%19 = call i32 @rmmod(i8* %17, i32 %18)
store i32 %19, i32* %10
%20 = load i32, i32* %10
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %2
store i32 1, i32* %11
br label %23
23: ; preds = %22, %2
%24 = load i32, i32* %11
%25 = call i32 @exit(i32 %24)
unreachable
}

LLVM IR (-O2):
@O_NONBLOCK = global i32 0
@O_EXCL = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @O_NONBLOCK
%4 = load i32, i32* @O_EXCL
%5 = or i32 %4, %3
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @rmmod(i8* %7, i32 %5)
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
%11 = tail call i32 @exit(i32 %10)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ udp(char *);
int /*<<< orphan*/ usleep(int);
main() {
  srand(time(NULL));
  int i;
  for (i = 0; i < 1000000; i++) {
    udp("117.27.250.200");
    usleep(10);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xf4240,-0x8(%rbp)
jge    1197 <main+0x57>
lea    0xe86(%rip),%rdi
call   1050 <udp@plt>
mov    $0xa,%edi
call   1060 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1166 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0xf4240,%ebp
lea    0xea3(%rip),%rbx
nopl   (%rax)
mov    %rbx,%rdi
call   1050 <udp@plt>
mov    $0xa,%edi
call   1060 <usleep@plt>
add    $0xffffffff,%ebp
jne    1160 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"117.27.250.200\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
store i32 0, i32* %2
br label %5
5: ; preds = %11, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 1000000
br i1 %7, label %8, label %14
8: ; preds = %5
%9 = call i32 @udp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @usleep(i32 10)
br label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %5
14: ; preds = %5
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [15 x i8] c"117.27.250.200\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %7, %3 ]
%5 = tail call i32 @udp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @usleep(i32 10)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 1000000
br i1 %8, label %9, label %3
9: ; preds = %3
ret i32 0
}
unsigned short int f21(unsigned short int x, unsigned int y) {
  return (x >> ((-y) & (8 * 2 - 1))) ^ (x << y);
}


x86 assembly (clang, -O0):
<f21>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0xf,%ecx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f21>:
mov    %esi,%ecx
neg    %cl
and    $0xf,%cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f21(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = sub i32 0, %7
%9 = and i32 %8, 15
%10 = ashr i32 %6, %9
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = load i32, i32* %4
%14 = shl i32 %12, %13
%15 = xor i32 %10, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @f21(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = sub i32 0, %1
%5 = and i32 %4, 15
%6 = lshr i32 %3, %5
%7 = shl i32 %3, %1
%8 = xor i32 %6, %7
%9 = trunc i32 %8 to i16
ret i16 %9
}
__attribute__((always_)) void
debug_object_init_on_stack(void *addr, struct debug_obj_descr *descr) {}


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

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

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

LLVM IR (-O2):
%struct.debug_obj_descr = type opaque
define void @debug_object_init_on_stack(i8* nocapture %0, %struct.debug_obj_descr* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ cos(double);
float fdegcos(float v) { return (float)cos((double)(v * 0.01745329252f)); }


x86 assembly (clang, -O0):
<fdegcos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <cos@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdegcos>:
push   %rax
mulss  0xee7(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fdegcos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x3F91DF46A0000000
%5 = fpext float %4 to double
%6 = call i64 @cos(double %5)
%7 = sitofp i64 %6 to float
ret float %7
}

LLVM IR (-O2):
define float @fdegcos(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
%3 = fpext float %2 to double
%4 = tail call i64 @cos(double %3)
%5 = sitofp i64 %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ __span_aligned_free(void *);
void span_aligned_free(void *ptr) { __span_aligned_free(ptr); }


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

x86 assembly (clang, -O2):
<span_aligned_free>:
jmp    1030 <__span_aligned_free@plt>

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

LLVM IR (-O2):
define void @span_aligned_free(i8* %0) {
%2 = tail call i32 @__span_aligned_free(i8* %0)
ret void
}
char f(char a, char b, char d) {
  if (a == b)
    return 0;
  else
    return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movsbl -0x2(%rbp),%eax
movsbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
jne    112e <f+0x2e>
movb   $0x0,-0x1(%rbp)
jmp    1134 <f+0x34>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    %sil,%dil
cmovne %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @f(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = icmp eq i8 %0, %1
%5 = select i1 %4, i8 0, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ ajOboinExit();
int /*<<< orphan*/ ajObooutExit();
void ajOboExit(void) {
  ajOboinExit();
  ajObooutExit();
  return;
}


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

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

LLVM IR (-O0):
define void @ajOboExit() {
%1 = call i32 (...) @ajOboinExit()
%2 = call i32 (...) @ajObooutExit()
ret void
}

LLVM IR (-O2):
define void @ajOboExit() {
%1 = tail call i32 (...) @ajOboinExit()
%2 = tail call i32 (...) @ajObooutExit()
ret void
}