xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _response(char const *);
void _stat_fail_550(void) {
  const char msg[] = "550 Requested action not taken. File unavailable.\r\n";
  _response(msg);
}


x86 assembly (clang, -O0):
<_stat_fail_550>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x34,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
call   1030 <_response@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_stat_fail_550>:
sub    $0x38,%rsp
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xa0d2e,0x30(%rsp)
mov    %rsp,%rdi
call   1030 <_response@plt>
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const._stat_fail_550.msg = [52 x i8] c"550 Requested action not taken. File unavailable.\0D\0A\00"
define void @_stat_fail_550() {
%1 = alloca [52 x i8]
%2 = bitcast [52 x i8]* %1 to i8*
%3 = getelementptr inbounds [52 x i8], [52 x i8]* %1, i64 0, i64 0
%4 = call i32 @_response(i8* %3)
ret void
}

LLVM IR (-O2):
@__const._stat_fail_550.msg = [52 x i8] c"550 Requested action not taken. File unavailable.\0D\0A\00"
define void @_stat_fail_550() {
%1 = alloca [52 x i8]
%2 = getelementptr inbounds [52 x i8], [52 x i8]* %1, i64 0, i64 0
%3 = call i32 @_response(i8* %2)
ret void
}
/* Variables and functions */
int heap_get_ncpus();
unsigned heap_get_ncaches(void) { return 2 * heap_get_ncpus(); }


