xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printTab(int *, int);
int /*<<< orphan*/ triBulle(int *, int);
int main() {
  int tab[] = {1, 5, 3, 6, 9, 645, 1, 4, 2, 567, 8};
  printTab(tab, 11);
  triBulle(tab, 11);
  printTab(tab, 11);
  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    $0x2c,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xb,%esi
call   1030 <printTab@plt>
lea    -0x30(%rbp),%rdi
mov    $0xb,%esi
call   1050 <triBulle@plt>
lea    -0x30(%rbp),%rdi
mov    $0xb,%esi
call   1030 <printTab@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movups 0xef0(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printTab@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1040 <triBulle@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printTab@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.tab = [11 x i32] [i32 1, i32 5, i32 3, i32 6, i32 9, i32 645, i32 1, i32 4, i32 2, i32 567, i32 8]
define i32 @main() {
%1 = alloca [11 x i32]
%2 = bitcast [11 x i32]* %1 to i8*
%3 = getelementptr inbounds [11 x i32], [11 x i32]* %1, i64 0, i64 0
%4 = call i32 @printTab(i32* %3, i32 11)
%5 = call i32 @triBulle(i32* %3, i32 11)
%6 = call i32 @printTab(i32* %3, i32 11)
ret i32 0
}
/* Variables and functions */
int partition(int *, int, int);
void quickSort(int array[], int lo, int hi) {
  int pivot;
  if (hi - lo < 1) {
    return;
  }
  pivot = partition(array, lo, hi);
  quickSort(array, lo, pivot - 1);
  quickSort(array, pivot + 1, hi);
}


x86 assembly (clang, -O0):
<quickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    $0x1,%eax
jge    1146 <quickSort+0x26>
jmp    117c <quickSort+0x5c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quickSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quickSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %esi,%edx
jle    1166 <quickSort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quickSort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quickSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quickSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quickSort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzWhile_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_ACKDOWN(int /*<<< orphan*/);
void BrzWhile_reqdown(struct comp *comp, int port) {
  struct BrzWhile_ *c = (struct BrzWhile_ *)comp;
  SEND_ACKDOWN(0);
}


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

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

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzWhile_ = type { i32 }
define void @BrzWhile_reqdown(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzWhile_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzWhile_*
store %struct.BrzWhile_* %7, %struct.BrzWhile_** %5
%8 = call i32 @SEND_ACKDOWN(i32 0)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzWhile_reqdown(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @SEND_ACKDOWN(i32 0)
ret void
}
void test_sfr(void) {}


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

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

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

LLVM IR (-O2):
define void @test_sfr() {
ret void
}
void passaExemplo(int jogador) {}


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

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

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

LLVM IR (-O2):
define void @passaExemplo(i32 %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ send_event;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xresizerequest_send_event(void *_p) {
  return (int)((XEvent *)_p)->xresizerequest.send_event;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xresizerequest_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xresizerequest_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
struct stat {
  int st_mtime;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char *, struct stat *);
int get_file_modified(char *filename) {
  struct stat st;
  stat(filename, &st);
  return st.st_mtime;
}


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

x86 assembly (clang, -O2):
<get_file_modified>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @get_file_modified(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
void __ccaprice_atomic_increment(volatile int *x) {
  __asm__ __volatile__("lock   \n\t"
                       "incl %0\n\t"
                       : "=m"(*x)
                       : "m"(*x)
                       : "memory");
}


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

x86 assembly (clang, -O2):
<__ccaprice_atomic_increment>:
lock incl (%rdi)
ret

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

LLVM IR (-O2):
define void @__ccaprice_atomic_increment(i32* %0) {
tail call void asm sideeffect "lock \0A\09incl $0\0A\09", "=*m,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %0, i32* elementtype(i32) %0)
ret void
}
fatal(s) char *s;
{
  write(2, s, (unsigned)strlen(s));
  exit(-1);
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <write@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <write@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* %3, i32 %6)
unreachable
}

LLVM IR (-O2):
define i32 @fatal(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 2, i8* %0, i32 %3)
tail call void @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ consumer(int);
int /*<<< orphan*/ producer(int *);
int main() {
  int x = 0;
  int *ptr_x = &x;
  producer(ptr_x);
  consumer(*ptr_x);
#pragma omp taskwait
  assert(x == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <producer@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1050 <consumer@plt>
cmpl   $0x1,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <producer@plt>
mov    0x4(%rsp),%edi
call   1050 <consumer@plt>
xor    %edi,%edi
cmpl   $0x1,0x4(%rsp)
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store i32* %1, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @producer(i32* %3)
%5 = load i32*, i32** %2
%6 = load i32, i32* %5
%7 = call i32 @consumer(i32 %6)
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, 1
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @producer(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @consumer(i32 %4)
%6 = load i32, i32* %1
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}
/* Variables and functions */
void *push_r4_r7_lr_search_up(void *, int);
void *find_verify_shsh_top(void *ptr) {
  void *top = push_r4_r7_lr_search_up(ptr, 0x500);
  if (!top) {
    return 0;
  }
  top++;
  return top;
}


x86 assembly (clang, -O0):
<find_verify_shsh_top>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x500,%esi
call   1030 <push_r4_r7_lr_search_up@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1146 <find_verify_shsh_top+0x36>
movq   $0x0,-0x8(%rbp)
jmp    115a <find_verify_shsh_top+0x4a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_verify_shsh_top>:
push   %rax
mov    $0x500,%esi
call   1030 <push_r4_r7_lr_search_up@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @find_verify_shsh_top(i8* %0) {
%2 = tail call i8* @push_r4_r7_lr_search_up(i8* %0, i32 1280)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t motorcontrol_get_rc_channels(uint8_t *channel_a, uint8_t *channel_b,
                                     uint8_t *channel_c, uint8_t *channel_d) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @motorcontrol_get_rc_channels(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i32* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_help_and_exit() {
  fprintf(stderr, "Usage:\n");
  exit(EXIT_SUCCESS);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"Usage:\0A\00"
@EXIT_SUCCESS = global i32 0
define void @print_help_and_exit() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"Usage:\0A\00"
@EXIT_SUCCESS = global i32 0
define void @print_help_and_exit() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void s5pv210_default_sdhci2(void) {}


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

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

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

LLVM IR (-O2):
define void @s5pv210_default_sdhci2() {
ret void
}
int ComplementodoInsertionSort(int *vetor, int i) {}


x86 assembly (clang, -O0):
<ComplementodoInsertionSort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ComplementodoInsertionSort(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @ComplementodoInsertionSort(i32* nocapture readnone %0, i32 %1) {
ret i32 undef
}
int incl(unsigned int e1, unsigned int e2) {
  if (((e1 & 0x0FFFFFFF) & (e2 & 0x0FFFFFFF)) == (e1 & 0x0FFFFFFF)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<incl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xfffffff,%eax
mov    -0xc(%rbp),%ecx
and    $0xfffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xfffffff,%ecx
cmp    %ecx,%eax
jne    113a <incl+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <incl+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<incl>:
not    %esi
and    %edi,%esi
xor    %eax,%eax
test   $0xfffffff,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @incl(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 = and i32 %6, 268435455
%8 = load i32, i32* %5
%9 = and i32 %8, 268435455
%10 = and i32 %7, %9
%11 = load i32, i32* %4
%12 = and i32 %11, 268435455
%13 = icmp eq i32 %10, %12
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 1, i32* %3
br label %16
15: ; preds = %2
store i32 0, i32* %3
br label %16
16: ; preds = %15, %14
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @incl(i32 %0, i32 %1) {
%3 = and i32 %1, 268435455
%4 = xor i32 %3, 268435455
%5 = and i32 %4, %0
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ UI;

/* Variables and functions */
int /*<<< orphan*/ UIT_BOOLEAN;
int general_allocate_boolean(int /*<<< orphan*/ *, char const *, char const *,
                             char const *, char const *, int /*<<< orphan*/,
                             int /*<<< orphan*/, int, char *);
int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
                         const char *ok_chars, const char *cancel_chars,
                         int flags, char *result_buf) {
  return general_allocate_boolean(ui, prompt, action_desc, ok_chars,
                                  cancel_chars, 0, UIT_BOOLEAN, flags,
                                  result_buf);
}


x86 assembly (clang, -O0):
<UI_add_input_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    0x2e91(%rip),%rax
mov    (%rax),%r11d
mov    -0x2c(%rbp),%r10d
mov    0x10(%rbp),%rax
xor    %r9d,%r9d
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <general_allocate_boolean@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_add_input_boolean>:
push   %rax
mov    %r9d,%r10d
mov    0x2ec5(%rip),%rax
mov    (%rax),%eax
sub    $0x8,%rsp
xor    %r9d,%r9d
push   0x18(%rsp)
push   %r10
push   %rax
call   1030 <general_allocate_boolean@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@UIT_BOOLEAN = global i32 0
define i32 @UI_add_input_boolean(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5, i8* %6) {
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
store i32* %0, i32** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i8* %6, i8** %14
%15 = load i32*, i32** %8
%16 = load i8*, i8** %9
%17 = load i8*, i8** %10
%18 = load i8*, i8** %11
%19 = load i8*, i8** %12
%20 = load i32, i32* @UIT_BOOLEAN
%21 = load i32, i32* %13
%22 = load i8*, i8** %14
%23 = call i32 @general_allocate_boolean(i32* %15, i8* %16, i8* %17, i8* %18, i8* %19, i32 0, i32 %20, i32 %21, i8* %22)
ret i32 %23
}

LLVM IR (-O2):
@UIT_BOOLEAN = global i32 0
define i32 @UI_add_input_boolean(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5, i8* %6) {
%8 = load i32, i32* @UIT_BOOLEAN
%9 = tail call i32 @general_allocate_boolean(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 0, i32 %8, i32 %5, i8* %6)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ serverSendLocal();
int /*<<< orphan*/ serverSendNet();
int serverSend() {
  serverSendNet();
  serverSendLocal();
  return 0;
}


x86 assembly (clang, -O0):
<serverSend>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <serverSendNet@plt>
mov    $0x0,%al
call   1030 <serverSendLocal@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<serverSend>:
push   %rax
xor    %eax,%eax
call   1040 <serverSendNet@plt>
xor    %eax,%eax
call   1030 <serverSendLocal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serverSend() {
%1 = call i32 (...) @serverSendNet()
%2 = call i32 (...) @serverSendLocal()
ret i32 0
}

LLVM IR (-O2):
define i32 @serverSend() {
%1 = tail call i32 (...) @serverSendNet()
%2 = tail call i32 (...) @serverSendLocal()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void main(void) {
  char a, b, c;
  a = 'O';
  b = a;
  c = 'K';
  a = '\n';
  putchar(b);
  putchar(c);
  putchar(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x4f,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movb   $0x4b,-0x3(%rbp)
movb   $0xa,-0x1(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x3(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4f,%edi
call   1030 <putchar@plt>
mov    $0x4b,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
store i8 79, i8* %1
%4 = load i8, i8* %1
store i8 %4, i8* %2
store i8 75, i8* %3
store i8 10, i8* %1
%5 = load i8, i8* %2
%6 = call i32 @putchar(i8 signext %5)
%7 = load i8, i8* %3
%8 = call i32 @putchar(i8 signext %7)
%9 = load i8, i8* %1
%10 = call i32 @putchar(i8 signext %9)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @putchar(i8 signext 79)
%2 = tail call i32 @putchar(i8 signext 75)
%3 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t closest_same_weight(uint64_t x) {
  uint64_t flip;
  if (x & 1) {
    flip = (x + 1) & ~x;
  } else {
    flip = (~x + 1) & x;
  }
  flip |= flip >> 1;
  return x ^ flip;
}


x86 assembly (clang, -O0):
<closest_same_weight>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     112c <closest_same_weight+0x2c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <closest_same_weight+0x3b>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
add    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<closest_same_weight>:
test   $0x1,%dil
jne    110e <closest_same_weight+0xe>
mov    %edi,%ecx
neg    %ecx
and    %edi,%ecx
jmp    1117 <closest_same_weight+0x17>
lea    0x1(%rdi),%eax
mov    %edi,%ecx
not    %ecx
and    %eax,%ecx
mov    %ecx,%eax
sar    %eax
or     %ecx,%eax
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @closest_same_weight(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = add nsw i32 %0, 1
%6 = xor i32 %0, -1
%7 = and i32 %5, %6
br label %11
8: ; preds = %1
%9 = sub i32 0, %0
%10 = and i32 %9, %0
br label %11
11: ; preds = %8, %4
%12 = phi i32 [ %7, %4 ], [ %10, %8 ]
%13 = ashr i32 %12, 1
%14 = or i32 %13, %12
%15 = xor i32 %14, %0
ret i32 %15
}
/* Variables and functions */
int generate_xi_format_file(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *s = "hello, eyu, i am xiyi\n";
  int ret;
  ret = generate_xi_format_file("xi_format_file.cx", s);
  printf("ret:%d\n", ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1040 <generate_xi_format_file@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeef(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1040 <generate_xi_format_file@plt>
lea    0xeee(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"hello, eyu, i am xiyi\0A\00"
@.str.1 = [18 x i8] c"xi_format_file.cx\00"
@.str.2 = [8 x i8] c"ret:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @generate_xi_format_file(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"hello, eyu, i am xiyi\0A\00"
@.str.1 = [18 x i8] c"xi_format_file.cx\00"
@.str.2 = [8 x i8] c"ret:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @generate_xi_format_file(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
void testClosureSIrV(void (*closure)(short, int), short a1, int a2) {
  (*closure)(a1, a2);
}


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

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

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

LLVM IR (-O2):
define void @testClosureSIrV(void (i16, i32)* nocapture %0, i16 signext %1, i32 %2) {
tail call void %0(i16 signext %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(char *s) {
  fprintf(stderr, "usage: gf_example_7\n");
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"usage: gf_example_7\0A\00"
define void @usage(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
void *calloc(size_t, size_t);
void *_calloc_r(struct _reent *ptr, size_t size, size_t len) {
  return calloc(size, len);
}


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

x86 assembly (clang, -O2):
<_calloc_r>:
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
%struct._reent = type { i32 }
define i8* @_calloc_r(%struct._reent* %0, i64 %1, i64 %2) {
%4 = alloca %struct._reent*
%5 = alloca i64
%6 = alloca i64
store %struct._reent* %0, %struct._reent** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %5
%8 = load i64, i64* %6
%9 = call i8* @calloc(i64 %7, i64 %8)
ret i8* %9
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define noalias i8* @_calloc_r(%struct._reent* nocapture readnone %0, i64 %1, i64 %2) {
%4 = tail call i8* @calloc(i64 %1, i64 %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ help();
int /*<<< orphan*/ whoami();
char blueshell_query(char input[]) {
  if (input == "help")
    help();
  if (input == "who am i")
    whoami();
}


x86 assembly (clang, -O0):
<blueshell_query>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xecd(%rip),%rax
cmp    %rax,-0x10(%rbp)
jne    1144 <blueshell_query+0x24>
mov    $0x0,%al
call   1040 <help@plt>
lea    0xeba(%rip),%rax
cmp    %rax,-0x10(%rbp)
jne    115c <blueshell_query+0x3c>
mov    $0x0,%al
call   1030 <whoami@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blueshell_query>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rax
cmp    %rax,%rdi
jne    1137 <blueshell_query+0x17>
xor    %eax,%eax
call   1040 <help@plt>
lea    0xec7(%rip),%rax
cmp    %rax,%rbx
je     1145 <blueshell_query+0x25>
pop    %rbx
ret
xor    %eax,%eax
call   1030 <whoami@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"help\00"
@.str.1 = [9 x i8] c"who am i\00"
define signext i8 @blueshell_query(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @help()
br label %8
8: ; preds = %6, %1
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (...) @whoami()
br label %13
13: ; preds = %11, %8
%14 = load i8, i8* %2
ret i8 %14
}

LLVM IR (-O2):
@.str = [5 x i8] c"help\00"
@.str.1 = [9 x i8] c"who am i\00"
define signext i8 @blueshell_query(i8* readnone %0) {
%2 = icmp eq i8* %0, getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @help()
br label %5
5: ; preds = %3, %1
%6 = icmp eq i8* %0, getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 (...) @whoami()
br label %9
9: ; preds = %7, %5
ret i8 undef
}
int DoWhiteSpace(const char *str, int pos) {
  int inchar;
  inchar = str[pos];
  while ((inchar == ' ') || (inchar == '\f') || (inchar == '\t')) {
    pos++;
    inchar = str[pos];
  }
  return (pos);
}


x86 assembly (clang, -O0):
<DoWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x10(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1142 <DoWhiteSpace+0x42>
mov    $0x1,%al
cmpl   $0xc,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     1142 <DoWhiteSpace+0x42>
cmpl   $0x9,-0x10(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1152 <DoWhiteSpace+0x52>
jmp    116f <DoWhiteSpace+0x6f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x10(%rbp)
jmp    111a <DoWhiteSpace+0x1a>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoWhiteSpace>:
mov    %esi,%eax
movslq %esi,%rcx
add    %rdi,%rcx
movabs $0x100001200,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rcx),%esi
cmp    $0x20,%rsi
ja     1138 <DoWhiteSpace+0x38>
bt     %rsi,%rdx
jae    1138 <DoWhiteSpace+0x38>
add    $0x1,%eax
add    $0x1,%rcx
jmp    1120 <DoWhiteSpace+0x20>
ret

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

LLVM IR (-O2):
define i32 @DoWhiteSpace(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %8, %2
%5 = phi i64 [ %9, %8 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
switch i8 %7, label %10 [
i8 32, label %8
i8 12, label %8
i8 9, label %8
]
8: ; preds = %4, %4, %4
%9 = add i64 %5, 1
br label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ hash(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  char word[200];
  do {
    scanf("%s", word);
  } while (strlen(word) > 200);
  printf("%ld", hash(word));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rsi
lea    0xea0(%rip),%rdi
call   1060 <scanf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0xc8,%eax
jg     1152 <main+0x12>
lea    -0xd0(%rbp),%rdi
call   1040 <hash@plt>
mov    %eax,%esi
lea    0xe72(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
lea    0xeaf(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0xc8,%eax
jg     1160 <main+0x20>
mov    %rsp,%rdi
call   1040 <hash@plt>
lea    0xe7a(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %6, %0
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %6
6: ; preds = %3
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%8 = call i32 @strlen(i8* %7)
%9 = icmp sgt i32 %8, 200
br i1 %9, label %3, label %10
10: ; preds = %6
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%12 = call i32 @hash(i8* %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%ld\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @strlen(i8* %2)
%6 = icmp sgt i32 %5, 200
br i1 %6, label %3, label %7
7: ; preds = %3
%8 = call i32 @hash(i8* %2)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Type definitions */
struct nl_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct nl_info *);
void free_req(struct nl_info *req) {
  if (req)
    free(req);
}


x86 assembly (clang, -O0):
<free_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <free_req+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_req>:
test   %rdi,%rdi
je     111a <free_req+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.nl_info = type { i32 }
define void @free_req(%struct.nl_info* %0) {
%2 = alloca %struct.nl_info*
store %struct.nl_info* %0, %struct.nl_info** %2
%3 = load %struct.nl_info*, %struct.nl_info** %2
%4 = icmp ne %struct.nl_info* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.nl_info*, %struct.nl_info** %2
%7 = call i32 @free(%struct.nl_info* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.nl_info = type { i32 }
define void @free_req(%struct.nl_info* %0) {
%2 = icmp eq %struct.nl_info* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.nl_info* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _soxr_simd_aligned_free(void *p1) {
  if (p1)
    free(*((void **)p1 - 1));
}


x86 assembly (clang, -O0):
<_soxr_simd_aligned_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <_soxr_simd_aligned_free+0x24>
mov    -0x8(%rbp),%rax
mov    -0x8(%rax),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_soxr_simd_aligned_free>:
test   %rdi,%rdi
je     111e <_soxr_simd_aligned_free+0xe>
mov    -0x8(%rdi),%rdi
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @_soxr_simd_aligned_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to i8**
%8 = getelementptr inbounds i8*, i8** %7, i64 -1
%9 = load i8*, i8** %8
%10 = call i32 @free(i8* %9)
br label %11
11: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @_soxr_simd_aligned_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 -8
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @free(i8* %6)
br label %8
8: ; preds = %3, %1
ret void
}
void ff_hevc_put_hevc_uni_qpel_hv32_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv32_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
long int __ulimit(int cmd, ...) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__ulimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffffffffffff,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ulimit>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i64 @__ulimit(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i64 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i64 @__ulimit(i32 %0, ...) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i64 -1
}
/* Variables and functions */
bool isUppercase(char c) { return c >= 65 && c <= 90; }


x86 assembly (clang, -O0):
<isUppercase>:
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 <isUppercase+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):
<isUppercase>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isUppercase(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 @isUppercase(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int fun1241() { return 1241; }


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

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

LLVM IR (-O0):
define i32 @fun1241() {
ret i32 1241
}

LLVM IR (-O2):
define i32 @fun1241() {
ret i32 1241
}
/* Variables and functions */
int fptr_capi20ext_ncci_opencount(unsigned int, unsigned int);
scalar_t__ loadlib();
int capi20ext_ncci_opencount(unsigned applid, unsigned ncci) {
  if (loadlib() < 0)
    return 0;
  return fptr_capi20ext_ncci_opencount(applid, ncci);
}


x86 assembly (clang, -O0):
<capi20ext_ncci_opencount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <loadlib@plt>
cmp    $0x0,%rax
jge    114b <capi20ext_ncci_opencount+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1159 <capi20ext_ncci_opencount+0x39>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <fptr_capi20ext_ncci_opencount@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capi20ext_ncci_opencount>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <loadlib@plt>
test   %rax,%rax
js     1142 <capi20ext_ncci_opencount+0x22>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fptr_capi20ext_ncci_opencount@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @capi20ext_ncci_opencount(i32 %0, i32 %1) {
%3 = tail call i64 (...) @loadlib()
%4 = icmp slt i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @fptr_capi20ext_ncci_opencount(i32 %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Type definitions */
struct dnaSeq {
  int dummy;
};

/* Variables and functions */
struct dnaSeq *nibLoadAllMasked(int /*<<< orphan*/, char *);
struct dnaSeq *nibLoadAll(char *fileName) {
  return nibLoadAllMasked(0, fileName);
}


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

x86 assembly (clang, -O2):
<nibLoadAll>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <nibLoadAllMasked@plt>

LLVM IR (-O0):
%struct.dnaSeq = type { i32 }
define %struct.dnaSeq* @nibLoadAll(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.dnaSeq* @nibLoadAllMasked(i32 0, i8* %3)
ret %struct.dnaSeq* %4
}

LLVM IR (-O2):
%struct.dnaSeq = type { i32 }
define %struct.dnaSeq* @nibLoadAll(i8* %0) {
%2 = tail call %struct.dnaSeq* @nibLoadAllMasked(i32 0, i8* %0)
ret %struct.dnaSeq* %2
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void Curses_close() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @Curses_close() {
%1 = tail call i32 (...) @endwin()
ret void
}