xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ check(void *, int, char *, char const *, char const *);
void __is_equal(void *context, const char *desc1, const void *subject1,
                const char *desc2, const void *subject2) {
  check(context, subject1 != subject2, "%s does not equal %s", desc1, desc2);
}


x86 assembly (clang, -O0):
<__is_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
cmp    -0x28(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xeb1(%rip),%rdx
call   1030 <check@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__is_equal>:
mov    %rcx,%rax
mov    %rsi,%rcx
xor    %esi,%esi
cmp    %r8,%rdx
setne  %sil
lea    0xeda(%rip),%rdx
mov    %rax,%r8
jmp    1030 <check@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%s does not equal %s\00"
define void @__is_equal(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %8
%13 = load i8*, i8** %10
%14 = icmp ne i8* %12, %13
%15 = zext i1 %14 to i32
%16 = load i8*, i8** %7
%17 = load i8*, i8** %9
%18 = call i32 @check(i8* %11, i32 %15, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s does not equal %s\00"
define void @__is_equal(i8* %0, i8* %1, i8* readnone %2, i8* %3, i8* readnone %4) {
%6 = icmp ne i8* %2, %4
%7 = zext i1 %6 to i32
%8 = tail call i32 @check(i8* %0, i32 %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %3)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_copy_into_quaddobl_systems_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(473, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_copy_into_quaddobl_systems_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1d9,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_copy_into_quaddobl_systems_container>:
mov    $0x1d9,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @celcon_copy_into_quaddobl_systems_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 473, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_copy_into_quaddobl_systems_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 473, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ show_detail_info();
int /*<<< orphan*/ show_top_data();
void dbg_show_all(void) {
  show_top_data();
  show_detail_info();
}


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

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

LLVM IR (-O0):
define void @dbg_show_all() {
%1 = call i32 (...) @show_top_data()
%2 = call i32 (...) @show_detail_info()
ret void
}

LLVM IR (-O2):
define void @dbg_show_all() {
%1 = tail call i32 (...) @show_top_data()
%2 = tail call i32 (...) @show_detail_info()
ret void
}
void CRYPTO_new_ex_data(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_new_ex_data() {
ret void
}
int abs(int x) {
  if (x < 0) {
    return x;
  } else {
    return (0 - x);
  }
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111c <abs+0x1c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 false)
%3 = sub i32 0, %2
ret i32 %3
}
/* Variables and functions */
unsigned int catDictGenHashFunction(void const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(void const *);
unsigned int _dictStringCopyHTHashFunction(const void *key) {
  return catDictGenHashFunction(key, strlen(key));
}


x86 assembly (clang, -O0):
<_dictStringCopyHTHashFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <catDictGenHashFunction@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dictStringCopyHTHashFunction>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <catDictGenHashFunction@plt>

LLVM IR (-O0):
define i32 @_dictStringCopyHTHashFunction(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @catDictGenHashFunction(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @_dictStringCopyHTHashFunction(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @catDictGenHashFunction(i8* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ output(int, int);
void left_forward() {
  output(4, 1);
  output(18, 0);
}


x86 assembly (clang, -O0):
<left_forward>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <output@plt>
mov    $0x12,%edi
xor    %esi,%esi
call   1030 <output@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<left_forward>:
push   %rax
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <output@plt>
mov    $0x12,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <output@plt>

LLVM IR (-O0):
define void @left_forward() {
%1 = call i32 @output(i32 4, i32 1)
%2 = call i32 @output(i32 18, i32 0)
ret void
}

LLVM IR (-O2):
define void @left_forward() {
%1 = tail call i32 @output(i32 4, i32 1)
%2 = tail call i32 @output(i32 18, i32 0)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int random();
int64_t random64(void) { return ((int64_t)random()) << 31 | random(); }


x86 assembly (clang, -O0):
<random64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
shl    $0x1f,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random64>:
push   %rbx
xor    %eax,%eax
call   1030 <random@plt>
mov    %eax,%ebx
shl    $0x1f,%ebx
xor    %eax,%eax
call   1030 <random@plt>
or     %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random64() {
%1 = call i32 (...) @random()
%2 = shl i32 %1, 31
%3 = call i32 (...) @random()
%4 = or i32 %2, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @random64() {
%1 = tail call i32 (...) @random()
%2 = shl i32 %1, 31
%3 = tail call i32 (...) @random()
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hi");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"Hi\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void AONIOCFreezeEnable(void) {
  (*((volatile unsigned long *)(0x40094000 + 0x0000000C))) = 0x0;
}


x86 assembly (clang, -O0):
<AONIOCFreezeEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4009400c,%eax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AONIOCFreezeEnable>:
movq   $0x0,0x4009400c
ret

LLVM IR (-O0):
define void @AONIOCFreezeEnable() {
store volatile i64 0, i64* inttoptr (i64 1074348044 to i64*)
ret void
}

LLVM IR (-O2):
define void @AONIOCFreezeEnable() {
store volatile i64 0, i64* inttoptr (i64 1074348044 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void os_close_file(int fd) { close(fd); }


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

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

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

LLVM IR (-O2):
define void @os_close_file(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
void ff_hevc_put_hevc_uni_w_epel_hv6_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_hv6_10_sse4() {
ret void
}
void foo_1_2_2_1_1_1_2_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_1_1_2_1_2() {
ret void
}
int Prec(char ch) {
  switch (ch) {
  case '+':
  case '-':
    return 1;
  case '*':
  case '/':
    return 2;
  case '^':
    return 3;
  }
  return -1;
}


x86 assembly (clang, -O0):
<Prec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2a,%eax
je     116f <Prec+0x6f>
jmp    111f <Prec+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2b,%eax
je     1163 <Prec+0x63>
jmp    1130 <Prec+0x30>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     1163 <Prec+0x63>
jmp    1141 <Prec+0x41>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     116f <Prec+0x6f>
jmp    1152 <Prec+0x52>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
je     117b <Prec+0x7b>
jmp    1187 <Prec+0x87>
movl   $0x1,-0x4(%rbp)
jmp    118e <Prec+0x8e>
movl   $0x2,-0x4(%rbp)
jmp    118e <Prec+0x8e>
movl   $0x3,-0x4(%rbp)
jmp    118e <Prec+0x8e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Prec>:
lea    -0x2a(%rdi),%ecx
cmp    $0x5,%ecx
ja     1123 <Prec+0x23>
mov    $0x1,%eax
lea    0xeec(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x2,%eax
ret
cmp    $0x5e,%edi
jne    112e <Prec+0x2e>
mov    $0x3,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @Prec(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
switch i32 %5, label %9 [
i32 43, label %6
i32 45, label %6
i32 42, label %7
i32 47, label %7
i32 94, label %8
]
6: ; preds = %1, %1
store i32 1, i32* %2
br label %10
7: ; preds = %1, %1
store i32 2, i32* %2
br label %10
8: ; preds = %1
store i32 3, i32* %2
br label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @Prec(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 43, label %6
i32 45, label %6
i32 42, label %3
i32 47, label %3
i32 94, label %4
]
3: ; preds = %1, %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %1, %5, %4, %3
%7 = phi i32 [ -1, %5 ], [ 3, %4 ], [ 2, %3 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %7
}
void vzero(double *v) {
  v[0] = 0.0;
  v[1] = 0.0;
  v[2] = 0.0;
}


x86 assembly (clang, -O0):
<vzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vzero>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
movq   $0x0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @vzero(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
store double 0.000000e+00, double* %4
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 1
store double 0.000000e+00, double* %6
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 2
store double 0.000000e+00, double* %8
ret void
}

LLVM IR (-O2):
define void @vzero(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float divisaoA(float x, float y) {
  float divisao = 0;
  divisao = x / y;
  printf("%2.f\n", divisao);
  return divisao;
}


x86 assembly (clang, -O0):
<divisaoA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divisaoA>:
push   %rax
divss  %xmm1,%xmm0
movss  %xmm0,0x4(%rsp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%2.f\0A\00"
define float @divisaoA(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
store float 0.000000e+00, float* %5
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fdiv float %6, %7
store float %8, float* %5
%9 = load float, float* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %9)
%11 = load float, float* %5
ret float %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"%2.f\0A\00"
define float @divisaoA(float %0, float %1) {
%3 = fdiv float %0, %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %3)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int __afl_persistent_loop(unsigned int max_cnt) {
  printf("peristent loop\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"peristent loop\0A\00"
define i32 @__afl_persistent_loop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"peristent loop\00"
define i32 @__afl_persistent_loop(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *paged_mem_pool_new_128b(size_t, int);
void *virtual_machine_resource_pool_page_128b_init(size_t size) {
  return paged_mem_pool_new_128b(size, 1);
}


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

x86 assembly (clang, -O2):
<virtual_machine_resource_pool_page_128b_init>:
mov    $0x1,%esi
jmp    1030 <paged_mem_pool_new_128b@plt>

LLVM IR (-O0):
define i8* @virtual_machine_resource_pool_page_128b_init(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @paged_mem_pool_new_128b(i64 %3, i32 1)
ret i8* %4
}

LLVM IR (-O2):
define i8* @virtual_machine_resource_pool_page_128b_init(i64 %0) {
%2 = tail call i8* @paged_mem_pool_new_128b(i64 %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ engine_exit();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void engine_safe_exit(int sig) {
  engine_exit();
  fprintf(stderr,
          "Interrupted (signal %d).\n"
          "Bad game, no donut for you!\n",
          sig);
  _exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<engine_safe_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <engine_exit@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xeab(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<engine_safe_exit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <engine_exit@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
mov    %ebx,%edx
call   1050 <fprintf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [54 x i8] c"Interrupted (signal %d).\0ABad game, no donut for you!\0A\00"
@EXIT_FAILURE = global i32 0
define void @engine_safe_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @engine_exit()
%4 = load i32, i32* @stderr
%5 = load i32, i32* %2
%6 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @_exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [54 x i8] c"Interrupted (signal %d).\0ABad game, no donut for you!\0A\00"
@EXIT_FAILURE = global i32 0
define void @engine_safe_exit(i32 %0) {
%2 = tail call i32 (...) @engine_exit()
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @_exit(i32 %5)
unreachable
}
/* Type definitions */
struct node {
  int dummy;
};
struct generator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ write_check_limit(struct generator *, struct node *);
int /*<<< orphan*/ write_comment(struct generator *, struct node *);
int /*<<< orphan*/ write_inc_cursor(struct generator *, struct node *);
void generate_next(struct generator *g, struct node *p) {
  write_comment(g, p);
  write_check_limit(g, p);
  write_inc_cursor(g, p);
}


x86 assembly (clang, -O0):
<generate_next>:
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   1050 <write_comment@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <write_check_limit@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <write_inc_cursor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_next>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <write_comment@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <write_check_limit@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <write_inc_cursor@plt>

LLVM IR (-O0):
%struct.generator = type { i32 }
%struct.node = type { i32 }
define void @generate_next(%struct.generator* %0, %struct.node* %1) {
%3 = alloca %struct.generator*
%4 = alloca %struct.node*
store %struct.generator* %0, %struct.generator** %3
store %struct.node* %1, %struct.node** %4
%5 = load %struct.generator*, %struct.generator** %3
%6 = load %struct.node*, %struct.node** %4
%7 = call i32 @write_comment(%struct.generator* %5, %struct.node* %6)
%8 = load %struct.generator*, %struct.generator** %3
%9 = load %struct.node*, %struct.node** %4
%10 = call i32 @write_check_limit(%struct.generator* %8, %struct.node* %9)
%11 = load %struct.generator*, %struct.generator** %3
%12 = load %struct.node*, %struct.node** %4
%13 = call i32 @write_inc_cursor(%struct.generator* %11, %struct.node* %12)
ret void
}

LLVM IR (-O2):
%struct.generator = type { i32 }
%struct.node = type { i32 }
define void @generate_next(%struct.generator* %0, %struct.node* %1) {
%3 = tail call i32 @write_comment(%struct.generator* %0, %struct.node* %1)
%4 = tail call i32 @write_check_limit(%struct.generator* %0, %struct.node* %1)
%5 = tail call i32 @write_inc_cursor(%struct.generator* %0, %struct.node* %1)
ret void
}
int fibonacci(int n) {
  if (n <= 1)
    return (1);
  return (fibonacci(n - 1) + fibonacci(n - 2));
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1131 <fibonacci+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fibonacci+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1145 <fibonacci+0x35>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fibonacci@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x3,%ebx
ja     1130 <fibonacci+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacci(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
char multiply(char a, char b) { return a * b; }


x86 assembly (clang, -O0):
<multiply>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
imul   %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply>:
mov    %esi,%eax
mul    %dil
ret

LLVM IR (-O0):
define signext i8 @multiply(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = load i8, i8* %4
%8 = sext i8 %7 to i32
%9 = mul nsw i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @multiply(i8 signext %0, i8 signext %1) {
%3 = mul i8 %1, %0
ret i8 %3
}
/* Variables and functions */
unsigned int hash_str(char const *, int /*<<< orphan*/, int);
unsigned int hash_knr2(const char *s) { return hash_str(s, 0, 31); }


x86 assembly (clang, -O0):
<hash_knr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x1f,%edx
call   1030 <hash_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_knr2>:
xor    %esi,%esi
mov    $0x1f,%edx
jmp    1030 <hash_str@plt>

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

LLVM IR (-O2):
define i32 @hash_knr2(i8* %0) {
%2 = tail call i32 @hash_str(i8* %0, i32 0, i32 31)
ret i32 %2
}
unsigned xrop3_235_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk2 = ~stk2;
  stk1 = D | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_235_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_235_0_0>:
mov    %edi,%eax
xor    %esi,%eax
shl    $0x8,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @xrop3_235_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_235_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, %0
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = xor i32 %5, -1
ret i32 %6
}
void rop3_65_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T ^ S;
  stk1 = *D | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_65_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_65_1_0>:
mov    (%rdi),%al
or     %esi,%edx
or     %al,%dl
not    %dl
and    %al,%sil
or     %dl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_65_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = xor i32 %23, -1
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = load i8, i8* %5
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = trunc i32 %38 to i8
%40 = load i8*, i8** %4
store i8 %39, i8* %40
ret void
}

LLVM IR (-O2):
define void @rop3_65_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = or i8 %5, %4
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(stderr,
          "usage: %s <target> <bcast file> "
          "<num packets> <packet delay> <packet size>\n\n"
          "target        = address to hit\n"
          "bcast file    = file to read broadcast addresses from\n"
          "num packets   = number of packets to send (0 = flood)\n"
          "packet delay  = wait between each packet (in ms)\n"
          "packet size   = size of packet (< 1024)\n\n",
          prog);
  exit(-1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [306 x i8] c"usage: %s <target> <bcast file> <num packets> <packet delay> <packet size>\0A\0Atarget = address to hit\0Abcast file = file to read broadcast addresses from\0Anum packets = number of packets to send (0 = flood)\0Apacket delay = wait between each packet (in ms)\0Apacket size = size of packet (< 1024)\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([306 x i8], [306 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [306 x i8] c"usage: %s <target> <bcast file> <num packets> <packet delay> <packet size>\0A\0Atarget = address to hit\0Abcast file = file to read broadcast addresses from\0Anum packets = number of packets to send (0 = flood)\0Apacket delay = wait between each packet (in ms)\0Apacket size = size of packet (< 1024)\0A\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([306 x i8], [306 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void help() {
  printf("p-optimal filter to subopt output. usage:\n"
         "RNAsubopt -s < seq | popt \n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@.str = [70 x i8] c"p-optimal filter to subopt output. usage:\0ARNAsubopt -s < seq | popt \0A\00"
@EXIT_FAILURE = global i32 0
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [69 x i8] c"p-optimal filter to subopt output. usage:\0ARNAsubopt -s < seq | popt \00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t swap16(uint16_t value) { return (value >> 8) | (value << 8); }


x86 assembly (clang, -O0):
<swap16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap16>:
mov    %edi,%eax
sar    $0x8,%eax
shl    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @swap16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @swap16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_number_of_multprec_Laurentials(int *length) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc(572, length, b, c);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @syscon_number_of_multprec_Laurentials(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 572, i32* %0, i32* undef, double* undef)
ret i32 %2
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, int);
main() { printf("(getchar() != EOF) = %d\n", getchar() != EOF); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%rax
setne  %sil
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"(getchar() != EOF) = %d\0A\00"
@EOF = global i64 0
define i32 @main() {
%1 = call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"(getchar() != EOF) = %d\0A\00"
@EOF = global i64 0
define i32 @main() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp ne i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void GPIOPortA_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortA_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortA_Handler+0x9>
jmp    1109 <GPIOPortA_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortA_Handler>:
jmp    1100 <GPIOPortA_Handler>

LLVM IR (-O0):
define void @GPIOPortA_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortA_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
int main() { fprintf(stdout, "asdf %d\n", 3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x3,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [9 x i8] c"asdf %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c"asdf %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void _Q_feq(void) {
  printf("Unimplemented %s called, exiting\n", "_Q_feq");
  exit(-1);
}


x86 assembly (clang, -O0):
<_Q_feq>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xef0(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_Q_feq>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef3(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [7 x i8] c"_Q_feq\00"
define void @_Q_feq() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [7 x i8] c"_Q_feq\00"
define void @_Q_feq() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
void foo749() {}


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

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

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

LLVM IR (-O2):
define void @foo749() {
ret void
}
/* Variables and functions */
int PAPI_enum_event(int *, int);
void PAPIF_ENUM_EVENT(int *EventCode, int *modifier, int *check) {
  *check = PAPI_enum_event(EventCode, *modifier);
}


x86 assembly (clang, -O0):
<PAPIF_ENUM_EVENT>:
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),%rax
mov    (%rax),%esi
call   1030 <PAPI_enum_event@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_ENUM_EVENT>:
push   %rbx
mov    %rdx,%rbx
mov    (%rsi),%esi
call   1030 <PAPI_enum_event@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_ENUM_EVENT(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** %5
%9 = load i32, i32* %8
%10 = call i32 @PAPI_enum_event(i32* %7, i32 %9)
%11 = load i32*, i32** %6
store i32 %10, i32* %11
ret void
}

LLVM IR (-O2):
define void @PAPIF_ENUM_EVENT(i32* %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %1
%5 = tail call i32 @PAPI_enum_event(i32* %0, i32 %4)
store i32 %5, i32* %2
ret void
}
void UI_FontsMenu_Cache(void) { ; }


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

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

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

LLVM IR (-O2):
define void @UI_FontsMenu_Cache() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x6a() {
  Assert_real((isxdigit(106) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              535, ("isxdigit should be 0 for j"));
}


x86 assembly (clang, -O0):
<t_isxdigit_0x6a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6a,%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x217,%edx
lea    0xf5c(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isxdigit_0x6a>:
push   %rax
mov    $0x6a,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x217,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for j\00"
define void @t_isxdigit_0x6a() {
%1 = call i64 @isxdigit(i32 106)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 535, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for j\00"
define void @t_isxdigit_0x6a() {
%1 = tail call i64 @isxdigit(i32 106)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 535, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int potencia(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int exponente, producto;
  printf("\nIngrese el exponente de 2: ");
  scanf("%d", &exponente);
  producto = potencia(2, exponente);
  printf("\n2^%d es %d\n\n", exponente, producto);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    $0x2,%edi
call   1050 <potencia@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    $0x2,%edi
call   1050 <potencia@plt>
mov    0x4(%rsp),%esi
lea    0xeb7(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"\0AIngrese el exponente de 2: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"\0A2^%d es %d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @potencia(i32 2, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"\0AIngrese el exponente de 2: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"\0A2^%d es %d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @potencia(i32 2, i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ stub(int, char *, char *, char *, int /*<<< orphan*/);
int main() {
  stub(1, "ab", "bc", "cx", 0);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
lea    0xec1(%rip),%rdx
lea    0xebd(%rip),%rcx
xor    %r8d,%r8d
call   1030 <stub@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rsi
lea    0xed4(%rip),%rdx
lea    0xed0(%rip),%rcx
mov    $0x1,%edi
xor    %r8d,%r8d
call   1030 <stub@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"ab\00"
@.str.1 = [3 x i8] c"bc\00"
@.str.2 = [3 x i8] c"cx\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @stub(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 0)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"ab\00"
@.str.1 = [3 x i8] c"bc\00"
@.str.2 = [3 x i8] c"cx\00"
define i32 @main() {
%1 = tail call i32 @stub(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 0)
%2 = tail call i32 @exit(i32 0)
unreachable
}