xunge/DecIR huggingface dataset:
/* Variables and functions */
int abs(int);
int createMVDCost(int i_lambda, int x, int y) {
  if (x == 0 && y == 0)
    return 0;
  x = abs(x);
  y = abs(y);
  x = i_lambda * x;
  x += i_lambda * y;
  return x;
}


x86 assembly (clang, -O0):
<createMVDCost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1141 <createMVDCost+0x31>
cmpl   $0x0,-0x10(%rbp)
jne    1141 <createMVDCost+0x31>
movl   $0x0,-0x4(%rbp)
jmp    1174 <createMVDCost+0x64>
mov    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createMVDCost>:
mov    %edx,%eax
or     %esi,%eax
je     111a <createMVDCost+0x1a>
mov    %esi,%ecx
neg    %ecx
cmovs  %esi,%ecx
mov    %edx,%eax
neg    %eax
cmovs  %edx,%eax
add    %ecx,%eax
imul   %edi,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @createMVDCost(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %2, %1
%5 = icmp eq i32 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%8 = tail call i32 @llvm.abs.i32(i32 %2, i1 true)
%9 = add nuw i32 %8, %7
%10 = mul i32 %9, %0
br label %11
11: ; preds = %3, %6
%12 = phi i32 [ %10, %6 ], [ 0, %3 ]
ret i32 %12
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR99_set(void) { return U_WMRCORENONE_set("U_WMR99"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR99\00"
define i8* @U_WMR99_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR99\00"
define i8* @U_WMR99_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
float stress_funccall_float_1(float const);
float __attribute__((no))
stress_funcdeep_float_2(const float a, const float b) {
  return stress_funccall_float_1(b) + stress_funccall_float_1(a);
}


x86 assembly (clang, -O0):
<stress_funcdeep_float_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <stress_funccall_float_1@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <stress_funccall_float_1@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_funcdeep_float_2>:
push   %rax
movss  %xmm0,0x4(%rsp)
movaps %xmm1,%xmm0
call   1030 <stress_funccall_float_1@plt>
movss  %xmm0,(%rsp)
movss  0x4(%rsp),%xmm0
call   1030 <stress_funccall_float_1@plt>
addss  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @stress_funcdeep_float_2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = call float @stress_funccall_float_1(float %5)
%7 = load float, float* %3
%8 = call float @stress_funccall_float_1(float %7)
%9 = fadd float %6, %8
ret float %9
}

LLVM IR (-O2):
define float @stress_funcdeep_float_2(float %0, float %1) {
%3 = tail call float @stress_funccall_float_1(float %1)
%4 = tail call float @stress_funccall_float_1(float %0)
%5 = fadd float %3, %4
ret float %5
}
void init_ptr_zero(int *ptr, int i) {
  if (i != 0) {
    *ptr = 42;
  } else {
    *(ptr + i) = 42;
  }
}


x86 assembly (clang, -O0):
<init_ptr_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1124 <init_ptr_zero+0x24>
mov    -0x8(%rbp),%rax
movl   $0x2a,(%rax)
jmp    1133 <init_ptr_zero+0x33>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x2a,(%rax,%rcx,4)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @init_ptr_zero(i32* nocapture writeonly %0, i32 %1) {
store i32 42, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func() { printf("destruct\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"destruct\00"
define void @func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
nl() { write(1, "\n", 1); }


x86 assembly (clang, -O0):
<nl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edx
lea    0xedc(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nl>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @nl() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 undef
}
void ASN1_INTEGER_set(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_INTEGER_set() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr,
          "Usage: gpgeowa [-op1 d/s] [-op2 d/s] [-silent] [-v] [-l/-h] [-f]\n");
  fprintf(stderr, "          [-diff1/-diff2] [-me maxeqns] [-mwd maxwdiffs] "
                  "[-n] groupname\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [66 x i8] c"Usage: gpgeowa [-op1 d/s] [-op2 d/s] [-silent] [-v] [-l/-h] [-f]\0A\00"
@.str.1 = [73 x i8] c" [-diff1/-diff2] [-me maxeqns] [-mwd maxwdiffs] [-n] groupname\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [66 x i8] c"Usage: gpgeowa [-op1 d/s] [-op2 d/s] [-silent] [-v] [-l/-h] [-f]\0A\00"
@.str.1 = [73 x i8] c" [-diff1/-diff2] [-me maxeqns] [-mwd maxwdiffs] [-n] groupname\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memset(int *, int /*<<< orphan*/, int);
int *create_matrix(int size) {
  int *mat;
  int i;
  mat = (int *)malloc(sizeof(int *) * size * size);
  memset(mat, 0, sizeof(int) * size * size);
  return mat;
}


x86 assembly (clang, -O0):
<create_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x3,%rax
movslq -0x4(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
movslq -0x4(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_matrix>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
imul   %ebx,%ebx
lea    0x0(,%rbx,8),%edi
call   1040 <malloc@plt>
mov    %rax,%r14
shl    $0x2,%ebx
mov    %rax,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @create_matrix(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = mul i64 8, %6
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = mul i64 %7, %9
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %3
%14 = load i32*, i32** %3
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = mul i64 4, %16
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = mul i64 %17, %19
%21 = trunc i64 %20 to i32
%22 = call i32 @memset(i32* %14, i32 0, i32 %21)
%23 = load i32*, i32** %3
ret i32* %23
}

LLVM IR (-O2):
define i32* @create_matrix(i32 %0) {
%2 = shl i32 %0, 3
%3 = mul i32 %2, %0
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i32*
%6 = shl i32 %0, 2
%7 = mul i32 %6, %0
%8 = tail call i32 @memset(i32* %5, i32 0, i32 %7)
ret i32* %5
}
/* Type definitions */
struct tms {
  int tms_utime;
};

/* Variables and functions */
int /*<<< orphan*/ times(struct tms *);
int Getclock() {
  struct tms rusage;
  times(&rusage);
  return (rusage.tms_utime * 50 / 3);
}


x86 assembly (clang, -O0):
<Getclock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <times@plt>
imul   $0x32,-0x8(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Getclock>:
push   %rax
mov    %rsp,%rdi
call   1030 <times@plt>
imul   $0x32,(%rsp),%eax
cltq
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @Getclock() {
%1 = alloca %struct.tms
%2 = call i32 @times(%struct.tms* %1)
%3 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 50
%6 = sdiv i32 %5, 3
ret i32 %6
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @Getclock() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i32 @times(%struct.tms* %1)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 50
%7 = sdiv i32 %6, 3
ret i32 %7
}
/* Variables and functions */
int ksft_exit_fail();
int ksft_exit_pass();
scalar_t__ validate_freq();
scalar_t__ validate_set_offset();
int main(int argc, char **argv) {
  if (validate_freq()) {
    return ksft_exit_fail();
  }
  if (validate_set_offset()) {
    return ksft_exit_fail();
  }
  return ksft_exit_pass();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <validate_freq@plt>
cmp    $0x0,%rax
je     1176 <main+0x36>
mov    $0x0,%al
call   1040 <ksft_exit_fail@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <main+0x60>
mov    $0x0,%al
call   1060 <validate_set_offset@plt>
cmp    $0x0,%rax
je     1196 <main+0x56>
mov    $0x0,%al
call   1040 <ksft_exit_fail@plt>
mov    %eax,-0x4(%rbp)
jmp    11a0 <main+0x60>
mov    $0x0,%al
call   1030 <ksft_exit_pass@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <validate_freq@plt>
test   %rax,%rax
jne    1159 <main+0x19>
xor    %eax,%eax
call   1060 <validate_set_offset@plt>
test   %rax,%rax
je     1161 <main+0x21>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ksft_exit_fail@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ksft_exit_pass@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @validate_freq()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @ksft_exit_fail()
br label %14
7: ; preds = %2
%8 = tail call i64 (...) @validate_set_offset()
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 (...) @ksft_exit_fail()
br label %14
12: ; preds = %7
%13 = tail call i32 (...) @ksft_exit_pass()
br label %14
14: ; preds = %12, %10, %5
%15 = phi i32 [ %6, %5 ], [ %11, %10 ], [ %13, %12 ]
ret i32 %15
}
unsigned long InvertEndian32(unsigned long value) {
  return (((value >> 0) & 0xFF) << 24) | (((value >> 8) & 0xFF) << 16) |
         (((value >> 16) & 0xFF) << 8) | (((value >> 24) & 0xFF) << 0);
}


x86 assembly (clang, -O0):
<InvertEndian32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x0,%rax
and    $0xff,%rax
shl    $0x18,%rax
mov    -0x8(%rbp),%rcx
shr    $0x8,%rcx
and    $0xff,%rcx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
and    $0xff,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x18,%rcx
and    $0xff,%rcx
shl    $0x0,%rcx
or     %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @InvertEndian32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 0
%5 = and i64 %4, 255
%6 = shl i64 %5, 24
%7 = load i64, i64* %2
%8 = lshr i64 %7, 8
%9 = and i64 %8, 255
%10 = shl i64 %9, 16
%11 = or i64 %6, %10
%12 = load i64, i64* %2
%13 = lshr i64 %12, 16
%14 = and i64 %13, 255
%15 = shl i64 %14, 8
%16 = or i64 %11, %15
%17 = load i64, i64* %2
%18 = lshr i64 %17, 24
%19 = and i64 %18, 255
%20 = shl i64 %19, 0
%21 = or i64 %16, %20
ret i64 %21
}

LLVM IR (-O2):
define i64 @InvertEndian32(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void usage() { puts("Usage: hq9plus [OPTIONS]... [file]...\n"); }


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"Usage: hq9plus [OPTIONS]... [file]...\0A\00"
define void @usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Usage: hq9plus [OPTIONS]... [file]...\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}
int getc() {}


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

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

LLVM IR (-O0):
define i32 @getc() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @getc() {
ret i32 undef
}
call6h(us, ui, ul) unsigned short us;
unsigned int ui;
unsigned long ul;
{
  us = us;
  call6i(ui, ul);
}


x86 assembly (clang, -O0):
<call6h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x6(%rbp),%ax
mov    %ax,-0x6(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <call6i@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call6h>:
mov    %esi,%edi
mov    %rdx,%rsi
xor    %eax,%eax
jmp    1030 <call6i@plt>

LLVM IR (-O0):
define i32 @call6h(i32 %0, i32 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i32
%7 = alloca i64
%8 = trunc i32 %0 to i16
store i16 %8, i16* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%9 = load i16, i16* %5
store i16 %9, i16* %5
%10 = load i32, i32* %6
%11 = load i64, i64* %7
%12 = call i32 (i32, i64, ...) bitcast (i32 (...)* @call6i to i32 (i32, i64, ...)*)(i32 %10, i64 %11)
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @call6h(i32 %0, i32 %1, i64 %2) {
%4 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @call6i to i32 (i32, i64, ...)*)(i32 %1, i64 %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void hyperplane_destroy(double *hyperplane) { free(hyperplane); }


x86 assembly (clang, -O0):
<hyperplane_destroy>:
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):
<hyperplane_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @hyperplane_destroy(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pico_stack_tick();
int /*<<< orphan*/ usleep(int);
void app_noop(void) {
  while (1) {
    pico_stack_tick();
    usleep(2000);
  }
}


x86 assembly (clang, -O0):
<app_noop>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <app_noop+0x9>
mov    $0x0,%al
call   1030 <pico_stack_tick@plt>
mov    $0x7d0,%edi
call   1040 <usleep@plt>
jmp    1129 <app_noop+0x9>

x86 assembly (clang, -O2):
<app_noop>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <pico_stack_tick@plt>
mov    $0x7d0,%edi
call   1040 <usleep@plt>
jmp    1130 <app_noop+0x10>

LLVM IR (-O0):
define void @app_noop() {
br label %1
1: ; preds = %0, %1
%2 = call i32 (...) @pico_stack_tick()
%3 = call i32 @usleep(i32 2000)
br label %1
}

LLVM IR (-O2):
define void @app_noop() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @pico_stack_tick()
%3 = tail call i32 @usleep(i32 2000)
br label %1
}
/* Variables and functions */
int f480(int *);
int f481(int *p) { return f480(p); }


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

x86 assembly (clang, -O2):
<f481>:
jmp    1030 <f480@plt>

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

LLVM IR (-O2):
define i32 @f481(i32* %0) {
%2 = tail call i32 @f480(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void dvbvbittx_set_line(uint8_t *p, uint8_t line) {
  p[0] &= ~0x1f;
  p[0] |= 0xc0 | (line & 0x1f);
}


x86 assembly (clang, -O0):
<dvbvbittx_set_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xffffffe0,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
or     $0xc0,%ecx
mov    -0x8(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dvbvbittx_set_line>:
mov    $0xffffff20,%eax
and    (%rdi),%eax
and    $0x1f,%esi
add    %esi,%eax
add    $0xc0,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @dvbvbittx_set_line(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, -32
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 31
%11 = or i32 192, %10
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = or i32 %14, %11
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @dvbvbittx_set_line(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = and i32 %3, -224
%5 = and i32 %1, 31
%6 = or i32 %5, %4
%7 = or i32 %6, 192
store i32 %7, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_prime(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n = 0;
  scanf("%d", &n);
  is_prime(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <is_prime@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <is_prime@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @is_prime(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @is_prime(i32 %4)
ret i32 0
}
/* Variables and functions */
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *, int);
int main() {
  int len;
  char line[100];
  len = 0;
  while ((len = getline(line, 100)) > 0) {
    reverse(line, len);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1050 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1181 <main+0x51>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <reverse@plt>
lea    -0x70(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%rdi
mov    $0x64,%esi
call   1050 <getline@plt>
test   %eax,%eax
jle    1186 <main+0x56>
mov    %rsp,%rbx
lea    0xeae(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 100)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %3, %0 ]
%7 = call i32 @reverse(i8* %2, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = call i32 @getline(i8* %2, i32 100)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
int SLOW_IsSeparator(char c) {
  static const char *separators = " \t\r,";
  for (unsigned int i = 0; separators[i]; ++i)
    if (separators[i] == c)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<SLOW_IsSeparator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2f08(%rip),%rax
mov    -0xc(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     115e <SLOW_IsSeparator+0x5e>
mov    0x2ef4(%rip),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    114b <SLOW_IsSeparator+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1165 <SLOW_IsSeparator+0x65>
jmp    1150 <SLOW_IsSeparator+0x50>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <SLOW_IsSeparator+0x11>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SLOW_IsSeparator>:
cmp    $0x2c,%dil
ja     1120 <SLOW_IsSeparator+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100100002200,%rdx
bt     %rcx,%rdx
jae    1120 <SLOW_IsSeparator+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@SLOW_IsSeparator.separators = internal global i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0)
@.str = [5 x i8] c" \09\0D,\00"
define i32 @SLOW_IsSeparator(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 0, i32* %4
br label %5
5: ; preds = %24, %1
%6 = load i8*, i8** @SLOW_IsSeparator.separators
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %27
12: ; preds = %5
%13 = load i8*, i8** @SLOW_IsSeparator.separators
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %18, %20
br i1 %21, label %22, label %23
22: ; preds = %12
store i32 1, i32* %2
br label %28
23: ; preds = %12
br label %24
24: ; preds = %23
%25 = load i32, i32* %4
%26 = add i32 %25, 1
store i32 %26, i32* %4
br label %5
27: ; preds = %5
store i32 0, i32* %2
br label %28
28: ; preds = %27, %22
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @SLOW_IsSeparator(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 9, label %3
i8 13, label %3
i8 44, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %2
%4 = phi i32 [ 1, %1 ], [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ast_unregister_file_version(char *);
void __attribute__((destructor)) __unregister_file_version(void) {
  ast_unregister_file_version(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/"
      "master/alaw.c");
}


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

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

LLVM IR (-O0):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/alaw.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__unregister_file_version, i8* null }]
define void @__unregister_file_version() {
%1 = call i32 @ast_unregister_file_version(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/alaw.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__unregister_file_version, i8* null }]
define void @__unregister_file_version() {
%1 = tail call i32 @ast_unregister_file_version(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
ret void
}
long long sll_sll_test(long long data) {
  printf("Entered %s:\n", __FUNCTION__);
  printf("Data In: %lld\n", data);
  printf("Exited  %s:\n", __FUNCTION__);
  return data;
}


x86 assembly (clang, -O0):
<sll_sll_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    0xebc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sll_sll_test>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rdi
lea    0xee8(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Entered %s:\0A\00"
@__FUNCTION__.sll_sll_test = [13 x i8] c"sll_sll_test\00"
@.str.1 = [15 x i8] c"Data In: %lld\0A\00"
@.str.2 = [13 x i8] c"Exited %s:\0A\00"
define i64 @sll_sll_test(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.sll_sll_test, i64 0, i64 0))
%4 = load i64, i64* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.sll_sll_test, i64 0, i64 0))
%7 = load i64, i64* %2
ret i64 %7
}

LLVM IR (-O2):
@.str = [13 x i8] c"Entered %s:\0A\00"
@__FUNCTION__.sll_sll_test = [13 x i8] c"sll_sll_test\00"
@.str.1 = [15 x i8] c"Data In: %lld\0A\00"
@.str.2 = [13 x i8] c"Exited %s:\0A\00"
define i64 @sll_sll_test(i64 returned %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.sll_sll_test, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i64 %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.sll_sll_test, i64 0, i64 0))
ret i64 %0
}
int f(a, b)
char *a;
char *b;
{
  (void)a;
  (void)b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ passem(int, int, int, int *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[], char *envp[]) {
  int local0;
  passem(5, 10, 40, &local0);
  printf("Fifty five is %d\n", local0);
  return 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    %rdx,-0x18(%rbp)
mov    $0x5,%edi
mov    $0xa,%esi
mov    $0x28,%edx
lea    -0x1c(%rbp),%rcx
call   1040 <passem@plt>
mov    -0x1c(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rcx
mov    $0x5,%edi
mov    $0xa,%esi
mov    $0x28,%edx
call   1040 <passem@plt>
mov    0x4(%rsp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Fifty five is %d\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%9 = call i32 @passem(i32 5, i32 10, i32 40, i32* %8)
%10 = load i32, i32* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Fifty five is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @passem(i32 5, i32 10, i32 40, i32* %4)
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
void ptrace_disable(struct task_struct *child) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
define void @ptrace_disable(%struct.task_struct* nocapture %0) {
ret void
}
signed int readjpeg(char *name, signed int *xres, signed int *yres,
                    unsigned char **imgdata) {
  return 2;
}


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

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

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

LLVM IR (-O2):
define i32 @readjpeg(i8* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2, i8** nocapture readnone %3) {
ret i32 2
}
/* Variables and functions */
int _getline(char *, int);
int /*<<< orphan*/ entab(char *, int, int);
int main() {
  int length, tabwidth;
  tabwidth = 4;
  char line[1000];
  while ((length = _getline(line, 1000)) > 0) {
    entab(line, tabwidth, length);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <_getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    116d <main+0x4d>
lea    -0x400(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1040 <entab@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1030 <_getline@plt>
test   %eax,%eax
jle    1160 <main+0x40>
mov    %rsp,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %eax,%edx
call   1040 <entab@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <_getline@plt>
test   %eax,%eax
jg     1140 <main+0x20>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1000 x i8]
store i32 0, i32* %1
store i32 4, i32* %3
br label %5
5: ; preds = %9, %0
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%7 = call i32 @_getline(i8* %6, i32 1000)
store i32 %7, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = call i32 @entab(i8* %10, i32 %11, i32 %12)
br label %5
14: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @_getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = phi i32 [ %8, %5 ], [ %3, %0 ]
%7 = call i32 @entab(i8* %2, i32 4, i32 %6)
%8 = call i32 @_getline(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
void RTAvloHCPhysDoWithAll(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvloHCPhysDoWithAll() {
ret void
}
void init_sub_pixel_pt_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_sub_pixel_pt_funcs_c() {
ret void
}
int is_space(char c) {
  if (c == ' ')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1123 <is_space+0x23>
movl   $0x1,-0x4(%rbp)
jmp    112a <is_space+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
xor    %eax,%eax
cmp    $0x20,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
double const fabs(double const);
int coco_doubles_almost_equal(const double a, const double b,
                              const double accuracy) {
  return ((fabs(a - b) < accuracy) == 0);
}


x86 assembly (clang, -O0):
<coco_doubles_almost_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coco_doubles_almost_equal>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm2
setbe  %al
ret

LLVM IR (-O0):
define i32 @coco_doubles_almost_equal(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
%10 = call double @fabs(double %9)
%11 = load double, double* %6
%12 = fcmp olt double %10, %11
%13 = zext i1 %12 to i32
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @coco_doubles_almost_equal(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fcmp uge double %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int get_bit(const uint8_t *table, int x, int y) {
  return !!(table[y] & (1 << (x)));
}


x86 assembly (clang, -O0):
<get_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit>:
mov    %esi,%ecx
movslq %edx,%rax
mov    (%rdi,%rax,4),%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_bit(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = load i32, i32* %5
%13 = shl i32 1, %12
%14 = and i32 %11, %13
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @get_bit(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = lshr i32 %6, %1
%8 = and i32 %7, 1
ret i32 %8
}
void XkbFreeGeomKeyAliases() {}


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

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

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

LLVM IR (-O2):
define void @XkbFreeGeomKeyAliases() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OpcodeNotDone();
void ldsf(void) { OpcodeNotDone(); }


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

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

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

LLVM IR (-O2):
define void @ldsf() {
%1 = tail call i32 (...) @OpcodeNotDone()
ret void
}
/* Variables and functions */
size_t fread(void *, int, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
size_t up_hostread(void *buffer, size_t len) {
  return fread(buffer, 1, len, stdin);
}


x86 assembly (clang, -O0):
<up_hostread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    0x2eb9(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1030 <fread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<up_hostread>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
jmp    1030 <fread@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i64 @up_hostread(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 = load i64, i64* %4
%7 = load i32, i32* @stdin
%8 = call i64 @fread(i8* %5, i32 1, i64 %6, i32 %7)
ret i64 %8
}

LLVM IR (-O2):
@stdin = global i32 0
define i64 @up_hostread(i8* %0, i64 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i64 @fread(i8* %0, i32 1, i64 %1, i32 %3)
ret i64 %4
}
int Sequential_Search(int *a, int n, int key) {
  int i;
  for (i = 1; i <= n; i++) {
    if (a[i] == key)
      return i;
    else
      return 0;
  }
}


x86 assembly (clang, -O0):
<Sequential_Search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1147 <Sequential_Search+0x47>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1140 <Sequential_Search+0x40>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <Sequential_Search+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sequential_Search>:
test   %esi,%esi
jle    110d <Sequential_Search+0xd>
xor    %eax,%eax
cmp    %edx,0x4(%rdi)
sete   %al
ret
ret

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

LLVM IR (-O2):
define i32 @Sequential_Search(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %10
5: ; preds = %3
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = icmp eq i32 %7, %2
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %3, %5
%11 = phi i32 [ %9, %5 ], [ undef, %3 ]
ret i32 %11
}