xunge/DecIR huggingface dataset:
/* Variables and functions */
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sleep(int);
void *child2(void *p) {
  printf("child2 created : %d (%d)\n", getpid(), getppid());
  sleep(1);
}


x86 assembly (clang, -O0):
<child2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <getppid@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child2>:
push   %rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getppid@plt>
lea    0xea8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1060 <sleep@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"child2 created : %d (%d)\0A\00"
define i8* @child2(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @getpid()
%5 = call i32 (...) @getppid()
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = call i32 @sleep(i32 1)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [26 x i8] c"child2 created : %d (%d)\0A\00"
define noalias i8* @child2(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @getpid()
%3 = tail call i32 (...) @getppid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = tail call i32 @sleep(i32 1)
ret i8* undef
}
/* Variables and functions */
int write_whitney(int, int);
int PL_final_enable_tv_out(void) {
  int err;
  err = write_whitney(0x60018, 0xA0004003);
  if (err)
    return err;
  return 0;
}


x86 assembly (clang, -O0):
<PL_final_enable_tv_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x60018,%edi
mov    $0xa0004003,%esi
call   1030 <write_whitney@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     113f <PL_final_enable_tv_out+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <PL_final_enable_tv_out+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PL_final_enable_tv_out>:
mov    $0x60018,%edi
mov    $0xa0004003,%esi
jmp    1030 <write_whitney@plt>

LLVM IR (-O0):
define i32 @PL_final_enable_tv_out() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @write_whitney(i32 393240, i32 -1610596349)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i32, i32* %2
store i32 %7, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %6
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @PL_final_enable_tv_out() {
%1 = tail call i32 @write_whitney(i32 393240, i32 -1610596349)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void boxless_cstate_table_header(__attribute__((unused)) void *report_data) {
  printf("   C-state        min        max        avg      total    hits    "
         "over   under\n");
}


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

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

LLVM IR (-O0):
@.str = [80 x i8] c" C-state min max avg total hits over under\0A\00"
define void @boxless_cstate_table_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [79 x i8] c" C-state min max avg total hits over under\00"
define void @boxless_cstate_table_header(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
scalar_t__ remove(int /*<<< orphan*/);
int /*<<< orphan*/ s_let(char *, char *);
char *macremovefile(char *arg) {
  if (remove(get_string(arg)))
    s_let("none", arg);
  else
    s_let("ok", arg);
  return (arg);
}


x86 assembly (clang, -O0):
<macremovefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <get_string@plt>
mov    %eax,%edi
call   1030 <remove@plt>
cmp    $0x0,%rax
je     116b <macremovefile+0x3b>
mov    -0x8(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <s_let@plt>
jmp    117b <macremovefile+0x4b>
mov    -0x8(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1040 <s_let@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macremovefile>:
push   %rbx
mov    %rdi,%rbx
call   1050 <get_string@plt>
mov    %eax,%edi
call   1030 <remove@plt>
test   %rax,%rax
lea    0xebb(%rip),%rax
lea    0xeaf(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
call   1040 <s_let@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
@.str.1 = [3 x i8] c"ok\00"
define i8* @macremovefile(i8* returned %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i64 @remove(i32 %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @s_let(i8* %5, i8* %0)
ret i8* %0
}
int is_prefix(char *pre, char *test) {
  while (*pre == *test && *pre != '\0') {
    pre++;
    test++;
  }
  return *pre == '\0';
}


x86 assembly (clang, -O0):
<is_prefix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jne    1137 <is_prefix+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <is_prefix+0x47>
jmp    1164 <is_prefix+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <is_prefix+0xc>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prefix>:
mov    (%rdi),%cl
test   %cl,%cl
sete   %r8b
je     1138 <is_prefix+0x38>
cmp    (%rsi),%cl
jne    1138 <is_prefix+0x38>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rdi,%rcx,1),%edx
test   %dl,%dl
sete   %r8b
je     1138 <is_prefix+0x38>
lea    0x1(%rcx),%rax
cmp    (%rsi,%rcx,1),%dl
mov    %rax,%rcx
je     1120 <is_prefix+0x20>
movzbl %r8b,%eax
ret

LLVM IR (-O0):
define i32 @is_prefix(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %20, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %8, %11
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %5
%19 = phi i1 [ false, %5 ], [ %17, %13 ]
br i1 %19, label %20, label %25
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %5
25: ; preds = %18
%26 = load i8*, i8** %3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 0
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_prefix(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i1 [ %6, %2 ], [ %16, %8 ]
%20 = zext i1 %19 to i32
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ max_heapify(int *, int, int);
void build_max_heap(int *a, int heapsize) {
  int i;
  for (i = heapsize / 2; i >= 0; i--)
    max_heapify(a, i, heapsize);
}


x86 assembly (clang, -O0):
<build_max_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1154 <build_max_heap+0x44>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <max_heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <build_max_heap+0x1d>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_max_heap>:
push   %rbp
push   %r14
push   %rbx
cmp    $0xffffffff,%esi
jl     1141 <build_max_heap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%ebp
shr    $0x1f,%ebp
add    %esi,%ebp
sar    %ebp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <max_heapify@plt>
add    $0xffffffff,%ebp
jb     1130 <build_max_heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @build_max_heap(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* %4
%7 = sdiv i32 %6, 2
store i32 %7, i32* %5
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @max_heapify(i32* %12, i32 %13, i32 %14)
br label %16
16: ; preds = %11
%17 = load i32, i32* %5
%18 = add nsw i32 %17, -1
store i32 %18, i32* %5
br label %8
19: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, -2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = sdiv i32 %1, 2
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %5, %4 ]
%8 = tail call i32 @max_heapify(i32* %0, i32 %7, i32 %1)
%9 = add nsw i32 %7, -1
%10 = icmp eq i32 %7, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
ret void
}
void foo_2_1_2_2_1_2_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_2_1_2_2_1_1() {
ret void
}
double third_order_polynomial(double a, double b, double c, double d,
                              double x) {
  return ((a * x + b) * x + c) * x + d;
}


x86 assembly (clang, -O0):
<third_order_polynomial>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<third_order_polynomial>:
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @third_order_polynomial(double %0, double %1, double %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %6
store double %1, double* %7
store double %2, double* %8
store double %3, double* %9
store double %4, double* %10
%11 = load double, double* %6
%12 = load double, double* %10
%13 = load double, double* %7
%14 = call double @llvm.fmuladd.f64(double %11, double %12, double %13)
%15 = load double, double* %10
%16 = load double, double* %8
%17 = call double @llvm.fmuladd.f64(double %14, double %15, double %16)
%18 = load double, double* %10
%19 = load double, double* %9
%20 = call double @llvm.fmuladd.f64(double %17, double %18, double %19)
ret double %20
}

LLVM IR (-O2):
define double @third_order_polynomial(double %0, double %1, double %2, double %3, double %4) {
%6 = tail call double @llvm.fmuladd.f64(double %0, double %4, double %1)
%7 = tail call double @llvm.fmuladd.f64(double %6, double %4, double %2)
%8 = tail call double @llvm.fmuladd.f64(double %7, double %4, double %3)
ret double %8
}
int isqrt(int n) {
  int x;
  for (x = 1; x * x <= n; x++)
    ;
  return x - 1;
}


x86 assembly (clang, -O0):
<isqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1131 <isqrt+0x31>
jmp    1123 <isqrt+0x23>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <isqrt+0xe>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isqrt>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x2(%rax),%ecx
imul   %ecx,%ecx
add    $0x1,%eax
cmp    %edi,%ecx
jle    1110 <isqrt+0x10>
ret

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

LLVM IR (-O2):
define i32 @isqrt(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %6, %2 ]
%4 = mul nsw i32 %3, %3
%5 = icmp sgt i32 %4, %0
%6 = add nuw nsw i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = add nsw i32 %3, -1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ do_csi(char *, int);
void decscusr(int parm) { do_csi("%d q", parm); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d q\00"
define void @decscusr(i32 %0) {
%2 = tail call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ flockfile(int /*<<< orphan*/ *);
int /*<<< orphan*/ funlockfile(int /*<<< orphan*/ *);
size_t fwrite_unlocked(void const *, size_t, size_t, int /*<<< orphan*/ *);
size_t fwrite(const void *restrict ptr, size_t size, size_t count,
              FILE *restrict file) {
  flockfile(file);
  size_t result = fwrite_unlocked(ptr, size, count, file);
  funlockfile(file);
  return result;
}


x86 assembly (clang, -O0):
<fwrite>:
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    -0x20(%rbp),%rdi
call   1040 <flockfile@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1050 <fwrite_unlocked@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <funlockfile@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwrite>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rcx,%rdi
call   1040 <flockfile@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1050 <fwrite_unlocked@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <funlockfile@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @fwrite(i8* noalias %0, i64 %1, i64 %2, i32* noalias %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%10 = load i32*, i32** %8
%11 = call i32 @flockfile(i32* %10)
%12 = load i8*, i8** %5
%13 = load i64, i64* %6
%14 = load i64, i64* %7
%15 = load i32*, i32** %8
%16 = call i64 @fwrite_unlocked(i8* %12, i64 %13, i64 %14, i32* %15)
store i64 %16, i64* %9
%17 = load i32*, i32** %8
%18 = call i32 @funlockfile(i32* %17)
%19 = load i64, i64* %9
ret i64 %19
}

LLVM IR (-O2):
define i64 @fwrite(i8* noalias nocapture %0, i64 %1, i64 %2, i32* noalias nocapture %3) {
%5 = tail call i32 @flockfile(i32* %3)
%6 = tail call i64 @fwrite_unlocked(i8* %0, i64 %1, i64 %2, i32* %3)
%7 = tail call i32 @funlockfile(i32* %3)
ret i64 %6
}
int thirdBits(void) {
  int i = 73;
  i = i << 9 | 73;
  i = i << 9 | 73;
  i = i << 5 | 4;
  return i;
}


x86 assembly (clang, -O0):
<thirdBits>:
push   %rbp
mov    %rsp,%rbp
movl   $0x49,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x9,%eax
or     $0x49,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x9,%eax
or     $0x49,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%eax
or     $0x4,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @thirdBits() {
%1 = alloca i32
store i32 73, i32* %1
%2 = load i32, i32* %1
%3 = shl i32 %2, 9
%4 = or i32 %3, 73
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = shl i32 %5, 9
%7 = or i32 %6, 73
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = shl i32 %8, 5
%10 = or i32 %9, 4
store i32 %10, i32* %1
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @thirdBits() {
ret i32 613566756
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strlen(char *);
int main() {
  char greeting[6] = {'H', 'e', 'l', 'l', 'o', '\0'};
  printf("Greeting message: %s\n", greeting);
  printf("Length: %ld", strlen(greeting));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xa(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    -0xa(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rsi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x6f,0xc(%rsp)
movl   $0x6c6c6548,0x8(%rsp)
6c
lea    0xecb(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0xec5(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.greeting = [6 x i8] c"Hello\00"
@.str = [22 x i8] c"Greeting message: %s\0A\00"
@.str.1 = [12 x i8] c"Length: %ld\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
store i32 0, i32* %1
%3 = bitcast [6 x i8]* %2 to i8*
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%7 = call i8* @strlen(i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.greeting = [6 x i8] c"Hello\00"
@.str = [22 x i8] c"Greeting message: %s\0A\00"
@.str.1 = [12 x i8] c"Length: %ld\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i8* @strlen(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ vla_allocate_unsigned(int);
void check_negative_sized_VLA_2() { vla_allocate_unsigned(-1); }


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

x86 assembly (clang, -O2):
<check_negative_sized_VLA_2>:
mov    $0xffffffff,%edi
jmp    1030 <vla_allocate_unsigned@plt>

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

LLVM IR (-O2):
define void @check_negative_sized_VLA_2() {
%1 = tail call i32 @vla_allocate_unsigned(i32 -1)
ret void
}
void foo555(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo555(i32 %0) {
ret void
}
void do_abort(void) {
  print_log_msg((1), __FUNCTION__, "Aborted.");
  exit(1);
}


x86 assembly (clang, -O0):
<do_abort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xed0(%rip),%rsi
lea    0xed2(%rip),%rdx
mov    $0x0,%al
call   1030 <print_log_msg@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<do_abort>:
push   %rax
lea    0xed8(%rip),%rsi
lea    0xeda(%rip),%rdx
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <print_log_msg@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@__FUNCTION__.do_abort = [9 x i8] c"do_abort\00"
@.str = [9 x i8] c"Aborted.\00"
define void @do_abort() {
%1 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @print_log_msg to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.do_abort, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@__FUNCTION__.do_abort = [9 x i8] c"do_abort\00"
@.str = [9 x i8] c"Aborted.\00"
define void @do_abort() {
%1 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @print_log_msg to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__FUNCTION__.do_abort, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
tail call void @exit(i32 1)
unreachable
}
void BIO_f_buffer(void) {}


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

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

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

LLVM IR (-O2):
define void @BIO_f_buffer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RPI_AuxMiniUartWrite(int);
void dump_binary(unsigned int value) {
  int i;
  for (i = 0; i < 32; i++) {
    int c = '0' + (value >> 31);
    RPI_AuxMiniUartWrite(c);
    value <<= 1;
  }
}


x86 assembly (clang, -O0):
<dump_binary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jge    1157 <dump_binary+0x47>
mov    -0x4(%rbp),%eax
shr    $0x1f,%eax
add    $0x30,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <RPI_AuxMiniUartWrite@plt>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <dump_binary+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_binary>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x20,%ebp
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
shr    $0x1f,%edi
or     $0x30,%edi
call   1030 <RPI_AuxMiniUartWrite@plt>
add    %ebx,%ebx
add    $0xffffffff,%ebp
jne    1120 <dump_binary+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @dump_binary(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 32
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %2
%10 = lshr i32 %9, 31
%11 = add i32 48, %10
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = call i32 @RPI_AuxMiniUartWrite(i32 %12)
%14 = load i32, i32* %2
%15 = shl i32 %14, 1
store i32 %15, i32* %2
br label %16
16: ; preds = %8
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %5
19: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @dump_binary(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ %0, %1 ], [ %8, %2 ]
%4 = phi i32 [ 0, %1 ], [ %9, %2 ]
%5 = lshr i32 %3, 31
%6 = or i32 %5, 48
%7 = tail call i32 @RPI_AuxMiniUartWrite(i32 %6)
%8 = shl i32 %3, 1
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, 32
br i1 %10, label %11, label %2
11: ; preds = %2
ret void
}
/* Variables and functions */
int number_range(int, int);
unsigned char bigchance(int num) {
  if (number_range(1, 1500) * 2 <= num)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<bigchance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x5dc,%esi
call   1030 <number_range@plt>
shl    $0x1,%eax
cmp    -0x8(%rbp),%eax
jg     113f <bigchance+0x2f>
movb   $0x1,-0x1(%rbp)
jmp    1143 <bigchance+0x33>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigchance>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
mov    $0x5dc,%esi
call   1030 <number_range@plt>
add    %eax,%eax
cmp    %ebx,%eax
setle  %al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @bigchance(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @number_range(i32 1, i32 1500)
%5 = mul nsw i32 %4, 2
%6 = load i32, i32* %3
%7 = icmp sle i32 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 1, i8* %2
br label %10
9: ; preds = %1
store i8 0, i8* %2
br label %10
10: ; preds = %9, %8
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define zeroext i8 @bigchance(i32 %0) {
%2 = tail call i32 @number_range(i32 1, i32 1500)
%3 = shl nsw i32 %2, 1
%4 = icmp sle i32 %3, %0
%5 = zext i1 %4 to i8
ret i8 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int sem_init(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ *xmalloc(int);
sem_t *sem_alloc(void) {
  sem_t *sem = xmalloc(sizeof(sem_t));
  int res = sem_init(sem, 0, 0);
  ASSERT(!res);
  return sem;
}


x86 assembly (clang, -O0):
<sem_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <xmalloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <sem_init@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_alloc>:
push   %rbx
mov    $0x4,%edi
call   1030 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <sem_init@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <ASSERT@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @sem_alloc() {
%1 = alloca i32*
%2 = alloca i32
%3 = call i32* @xmalloc(i32 4)
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @sem_init(i32* %4, i32 0, i32 0)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = call i32 @ASSERT(i32 %9)
%11 = load i32*, i32** %1
ret i32* %11
}

LLVM IR (-O2):
define i32* @sem_alloc() {
%1 = tail call i32* @xmalloc(i32 4)
%2 = tail call i32 @sem_init(i32* %1, i32 0, i32 0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
ret i32* %1
}
int hashString(s)
char *s;
{
  unsigned result;
  result = 0;
  while (*s != '\0')
    result = (result << 1) + toLowerCase(*s++);
  return (result & 0x1FF);
}


x86 assembly (clang, -O0):
<hashString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1164 <hashString+0x54>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1030 <toLowerCase@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <hashString+0x13>
mov    -0xc(%rbp),%eax
and    $0x1ff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashString>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1152 <hashString+0x42>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %al,%edi
xor    %eax,%eax
call   1030 <toLowerCase@plt>
lea    (%rax,%r14,2),%r14d
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <hashString+0x20>
and    $0x1ff,%r14d
jmp    1155 <hashString+0x45>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @hashString(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %4
%10 = load i32, i32* %3
%11 = shl i32 %10, 1
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
%14 = load i8, i8* %12
%15 = sext i8 %14 to i32
%16 = call i32 (i32, ...) bitcast (i32 (...)* @toLowerCase to i32 (i32, ...)*)(i32 %15)
%17 = add i32 %11, %16
store i32 %17, i32* %3
br label %4
18: ; preds = %4
%19 = load i32, i32* %3
%20 = and i32 %19, 511
ret i32 %20
}

LLVM IR (-O2):
define i32 @hashString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %17, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = shl i32 %6, 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @toLowerCase to i32 (i32, ...)*)(i32 %8)
%12 = add i32 %11, %9
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4
%16 = and i32 %12, 511
br label %17
17: ; preds = %15, %1
%18 = phi i32 [ 0, %1 ], [ %16, %15 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xbf() {
  Assert_real((isascii(191) == 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_isascii.c",
              960, ("isascii should be 0 for 0xbf"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xbf>:
push   %rax
mov    $0xbf,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c0,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xbf\00"
define void @t_isascii_0xbf() {
%1 = call i64 @isascii(i32 191)
%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 960, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xbf\00"
define void @t_isascii_0xbf() {
%1 = tail call i64 @isascii(i32 191)
%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 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct mntent {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct mntent *getmntent(FILE *fp) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.mntent = type { i32 }
define %struct.mntent* @getmntent(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret %struct.mntent* null
}

LLVM IR (-O2):
%struct.mntent = type { i32 }
define noalias %struct.mntent* @getmntent(i32* nocapture readnone %0) {
ret %struct.mntent* null
}
/* Variables and functions */
int /*<<< orphan*/ deinitfields();
void switch_from_3202x(void) { deinitfields(); }


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

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

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

LLVM IR (-O2):
define void @switch_from_3202x() {
%1 = tail call i32 (...) @deinitfields()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS12;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS12_it;
int i2d_PKCS12(PKCS12 *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS12_it);
}


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

x86 assembly (clang, -O2):
<i2d_PKCS12>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@PKCS12_it = global i32 0
define i32 @i2d_PKCS12(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS12_it)
ret i32 %3
}
void rk_virt_init(void) {}


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

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

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

LLVM IR (-O2):
define void @rk_virt_init() {
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=401 REPO_URL= REVISION= CHANGED_REVISION= "
         "CHANGE_DATE= BUILD_DATE=Пт. июня 26 10:21:51 YEKT 2015 BUILD=debug "
         "TARGET_PLATFORM= MALI_PLATFORM= KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING= "
         "USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 "
         "USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [352 x i8] c"malidrv: API_VERSION=401 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D0\9F\D1\82. \D0\B8\D1\8E\D0\BD\D1\8F 26 10:21:51 YEKT 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([352 x i8], [352 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [352 x i8] c"malidrv: API_VERSION=401 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\D0\9F\D1\82. \D0\B8\D1\8E\D0\BD\D1\8F 26 10:21:51 YEKT 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING= USING_INTERNAL_PROFILING= USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([352 x i8], [352 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void test_manual_help_cmd_parser_print_version(void) {
  printf("%s %s\n",
         (strlen("test_manual_help") ? "test_manual_help" : "test_manual_help"),
         "1.0");
}


x86 assembly (clang, -O0):
<test_manual_help_cmd_parser_print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xedc(%rip),%rdi
call   1030 <strlen@plt>
lea    0xed0(%rip),%rsi
cmp    $0x0,%rax
cmovne %rsi,%rsi
lea    0xeba(%rip),%rdi
lea    0xecb(%rip),%rdx
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_manual_help_cmd_parser_print_version>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xef3(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [17 x i8] c"test_manual_help\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @test_manual_help_cmd_parser_print_version() {
%1 = call i64 @strlen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [17 x i8] c"test_manual_help\00"
@.str.2 = [4 x i8] c"1.0\00"
define void @test_manual_help_cmd_parser_print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char ch;
  printf("Please enter a character.\n");
  scanf("%c", &ch);
  printf("The code of %c is %d.\n", ch, ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%esi
movsbl -0x5(%rbp),%edx
lea    0xec2(%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    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%edx
lea    0xea9(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Please enter a character.\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [23 x i8] c"The code of %c is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [23 x i8] c"The code of %c is %d.\0A\00"
@str = [26 x i8] c"Please enter a character.\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ VIDEO_STOP;
int ioctl(int, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int videoStop(int fd, char *arg) {
  if (arg)
    return -1;
  if (ioctl(fd, VIDEO_STOP) == -1)
    perror("VIDEO_STOP");
  return 0;
}


x86 assembly (clang, -O0):
<videoStop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1146 <videoStop+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <videoStop+0x53>
mov    -0x8(%rbp),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    116c <videoStop+0x4c>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<videoStop>:
push   %rbx
mov    $0xffffffff,%ebx
test   %rsi,%rsi
jne    1140 <videoStop+0x20>
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
je     1144 <videoStop+0x24>
mov    %ebx,%eax
pop    %rbx
ret
lea    0xeb5(%rip),%rdi
call   1040 <perror@plt>
jmp    1140 <videoStop+0x20>

LLVM IR (-O0):
@VIDEO_STOP = global i32 0
@.str = [11 x i8] c"VIDEO_STOP\00"
define i32 @videoStop(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %17
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* @VIDEO_STOP
%12 = call i32 @ioctl(i32 %10, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %9
store i32 0, i32* %3
br label %17
17: ; preds = %16, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@VIDEO_STOP = global i32 0
@.str = [11 x i8] c"VIDEO_STOP\00"
define i32 @videoStop(i32 %0, i8* readnone %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = load i32, i32* @VIDEO_STOP
%6 = tail call i32 @ioctl(i32 %0, i32 %5)
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %4, %8, %2
%11 = phi i32 [ -1, %2 ], [ 0, %8 ], [ 0, %4 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int /*<<< orphan*/ stdout;
double eval_charprint(double x, double y) {
  fprintf(stdout, "%c", (char)y);
  return y;
}


x86 assembly (clang, -O0):
<eval_charprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
lea    0xec5(%rip),%rsi
movsbl %al,%edx
call   1030 <fprintf@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_charprint>:
push   %rax
movsd  %xmm1,(%rsp)
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
cvttsd2si %xmm1,%eax
movsbl %al,%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define double @eval_charprint(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load i32, i32* @stdout
%6 = load double, double* %4
%7 = fptosi double %6 to i8
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = load double, double* %4
ret double %9
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%c\00"
define double @eval_charprint(double %0, double returned %1) {
%3 = load i32, i32* @stdout
%4 = fptosi double %1 to i8
%5 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret double %1
}
/* Type definitions */
typedef int /*<<< orphan*/ address;

/* Variables and functions */
int getInt16(unsigned char *);
int /*<<< orphan*/ sciprintf(char *, int /*<<< orphan*/);
int getHeapInt16(unsigned char *base, int address) {
  if (address & 1)
    sciprintf("Warning: Unaligned read from %04x\n", (address)&0xffff);
  return getInt16(base + address);
}


x86 assembly (clang, -O0):
<getHeapInt16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1153 <getHeapInt16+0x33>
mov    -0xc(%rbp),%esi
and    $0xffff,%esi
lea    0xeb2(%rip),%rdi
call   1030 <sciprintf@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
call   1040 <getInt16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHeapInt16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
test   $0x1,%bpl
je     113d <getHeapInt16+0x1d>
movzwl %bp,%esi
lea    0xec8(%rip),%rdi
call   1030 <sciprintf@plt>
movslq %ebp,%rax
add    %rax,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <getInt16@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"Warning: Unaligned read from %04x\0A\00"
define i32 @getHeapInt16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = and i32 %9, 65535
%11 = call i32 @sciprintf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %2
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = call i32 @getInt16(i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [35 x i8] c"Warning: Unaligned read from %04x\0A\00"
define i32 @getHeapInt16(i8* %0, i32 %1) {
%3 = and i32 %1, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = and i32 %1, 65535
%7 = tail call i32 @sciprintf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %2
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = tail call i32 @getInt16(i8* %10)
ret i32 %11
}