x86 assembly (clang, -O0):
<heap_get_ncaches>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <heap_get_ncpus@plt>
shl    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @heap_get_ncaches() {
%1 = call i32 (...) @heap_get_ncpus()
%2 = mul nsw i32 2, %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @heap_get_ncaches() {
%1 = tail call i32 (...) @heap_get_ncpus()
%2 = shl nsw i32 %1, 1
ret i32 %2
}
/* Variables and functions */
void *a14(int);
void *a13(int x) { return (((x >> 13) & 1) ? a14(x) : a14(x)); }


x86 assembly (clang, -O0):
<a13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xd,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113e <a13+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <a14@plt>
mov    %rax,-0x10(%rbp)
jmp    114a <a13+0x3a>
mov    -0x4(%rbp),%edi
call   1030 <a14@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a13>:
jmp    1030 <a14@plt>

LLVM IR (-O0):
define i8* @a13(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 13
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i8* @a14(i32 %8)
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i8* @a14(i32 %11)
br label %13
13: ; preds = %10, %7
%14 = phi i8* [ %9, %7 ], [ %12, %10 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @a13(i32 %0) {
%2 = tail call i8* @a14(i32 %0)
ret i8* %2
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ _q_countread(char const *);
double difftime(scalar_t__, scalar_t__);
scalar_t__ time(int /*<<< orphan*/ *);
int _is_valid_session(const char *filepath) {
  time_t timeout, timenow;
  double timediff;
  if ((timeout = (time_t)_q_countread(filepath)) == 0)
    return 0;
  timenow = time(NULL);
  timediff = difftime(timeout, timenow);
  if (timediff >= 0)
    return 1;
  return -1;
}


x86 assembly (clang, -O0):
<_is_valid_session>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <_q_countread@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    115f <_is_valid_session+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    11a3 <_is_valid_session+0x73>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <difftime@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     119c <_is_valid_session+0x6c>
movl   $0x1,-0x4(%rbp)
jmp    11a3 <_is_valid_session+0x73>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_valid_session>:
push   %rbx
call   1040 <_q_countread@plt>
test   %rax,%rax
je     1164 <_is_valid_session+0x34>
mov    %rax,%rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <difftime@plt>
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setae  %al
add    %eax,%eax
add    $0xffffffff,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @_is_valid_session(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca double
store i8* %0, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @_q_countread(i8* %7)
store i64 %8, i64* %4
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %20
11: ; preds = %1
%12 = call i64 @time(i32* null)
store i64 %12, i64* %5
%13 = load i64, i64* %4
%14 = load i64, i64* %5
%15 = call double @difftime(i64 %13, i64 %14)
store double %15, double* %6
%16 = load double, double* %6
%17 = fcmp oge double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %11
store i32 1, i32* %2
br label %20
19: ; preds = %11
store i32 -1, i32* %2
br label %20
20: ; preds = %19, %18, %10
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @_is_valid_session(i8* %0) {
%2 = tail call i64 @_q_countread(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @time(i32* null)
%6 = tail call double @difftime(i64 %2, i64 %5)
%7 = fcmp ult double %6, 0.000000e+00
%8 = select i1 %7, i32 -1, i32 1
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %10
}
void swap(int *first, int *second) {
  int container;
  container = *first;
  *first = *second;
  *second = container;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Clean_Up();
int /*<<< orphan*/ Setup_Grid();
int /*<<< orphan*/ Solve();
int /*<<< orphan*/ Write_Grid();
int /*<<< orphan*/ print_timer();
int /*<<< orphan*/ start_timer();
int main(int argc, char **argv) {
  start_timer();
  Setup_Grid();
  Solve();
  Write_Grid();
  print_timer();
  Clean_Up();
  return 0;
}


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   1070 <start_timer@plt>
mov    $0x0,%al
call   1050 <Setup_Grid@plt>
mov    $0x0,%al
call   1080 <Solve@plt>
mov    $0x0,%al
call   1060 <Write_Grid@plt>
mov    $0x0,%al
call   1030 <print_timer@plt>
mov    $0x0,%al
call   1040 <Clean_Up@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <start_timer@plt>
xor    %eax,%eax
call   1050 <Setup_Grid@plt>
xor    %eax,%eax
call   1080 <Solve@plt>
xor    %eax,%eax
call   1060 <Write_Grid@plt>
xor    %eax,%eax
call   1030 <print_timer@plt>
xor    %eax,%eax
call   1040 <Clean_Up@plt>
xor    %eax,%eax
pop    %rcx
ret

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 i32 (...) @start_timer()
%7 = call i32 (...) @Setup_Grid()
%8 = call i32 (...) @Solve()
%9 = call i32 (...) @Write_Grid()
%10 = call i32 (...) @print_timer()
%11 = call i32 (...) @Clean_Up()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @start_timer()
%4 = tail call i32 (...) @Setup_Grid()
%5 = tail call i32 (...) @Solve()
%6 = tail call i32 (...) @Write_Grid()
%7 = tail call i32 (...) @print_timer()
%8 = tail call i32 (...) @Clean_Up()
ret i32 0
}
/* Variables and functions */
float pow(float, int);
float quintic_out(float step, float max_steps, float max_val) {
  float ratio = (step / max_steps) - 1.0;
  return max_val + max_val * pow(ratio, 5);
}


x86 assembly (clang, -O0):
<quintic_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec3(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x5,%edi
call   1030 <pow@plt>
movss  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quintic_out>:
push   %rax
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm0
addss  0xedd(%rip),%xmm0
mov    $0x5,%edi
call   1030 <pow@plt>
movss  0x4(%rsp),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @quintic_out(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fdiv float %8, %9
%11 = fpext float %10 to double
%12 = fsub double %11, 1.000000e+00
%13 = fptrunc double %12 to float
store float %13, float* %7
%14 = load float, float* %6
%15 = load float, float* %6
%16 = load float, float* %7
%17 = call float @pow(float %16, i32 5)
%18 = call float @llvm.fmuladd.f32(float %15, float %17, float %14)
ret float %18
}

LLVM IR (-O2):
define float @quintic_out(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = fadd float %4, -1.000000e+00
%6 = tail call float @pow(float %5, i32 5)
%7 = tail call float @llvm.fmuladd.f32(float %2, float %6, float %2)
ret float %7
}
/* Type definitions */
struct bplus_tree {
  int dummy;
};
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
long bplus_tree_search(struct bplus_tree *, int /*<<< orphan*/);
long bplus_tree_get(struct bplus_tree *tree, key_t key) {
  return bplus_tree_search(tree, key);
}


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

x86 assembly (clang, -O2):
<bplus_tree_get>:
jmp    1030 <bplus_tree_search@plt>

LLVM IR (-O0):
%struct.bplus_tree = type { i32 }
define i64 @bplus_tree_get(%struct.bplus_tree* %0, i32 %1) {
%3 = alloca %struct.bplus_tree*
%4 = alloca i32
store %struct.bplus_tree* %0, %struct.bplus_tree** %3
store i32 %1, i32* %4
%5 = load %struct.bplus_tree*, %struct.bplus_tree** %3
%6 = load i32, i32* %4
%7 = call i64 @bplus_tree_search(%struct.bplus_tree* %5, i32 %6)
ret i64 %7
}

LLVM IR (-O2):
%struct.bplus_tree = type { i32 }
define i64 @bplus_tree_get(%struct.bplus_tree* %0, i32 %1) {
%3 = tail call i64 @bplus_tree_search(%struct.bplus_tree* %0, i32 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x[4];
  int *num;
  num = x;
  int i = 0;
  while (i++ < 4) {
    printf("%d\n", *num);
    num++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2c(%rbp)
cmp    $0x4,%eax
jge    1165 <main+0x55>
mov    -0x28(%rbp),%rax
mov    (%rax),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
jmp    112e <main+0x1e>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ basic_test(int);
int /*<<< orphan*/ cleanup_test();
int /*<<< orphan*/ init_test();
int log_read_end(int);
void read_two_pages_end(void) {
  ssize_t n;
  init_test();
  n = log_read_end(8192);
  basic_test(n == 8192);
  cleanup_test();
}


x86 assembly (clang, -O0):
<read_two_pages_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <init_test@plt>
mov    $0x2000,%edi
call   1040 <log_read_end@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x2000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <basic_test@plt>
mov    $0x0,%al
call   1050 <cleanup_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_two_pages_end>:
push   %rax
xor    %eax,%eax
call   1060 <init_test@plt>
mov    $0x2000,%edi
call   1040 <log_read_end@plt>
xor    %edi,%edi
cmp    $0x2000,%eax
sete   %dil
call   1030 <basic_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <cleanup_test@plt>

LLVM IR (-O0):
define void @read_two_pages_end() {
%1 = alloca i32
%2 = call i32 (...) @init_test()
%3 = call i32 @log_read_end(i32 8192)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 8192
%6 = zext i1 %5 to i32
%7 = call i32 @basic_test(i32 %6)
%8 = call i32 (...) @cleanup_test()
ret void
}

LLVM IR (-O2):
define void @read_two_pages_end() {
%1 = tail call i32 (...) @init_test()
%2 = tail call i32 @log_read_end(i32 8192)
%3 = icmp eq i32 %2, 8192
%4 = zext i1 %3 to i32
%5 = tail call i32 @basic_test(i32 %4)
%6 = tail call i32 (...) @cleanup_test()
ret void
}
double dBbp3a(double x) { return -0.5 + x / 6.0 * (1.0 - x * x / 30.0); }


x86 assembly (clang, -O0):
<dBbp3a>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf02(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  -0x8(%rbp),%xmm2
movsd  0xee4(%rip),%xmm1
divsd  %xmm1,%xmm2
movsd  0xed0(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb8(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dBbp3a>:
movapd %xmm0,%xmm1
divsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm0
divsd  0xef0(%rip),%xmm0
addsd  0xef0(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @dBbp3a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 6.000000e+00
%5 = load double, double* %2
%6 = load double, double* %2
%7 = fmul double %5, %6
%8 = fdiv double %7, 3.000000e+01
%9 = fsub double 1.000000e+00, %8
%10 = call double @llvm.fmuladd.f64(double %4, double %9, double -5.000000e-01)
ret double %10
}

LLVM IR (-O2):
define double @dBbp3a(double %0) {
%2 = fdiv double %0, 6.000000e+00
%3 = fmul double %0, %0
%4 = fdiv double %3, 3.000000e+01
%5 = fsub double 1.000000e+00, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %5, double -5.000000e-01)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
int /*<<< orphan*/ shmctl(int, int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  int shmid;
  void *shared;
  shmctl(1, IPC_RMID, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
xor    %edx,%edx
call   1030 <shmctl@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
xor    %edx,%edx
call   1030 <shmctl@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPC_RMID = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = load i32, i32* @IPC_RMID
%4 = call i32 @shmctl(i32 1, i32 %3, i32 0)
ret i32 0
}

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @main() {
%1 = load i32, i32* @IPC_RMID
%2 = tail call i32 @shmctl(i32 1, i32 %1, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version() { printf("tolower version 1.0\nHitlion King\n"); }


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

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

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

LLVM IR (-O2):
@str = [33 x i8] c"tolower version 1.0\0AHitlion King\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret void
}
int isdigit(int ch) { return (ch >= '0' && ch <= '9'); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_event_prepare(void *e) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_event_prepare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_event_prepare>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_event_prepare(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_prepare(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
uintptr_t tm_block_offset_at(uintptr_t addr) {
  return addr & ((1ul << (1ul << (3))) - 1);
}


x86 assembly (clang, -O0):
<tm_block_offset_at>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tm_block_offset_at>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i64 @tm_block_offset_at(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 255
ret i64 %4
}

LLVM IR (-O2):
define i64 @tm_block_offset_at(i64 %0) {
%2 = and i64 %0, 255
ret i64 %2
}
/* Variables and functions */
unsigned int ___swab32(unsigned int);
unsigned int __arch__swab32(unsigned int x) {
  unsigned int __tmp = (x);
  return ___swab32(__tmp);
}


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

x86 assembly (clang, -O2):
<__arch__swab32>:
jmp    1030 <___swab32@plt>

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

LLVM IR (-O2):
define i32 @__arch__swab32(i32 %0) {
%2 = tail call i32 @___swab32(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswspace(int /*<<< orphan*/);
int iswspace_l(wint_t c, locale_t l) { return iswspace(c); }


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

x86 assembly (clang, -O2):
<iswspace_l>:
jmp    1030 <iswspace@plt>

LLVM IR (-O0):
define i32 @iswspace_l(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @iswspace(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @iswspace_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswspace(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void Section4Hours(int seconds) { printf("\n4.- %d hours, ", seconds / 3600); }


x86 assembly (clang, -O0):
<Section4Hours>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Section4Hours>:
movslq %edi,%rsi
imul   $0xffffffff91a2b3c5,%rsi,%rax
shr    $0x20,%rax
add    %eax,%esi
mov    %esi,%eax
shr    $0x1f,%eax
sar    $0xb,%esi
add    %eax,%esi
lea    0xecf(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"\0A4.- %d hours, \00"
define void @Section4Hours(i32 %0) {
%2 = sdiv i32 %0, 3600
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
float dot4_c(float *, float *);
float dot4_neon_sfp(float v0[4], float v1[4]) { return dot4_c(v0, v1); }


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

x86 assembly (clang, -O2):
<dot4_neon_sfp>:
jmp    1030 <dot4_c@plt>

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

LLVM IR (-O2):
define float @dot4_neon_sfp(float* %0, float* %1) {
%3 = tail call float @dot4_c(float* %0, float* %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x98() {
  Assert_real((isgraph(152) == 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_isgraph.c",
              765, ("isgraph should be 0 for 0x98"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x98>:
push   %rax
mov    $0x98,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2fd,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x98\00"
define void @t_isgraph_0x98() {
%1 = call i64 @isgraph(i32 152)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 765, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x98\00"
define void @t_isgraph_0x98() {
%1 = tail call i64 @isgraph(i32 152)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 765, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
void strcmp_diff_length_0() {
  char *x = "12345";
  char *y = "234";
  if (strcmp(x, y) != -1)
    (void)*(char *)0;
}


x86 assembly (clang, -O0):
<strcmp_diff_length_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xedc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0xffffffff,%eax
je     1144 <strcmp_diff_length_0+0x34>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @strcmp_diff_length_0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Reader\n");
  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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [7 x i8] c"Reader\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ send_phonemes(char *);
void inqSpeakPho() { send_phonemes("Speak.pho"); }


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"Speak.pho\00"
define void @inqSpeakPho() {
%1 = tail call i32 @send_phonemes(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bubbleSort(int *, int);
int /*<<< orphan*/ printarray(int *, int);
void test_bubbleSort() {
  int array[5] = {4, 2, 8, 7, 1};
  bubbleSort(array, 5);
  printarray(array, 5);
}


x86 assembly (clang, -O0):
<test_bubbleSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1030 <bubbleSort@plt>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <printarray@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bubbleSort>:
push   %rbx
sub    $0x20,%rsp
mov    0xee5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <bubbleSort@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <printarray@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test_bubbleSort.array = [5 x i32] [i32 4, i32 2, i32 8, i32 7, i32 1]
define void @test_bubbleSort() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @bubbleSort(i32* %3, i32 5)
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%6 = call i32 @printarray(i32* %5, i32 5)
ret void
}

LLVM IR (-O2):
@__const.test_bubbleSort.array = [5 x i32] [i32 4, i32 2, i32 8, i32 7, i32 1]
define void @test_bubbleSort() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @bubbleSort(i32* %3, i32 5)
%5 = call i32 @printarray(i32* %3, i32 5)
ret void
}
void *XSharpCreateFontSet(void *dpy, const char *family, int pointSize,
                          int style) {
  return 0;
}


x86 assembly (clang, -O0):
<XSharpCreateFontSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @XSharpCreateFontSet(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xa1() {
  Assert_real((isalnum(161) == 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_isalnum.c",
              810, ("isalnum should be 0 for 0xa1"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xa1>:
push   %rax
mov    $0xa1,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xa1\00"
define void @t_isalnum_0xa1() {
%1 = call i64 @isalnum(i32 161)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 810, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xa1\00"
define void @t_isalnum_0xa1() {
%1 = tail call i64 @isalnum(i32 161)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 810, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char const *kas_strerror(int);
scalar_t__ tsk_is_kas_error(int);
char const *tsk_strerror_internal(int);
const char *tsk_strerror(int err) {
  if (err != 0 && tsk_is_kas_error(err)) {
    err ^= (1 << 14);
    return kas_strerror(err);
  } else {
    return tsk_strerror_internal(err);
  }
}


x86 assembly (clang, -O0):
<tsk_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1173 <tsk_strerror+0x43>
mov    -0xc(%rbp),%edi
call   1030 <tsk_is_kas_error@plt>
cmp    $0x0,%rax
je     1173 <tsk_strerror+0x43>
mov    -0xc(%rbp),%eax
xor    $0x4000,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <kas_strerror@plt>
mov    %rax,-0x8(%rbp)
jmp    117f <tsk_strerror+0x4f>
mov    -0xc(%rbp),%edi
call   1040 <tsk_strerror_internal@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsk_strerror>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
je     1151 <tsk_strerror+0x21>
mov    %ebx,%edi
call   1030 <tsk_is_kas_error@plt>
test   %rax,%rax
je     1151 <tsk_strerror+0x21>
xor    $0x4000,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1050 <kas_strerror@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <tsk_strerror_internal@plt>

LLVM IR (-O0):
define i8* @tsk_strerror(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i64 @tsk_is_kas_error(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i32, i32* %3
%12 = xor i32 %11, 16384
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = call i8* @kas_strerror(i32 %13)
store i8* %14, i8** %2
br label %18
15: ; preds = %6, %1
%16 = load i32, i32* %3
%17 = call i8* @tsk_strerror_internal(i32 %16)
store i8* %17, i8** %2
br label %18
18: ; preds = %15, %10
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @tsk_strerror(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 @tsk_is_kas_error(i32 %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = xor i32 %0, 16384
%8 = tail call i8* @kas_strerror(i32 %7)
br label %11
9: ; preds = %3, %1
%10 = tail call i8* @tsk_strerror_internal(i32 %0)
br label %11
11: ; preds = %9, %6
%12 = phi i8* [ %8, %6 ], [ %10, %9 ]
ret i8* %12
}
/* Variables and functions */
int gcd(int, int);
scalar_t__ prime(int);
int special(int n) {
  int div;
  for (div = 2; div < n; ++div) {
    if (gcd(n, div) == 1 && prime(div) == 0)
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1183 <special+0x63>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <gcd@plt>
cmp    $0x1,%eax
jne    1170 <special+0x50>
mov    -0xc(%rbp),%edi
call   1030 <prime@plt>
cmp    $0x0,%rax
jne    1170 <special+0x50>
movl   $0x0,-0x4(%rbp)
jmp    118a <special+0x6a>
jmp    1175 <special+0x55>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1132 <special+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<special>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%r14d
cmp    $0x3,%edi
jl     1164 <special+0x44>
mov    %edi,%ebp
mov    $0x2,%ebx
jmp    1147 <special+0x27>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    %ebx,%ebp
je     1164 <special+0x44>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <gcd@plt>
cmp    $0x1,%eax
jne    1140 <special+0x20>
mov    %ebx,%edi
call   1030 <prime@plt>
test   %rax,%rax
jne    1140 <special+0x20>
xor    %r14d,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @special(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %3, label %13
3: ; preds = %1, %10
%4 = phi i32 [ %11, %10 ], [ 2, %1 ]
%5 = tail call i32 @gcd(i32 %0, i32 %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i64 @prime(i32 %4)
%9 = icmp eq i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %3, %7
%11 = add nuw nsw i32 %4, 1
%12 = icmp eq i32 %11, %0
br i1 %12, label %13, label %3
13: ; preds = %7, %10, %1
%14 = phi i32 [ 1, %1 ], [ 1, %10 ], [ 0, %7 ]
ret i32 %14
}
void OCSP_SINGLERESP_new(void) {}


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

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

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

LLVM IR (-O2):
define void @OCSP_SINGLERESP_new() {
ret void
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *_realloc_os_r(struct _reent *r, void *p, size_t n, size_t oldn) {
  void *newp = p;
  if (oldn < n) {
    newp = malloc(n);
    if (p != 0)
      memcpy(newp, p, oldn);
  }
  return newp;
}


x86 assembly (clang, -O0):
<_realloc_os_r>:
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    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    117c <_realloc_os_r+0x5c>
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1177 <_realloc_os_r+0x57>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <memcpy@plt>
jmp    117c <_realloc_os_r+0x5c>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_realloc_os_r>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
cmp    %rdx,%rcx
jae    1150 <_realloc_os_r+0x30>
mov    %rcx,%r15
mov    %rdx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1153 <_realloc_os_r+0x33>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <memcpy@plt>
jmp    1153 <_realloc_os_r+0x33>
mov    %rbx,%r14
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct._reent = type { i32 }
define i8* @_realloc_os_r(%struct._reent* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca %struct._reent*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
store %struct._reent* %0, %struct._reent** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i8*, i8** %6
store i8* %10, i8** %9
%11 = load i64, i64* %8
%12 = load i64, i64* %7
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %25
14: ; preds = %4
%15 = load i64, i64* %7
%16 = call i8* @malloc(i64 %15)
store i8* %16, i8** %9
%17 = load i8*, i8** %6
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %24
19: ; preds = %14
%20 = load i8*, i8** %9
%21 = load i8*, i8** %6
%22 = load i64, i64* %8
%23 = call i32 @memcpy(i8* %20, i8* %21, i64 %22)
br label %24
24: ; preds = %19, %14
br label %25
25: ; preds = %24, %4
%26 = load i8*, i8** %9
ret i8* %26
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define i8* @_realloc_os_r(%struct._reent* nocapture readnone %0, i8* %1, i64 %2, i64 %3) {
%5 = icmp ult i64 %3, %2
br i1 %5, label %6, label %11
6: ; preds = %4
%7 = tail call i8* @malloc(i64 %2)
%8 = icmp eq i8* %1, null
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @memcpy(i8* %7, i8* %1, i64 %3)
br label %11
11: ; preds = %6, %9, %4
%12 = phi i8* [ %7, %9 ], [ %7, %6 ], [ %1, %4 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int shit(int a, int b) {
  printf("a: %d\n", a);
  printf("b: %d\n", b);
  return a + b;
}


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

x86 assembly (clang, -O2):
<shit>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"a: %d\0A\00"
@.str.1 = [7 x i8] c"b: %d\0A\00"
define i32 @shit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"a: %d\0A\00"
@.str.1 = [7 x i8] c"b: %d\0A\00"
define i32 @shit(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%5 = add nsw i32 %1, %0
ret i32 %5
}
/* Variables and functions */
scalar_t__ read32(int);
int /*<<< orphan*/ write32(int, int /*<<< orphan*/);
void aes_reset(void) {
  write32((0xd020000 + 0x000), 0);
  while (read32((0xd020000 + 0x000)) != 0)
    ;
}


x86 assembly (clang, -O0):
<aes_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0xd020000,%edi
xor    %esi,%esi
call   1030 <write32@plt>
mov    $0xd020000,%edi
call   1040 <read32@plt>
cmp    $0x0,%rax
je     1149 <aes_reset+0x29>
jmp    1130 <aes_reset+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_reset>:
push   %rax
mov    $0xd020000,%edi
xor    %esi,%esi
call   1030 <write32@plt>
nopl   (%rax)
mov    $0xd020000,%edi
call   1040 <read32@plt>
test   %rax,%rax
jne    1130 <aes_reset+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @aes_reset() {
%1 = call i32 @write32(i32 218234880, i32 0)
br label %2
2: ; preds = %5, %0
%3 = call i64 @read32(i32 218234880)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @aes_reset() {
%1 = tail call i32 @write32(i32 218234880, i32 0)
br label %2
2: ; preds = %2, %0
%3 = tail call i64 @read32(i32 218234880)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}
void ms_delay(int ms) {}


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

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

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

LLVM IR (-O2):
define void @ms_delay(i32 %0) {
ret void
}
SORU_6_PROTOTYPE() {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define i32 @SORU_6_PROTOTYPE() {
br label %1
1: ; preds = %0, %1
br label %1
}
void ep93xx_i2s_release(void) {}


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

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

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

LLVM IR (-O2):
define void @ep93xx_i2s_release() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ S_AdvanceBackgroundTrack(int);
void S_NextBackgroundTrack(void) { S_AdvanceBackgroundTrack(1); }


x86 assembly (clang, -O0):
<S_NextBackgroundTrack>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <S_AdvanceBackgroundTrack@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_NextBackgroundTrack>:
mov    $0x1,%edi
jmp    1030 <S_AdvanceBackgroundTrack@plt>

LLVM IR (-O0):
define void @S_NextBackgroundTrack() {
%1 = call i32 @S_AdvanceBackgroundTrack(i32 1)
ret void
}

LLVM IR (-O2):
define void @S_NextBackgroundTrack() {
%1 = tail call i32 @S_AdvanceBackgroundTrack(i32 1)
ret void
}
/* Variables and functions */
long expmod(long, long, long);
long rsa_crypt(long msg, long a, long pq) { return expmod(msg, a, pq); }


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

x86 assembly (clang, -O2):
<rsa_crypt>:
jmp    1030 <expmod@plt>

LLVM IR (-O0):
define i64 @rsa_crypt(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
%10 = call i64 @expmod(i64 %7, i64 %8, i64 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @rsa_crypt(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @expmod(i64 %0, i64 %1, i64 %2)
ret i64 %4
}