xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ MAP_PRIVATE;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ PROT_READ;
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ mmap(int /*<<< orphan*/ *, int, int /*<<< orphan*/,
                        int /*<<< orphan*/, int, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int main() {
  int fd;
  mkdir("dir", 0777);
  fd = open("dir", O_RDONLY);
  mmap(NULL, 4711, PROT_READ, MAP_PRIVATE, fd, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%esi
lea    0xea0(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e89(%rip),%rax
mov    (%rax),%edx
mov    0x2e58(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
mov    $0x1267,%esi
xor    %r9d,%r9d
call   1040 <mmap@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <open@plt>
mov    0x2e9b(%rip),%rcx
mov    (%rcx),%edx
mov    0x2e6a(%rip),%rcx
mov    (%rcx),%ecx
xor    %edi,%edi
mov    $0x1267,%esi
mov    %eax,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"dir\00"
@O_RDONLY = global i32 0
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @mkdir(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 511)
%4 = load i32, i32* @O_RDONLY
%5 = call i32 @open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* @PROT_READ
%7 = load i32, i32* @MAP_PRIVATE
%8 = load i32, i32* %2
%9 = call i32 @mmap(i32* null, i32 4711, i32 %6, i32 %7, i32 %8, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"dir\00"
@O_RDONLY = global i32 0
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
define i32 @main() {
%1 = tail call i32 @mkdir(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 511)
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @PROT_READ
%5 = load i32, i32* @MAP_PRIVATE
%6 = tail call i32 @mmap(i32* null, i32 4711, i32 %4, i32 %5, i32 %3, i32 0)
ret i32 0
}
int add(int x, int y) {
  int sum = 0;
  sum = x + y;
  return sum;
}


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

x86 assembly (clang, -O2):
<add>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
void AKSC_InitHFlucCheck(void) {}


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

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

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

LLVM IR (-O2):
define void @AKSC_InitHFlucCheck() {
ret void
}
/* Variables and functions */
long hash_csum2(char *);
long hash2_bucket(char *str, long n_buckets) {
  return hash_csum2(str) % n_buckets;
}


x86 assembly (clang, -O0):
<hash2_bucket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <hash_csum2@plt>
cqto
idivq  -0x10(%rbp)
mov    %rdx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash2_bucket>:
push   %rbx
mov    %rsi,%rbx
call   1030 <hash_csum2@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     112f <hash2_bucket+0x1f>
cqto
idiv   %rbx
mov    %rdx,%rax
pop    %rbx
ret
xor    %edx,%edx
div    %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @hash2_bucket(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = call i64 @hash_csum2(i8* %5)
%7 = load i64, i64* %4
%8 = srem i64 %6, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @hash2_bucket(i8* %0, i64 %1) {
%3 = tail call i64 @hash_csum2(i8* %0)
%4 = srem i64 %3, %1
ret i64 %4
}
void strunc(str) register char *str;
{
  register int loop;
  loop = strlen(str) - 1;
  while (str[--loop] == ' ')
    str[loop] = '\0';
}


x86 assembly (clang, -O0):
<strunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    115a <strunc+0x4a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    112c <strunc+0x1c>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strunc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0xfffffffe,%eax
cltq
cmpb   $0x20,(%rbx,%rax,1)
jne    113d <strunc+0x2d>
add    %rax,%rbx
nopw   0x0(%rax,%rax,1)
movb   $0x0,(%rbx)
cmpb   $0x20,-0x1(%rbx)
lea    -0x1(%rbx),%rbx
je     1130 <strunc+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @strunc(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = sub i64 %5, 1
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
br label %8
8: ; preds = %17, %1
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, -1
store i32 %11, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 32
br i1 %16, label %17, label %22
17: ; preds = %8
%18 = load i8*, i8** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @strunc(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = shl i64 %2, 32
%4 = add i64 %3, -8589934592
%5 = ashr exact i64 %4, 32
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 32
br i1 %8, label %9, label %16
9: ; preds = %1, %9
%10 = phi i64 [ %12, %9 ], [ %5, %1 ]
%11 = phi i8* [ %13, %9 ], [ %6, %1 ]
store i8 0, i8* %11
%12 = add i64 %10, -1
%13 = getelementptr inbounds i8, i8* %0, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 32
br i1 %15, label %9, label %16
16: ; preds = %9, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ polyglot_array_typeid(int /*<<< orphan*/,
                                         int /*<<< orphan*/);
void *polyglot_from_typed(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ polyglot_i8_typeid();
__attribute__((always_)) void *polyglot_from_i8_array(int8_t *arr,
                                                      uint64_t len) {
  return polyglot_from_typed(arr,
                             polyglot_array_typeid(polyglot_i8_typeid(), len));
}


x86 assembly (clang, -O0):
<polyglot_from_i8_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <polyglot_i8_typeid@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1050 <polyglot_array_typeid@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <polyglot_from_typed@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<polyglot_from_i8_array>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <polyglot_i8_typeid@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1050 <polyglot_array_typeid@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <polyglot_from_typed@plt>

LLVM IR (-O0):
define i8* @polyglot_from_i8_array(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 = call i32 (...) @polyglot_i8_typeid()
%7 = load i32, i32* %4
%8 = call i32 @polyglot_array_typeid(i32 %6, i32 %7)
%9 = call i8* @polyglot_from_typed(i32* %5, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @polyglot_from_i8_array(i32* %0, i32 %1) {
%3 = tail call i32 (...) @polyglot_i8_typeid()
%4 = tail call i32 @polyglot_array_typeid(i32 %3, i32 %1)
%5 = tail call i8* @polyglot_from_typed(i32* %0, i32 %4)
ret i8* %5
}
/* Type definitions */
typedef scalar_t__ off_t;

/* Variables and functions */
int handle_off(off_t ret) {
  if (ret == (off_t)-1) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<handle_off>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    111f <handle_off+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1126 <handle_off+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_off>:
xor    %eax,%eax
cmp    $0xffffffffffffffff,%rdi
sete   %al
neg    %eax
ret

LLVM IR (-O0):
define i32 @handle_off(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @handle_off(i64 %0) {
%2 = icmp eq i64 %0, -1
%3 = sext i1 %2 to i32
ret i32 %3
}
void xenbus_backend_probe_and_watch(void) {}


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

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

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

LLVM IR (-O2):
define void @xenbus_backend_probe_and_watch() {
ret void
}
int opposite(int dir) { return 4 == dir ? 4 : (dir + 2) % 4; }


x86 assembly (clang, -O0):
<opposite>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x4,%eax
cmp    -0x4(%rbp),%eax
jne    1122 <opposite+0x22>
mov    $0x4,%edx
mov    %edx,-0x8(%rbp)
jmp    1133 <opposite+0x33>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opposite>:
mov    $0x4,%eax
cmp    $0x4,%edi
je     1120 <opposite+0x20>
lea    0x2(%rdi),%eax
lea    0x5(%rdi),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffffc,%ecx
neg    %ecx
lea    (%rdi,%rcx,1),%eax
add    $0x2,%eax
ret

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

LLVM IR (-O2):
define i32 @opposite(i32 %0) {
%2 = icmp eq i32 %0, 4
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, 2
%5 = srem i32 %4, 4
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 4, %1 ]
ret i32 %7
}
float mus_fclamp(float lo, float val, float hi) {
  if (val > hi)
    return (hi);
  else if (val < lo)
    return (lo);
  else
    return (val);
}


x86 assembly (clang, -O0):
<mus_fclamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1131 <mus_fclamp+0x31>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <mus_fclamp+0x5d>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1153 <mus_fclamp+0x53>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    115d <mus_fclamp+0x5d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_fclamp>:
maxss  %xmm1,%xmm0
movaps %xmm2,%xmm3
cmpltss %xmm1,%xmm3
movaps %xmm3,%xmm1
andnps %xmm0,%xmm1
andps  %xmm2,%xmm3
orps   %xmm1,%xmm3
movaps %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @mus_fclamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %6
%9 = load float, float* %7
%10 = fcmp ogt float %8, %9
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %7
store float %12, float* %4
br label %21
13: ; preds = %3
%14 = load float, float* %6
%15 = load float, float* %5
%16 = fcmp olt float %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load float, float* %5
store float %18, float* %4
br label %21
19: ; preds = %13
%20 = load float, float* %6
store float %20, float* %4
br label %21
21: ; preds = %19, %17, %11
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
define float @mus_fclamp(float %0, float %1, float %2) {
%4 = fcmp ogt float %1, %2
%5 = fcmp olt float %1, %0
%6 = select i1 %5, float %0, float %1
%7 = select i1 %4, float %2, float %6
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ handle_input_event(int, int, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
void handle_hotkey_event(int event, int state) {
  handle_input_event(event, state, 0, 0);
}


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

x86 assembly (clang, -O2):
<handle_hotkey_event>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <handle_input_event@plt>

LLVM IR (-O0):
define void @handle_hotkey_event(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 = call i32 @handle_input_event(i32 %5, i32 %6, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @handle_hotkey_event(i32 %0, i32 %1) {
%3 = tail call i32 @handle_input_event(i32 %0, i32 %1, i32 0, i32 0)
ret void
}
/* Variables and functions */
scalar_t__ Pop();
int /*<<< orphan*/ Push(int);
int CmdAndLogical(void) {
  Push(Pop() && Pop());
  return 0;
}


x86 assembly (clang, -O0):
<CmdAndLogical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     1152 <CmdAndLogical+0x32>
mov    $0x0,%al
call   1030 <Pop@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <Push@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdAndLogical>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <Pop@plt>
test   %rax,%rax
je     113e <CmdAndLogical+0x1e>
xor    %eax,%eax
call   1030 <Pop@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%edi
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CmdAndLogical() {
%1 = call i64 (...) @Pop()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 (...) @Pop()
%5 = icmp ne i64 %4, 0
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
%9 = call i32 @Push(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @CmdAndLogical() {
%1 = tail call i64 (...) @Pop()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 (...) @Pop()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
%9 = tail call i32 @Push(i32 %8)
ret i32 0
}
/* Variables and functions */
int strcspn(char const *, char *);
int strlen(char const *);
int compare_wrap(const char *str, char tail) {
  char tailstr[2] = {tail, 0};
  if (strcspn(str, tailstr) == strlen(str) - 1)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<compare_wrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
mov    %al,-0x13(%rbp)
movb   $0x0,-0x12(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x13(%rbp),%rsi
call   1040 <strcspn@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1171 <compare_wrap+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1178 <compare_wrap+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_wrap>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %sil,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rsi
call   1040 <strcspn@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    %eax,%ebp
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @compare_wrap(i8* %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8
%6 = alloca [2 x i8]
store i8* %0, i8** %4
store i8 %1, i8* %5
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%8 = load i8, i8* %5
store i8 %8, i8* %7
%9 = getelementptr inbounds i8, i8* %7, i64 1
store i8 0, i8* %9
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %6, i64 0, i64 0
%12 = call i32 @strcspn(i8* %10, i8* %11)
%13 = load i8*, i8** %4
%14 = call i32 @strlen(i8* %13)
%15 = sub nsw i32 %14, 1
%16 = icmp eq i32 %12, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 0, i32* %3
br label %19
18: ; preds = %2
store i32 1, i32* %3
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @compare_wrap(i8* %0, i8 signext %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %1, i8* %4
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %5
%6 = call i32 @strcspn(i8* %0, i8* %4)
%7 = tail call i32 @strlen(i8* %0)
%8 = add nsw i32 %7, -1
%9 = icmp ne i32 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void foprintf(char *s) { printf("\n%s\n", s); }


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

x86 assembly (clang, -O2):
<foprintf>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\0A%s\0A\00"
define void @foprintf(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
define void @foprintf(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void flush_icache_page(struct vm_area_struct *vma, struct page *page) {}


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

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

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

LLVM IR (-O2):
%struct.vm_area_struct = type opaque
%struct.page = type opaque
define void @flush_icache_page(%struct.vm_area_struct* nocapture %0, %struct.page* nocapture %1) {
ret void
}
/* Variables and functions */
int printf(char *, char *);
int main(int argc, char **argv) {
  int ret = printf("%s\n", argv[argc - 1]);
  argv[0] = '\0';
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
movslq %edi,%rax
mov    -0x8(%rsi,%rax,8),%rsi
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %7, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 %13, i32* %6
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 0
store i8* null, i8** %15
%16 = load i32, i32* %6
ret i32 %16
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8*, i8** %1, i64 %4
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
store i8* null, i8** %1
ret i32 %7
}
void f7(unsigned long long *p) { *p = 42; }


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

x86 assembly (clang, -O2):
<f7>:
movq   $0x2a,(%rdi)
ret

LLVM IR (-O0):
define void @f7(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
store i64 42, i64* %3
ret void
}

LLVM IR (-O2):
define void @f7(i64* nocapture writeonly %0) {
store i64 42, i64* %0
ret void
}
void smCallConfigMaxDepth(int depth) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ add_sentence(int *, int /*<<< orphan*/ *, int *, int);
void gen_st_total_milage(uint8_t *b, uint32_t *buflen) {
  uint8_t sentence[] = {0x22, 0xF2, 0x64, 0x00, 0x00};
  add_sentence(b, buflen, sentence, 5);
}


x86 assembly (clang, -O0):
<gen_st_total_milage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed4(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x5,%ecx
call   1030 <add_sentence@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_st_total_milage>:
sub    $0x18,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x5,%ecx
call   1030 <add_sentence@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.gen_st_total_milage.sentence = [5 x i32] [i32 34, i32 242, i32 100, i32 0, i32 0]
define void @gen_st_total_milage(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [5 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = bitcast [5 x i32]* %5 to i8*
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%10 = call i32 @add_sentence(i32* %7, i32* %8, i32* %9, i32 5)
ret void
}

LLVM IR (-O2):
@__const.gen_st_total_milage.sentence = [5 x i32] [i32 34, i32 242, i32 100, i32 0, i32 0]
define void @gen_st_total_milage(i32* %0, i32* %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = call i32 @add_sentence(i32* %0, i32* %1, i32* %5, i32 5)
ret void
}
void lseg_remove(void *phead, void *element) {
  void **pnext = phead;
  while (*pnext != element) {
    void **next = *pnext;
    pnext = next;
  }
  {
    void *nextNext = *((void **)*pnext);
    *pnext = nextNext;
  }
}


x86 assembly (clang, -O0):
<lseg_remove>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
je     113d <lseg_remove+0x3d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <lseg_remove+0x14>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseg_remove>:
mov    %rdi,%rax
mov    (%rdi),%rdi
cmp    %rsi,%rdi
jne    1100 <lseg_remove>
mov    (%rsi),%rcx
mov    %rcx,(%rax)
ret

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

LLVM IR (-O2):
define void @lseg_remove(i8* nocapture %0, i8* readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %6, %3 ]
%5 = bitcast i8* %4 to i8**
%6 = load i8*, i8** %5
%7 = icmp eq i8* %6, %1
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = bitcast i8* %4 to i8**
%10 = bitcast i8* %1 to i8**
%11 = load i8*, i8** %10
store i8* %11, i8** %9
ret void
}
int getitimer(int which, struct itimerval *value) { return -1; }


x86 assembly (clang, -O0):
<getitimer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.itimerval = type opaque
define i32 @getitimer(i32 %0, %struct.itimerval* %1) {
%3 = alloca i32
%4 = alloca %struct.itimerval*
store i32 %0, i32* %3
store %struct.itimerval* %1, %struct.itimerval** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.itimerval = type opaque
define i32 @getitimer(i32 %0, %struct.itimerval* nocapture readnone %1) {
ret i32 -1
}
int get_cutoff_sfb(int sfb_offset_max, int *sfb_offset, int cutoff_line) {
  int i;
  for (i = 0; i < sfb_offset_max; i++) {
    if (sfb_offset[i] >= cutoff_line)
      break;
  }
  return i;
}


x86 assembly (clang, -O0):
<get_cutoff_sfb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114d <get_cutoff_sfb+0x4d>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jl     113a <get_cutoff_sfb+0x3a>
jmp    114d <get_cutoff_sfb+0x4d>
jmp    113f <get_cutoff_sfb+0x3f>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <get_cutoff_sfb+0x15>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cutoff_sfb>:
test   %edi,%edi
jle    1121 <get_cutoff_sfb+0x21>
mov    %edi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rsi,%rax,4)
jge    1120 <get_cutoff_sfb+0x20>
add    $0x1,%rax
cmp    %rax,%rcx
jne    1110 <get_cutoff_sfb+0x10>
mov    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @get_cutoff_sfb(i32 %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %1, i64 %8
%10 = load i32, i32* %9
%11 = icmp slt i32 %10, %2
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ 0, %3 ], [ %16, %15 ], [ %0, %12 ]
ret i32 %18
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7_DIGEST;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_DIGEST_it;
PKCS7_DIGEST *PKCS7_DIGEST_new(void) {
  return (PKCS7_DIGEST *)ASN1_item_new(&PKCS7_DIGEST_it);
}


x86 assembly (clang, -O0):
<PKCS7_DIGEST_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS7_DIGEST_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@PKCS7_DIGEST_it = global i32 0
define i32* @PKCS7_DIGEST_new() {
%1 = call i64 @ASN1_item_new(i32* @PKCS7_DIGEST_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@PKCS7_DIGEST_it = global i32 0
define i32* @PKCS7_DIGEST_new() {
%1 = tail call i64 @ASN1_item_new(i32* @PKCS7_DIGEST_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_POT_SELECT_PIN() { clear_io_bit(0x43, 5); }


x86 assembly (clang, -O0):
<TOSH_CLR_POT_SELECT_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43,%edi
mov    $0x5,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_POT_SELECT_PIN>:
mov    $0x43,%edi
mov    $0x5,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_POT_SELECT_PIN() {
%1 = call i32 @clear_io_bit(i32 67, i32 5)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_POT_SELECT_PIN() {
%1 = tail call i32 @clear_io_bit(i32 67, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_xfreev() {
  printf("NOT IMPLEMENTED:"
         "pa_xfreev"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"NOT IMPLEMENTED:pa_xfreev\0A\00"
define i32 @pa_xfreev() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [26 x i8] c"NOT IMPLEMENTED:pa_xfreev\00"
define i32 @pa_xfreev() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int userboot_autoload(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @userboot_autoload() {
ret i32 0
}

LLVM IR (-O2):
define i32 @userboot_autoload() {
ret i32 0
}
/* Variables and functions */
int _rputchar(char);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_putchar(char c) {
  int ret;
  monLock();
  ret = _rputchar(c);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
movsbl -0x1(%rbp),%edi
call   1050 <_rputchar@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <monUnlock@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_putchar>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %ebx,%edi
call   1050 <_rputchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <monUnlock@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mon_putchar(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = call i32 (...) @monLock()
%5 = load i8, i8* %2
%6 = call i32 @_rputchar(i8 signext %5)
store i32 %6, i32* %3
%7 = call i32 (...) @monUnlock()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @mon_putchar(i8 signext %0) {
%2 = tail call i32 (...) @monLock()
%3 = tail call i32 @_rputchar(i8 signext %0)
%4 = tail call i32 (...) @monUnlock()
ret i32 %3
}
void avformat_get_mov_video_tags() {}


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

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

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

LLVM IR (-O2):
define void @avformat_get_mov_video_tags() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int usage(void) {
  puts("usage :\n\tcfoucc [-i] file.avi\n\tcfourcc -u DIVX file.avi\n\tcfourcc "
       "-d DIVX file.avi\n\tcfourcc -h\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [95 x i8] c"usage :\0A\09cfoucc [-i] file.avi\0A\09cfourcc -u DIVX file.avi\0A\09cfourcc -d DIVX file.avi\0A\09cfourcc -h\0A\00"
define i32 @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [95 x i8] c"usage :\0A\09cfoucc [-i] file.avi\0A\09cfourcc -u DIVX file.avi\0A\09cfourcc -d DIVX file.avi\0A\09cfourcc -h\0A\00"
define i32 @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int pvr_get_objbuf_size() {
  return (*((volatile unsigned long *)((0xA05F8000 + 0x138)))) -
         (*((volatile unsigned long *)((0xA05F8000 + 0x128))));
}


x86 assembly (clang, -O0):
<pvr_get_objbuf_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa05f8138,%eax
mov    (%rax),%rax
mov    $0xa05f8128,%ecx
mov    (%rcx),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pvr_get_objbuf_size>:
mov    $0xa05f8128,%ecx
mov    0x10(%rcx),%rax
mov    (%rcx),%rcx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @pvr_get_objbuf_size() {
%1 = load volatile i64, i64* inttoptr (i64 2690613560 to i64*)
%2 = load volatile i64, i64* inttoptr (i64 2690613544 to i64*)
%3 = sub i64 %1, %2
%4 = trunc i64 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @pvr_get_objbuf_size() {
%1 = load volatile i64, i64* inttoptr (i64 2690613560 to i64*)
%2 = load volatile i64, i64* inttoptr (i64 2690613544 to i64*)
%3 = sub i64 %1, %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void myfree(void *a) { free(a); }


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

x86 assembly (clang, -O2):
<myfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @myfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ check_time(long);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  long offset;
  int fails;
  if (sizeof(time_t) < 8) {
    fprintf(stderr, "Skipping; time_t is less than 64-bits\n");
    return 0;
  }
  for (fails = 0, offset = 0; offset < 1000000; offset++) {
    if (!check_time(offset))
      fails++;
    if (!check_time(-offset))
      fails++;
    if (!check_time(offset * 1000))
      fails++;
    if (!check_time(-offset * 1000))
      fails++;
  }
  return fails ? 1 : 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Skipping; time_t is less than 64-bits\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Skipping; time_t is less than 64-bits\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void pointer_loop(char *p, unsigned u) {
  unsigned i;
  for (i = 0; i < u; i++) {
    *p++ = 42;
  }
}


x86 assembly (clang, -O0):
<pointer_loop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    113e <pointer_loop+0x3e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2a,(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <pointer_loop+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_loop>:
test   %esi,%esi
je     1125 <pointer_loop+0x15>
push   %rax
mov    %esi,%edx
mov    $0x2a,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @pointer_loop(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int DensityLiquid(int /*<<< orphan*/);
int /*<<< orphan*/ GBackDensity(int, int);
int GBackLiquid(int x, int y) { return DensityLiquid(GBackDensity(x, y)); }


x86 assembly (clang, -O0):
<GBackLiquid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <GBackDensity@plt>
mov    %eax,%edi
call   1040 <DensityLiquid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GBackLiquid>:
push   %rax
call   1030 <GBackDensity@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <DensityLiquid@plt>

LLVM IR (-O0):
define i32 @GBackLiquid(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 = call i32 @GBackDensity(i32 %5, i32 %6)
%8 = call i32 @DensityLiquid(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @GBackLiquid(i32 %0, i32 %1) {
%3 = tail call i32 @GBackDensity(i32 %0, i32 %1)
%4 = tail call i32 @DensityLiquid(i32 %3)
ret i32 %4
}
void gtk_tree_view_get_column() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_column() {
ret void
}
void testDifferentTypes3(int arg) {
  switch (arg) {
  case 1UL ... 400000000UL:
    clang_analyzer_warnIfReached();
    break;
  default:
    clang_analyzer_warnIfReached();
    break;
  }
}


x86 assembly (clang, -O0):
<testDifferentTypes3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <testDifferentTypes3+0x22>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
jmp    114a <testDifferentTypes3+0x3a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cmp    $0x17d783ff,%eax
jbe    1126 <testDifferentTypes3+0x16>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testDifferentTypes3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
]
4: ; preds = %6
%5 = call i32 (...) @clang_analyzer_warnIfReached()
br label %11
6: ; preds = %1
%7 = sub i32 %3, 1
%8 = icmp ule i32 %7, 399999999
br i1 %8, label %4, label %9
9: ; preds = %6
%10 = call i32 (...) @clang_analyzer_warnIfReached()
br label %11
11: ; preds = %9, %4
ret void
}

LLVM IR (-O2):
define void @testDifferentTypes3(i32 %0) {
%2 = tail call i32 (...) @clang_analyzer_warnIfReached()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DFS_traversal(int);
int /*<<< orphan*/ creategraph(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Enter how many vertices : ");
  scanf("%d", &n);
  creategraph(n);
  DFS_traversal(n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1030 <creategraph@plt>
mov    -0x4(%rbp),%edi
call   1060 <DFS_traversal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <creategraph@plt>
mov    0x4(%rsp),%edi
call   1060 <DFS_traversal@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Enter how many vertices : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @creategraph(i32 %4)
%6 = load i32, i32* %1
%7 = call i32 @DFS_traversal(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter how many vertices : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @creategraph(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @DFS_traversal(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_get_skt_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::get_skt (rtpp_stream_get_skt) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


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

x86 assembly (clang, -O2):
<rtpp_stream_get_skt_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_stream@%p::get_skt (rtpp_stream_get_skt) is invoked after destruction\0A\00"
define void @rtpp_stream_get_skt_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [83 x i8] c"Method rtpp_stream@%p::get_skt (rtpp_stream_get_skt) is invoked after destruction\0A\00"
define void @rtpp_stream_get_skt_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
void display_cursPos(unsigned int x, unsigned int y) {
  printf("\033[%u;%uH", x, y);
}


x86 assembly (clang, -O0):
<display_cursPos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_cursPos>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%u;%uH\00"
define void @display_cursPos(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 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%u;%uH\00"
define void @display_cursPos(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void f2_union() {
  union U1;
  union U1 *u1;
  union U1 {
    int i;
    int j;
  };
  union U1 u2;
  *u1 = u2;
}


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

x86 assembly (clang, -O2):
LLVM IR (-O0):
%union.U1 = type { i32 }
define void @f2_union() {
%1 = alloca %union.U1*
%2 = alloca %union.U1
%3 = load %union.U1*, %union.U1** %1
%4 = bitcast %union.U1* %3 to i8*
%5 = bitcast %union.U1* %2 to i8*
ret void
}

LLVM IR (-O2):