xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int strlen(char *);
void str_concat(char *dst, char *first, char second) {
  int len = strlen(first);
  memcpy(dst, first, strlen(first));
  dst[len] = second;
}


x86 assembly (clang, -O0):
<str_concat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_concat>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %eax,%r15d
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <memcpy@plt>
movslq %r15d,%rax
mov    %r14b,0x0(%rbp,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @str_concat(i8* %0, i8* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%8 = load i8*, i8** %5
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %7
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i8*, i8** %5
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @memcpy(i8* %10, i8* %11, i32 %13)
%15 = load i8, i8* %6
%16 = load i8*, i8** %4
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
store i8 %15, i8* %19
ret void
}

LLVM IR (-O2):
define void @str_concat(i8* %0, i8* %1, i8 signext %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @strlen(i8* %1)
%6 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %5)
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %2, i8* %8
ret void
}
short short_fetch_and_acquire(short *ptr, int value) {
  return __atomic_fetch_and(ptr, value, 2);
}


x86 assembly (clang, -O0):
<short_fetch_and_acquire>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%ecx
mov    %cx,-0xe(%rbp)
mov    -0xe(%rbp),%cx
mov    %cx,-0x14(%rbp)
mov    (%rax),%ax
mov    %ax,-0x12(%rbp)
mov    -0x12(%rbp),%ax
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x2c(%rbp)
and    %esi,%edx
mov    %edx,-0x28(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x22(%rbp)
test   $0x1,%cl
mov    %ax,-0x12(%rbp)
jne    1161 <short_fetch_and_acquire+0x61>
jmp    1129 <short_fetch_and_acquire+0x29>
mov    -0x22(%rbp),%ax
mov    %ax,-0x10(%rbp)
movswl -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<short_fetch_and_acquire>:
movzwl (%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
and    %esi,%ecx
lock cmpxchg %cx,(%rdi)
jne    1110 <short_fetch_and_acquire+0x10>
ret

LLVM IR (-O0):
define signext i16 @short_fetch_and_acquire(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i16
%6 = alloca i16
store i16* %0, i16** %3
store i32 %1, i32* %4
%7 = load i16*, i16** %3
%8 = load i32, i32* %4
%9 = trunc i32 %8 to i16
store i16 %9, i16* %5
%10 = load i16, i16* %5
%11 = atomicrmw and i16* %7, i16 %10 acquire
store i16 %11, i16* %6
%12 = load i16, i16* %6
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @short_fetch_and_acquire(i16* nocapture %0, i32 %1) {
%3 = trunc i32 %1 to i16
%4 = atomicrmw and i16* %0, i16 %3 acquire
ret i16 %4
}
void devpts_pty_kill(struct inode *inode) {}


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

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

LLVM IR (-O0):
%struct.inode = type opaque
define void @devpts_pty_kill(%struct.inode* %0) {
%2 = alloca %struct.inode*
store %struct.inode* %0, %struct.inode** %2
ret void
}

LLVM IR (-O2):
%struct.inode = type opaque
define void @devpts_pty_kill(%struct.inode* nocapture %0) {
ret void
}
void zero_out(region_ptr, size_in_bytes) char *region_ptr;
int size_in_bytes;
{
  register char *rp, *rp_end;
  rp = region_ptr;
  rp_end = region_ptr + size_in_bytes;
  while (rp < rp_end)
    *rp++ = 0;
}


x86 assembly (clang, -O0):
<zero_out>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1147 <zero_out+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
jmp    1122 <zero_out+0x22>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_out>:
test   %esi,%esi
jle    1133 <zero_out+0x23>
push   %rax
mov    %esi,%edx
add    %rdi,%rdx
lea    0x1(%rdi),%rax
cmp    %rax,%rdx
cmovbe %rax,%rdx
sub    %rdi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @zero_out(i8* writeonly %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = zext i32 %1 to i64
%7 = add i64 %3, %6
%8 = add i64 %3, 1
%9 = call i64 @llvm.umax.i64(i64 %7, i64 %8)
%10 = sub i64 %9, %3
br label %11
11: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo_smp();
void f() { foo_smp(); }


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

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

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

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 (...) @foo_smp()
ret void
}
unsigned short unsignedshort_ignoring_shortint(unsigned short x, short int y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshort_ignoring_shortint>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @unsignedshort_ignoring_shortint(i16 returned zeroext %0, i16 signext %1) {
ret i16 %0
}
int main() { return ~4; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0xfffffffb,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 -5
}
/* Variables and functions */
int /*<<< orphan*/ dprintf(char *);
void exception_swi(unsigned int no, void *arg) {
  dprintf("Exception: Software int\n");
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Exception: Software int\0A\00"
define void @exception_swi(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 @dprintf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Exception: Software int\0A\00"
define void @exception_swi(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @dprintf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ update_time();
int /*<<< orphan*/ write_port(int, int);
void rtc_interrupt_handler_main(void) {
  update_time();
  write_port(0x20, 0x20);
  write_port(0xA0, 0x20);
}


x86 assembly (clang, -O0):
<rtc_interrupt_handler_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <update_time@plt>
mov    $0x20,%esi
mov    %esi,%edi
call   1040 <write_port@plt>
mov    $0xa0,%edi
mov    $0x20,%esi
call   1040 <write_port@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtc_interrupt_handler_main>:
push   %rax
xor    %eax,%eax
call   1030 <update_time@plt>
mov    $0x20,%edi
mov    $0x20,%esi
call   1040 <write_port@plt>
mov    $0xa0,%edi
mov    $0x20,%esi
pop    %rax
jmp    1040 <write_port@plt>

LLVM IR (-O0):
define void @rtc_interrupt_handler_main() {
%1 = call i32 (...) @update_time()
%2 = call i32 @write_port(i32 32, i32 32)
%3 = call i32 @write_port(i32 160, i32 32)
ret void
}

LLVM IR (-O2):
define void @rtc_interrupt_handler_main() {
%1 = tail call i32 (...) @update_time()
%2 = tail call i32 @write_port(i32 32, i32 32)
%3 = tail call i32 @write_port(i32 160, i32 32)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void skeep_bytes(FILE *file, int bytes) { fseek(file, bytes, SEEK_CUR); }


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

x86 assembly (clang, -O2):
<skeep_bytes>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <fseek@plt>

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define void @skeep_bytes(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @SEEK_CUR
%8 = call i32 @fseek(i32* %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define void @skeep_bytes(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* @SEEK_CUR
%4 = tail call i32 @fseek(i32* %0, i32 %1, i32 %3)
ret void
}
const char *last_character(const char *str) {
  const char *ptr_in = str;
  const char *last = str;
  while (*ptr_in != '\0') {
    last = ptr_in;
    ptr_in++;
  }
  return last;
}


x86 assembly (clang, -O0):
<last_character>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1141 <last_character+0x41>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <last_character+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_character>:
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rcx,%rax
mov    %rdi,%rcx
add    $0x1,%rdi
cmpb   $0x0,(%rcx)
jne    1110 <last_character+0x10>
ret

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

LLVM IR (-O2):
define i8* @last_character(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = phi i8* [ %0, %1 ], [ %3, %2 ]
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %4
}
/* Variables and functions */
int *malloc(int);
int /*<<< orphan*/ realloc(int *, int /*<<< orphan*/);
void f2_realloc_0() {
  int *p = malloc(12);
  realloc(p, 0);
  realloc(p, 0);
}


x86 assembly (clang, -O0):
<f2_realloc_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <realloc@plt>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <realloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2_realloc_0>:
push   %rbx
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1040 <realloc@plt>
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <realloc@plt>

LLVM IR (-O0):
define void @f2_realloc_0() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @realloc(i32* %3, i32 0)
%5 = load i32*, i32** %1
%6 = call i32 @realloc(i32* %5, i32 0)
ret void
}

LLVM IR (-O2):
define void @f2_realloc_0() {
%1 = tail call i32* @malloc(i32 12)
%2 = tail call i32 @realloc(i32* %1, i32 0)
%3 = tail call i32 @realloc(i32* %1, i32 0)
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *COM_FileExtension(const char *in) {
  const char *ext = strrchr(in, '.');
  if (!ext || ext == in) {
    return "";
  }
  return ext + 1;
}


x86 assembly (clang, -O0):
<COM_FileExtension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1147 <COM_FileExtension+0x37>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1157 <COM_FileExtension+0x47>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1163 <COM_FileExtension+0x53>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<COM_FileExtension>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
cmp    %rbx,%rax
lea    0xed4(%rip),%rdx
cmove  %rdx,%rcx
test   %rax,%rax
cmove  %rdx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @COM_FileExtension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 46)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = icmp eq i8* %10, %11
br i1 %12, label %13, label %14
13: ; preds = %9, %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %17
14: ; preds = %9
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8* %16, i8** %2
br label %17
17: ; preds = %14, %13
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @COM_FileExtension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = icmp eq i8* %2, %0
%5 = or i1 %3, %4
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = select i1 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %6
ret i8* %7
}
void troca_bolha(void *v[], int i) {
  void *aux;
  aux = v[i];
  v[i] = v[i + 1];
  v[i + 1] = aux;
}


x86 assembly (clang, -O0):
<troca_bolha>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<troca_bolha>:
movslq %esi,%rax
movdqu (%rdi,%rax,8),%xmm0
pshufd $0x4e,%xmm0,%xmm0
movdqu %xmm0,(%rdi,%rax,8)
ret

LLVM IR (-O0):
define void @troca_bolha(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i8*
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
store i8* %10, i8** %5
%11 = load i8**, i8*** %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %11, i64 %14
%16 = load i8*, i8** %15
%17 = load i8**, i8*** %3
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
store i8* %16, i8** %20
%21 = load i8*, i8** %5
%22 = load i8**, i8*** %3
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %22, i64 %25
store i8* %21, i8** %26
ret void
}

LLVM IR (-O2):
define void @troca_bolha(i8** nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = bitcast i8** %4 to <2 x i8*>*
%6 = load <2 x i8*>, <2 x i8*>* %5
%7 = shufflevector <2 x i8*> %6, <2 x i8*> poison, <2 x i32> <i32 1, i32 0>
%8 = bitcast i8** %4 to <2 x i8*>*
store <2 x i8*> %7, <2 x i8*>* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usage();
void usage_exit(char *err) {
  printf("\nERROR: ");
  printf(err);
  printf("\n\n");
  usage();
  exit(1);
}


x86 assembly (clang, -O0):
<usage_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <usage@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage_exit>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <usage@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\0AERROR: \00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define void @usage_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (...) @usage()
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"\0AERROR: \00"
@str = [2 x i8] c"\0A\00"
define void @usage_exit(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @usage()
%6 = tail call i32 @exit(i32 1)
unreachable
}
void nfs_fscache_release_page(struct page *page) {}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define void @nfs_fscache_release_page(%struct.page* %0) {
%2 = alloca %struct.page*
store %struct.page* %0, %struct.page** %2
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @nfs_fscache_release_page(%struct.page* nocapture %0) {
ret void
}
void gencheck_interupt_out(unsigned int addr) {}


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

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

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

LLVM IR (-O2):
define void @gencheck_interupt_out(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ mem_head;

/* Variables and functions */
uint16_t mem_free_count_get(void *mem_head) {
  uint16_t free_count = 0;
  if (mem_head) {
    free_count = *(
        (uint16_t *)(((uint32_t)((uint8_t *)mem_head + sizeof(mem_head)) + 3) &
                     (~((uint32_t)3))));
  }
  return free_count;
}


x86 assembly (clang, -O0):
<mem_free_count_get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     112f <mem_free_count_get+0x2f>
mov    -0x8(%rbp),%rax
add    $0x20,%rax
add    $0x3,%eax
and    $0xfffffffc,%eax
cltq
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem_free_count_get>:
test   %rdi,%rdi
je     1112 <mem_free_count_get+0x12>
add    $0x23,%edi
movslq %edi,%rax
and    $0xfffffffffffffffc,%rax
mov    (%rax),%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @mem_free_count_get(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i32*
%9 = getelementptr inbounds i32, i32* %8, i64 8
%10 = ptrtoint i32* %9 to i32
%11 = add nsw i32 %10, 3
%12 = and i32 %11, -4
%13 = sext i32 %12 to i64
%14 = inttoptr i64 %13 to i32*
%15 = load i32, i32* %14
store i32 %15, i32* %3
br label %16
16: ; preds = %6, %1
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @mem_free_count_get(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = getelementptr inbounds i8, i8* %0, i64 32
%5 = ptrtoint i8* %4 to i64
%6 = shl i64 %5, 32
%7 = add i64 %6, 12884901888
%8 = ashr exact i64 %7, 32
%9 = and i64 %8, -4
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* %10
br label %12
12: ; preds = %3, %1
%13 = phi i32 [ %11, %3 ], [ 0, %1 ]
ret i32 %13
}
/* Variables and functions */
scalar_t__ calloc(long, int);
long strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, long);
char *_s2_c2fstr(char *cstring, long int *textlen) {
  *textlen = strlen(cstring);
  char *retval = (char *)calloc(*textlen, sizeof(char));
  if (!retval)
    return NULL;
  strncpy(retval, cstring, *textlen);
  return retval;
}


x86 assembly (clang, -O0):
<_s2_c2fstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1180 <_s2_c2fstr+0x50>
movq   $0x0,-0x8(%rbp)
jmp    119c <_s2_c2fstr+0x6c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
call   1030 <strncpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_s2_c2fstr>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %rax,(%r15)
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
test   %rax,%rax
je     1168 <_s2_c2fstr+0x38>
mov    %rax,%rbx
mov    (%r15),%rdx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strncpy@plt>
jmp    116a <_s2_c2fstr+0x3a>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @_s2_c2fstr(i8* %0, i64* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
store i64 %3, i64* %1
%4 = tail call i64 @calloc(i64 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i64, i64* %1
%9 = tail call i32 @strncpy(i8* %5, i8* %0, i64 %8)
br label %10
10: ; preds = %2, %7
%11 = phi i8* [ %5, %7 ], [ null, %2 ]
ret i8* %11
}
int div_hash(int key, int table_size) { return (key % table_size); }


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

x86 assembly (clang, -O2):
<div_hash>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @div_hash(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void sigquit() {
  printf("CHILD: SIGQUIT received\n");
  printf("exiting\n");
  exit(0);
}


x86 assembly (clang, -O0):
<sigquit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigquit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"CHILD: SIGQUIT received\0A\00"
@.str.1 = [9 x i8] c"exiting\0A\00"
define void @sigquit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [24 x i8] c"CHILD: SIGQUIT received\00"
@str.2 = [8 x i8] c"exiting\00"
define void @sigquit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int xs2qcpa();
int xs2qcpa_() { return xs2qcpa(); }


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

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

LLVM IR (-O0):
define i32 @xs2qcpa_() {
%1 = call i32 (...) @xs2qcpa()
ret i32 %1
}

LLVM IR (-O2):
define i32 @xs2qcpa_() {
%1 = tail call i32 (...) @xs2qcpa()
ret i32 %1
}
unsigned get_page_size() { return 4096; }


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

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

LLVM IR (-O0):
define i32 @get_page_size() {
ret i32 4096
}

LLVM IR (-O2):
define i32 @get_page_size() {
ret i32 4096
}
/* Type definitions */
struct ctl_table {
  int dummy;
};
struct cdrom_device_info {
  int dummy;
};

/* Variables and functions */
struct cdrom_device_info *HsCreateCdromDeviceInfo();
scalar_t__ nondet();
int /*<<< orphan*/ register_cdrom(struct cdrom_device_info *);
void HsInitialize(void) {
  struct ctl_table *tbl;
  while (nondet()) {
    struct cdrom_device_info *cdi;
    cdi = HsCreateCdromDeviceInfo();
    register_cdrom(cdi);
  }
  return;
}


x86 assembly (clang, -O0):
<HsInitialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <nondet@plt>
cmp    $0x0,%rax
je     1162 <HsInitialize+0x32>
mov    $0x0,%al
call   1040 <HsCreateCdromDeviceInfo@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <register_cdrom@plt>
jmp    1138 <HsInitialize+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HsInitialize>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nondet@plt>
test   %rax,%rax
je     115d <HsInitialize+0x2d>
xor    %eax,%eax
call   1040 <HsCreateCdromDeviceInfo@plt>
mov    %rax,%rdi
call   1050 <register_cdrom@plt>
jmp    1140 <HsInitialize+0x10>
pop    %rax
ret

LLVM IR (-O0):
%struct.ctl_table = type { i32 }
%struct.cdrom_device_info = type { i32 }
define void @HsInitialize() {
%1 = alloca %struct.ctl_table*
%2 = alloca %struct.cdrom_device_info*
br label %3
3: ; preds = %6, %0
%4 = call i64 (...) @nondet()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call %struct.cdrom_device_info* (...) @HsCreateCdromDeviceInfo()
store %struct.cdrom_device_info* %7, %struct.cdrom_device_info** %2
%8 = load %struct.cdrom_device_info*, %struct.cdrom_device_info** %2
%9 = call i32 @register_cdrom(%struct.cdrom_device_info* %8)
br label %3
10: ; preds = %3
ret void
}

LLVM IR (-O2):
%struct.ctl_table = type { i32 }
%struct.cdrom_device_info = type { i32 }
define void @HsInitialize() {
%1 = tail call i64 (...) @nondet()
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = tail call %struct.cdrom_device_info* (...) @HsCreateCdromDeviceInfo()
%5 = tail call i32 @register_cdrom(%struct.cdrom_device_info* %4)
%6 = tail call i64 (...) @nondet()
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret void
}
int main() {
  char array[16 * 1024];
  register int outer_loop;
  register int inner_loop;
  register int solution = 0;
  for (outer_loop = 0; outer_loop < 100; outer_loop++) {
    for (inner_loop = 0; inner_loop < 16 * 1024; inner_loop++) {
      solution *= array[inner_loop];
    }
  }
  return solution;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3fa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x401c(%rbp)
movl   $0x0,-0x4014(%rbp)
cmpl   $0x64,-0x4014(%rbp)
jge    1196 <main+0x96>
movl   $0x0,-0x4018(%rbp)
cmpl   $0x4000,-0x4018(%rbp)
jge    117d <main+0x7d>
movslq -0x4018(%rbp),%rax
movsbl -0x4010(%rbp,%rax,1),%eax
ff
imul   -0x401c(%rbp),%eax
mov    %eax,-0x401c(%rbp)
mov    -0x4018(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4018(%rbp)
jmp    113d <main+0x3d>
jmp    1182 <main+0x82>
mov    -0x4014(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4014(%rbp)
jmp    1126 <main+0x26>
mov    -0x401c(%rbp),%eax
add    $0x3fa0,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int reverseInt(int);
int isPalindrome(int n) { return reverseInt(n) == n; }


x86 assembly (clang, -O0):
<isPalindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <reverseInt@plt>
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPalindrome>:
push   %rbx
mov    %edi,%ebx
call   1030 <reverseInt@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isPalindrome(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @reverseInt(i32 %3)
%5 = load i32, i32* %2
%6 = icmp eq i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isPalindrome(i32 %0) {
%2 = tail call i32 @reverseInt(i32 %0)
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void handle_error(char *msg) {
  do {
    perror(msg);
    exit(EXIT_FAILURE);
  } while (0);
}


x86 assembly (clang, -O0):
<handle_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_error>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @handle_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
%5 = call i32 @perror(i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
8: ; No predecessors!
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @handle_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_number_of_multprec_polynomials(int *length) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(442, length, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_number_of_multprec_polynomials>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1ba,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_number_of_multprec_polynomials>:
mov    %rdi,%rsi
mov    $0x1ba,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @syscon_number_of_multprec_polynomials(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc(i32 442, i32* %6, i32* %7, double* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_number_of_multprec_polynomials(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 442, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fib(int);
int main() {
  int a;
  a = 30;
  fib(a);
  return a;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fib(i32 30)
ret i32 30
}
/* Variables and functions */
float fast_log2(float);
float fast_log(float x) { return 0.69314718f * fast_log2(x); }


x86 assembly (clang, -O0):
<fast_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fast_log2@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_log>:
push   %rax
call   1030 <fast_log2@plt>
mulss  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fast_log(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fast_log2(float %3)
%5 = fmul float 0x3FE62E4300000000, %4
ret float %5
}

LLVM IR (-O2):
define float @fast_log(float %0) {
%2 = tail call float @fast_log2(float %0)
%3 = fmul float %2, 0x3FE62E4300000000
ret float %3
}
void pcp_def_net_nfs_metrics(void) {}


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

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

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

LLVM IR (-O2):
define void @pcp_def_net_nfs_metrics() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(
      stderr, "usage: mount [-t fstype] [-o options] target_fs mount_point\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $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 = [61 x i8] c"usage: mount [-t fstype] [-o options] target_fs mount_point\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"usage: mount [-t fstype] [-o options] target_fs mount_point\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t make_bytes_int(uint8_t *buff, int start) {
  return buff[start] + (buff[start + 1] << 8) + (buff[start + 2] << 16) +
         (buff[start + 3] << 24);
}


x86 assembly (clang, -O0):
<make_bytes_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x3,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_bytes_int>:
movslq %esi,%rax
mov    0x4(%rdi,%rax,4),%ecx
mov    0x8(%rdi,%rax,4),%edx
shl    $0x8,%ecx
add    (%rdi,%rax,4),%ecx
shl    $0x10,%edx
add    %ecx,%edx
mov    0xc(%rdi,%rax,4),%eax
shl    $0x18,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @make_bytes_int(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = add nsw i32 %1, 1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = add nsw i32 %10, %5
%12 = add nsw i32 %1, 2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %0, i64 %13
%15 = load i32, i32* %14
%16 = shl i32 %15, 16
%17 = add nsw i32 %11, %16
%18 = add nsw i32 %1, 3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %0, i64 %19
%21 = load i32, i32* %20
%22 = shl i32 %21, 24
%23 = add nsw i32 %17, %22
ret i32 %23
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void f(int a0, int b0, int c) {
  int a1 = a0 - b0;
  int b1 = (unsigned)a1 + c;
  if (c == 0) {
    int d = 7L / b1;
    clang_analyzer_eval(a0 - b0 != 0);
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1164 <f+0x54>
movslq -0x14(%rbp),%rcx
mov    $0x7,%eax
cqto
idiv   %rcx
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edx,%edx
je     1115 <f+0x5>
ret
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
mov    %eax,%edi
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = add i32 %13, %14
store i32 %15, i32* %8
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %29
18: ; preds = %3
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = sdiv i64 7, %20
%22 = trunc i64 %21 to i32
store i32 %22, i32* %9
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = sub nsw i32 %23, %24
%26 = icmp ne i32 %25, 0
%27 = zext i1 %26 to i32
%28 = call i32 @clang_analyzer_eval(i32 %27)
br label %29
29: ; preds = %18, %3
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = icmp ne i32 %0, %1
%7 = zext i1 %6 to i32
%8 = tail call i32 @clang_analyzer_eval(i32 %7)
br label %9
9: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ errbuf;

/* Variables and functions */
#define ERANGE 128
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strerror_r(int, char *, int);
char *__wrap_strerror(int errnum) {
  static char errbuf[128];
  switch (errnum) {
  case ERANGE:
    strcpy(errbuf, "ERANGE");
    break;
  default:
    strerror_r(errnum, errbuf, sizeof(errbuf));
    break;
  }
  return errbuf;
}


x86 assembly (clang, -O0):
<__wrap_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x80,%eax
jne    1156 <__wrap_strerror+0x36>
jmp    113e <__wrap_strerror+0x1e>
lea    0x2efb(%rip),%rdi
lea    0xeb4(%rip),%rsi
call   1030 <strcpy@plt>
jmp    116a <__wrap_strerror+0x4a>
mov    -0x4(%rbp),%edi
lea    0x2ee0(%rip),%rsi
mov    $0x80,%edx
call   1040 <strerror_r@plt>
lea    0x2ecf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_strerror>:
push   %rax
cmp    $0x80,%edi
jne    113e <__wrap_strerror+0x1e>
lea    0x2f10(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcpy@plt>
jmp    114f <__wrap_strerror+0x2f>
lea    0x2efb(%rip),%rsi
mov    $0x80,%edx
call   1040 <strerror_r@plt>
lea    0x2eea(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@__wrap_strerror.errbuf = internal global [128 x i8] zeroinitializer
@.str = [7 x i8] c"ERANGE\00"
define i8* @__wrap_strerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 128, label %4
]
4: ; preds = %1
%5 = call i32 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @__wrap_strerror.errbuf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @strerror_r(i32 %7, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @__wrap_strerror.errbuf, i64 0, i64 0), i32 128)
br label %9
9: ; preds = %6, %4
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @__wrap_strerror.errbuf, i64 0, i64 0)
}

LLVM IR (-O2):
@__wrap_strerror.errbuf = internal global [128 x i8] zeroinitializer
@.str = [7 x i8] c"ERANGE\00"
define i8* @__wrap_strerror(i32 %0) {
%2 = icmp eq i32 %0, 128
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @strcpy(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @__wrap_strerror.errbuf, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @strerror_r(i32 %0, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @__wrap_strerror.errbuf, i64 0, i64 0), i32 128)
br label %7
7: ; preds = %5, %3
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @__wrap_strerror.errbuf, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ isspace(char);
scalar_t__ strcasestr(char *, char *);
char *strchr(char *, char);
int strlen(char *);
int very_very_hard_filter(char *buf) {
  return 0;
  int x = strlen(buf);
  if (!x)
    return 1;
  if (strcasestr(buf, "asm") || strcasestr(buf, "extern") ||
      strcasestr(buf, "#") || strcasestr(buf, "include"))
    return 1;
  char *target = buf - 1;
  while (target = strchr(target + 1, '(')) {
    if (target - buf < 0x2)
      return 1;
    if (!((*(target - 1) == 'f' && *(target - 2) == 'i' &&
           (target - buf < 0x3 ||
            (isspace(*(target - 3)) || *(target - 3) == ';'))) ||
          target - buf < 0x3 ||
          (*(target - 1) == 'r' && *(target - 2) == 'o' &&
           *(target - 3) == 'f' &&
           (target - buf < 0x4 ||
            (isspace(*(target - 4)) || *(target - 4) == ';'))) ||
          target - buf < 0x5 ||
          (*(target - 1) == 'e' && *(target - 2) == 'l' &&
           *(target - 3) == 'i' && *(target - 4) == 'h' &&
           *(target - 5) == 'w' &&
           (target - buf < 0x6 ||
            (isspace(*(target - 6)) || *(target - 6) == ';')))))
      return 1;
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @very_very_hard_filter(i8* nocapture readnone %0) {
ret i32 0
}