xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ FLEXIO1_DriverIRQHandler();
__attribute__((weak)) void FLEXIO1_IRQHandler(void) {
  FLEXIO1_DriverIRQHandler();
}


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

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

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

LLVM IR (-O2):
define weak void @FLEXIO1_IRQHandler() {
%1 = tail call i32 (...) @FLEXIO1_DriverIRQHandler()
ret void
}
int signextension(int unext) {
  int signext;
  if (unext >> 15 == 0)
    signext = unext;
  else
    signext = unext | 0xffff0000;
  return signext;
}


x86 assembly (clang, -O0):
<signextension>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
cmp    $0x0,%eax
jne    1121 <signextension+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    112c <signextension+0x2c>
mov    -0x4(%rbp),%eax
or     $0xffff0000,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signextension>:
mov    %edi,%eax
or     $0xffff0000,%eax
cmp    $0x8000,%edi
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @signextension(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 15
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* %2
store i32 %8, i32* %3
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = or i32 %10, -65536
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %7
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @signextension(i32 %0) {
%2 = icmp ult i32 %0, 32768
%3 = or i32 %0, -65536
%4 = select i1 %2, i32 %0, i32 %3
ret i32 %4
}
int dbg_check_space_info(struct ubifs_info *c) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ubifs_info = type opaque
define i32 @dbg_check_space_info(%struct.ubifs_info* nocapture readnone %0) {
ret i32 0
}
int dect_is_fp_packet(unsigned char *packet) {
  if ((packet[3] == 0xe9) && (packet[4] == 0x8a))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<dect_is_fp_packet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0xe9,%eax
jne    113a <dect_is_fp_packet+0x3a>
mov    -0x10(%rbp),%rax
movzbl 0x4(%rax),%eax
cmp    $0x8a,%eax
jne    113a <dect_is_fp_packet+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1141 <dect_is_fp_packet+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dect_is_fp_packet>:
cmpb   $0xe9,0x3(%rdi)
jne    1111 <dect_is_fp_packet+0x11>
mov    $0x1,%eax
cmpb   $0x8a,0x4(%rdi)
je     1113 <dect_is_fp_packet+0x13>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @dect_is_fp_packet(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, -23
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, -118
br i1 %8, label %10, label %9
9: ; preds = %5, %1
br label %10
10: ; preds = %5, %9
%11 = phi i32 [ 0, %9 ], [ 1, %5 ]
ret i32 %11
}
int right(int index) { return (index * 2 + 2); }


x86 assembly (clang, -O0):
<right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<right>:
lea    (%rdi,%rdi,1),%eax
add    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @right(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add nsw i32 %2, 2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void chi() {
  (void)puts("pol5.c - Solves polynomials up to the fifth degree v2.011.");
  (void)puts("  All rights reserved by Coert Vonk, November 1989.");
}


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

x86 assembly (clang, -O2):
<chi>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf17(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"pol5.c - Solves polynomials up to the fifth degree v2.011.\00"
@.str.1 = [52 x i8] c" All rights reserved by Coert Vonk, November 1989.\00"
define void @chi() {
%1 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"pol5.c - Solves polynomials up to the fifth degree v2.011.\00"
@.str.1 = [52 x i8] c" All rights reserved by Coert Vonk, November 1989.\00"
define void @chi() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int ffiTestInts(int c1, int c2, int c3, int c4) {
  ;
  return 42;
}


x86 assembly (clang, -O0):
<ffiTestInts>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    $0x2a,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ffiTestInts(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 42
}

LLVM IR (-O2):
define i32 @ffiTestInts(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ itm_book_del(int, int);
int itm_book_reset(int channel) {
  int i;
  if (channel < 0)
    return -1;
  for (i = 0; i < 512; i++) {
    itm_book_del(i, channel);
  }
  return 0;
}


x86 assembly (clang, -O0):
<itm_book_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1131 <itm_book_reset+0x21>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <itm_book_reset+0x55>
movl   $0x0,-0xc(%rbp)
cmpl   $0x200,-0xc(%rbp)
jge    115e <itm_book_reset+0x4e>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <itm_book_del@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1138 <itm_book_reset+0x28>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itm_book_reset>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
js     1136 <itm_book_reset+0x26>
mov    %edi,%ebp
xor    %r14d,%r14d
xor    %ebx,%ebx
nop
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <itm_book_del@plt>
add    $0x1,%ebx
cmp    $0x200,%ebx
jne    1120 <itm_book_reset+0x10>
jmp    113c <itm_book_reset+0x2c>
mov    $0xffffffff,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @itm_book_reset(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @itm_book_del(i32 %4, i32 %0)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 512
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = phi i32 [ -1, %1 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ output_label_terminator();
int /*<<< orphan*/ output_string(char *);
declare_entry_point(char *symbol_name) {
  output_string(symbol_name);
  output_label_terminator();
}


x86 assembly (clang, -O0):
<declare_entry_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <output_string@plt>
mov    $0x0,%al
call   1040 <output_label_terminator@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @declare_entry_point(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @output_string(i8* %4)
%6 = call i32 (...) @output_label_terminator()
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @declare_entry_point(i8* %0) {
%2 = tail call i32 @output_string(i8* %0)
%3 = tail call i32 (...) @output_label_terminator()
ret i32 undef
}
/* Variables and functions */
int get_fileSize(int);
int get_nr_blocks(int fd, int blksize) {
  int fileSize = get_fileSize(fd);
  int nr_blocks = (fileSize + blksize - 1) / blksize;
  return nr_blocks;
}


x86 assembly (clang, -O0):
<get_nr_blocks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_fileSize@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_nr_blocks>:
push   %rbx
mov    %esi,%ebx
call   1030 <get_fileSize@plt>
add    %ebx,%eax
add    $0xffffffff,%eax
cltd
idiv   %ebx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_nr_blocks(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @get_fileSize(i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
%12 = sub nsw i32 %11, 1
%13 = load i32, i32* %4
%14 = sdiv i32 %12, %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
ret i32 %15
}

LLVM IR (-O2):
define i32 @get_nr_blocks(i32 %0, i32 %1) {
%3 = tail call i32 @get_fileSize(i32 %0)
%4 = add i32 %1, -1
%5 = add i32 %4, %3
%6 = sdiv i32 %5, %1
ret i32 %6
}
void mpFail(char *msg) {}


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

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

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

LLVM IR (-O2):
define void @mpFail(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ regfree(int /*<<< orphan*/ *);
void regex_feature_free(regex_t *regex) {
  regfree(regex);
  free(regex);
}


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

x86 assembly (clang, -O2):
<regex_feature_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <regfree@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @regex_feature_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @regfree(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @regex_feature_free(i32* %0) {
%2 = tail call i32 @regfree(i32* %0)
%3 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main() {
  system("cd /mnt/user/code/MotoredCamera/bin && /mnt/user/jvm/java Main");
}


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

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

LLVM IR (-O0):
@.str = [63 x i8] c"cd /mnt/user/code/MotoredCamera/bin && /mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [63 x i8] c"cd /mnt/user/code/MotoredCamera/bin && /mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fadd_preg64_dword(int reg64) {
  put8(0xD8);
  put8(reg64);
}


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

x86 assembly (clang, -O2):
<fadd_preg64_dword>:
push   %rbx
mov    %edi,%ebx
mov    $0xd8,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

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

LLVM IR (-O2):
define void @fadd_preg64_dword(i32 %0) {
%2 = tail call i32 @put8(i32 216)
%3 = tail call i32 @put8(i32 %0)
ret void
}
void msm_jtag_mm_save_state(void) {}


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

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

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

LLVM IR (-O2):
define void @msm_jtag_mm_save_state() {
ret void
}
void getKeysInSlot(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               78, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<getKeysInSlot>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4e,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getKeysInSlot>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x4e,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.getKeysInSlot = [14 x i8] c"getKeysInSlot\00"
define void @getKeysInSlot() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 78, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.getKeysInSlot, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.getKeysInSlot = [14 x i8] c"getKeysInSlot\00"
define void @getKeysInSlot() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 78, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.getKeysInSlot, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rlimit {
  void *rlim_max;
  void *rlim_cur;
};
typedef void *rlim_t;

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_NOFILE;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ setrlimit(int /*<<< orphan*/, struct rlimit *);
void set_file_cnt(rlim_t file_max) {
  struct rlimit rlim;
  rlim.rlim_cur = file_max;
  rlim.rlim_max = file_max;
  if (!setrlimit(RLIMIT_NOFILE, &rlim)) {
    perror("setting rlimit");
  }
}


x86 assembly (clang, -O0):
<set_file_cnt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
call   1030 <setrlimit@plt>
cmp    $0x0,%eax
jne    1163 <set_file_cnt+0x43>
lea    0xea2(%rip),%rdi
call   1040 <perror@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_file_cnt>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rdi,0x8(%rsp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1030 <setrlimit@plt>
test   %eax,%eax
je     114a <set_file_cnt+0x2a>
add    $0x18,%rsp
ret
lea    0xeaf(%rip),%rdi
call   1040 <perror@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.rlimit = type { i8*, i8* }
@RLIMIT_NOFILE = global i32 0
@.str = [15 x i8] c"setting rlimit\00"
define void @set_file_cnt(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.rlimit
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %3, i32 0, i32 1
store i8* %4, i8** %5
%6 = load i8*, i8** %2
%7 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %3, i32 0, i32 0
store i8* %6, i8** %7
%8 = load i32, i32* @RLIMIT_NOFILE
%9 = call i32 @setrlimit(i32 %8, %struct.rlimit* %3)
%10 = icmp ne i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %1
%12 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i8*, i8* }
@RLIMIT_NOFILE = global i32 0
@.str = [15 x i8] c"setting rlimit\00"
define void @set_file_cnt(i8* %0) {
%2 = alloca %struct.rlimit
%3 = bitcast %struct.rlimit* %2 to i8*
%4 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %2, i64 0, i32 1
store i8* %0, i8** %4
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %2, i64 0, i32 0
store i8* %0, i8** %5
%6 = load i32, i32* @RLIMIT_NOFILE
%7 = call i32 @setrlimit(i32 %6, %struct.rlimit* %2)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eprintf(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void dparm_error() {
  eprintf("Disk parameters string format error.\n");
  printf(
      "It should be \"density:#heads:#tracks:#sectors:sector_size:skew\"\n\n");
  exit(1);
}


x86 assembly (clang, -O0):
<dparm_error>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1040 <eprintf@plt>
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<dparm_error>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <eprintf@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Disk parameters string format error.\0A\00"
@.str.1 = [66 x i8] c"It should be \22density:#heads:#tracks:#sectors:sector_size:skew\22\0A\0A\00"
define void @dparm_error() {
%1 = call i32 @eprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [38 x i8] c"Disk parameters string format error.\0A\00"
@str = [65 x i8] c"It should be \22density:#heads:#tracks:#sectors:sector_size:skew\22\0A\00"
define void @dparm_error() {
%1 = tail call i32 @eprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;
struct iphdr {
  int /*<<< orphan*/ ttl;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
u_int8_t GetTtl(unsigned char *ipPacket) {
  struct iphdr *iph;
  assert(ipPacket != NULL);
  iph = (struct iphdr *)ipPacket;
  return iph->ttl;
}


x86 assembly (clang, -O0):
<GetTtl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTtl>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.iphdr = type { i32 }
define i32 @GetTtl(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.iphdr*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to %struct.iphdr*
store %struct.iphdr* %9, %struct.iphdr** %3
%10 = load %struct.iphdr*, %struct.iphdr** %3
%11 = getelementptr inbounds %struct.iphdr, %struct.iphdr* %10, i32 0, i32 0
%12 = load i32, i32* %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @GetTtl(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = bitcast i8* %0 to i32*
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void prefetch_abort_handler(void) {
  puts("prefetch abort\n");
  puts("spinning forever...\n");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<prefetch_abort_handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
jmp    112c <prefetch_abort_handler+0x1c>

x86 assembly (clang, -O2):
<prefetch_abort_handler>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
nopl   0x0(%rax)
jmp    1130 <prefetch_abort_handler+0x20>

LLVM IR (-O0):
@.str = [16 x i8] c"prefetch abort\0A\00"
@.str.1 = [21 x i8] c"spinning forever...\0A\00"
define void @prefetch_abort_handler() {
%1 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
br label %3
}

LLVM IR (-O2):
@.str = [16 x i8] c"prefetch abort\0A\00"
@.str.1 = [21 x i8] c"spinning forever...\0A\00"
define void @prefetch_abort_handler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ serd_env_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ serd_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ serd_node_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ serd_reader_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ serd_writer_free(int /*<<< orphan*/ *);
int main(void) {
  serd_free(NULL);
  serd_node_free(NULL);
  serd_env_free(NULL);
  serd_reader_free(NULL);
  serd_writer_free(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <serd_free@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <serd_node_free@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <serd_env_free@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <serd_reader_free@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <serd_writer_free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <serd_free@plt>
xor    %edi,%edi
call   1070 <serd_node_free@plt>
xor    %edi,%edi
call   1060 <serd_env_free@plt>
xor    %edi,%edi
call   1030 <serd_reader_free@plt>
xor    %edi,%edi
call   1050 <serd_writer_free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @serd_free(i32* null)
%3 = call i32 @serd_node_free(i32* null)
%4 = call i32 @serd_env_free(i32* null)
%5 = call i32 @serd_reader_free(i32* null)
%6 = call i32 @serd_writer_free(i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @serd_free(i32* null)
%2 = tail call i32 @serd_node_free(i32* null)
%3 = tail call i32 @serd_env_free(i32* null)
%4 = tail call i32 @serd_reader_free(i32* null)
%5 = tail call i32 @serd_writer_free(i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cleanScene();
int /*<<< orphan*/ clean_camera();
void clean(void) {
  cleanScene();
  clean_camera();
}


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

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

LLVM IR (-O0):
define void @clean() {
%1 = call i32 (...) @cleanScene()
%2 = call i32 (...) @clean_camera()
ret void
}

LLVM IR (-O2):
define void @clean() {
%1 = tail call i32 (...) @cleanScene()
%2 = tail call i32 (...) @clean_camera()
ret void
}
void scale_3d(double *out, double *a, double b) {
  *(out++) = *(a++) * b;
  *(out++) = *(a++) * b;
  *(out) = *(a)*b;
}


x86 assembly (clang, -O0):
<scale_3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_3d>:
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdi)
mulsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @scale_3d(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i32 1
store double* %8, double** %5
%9 = load double, double* %7
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i32 1
store double* %13, double** %4
store double %11, double* %12
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i32 1
store double* %15, double** %5
%16 = load double, double* %14
%17 = load double, double* %6
%18 = fmul double %16, %17
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i32 1
store double* %20, double** %4
store double %18, double* %19
%21 = load double*, double** %5
%22 = load double, double* %21
%23 = load double, double* %6
%24 = fmul double %22, %23
%25 = load double*, double** %4
store double %24, double* %25
ret void
}

LLVM IR (-O2):
define void @scale_3d(double* nocapture writeonly %0, double* nocapture %1, double %2) {
%4 = getelementptr inbounds double, double* %1, i64 1
%5 = load double, double* %1
%6 = fmul double %5, %2
%7 = getelementptr inbounds double, double* %0, i64 1
store double %6, double* %0
%8 = getelementptr inbounds double, double* %1, i64 2
%9 = load double, double* %4
%10 = fmul double %9, %2
%11 = getelementptr inbounds double, double* %0, i64 2
store double %10, double* %7
%12 = load double, double* %8
%13 = fmul double %12, %2
store double %13, double* %11
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void EthernetIntUnregister(unsigned long ulBase) {
  DEBUG_ASSERT(ulBase == 0x40048000);
  IntDisable(58);
  IntUnregister(58);
}


x86 assembly (clang, -O0):
<EthernetIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x40048000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <DEBUG_ASSERT@plt>
mov    $0x3a,%edi
call   1030 <IntDisable@plt>
mov    $0x3a,%edi
call   1050 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EthernetIntUnregister>:
push   %rax
xor    %eax,%eax
cmp    $0x40048000,%rdi
sete   %al
mov    %eax,%edi
call   1040 <DEBUG_ASSERT@plt>
mov    $0x3a,%edi
call   1030 <IntDisable@plt>
mov    $0x3a,%edi
pop    %rax
jmp    1050 <IntUnregister@plt>

LLVM IR (-O0):
define void @EthernetIntUnregister(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1074036736
%5 = zext i1 %4 to i32
%6 = call i32 @DEBUG_ASSERT(i32 %5)
%7 = call i32 @IntDisable(i32 58)
%8 = call i32 @IntUnregister(i32 58)
ret void
}

LLVM IR (-O2):
define void @EthernetIntUnregister(i64 %0) {
%2 = icmp eq i64 %0, 1074036736
%3 = zext i1 %2 to i32
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = tail call i32 @IntDisable(i32 58)
%6 = tail call i32 @IntUnregister(i32 58)
ret void
}
int dsme_snooze_timeout_in_seconds(void) { return 120; }


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

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

LLVM IR (-O0):
define i32 @dsme_snooze_timeout_in_seconds() {
ret i32 120
}

LLVM IR (-O2):
define i32 @dsme_snooze_timeout_in_seconds() {
ret i32 120
}
/* Variables and functions */
char const *weak_n2();
const char *__attribute__((section(".test.b"))) call_weak_n2(void) {
  return weak_n2() + 1;
}


x86 assembly (clang, -O0):
<call_weak_n2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <weak_n2@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_weak_n2>:
push   %rax
xor    %eax,%eax
call   1030 <weak_n2@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_weak_n2() section ".test.b" {
%1 = call i8* (...) @weak_n2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_weak_n2() section ".test.b" {
%1 = tail call i8* (...) @weak_n2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
/* Variables and functions */
unsigned int _bzhi_u32(unsigned int, int /*<<< orphan*/);
unsigned int f2(unsigned int x) { return _bzhi_u32(x, 0); }


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

x86 assembly (clang, -O2):
<f2>:
xor    %esi,%esi
jmp    1030 <_bzhi_u32@plt>

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

LLVM IR (-O2):
define i32 @f2(i32 %0) {
%2 = tail call i32 @_bzhi_u32(i32 %0, i32 0)
ret i32 %2
}
int test_imm_58int8_mem(signed char *val) {
  return ((*val) & (-0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffa8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_58int8_mem>:
testb  $0xa8,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_58int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -88
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_58int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -88
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
unsigned long gf2_matrix_times(unsigned long *mat, unsigned long vec) {
  unsigned long sum;
  sum = 0;
  while (vec) {
    if (vec & 1)
      sum ^= *mat;
    vec >>= 1;
    mat++;
  }
  return sum;
}


x86 assembly (clang, -O0):
<gf2_matrix_times>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115d <gf2_matrix_times+0x5d>
mov    -0x10(%rbp),%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     1140 <gf2_matrix_times+0x40>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
xor    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <gf2_matrix_times+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gf2_matrix_times>:
xor    %eax,%eax
test   %rsi,%rsi
jne    1123 <gf2_matrix_times+0x23>
ret
nopl   0x0(%rax,%rax,1)
mov    %rsi,%rcx
shr    %rcx
add    $0x8,%rdi
cmp    $0x1,%rsi
mov    %rcx,%rsi
jbe    1107 <gf2_matrix_times+0x7>
test   $0x1,%sil
je     1110 <gf2_matrix_times+0x10>
xor    (%rdi),%rax
jmp    1110 <gf2_matrix_times+0x10>

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

LLVM IR (-O2):
define i64 @gf2_matrix_times(i64* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2, %13
%5 = phi i64 [ %14, %13 ], [ 0, %2 ]
%6 = phi i64 [ %15, %13 ], [ %1, %2 ]
%7 = phi i64* [ %16, %13 ], [ %0, %2 ]
%8 = and i64 %6, 1
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = load i64, i64* %7
%12 = xor i64 %11, %5
br label %13
13: ; preds = %10, %4
%14 = phi i64 [ %12, %10 ], [ %5, %4 ]
%15 = lshr i64 %6, 1
%16 = getelementptr inbounds i64, i64* %7, i64 1
%17 = icmp ult i64 %6, 2
br i1 %17, label %18, label %4
18: ; preds = %13, %2
%19 = phi i64 [ 0, %2 ], [ %14, %13 ]
ret i64 %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ remove_file_via_path(char *);
int rm(char *path) {
  if (remove_file_via_path(path) == 0)
    return 0;
  printf("Remove succeeded: %s\n", path);
  return 1;
}


x86 assembly (clang, -O0):
<rm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <remove_file_via_path@plt>
cmp    $0x0,%rax
jne    114b <rm+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1162 <rm+0x42>
mov    -0x10(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rm>:
push   %rbx
mov    %rdi,%rbx
call   1040 <remove_file_via_path@plt>
test   %rax,%rax
je     1144 <rm+0x24>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Remove succeeded: %s\0A\00"
define i32 @rm(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @remove_file_via_path(i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %9)
store i32 1, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [22 x i8] c"Remove succeeded: %s\0A\00"
define i32 @rm(i8* %0) {
%2 = tail call i64 @remove_file_via_path(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int get_power_of_two(unsigned int number) {
  int power = 0;
  while ((number & 1) == 0) {
    power += 1;
    number = number >> 1;
  }
  return power;
}


x86 assembly (clang, -O0):
<get_power_of_two>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1134 <get_power_of_two+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <get_power_of_two+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_power_of_two>:
xor    %eax,%eax
test   $0x1,%dil
jne    111d <get_power_of_two+0x1d>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax)
add    $0x1,%eax
shr    %ecx
test   $0x2,%dil
mov    %ecx,%edi
je     1110 <get_power_of_two+0x10>
ret

LLVM IR (-O0):
define i32 @get_power_of_two(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %2
%6 = and i32 %5, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = lshr i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_power_of_two(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i32 [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = lshr i32 %6, 1
%9 = and i32 %6, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void lux_close(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<lux_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @lux_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printPrompt(char *str, int print_prompt_flag) {
  if (print_prompt_flag)
    printf("%s", str);
}


x86 assembly (clang, -O0):
<printPrompt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1139 <printPrompt+0x29>
mov    -0x8(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printPrompt>:
test   %esi,%esi
je     1126 <printPrompt+0x16>
mov    %rdi,%rax
lea    0xee2(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printPrompt(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_FlashDataAreaAccess(int, int);
void rdk_meta_init(void) { R_FlashDataAreaAccess(0xFFFF, 0xFFFF); }


x86 assembly (clang, -O0):
<rdk_meta_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffff,%esi
mov    %esi,%edi
call   1030 <R_FlashDataAreaAccess@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdk_meta_init>:
mov    $0xffff,%edi
mov    $0xffff,%esi
jmp    1030 <R_FlashDataAreaAccess@plt>

LLVM IR (-O0):
define void @rdk_meta_init() {
%1 = call i32 @R_FlashDataAreaAccess(i32 65535, i32 65535)
ret void
}

LLVM IR (-O2):
define void @rdk_meta_init() {
%1 = tail call i32 @R_FlashDataAreaAccess(i32 65535, i32 65535)
ret void
}
void RAWToRGB24Row_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @RAWToRGB24Row_Any_SSSE3() {
ret void
}
void c_pomp_for_enter_(struct ompregdescr *r) { (void)0; }


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

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

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

LLVM IR (-O2):
%struct.ompregdescr = type opaque
define void @c_pomp_for_enter_(%struct.ompregdescr* nocapture %0) {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c;
  int x, y, z;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  c = 0;
  while (x > y + z) {
    y = y + 1;
    z = z + 1;
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jle    1175 <main+0x65>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1144 <main+0x34>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mongo_env_sock_init();
void mongo_init_sockets(void) { mongo_env_sock_init(); }


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

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

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

LLVM IR (-O2):
define void @mongo_init_sockets() {
%1 = tail call i32 (...) @mongo_env_sock_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintFromalib() {
  printf("Hello from my alib\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Hello from my alib\0A\00"
define void @PrintFromalib() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"Hello from my alib\00"
define void @PrintFromalib() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}