xunge/DecIR huggingface dataset:
void impl_initialize() { return; }


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

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

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

LLVM IR (-O2):
define void @impl_initialize() {
ret void
}
/* Variables and functions */
scalar_t__ isspace(int);
int rawnextchar();
int nextchar(void) {
  int c;
  do
    c = rawnextchar();
  while (isspace(c) || c == '\f');
  return c;
}


x86 assembly (clang, -O0):
<nextchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rawnextchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1156 <nextchar+0x36>
cmpl   $0xc,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1128 <nextchar+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextchar>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rawnextchar@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <isspace@plt>
cmp    $0xc,%ebx
je     1130 <nextchar+0x10>
test   %rax,%rax
jne    1130 <nextchar+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @nextchar() {
%1 = alloca i32
br label %2
2: ; preds = %11, %0
%3 = call i32 (...) @rawnextchar()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = call i64 @isspace(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 12
br label %11
11: ; preds = %8, %4
%12 = phi i1 [ true, %4 ], [ %10, %8 ]
br i1 %12, label %2, label %13
13: ; preds = %11
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @nextchar() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @rawnextchar()
%3 = tail call i64 @isspace(i32 %2)
%4 = icmp ne i64 %3, 0
%5 = icmp eq i32 %2, 12
%6 = or i1 %5, %4
br i1 %6, label %1, label %7
7: ; preds = %1
ret i32 %2
}
int deleteUser(const char *username) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @deleteUser(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ hidpp_get_unaligned_le_u16(int /*<<< orphan*/ *);
uint16_t hidpp_le_u16_to_cpu(uint16_t data) {
  return hidpp_get_unaligned_le_u16((uint8_t *)&data);
}


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

x86 assembly (clang, -O2):
<hidpp_le_u16_to_cpu>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <hidpp_get_unaligned_le_u16@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @hidpp_le_u16_to_cpu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @hidpp_get_unaligned_le_u16(i32* %2)
ret i32 %3
}

LLVM IR (-O2):
define i32 @hidpp_le_u16_to_cpu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @hidpp_get_unaligned_le_u16(i32* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
const char *indent_spaces(int inDent) {
  static char buffer[1024];
  memcpy(buffer,
         "                                                                     "
         "           ",
         inDent * 2);
  buffer[inDent * 2] = '\0';
  return buffer;
}


x86 assembly (clang, -O0):
<indent_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
shl    $0x1,%edx
lea    0x2f18(%rip),%rdi
lea    0xed1(%rip),%rsi
call   1030 <memcpy@plt>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
movslq %eax,%rcx
lea    0x2efc(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2ef1(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent_spaces>:
push   %r14
push   %rbx
push   %rax
movslq %edi,%rbx
lea    (%rbx,%rbx,1),%rdx
lea    0x2f1e(%rip),%r14
lea    0xed7(%rip),%rsi
mov    %r14,%rdi
call   1030 <memcpy@plt>
movb   $0x0,(%r14,%rbx,2)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@indent_spaces.buffer = internal global [1024 x i8] zeroinitializer
@.str = [81 x i8] c" \00"
define i8* @indent_spaces(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 2
%5 = call i32 @memcpy(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @indent_spaces.buffer, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = mul nsw i32 %6, 2
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* @indent_spaces.buffer, i64 0, i64 %8
store i8 0, i8* %9
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @indent_spaces.buffer, i64 0, i64 0)
}

LLVM IR (-O2):
@indent_spaces.buffer = internal global [1024 x i8] zeroinitializer
@.str = [81 x i8] c" \00"
define i8* @indent_spaces(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = tail call i32 @memcpy(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @indent_spaces.buffer, i64 0, i64 0), i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* @indent_spaces.buffer, i64 0, i64 %4
store i8 0, i8* %5
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @indent_spaces.buffer, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
double get_final_velocity(void) {
  double final_velocity = 0.0;
  printf("Enter the final velocity (mi/s): ");
  scanf("%lf", &final_velocity);
  return final_velocity;
}


x86 assembly (clang, -O0):
<get_final_velocity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_final_velocity>:
push   %rax
movq   $0x0,(%rsp)
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Enter the final velocity (mi/s): \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_final_velocity() {
%1 = alloca double
store double 0.000000e+00, double* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%4 = load double, double* %1
ret double %4
}

LLVM IR (-O2):
@.str = [34 x i8] c"Enter the final velocity (mi/s): \00"
@.str.1 = [4 x i8] c"%lf\00"
define double @get_final_velocity() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
store double 0.000000e+00, double* %1
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%5 = load double, double* %1
ret double %5
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int hashtbl_string_equals(const void *a, const void *b) {
  return strcmp(((const char *)a), (const char *)b) == 0;
}


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

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

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

LLVM IR (-O2):
define i32 @hashtbl_string_equals(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fd_bluetooth_spi_transfer();
int /*<<< orphan*/ fd_bluetooth_step();
void fd_bluetooth_ready(void) {
  fd_bluetooth_spi_transfer();
  fd_bluetooth_step();
}


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

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

LLVM IR (-O0):
define void @fd_bluetooth_ready() {
%1 = call i32 (...) @fd_bluetooth_spi_transfer()
%2 = call i32 (...) @fd_bluetooth_step()
ret void
}

LLVM IR (-O2):
define void @fd_bluetooth_ready() {
%1 = tail call i32 (...) @fd_bluetooth_spi_transfer()
%2 = tail call i32 (...) @fd_bluetooth_step()
ret void
}
/* Variables and functions */
char *alphabetBoardPath(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *ret = alphabetBoardPath("leet");
  printf("%s\n", ret);
  ret = alphabetBoardPath("zdz");
  printf("%s\n", ret);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <alphabetBoardPath@plt>
lea    0xed1(%rip),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
call   1040 <alphabetBoardPath@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"leet\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [4 x i8] c"zdz\00"
define i32 @main() {
%1 = tail call i8* @alphabetBoardPath(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i8* @alphabetBoardPath(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cm_nalloc_free_1d__alloc__is_allocated();
int /*<<< orphan*/ cm_nalloc_free_2d__alloc__is_allocated();
int /*<<< orphan*/ cm_nalloc_free_3d__alloc__is_allocated();
int /*<<< orphan*/ cm_nalloc_free_4d__alloc__is_allocated();
void cm_alloc_run(void) {
  cm_nalloc_free_1d__alloc__is_allocated();
  cm_nalloc_free_2d__alloc__is_allocated();
  cm_nalloc_free_3d__alloc__is_allocated();
  cm_nalloc_free_4d__alloc__is_allocated();
}


x86 assembly (clang, -O0):
<cm_alloc_run>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cm_nalloc_free_1d__alloc__is_allocated@plt>
mov    $0x0,%al
call   1050 <cm_nalloc_free_2d__alloc__is_allocated@plt>
mov    $0x0,%al
call   1040 <cm_nalloc_free_3d__alloc__is_allocated@plt>
mov    $0x0,%al
call   1060 <cm_nalloc_free_4d__alloc__is_allocated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cm_alloc_run>:
push   %rax
xor    %eax,%eax
call   1030 <cm_nalloc_free_1d__alloc__is_allocated@plt>
xor    %eax,%eax
call   1050 <cm_nalloc_free_2d__alloc__is_allocated@plt>
xor    %eax,%eax
call   1040 <cm_nalloc_free_3d__alloc__is_allocated@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <cm_nalloc_free_4d__alloc__is_allocated@plt>

LLVM IR (-O0):
define void @cm_alloc_run() {
%1 = call i32 (...) @cm_nalloc_free_1d__alloc__is_allocated()
%2 = call i32 (...) @cm_nalloc_free_2d__alloc__is_allocated()
%3 = call i32 (...) @cm_nalloc_free_3d__alloc__is_allocated()
%4 = call i32 (...) @cm_nalloc_free_4d__alloc__is_allocated()
ret void
}

LLVM IR (-O2):
define void @cm_alloc_run() {
%1 = tail call i32 (...) @cm_nalloc_free_1d__alloc__is_allocated()
%2 = tail call i32 (...) @cm_nalloc_free_2d__alloc__is_allocated()
%3 = tail call i32 (...) @cm_nalloc_free_3d__alloc__is_allocated()
%4 = tail call i32 (...) @cm_nalloc_free_4d__alloc__is_allocated()
ret void
}
/* Variables and functions */
scalar_t__ rand();
float f(int q) {
  float s = 0;
  int i;
  for (i = 0; i < q; i++)
    s += rand();
  s /= q;
  return s;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115a <f+0x4a>
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <f+0x1a>
cvtsi2ssl -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xorps  %xmm0,%xmm0
test   %edi,%edi
jle    1144 <f+0x34>
mov    %ebx,%ebp
xchg   %ax,%ax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %rax,%xmm1
addss  %xmm1,%xmm0
add    $0xffffffff,%ebp
jne    1120 <f+0x10>
xorps  %xmm1,%xmm1
cvtsi2ss %ebx,%xmm1
divss  %xmm1,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @f(i32 %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca i32
store i32 %0, i32* %2
store float 0.000000e+00, float* %3
store i32 0, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %17
9: ; preds = %5
%10 = call i64 (...) @rand()
%11 = sitofp i64 %10 to float
%12 = load float, float* %3
%13 = fadd float %12, %11
store float %13, float* %3
br label %14
14: ; preds = %9
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %5
17: ; preds = %5
%18 = load i32, i32* %2
%19 = sitofp i32 %18 to float
%20 = load float, float* %3
%21 = fdiv float %20, %19
store float %21, float* %3
%22 = load float, float* %3
ret float %22
}

LLVM IR (-O2):
define float @f(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi float [ %8, %3 ], [ 0.000000e+00, %1 ]
%6 = tail call i64 (...) @rand()
%7 = sitofp i64 %6 to float
%8 = fadd float %5, %7
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi float [ 0.000000e+00, %1 ], [ %8, %3 ]
%13 = sitofp i32 %0 to float
%14 = fdiv float %12, %13
ret float %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint32_t sancus_u32ll(long long v) {
  assert((v >= 0) && (v <= 0xffffffff));
  return (uint32_t)v;
}


x86 assembly (clang, -O0):
<sancus_u32ll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     113b <sancus_u32ll+0x2b>
mov    $0xffffffff,%eax
cmp    %rax,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sancus_u32ll>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
mov    %rbx,%rax
shr    $0x20,%rax
sete   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sancus_u32ll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sge i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp sle i64 %6, 4294967295
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i64, i64* %2
%13 = trunc i64 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @sancus_u32ll(i64 %0) {
%2 = icmp ult i64 %0, 4294967296
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = trunc i64 %0 to i32
ret i32 %5
}
void updateSeriesRating(unsigned int seriesID, unsigned short rating) {
  return;
}


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

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

LLVM IR (-O0):
define void @updateSeriesRating(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
ret void
}

LLVM IR (-O2):
define void @updateSeriesRating(i32 %0, i16 zeroext %1) {
ret void
}
/* Type definitions */
typedef int int8_t;
typedef int /*<<< orphan*/ input;
typedef int /*<<< orphan*/ expected;

/* Variables and functions */
int /*<<< orphan*/ test_rebase(int, int *, int, int, int *, int);
void test_decimal_to_binary(void) {
  int8_t input[] = {4, 2};
  int8_t expected[] = {1, 0, 1, 0, 1, 0};
  test_rebase(10, input, (sizeof(input) / sizeof(input[0])), 2, expected,
              (sizeof(expected) / sizeof(expected[0])));
}


x86 assembly (clang, -O0):
<test_decimal_to_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xee6(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xee3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee0(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rsi
lea    -0x20(%rbp),%r8
mov    $0xa,%edi
mov    $0x2,%ecx
mov    $0x6,%r9d
mov    %ecx,%edx
call   1030 <test_rebase@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_decimal_to_binary>:
sub    $0x28,%rsp
movabs $0x200000004,%rax
mov    %rax,0x8(%rsp)
mov    0xee6(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rsi
lea    0x10(%rsp),%r8
mov    $0xa,%edi
mov    $0x2,%edx
mov    $0x2,%ecx
mov    $0x6,%r9d
call   1030 <test_rebase@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test_decimal_to_binary.input = [2 x i32] [i32 4, i32 2]
@__const.test_decimal_to_binary.expected = [6 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0]
define void @test_decimal_to_binary() {
%1 = alloca [2 x i32]
%2 = alloca [6 x i32]
%3 = bitcast [2 x i32]* %1 to i8*
%4 = bitcast [6 x i32]* %2 to i8*
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%7 = call i32 @test_rebase(i32 10, i32* %5, i32 2, i32 2, i32* %6, i32 6)
ret void
}

LLVM IR (-O2):
@__const.test_decimal_to_binary.expected = [6 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0]
define void @test_decimal_to_binary() {
%1 = alloca i64
%2 = alloca [6 x i32]
%3 = bitcast i64* %1 to i8*
store i64 8589934596, i64* %1
%4 = bitcast [6 x i32]* %2 to i8*
%5 = bitcast i64* %1 to i32*
%6 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%7 = call i32 @test_rebase(i32 10, i32* %5, i32 2, i32 2, i32* %6, i32 6)
ret void
}
void error(message) char *message;
{ error2error(message, ""); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @error2error to i32 (i8*, i8*, ...)*)(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @error(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @error2error to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t *branch_target(uint32_t insn, uint32_t *addr) {
  unsigned long target;
  int immediate = ((insn & 0xfffc) ^ 0x8000) - 0x8000;
  int absolute = insn & 2;
  if (absolute)
    target = immediate;
  else
    target = ((unsigned long)addr) + immediate;
  return (uint32_t *)target;
}


x86 assembly (clang, -O0):
<branch_target>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffc,%eax
xor    $0x8000,%eax
sub    $0x8000,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1140 <branch_target+0x40>
movslq -0x1c(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    114f <branch_target+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<branch_target>:
movswl %di,%ecx
and    $0xfffffffc,%ecx
xor    %eax,%eax
test   $0x2,%dil
movslq %ecx,%rcx
cmove  %rsi,%rax
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i32* @branch_target(i32 %0, i32* %1) {
%3 = shl i32 %0, 16
%4 = ashr exact i32 %3, 16
%5 = and i32 %4, -4
%6 = and i32 %0, 2
%7 = icmp eq i32 %6, 0
%8 = sext i32 %5 to i64
%9 = ptrtoint i32* %1 to i64
%10 = select i1 %7, i64 %9, i64 0
%11 = add i64 %10, %8
%12 = inttoptr i64 %11 to i32*
ret i32* %12
}
int hash_supported(int hashtype) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hash_supported(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_thing(char *, int *, char *);
void __attribute__((nonnull(1, 3))) do_other_thing(char *s, int *p, char *q) {
  do_thing(s, p, q);
}


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

x86 assembly (clang, -O2):
<do_other_thing>:
jmp    1030 <do_thing@plt>

LLVM IR (-O0):
define void @do_other_thing(i8* %0, i32* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32*, i32** %5
%9 = load i8*, i8** %6
%10 = call i32 @do_thing(i8* %7, i32* %8, i8* %9)
ret void
}

LLVM IR (-O2):
define void @do_other_thing(i8* %0, i32* %1, i8* %2) {
%4 = tail call i32 @do_thing(i8* %0, i32* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _close(int);
int errno;
void do_close(int s) {
  int save;
  save = errno;
  (void)_close(s);
  errno = save;
}


x86 assembly (clang, -O0):
<do_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_close@plt>
mov    -0x8(%rbp),%ecx
mov    0x2ea7(%rip),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_close>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <_close@plt>
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define void @do_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @errno
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = call i32 @_close(i32 %5)
%7 = load i32, i32* %3
store i32 %7, i32* @errno
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @do_close(i32 %0) {
%2 = load i32, i32* @errno
%3 = tail call i32 @_close(i32 %0)
store i32 %2, i32* @errno
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cls();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basCls() { pushNumber(cls()); }


x86 assembly (clang, -O0):
<basCls>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cls@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basCls>:
push   %rax
xor    %eax,%eax
call   1030 <cls@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basCls() {
%1 = call i32 (...) @cls()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basCls() {
%1 = tail call i32 (...) @cls()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  int j;
  int t;
  i = __VERIFIER_nondet_int();
  j = __VERIFIER_nondet_int();
  t = 0;
  while (i != 0 && j != 0) {
    t = i;
    i = j;
    j = t;
  }
  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,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1153 <main+0x43>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1163 <main+0x53>
jmp    117a <main+0x6a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
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
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
void pointer_loop_d(char *p, unsigned u) {
  p += u;
  while (u > 0) {
    --p;
    --u;
    *p = 42;
  }
}


x86 assembly (clang, -O0):
<pointer_loop_d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1146 <pointer_loop_d+0x46>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2a,(%rax)
jmp    111b <pointer_loop_d+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointer_loop_d>:
test   %esi,%esi
je     1131 <pointer_loop_d+0x21>
push   %rax
mov    %esi,%edx
add    $0xffffffff,%esi
not    %rsi
add    %rdx,%rsi
add    %rsi,%rdi
mov    $0x2a,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @pointer_loop_d(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 = load i8*, i8** %3
%7 = zext i32 %5 to i64
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8* %8, i8** %3
br label %9
9: ; preds = %12, %2
%10 = load i32, i32* %4
%11 = icmp ugt i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 -1
store i8* %14, i8** %3
%15 = load i32, i32* %4
%16 = add i32 %15, -1
store i32 %16, i32* %4
%17 = load i8*, i8** %3
store i8 42, i8* %17
br label %9
18: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @pointer_loop_d(i8* nocapture writeonly %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = icmp eq i32 %1, 0
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = add i32 %1, -1
%7 = zext i32 %6 to i64
%8 = xor i64 %7, -1
%9 = add nsw i64 %8, %3
%10 = getelementptr i8, i8* %0, i64 %9
br label %11
11: ; preds = %5, %2
ret void
}
char NpyOS_ascii_tolower(char c) {
  if (c >= 'A' && c <= 'Z') {
    return c + ('a' - 'A');
  }
  return c;
}


x86 assembly (clang, -O0):
<NpyOS_ascii_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <NpyOS_ascii_tolower+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <NpyOS_ascii_tolower+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <NpyOS_ascii_tolower+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<NpyOS_ascii_tolower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @NpyOS_ascii_tolower(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @NpyOS_ascii_tolower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__4__GeneralIO__set();
void CC2420ControlP__RSTN__set(void) { Msp430GpioC__4__GeneralIO__set(); }


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__RSTN__set() {
%1 = tail call i32 (...) @Msp430GpioC__4__GeneralIO__set()
ret void
}
int intcmp(const void *v1, const void *v2) {
  return *((int *)v1) - *((int *)v2);
}


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

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

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

LLVM IR (-O2):
define i32 @intcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void ARGBToRGB24Row_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToRGB24Row_Any_SSSE3() {
ret void
}
int checkForLiving(int *generation, int length) {
  int i;
  for (i = 0; i < length; i++) {
    if (generation[i]) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<checkForLiving>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    114f <checkForLiving+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     113c <checkForLiving+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1156 <checkForLiving+0x56>
jmp    1141 <checkForLiving+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <checkForLiving+0x12>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkForLiving>:
test   %esi,%esi
jle    111f <checkForLiving+0x1f>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,(%rdi,%rcx,4)
jne    1122 <checkForLiving+0x22>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <checkForLiving+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @checkForLiving(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %13, %6 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %6, label %14
14: ; preds = %8, %6, %2
%15 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 1, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ dyad_panic(char *);
void *realloc(void *, int);
void *dyad_realloc(void *ptr, int n) {
  ptr = realloc(ptr, n);
  if (!ptr) {
    dyad_panic("out of memory");
  }
  return ptr;
}


x86 assembly (clang, -O0):
<dyad_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1156 <dyad_realloc+0x36>
lea    0xeaf(%rip),%rdi
call   1030 <dyad_panic@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dyad_realloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <dyad_realloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <dyad_panic@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @dyad_realloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i8* @realloc(i8* %5, i32 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = call i32 @dyad_panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define i8* @dyad_realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @dyad_panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
scalar_t__ read(int, char *, int);
int posix_input_poll(int fd) {
  char buf;
  ssize_t res = read(fd, &buf, 1);
  if (res <= 0)
    return res;
  return buf;
}


x86 assembly (clang, -O0):
<posix_input_poll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jg     1147 <posix_input_poll+0x37>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    114e <posix_input_poll+0x3e>
movsbl -0x9(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_input_poll>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
test   %rax,%rax
movsbl 0x7(%rsp),%ecx
cmovg  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @posix_input_poll(i32 %0) {
%2 = alloca i8
%3 = call i64 @read(i32 %0, i8* %2, i32 1)
%4 = icmp slt i64 %3, 1
%5 = trunc i64 %3 to i32
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = select i1 %4, i32 %5, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_parse_address() {
  printf("NOT IMPLEMENTED:"
         "pa_parse_address"
         "\n");
}


x86 assembly (clang, -O0):
<pa_parse_address>:
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_parse_address>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_parse_address\00"
define i32 @pa_parse_address() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void hm_Free(void) { return; }


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

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

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

LLVM IR (-O2):
define void @hm_Free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print1(size_t count) {
  int i;
  for (i = 0; i < count; i++) {
    fprintf(stderr, "1");
  }
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<print1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1154 <print1+0x44>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    0xebf(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print1+0x13>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print1>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1141 <print1+0x31>
mov    %rdi,%rbx
mov    0x2ebc(%rip),%r15
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15),%edi
mov    %r14,%rsi
call   1030 <fprintf@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <print1+0x20>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print1(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i64, i64* %2
%8 = icmp ult i64 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %4
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print1(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = add nuw i64 %4, 1
%8 = icmp eq i64 %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = load i32, i32* @stderr
%11 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int pause_dialog() {
  char dialog[][(46 - 2)] = {"%i) Resume", "%i) Exit"};
  return create_numbered_dialog("PAUSE", (char *)dialog, 2);
}


x86 assembly (clang, -O0):
<pause_dialog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x60(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x58,%edx
call   1030 <memcpy@plt>
lea    -0x60(%rbp),%rsi
lea    0xf10(%rip),%rdi
mov    $0x2,%edx
mov    $0x0,%al
call   1040 <create_numbered_dialog@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause_dialog>:
sub    $0x58,%rsp
mov    0xf35(%rip),%rax
mov    %rax,0x50(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xef6(%rip),%rdi
mov    %rsp,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <create_numbered_dialog@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.pause_dialog.dialog = [2 x [44 x i8]] [[44 x i8] c"%i) Resume\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [44 x i8] c"%i) Exit\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str = [6 x i8] c"PAUSE\00"
define i32 @pause_dialog() {
%1 = alloca [2 x [44 x i8]]
%2 = bitcast [2 x [44 x i8]]* %1 to i8*
%3 = getelementptr inbounds [2 x [44 x i8]], [2 x [44 x i8]]* %1, i64 0, i64 0
%4 = bitcast [44 x i8]* %3 to i8*
%5 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @create_numbered_dialog to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i32 2)
ret i32 %5
}

LLVM IR (-O2):
@__const.pause_dialog.dialog = [2 x [44 x i8]] [[44 x i8] c"%i) Resume\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [44 x i8] c"%i) Exit\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str = [6 x i8] c"PAUSE\00"
define i32 @pause_dialog() {
%1 = alloca [2 x [44 x i8]]
%2 = getelementptr inbounds [2 x [44 x i8]], [2 x [44 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @create_numbered_dialog to i32 (i8*, i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2, i32 2)
ret i32 %3
}
/* Variables and functions */
char sysfsparser_path_exist(char *, unsigned int);
signed char get_processor_is_hot_pluggable(unsigned int cpu) {
  return sysfsparser_path_exist("/sys/devices/system"
                                "/cpu"
                                "/cpu%u/online",
                                cpu);
}


x86 assembly (clang, -O0):
<get_processor_is_hot_pluggable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <sysfsparser_path_exist@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_processor_is_hot_pluggable>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <sysfsparser_path_exist@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"/sys/devices/system/cpu/cpu%u/online\00"
define signext i8 @get_processor_is_hot_pluggable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call signext i8 @sysfsparser_path_exist(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8 %4
}

LLVM IR (-O2):
@.str = [37 x i8] c"/sys/devices/system/cpu/cpu%u/online\00"
define signext i8 @get_processor_is_hot_pluggable(i32 %0) {
%2 = tail call signext i8 @sysfsparser_path_exist(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8 %2
}
void fputchar(c) char(c);
{ putchar(c); }


x86 assembly (clang, -O0):
<fputchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
mov    $0x0,%al
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputchar>:
movsbl %dil,%edi
xor    %eax,%eax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @fputchar(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fputchar(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %3)
ret void
}