xunge/DecIR huggingface dataset:
/* Variables and functions */
int fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stdout;
int serout(const char *m) { return fprintf(stdout, "%s", m); }


x86 assembly (clang, -O0):
<serout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serout>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @serout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @serout(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %3
}
void avio_close_dir() {}


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

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

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

LLVM IR (-O2):
define void @avio_close_dir() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ giveup(char *);
void eofErr(void) { giveup("EOF Overrun"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"EOF Overrun\00"
define void @eofErr() {
%1 = call i32 @giveup(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"EOF Overrun\00"
define void @eofErr() {
%1 = tail call i32 @giveup(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
double log1p(double x) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(x);
  return 0;
}


x86 assembly (clang, -O0):
<log1p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log1p>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.log1p = [6 x i8] c"log1p\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @log1p(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.log1p, i64 0, i64 0))
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%7 = load double, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.log1p = [6 x i8] c"log1p\00"
@.str.1 = [4 x i8] c"()\0A\00"
define double @log1p(double %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.log1p, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret double 0.000000e+00
}
int channels_interfere(int ch1, int ch2) {
  if (ch1 == -2 || ch2 == -2)
    return 0;
  if (ch1 == 255 || ch2 == 255)
    return 1;
  return ch1 == ch2;
}


x86 assembly (clang, -O0):
<channels_interfere>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0xfffffffe,-0x8(%rbp)
je     111e <channels_interfere+0x1e>
cmpl   $0xfffffffe,-0xc(%rbp)
jne    112a <channels_interfere+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1161 <channels_interfere+0x61>
cmpl   $0xff,-0x8(%rbp)
je     1144 <channels_interfere+0x44>
cmpl   $0xff,-0xc(%rbp)
jne    1150 <channels_interfere+0x50>
movl   $0x1,-0x4(%rbp)
jmp    1161 <channels_interfere+0x61>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<channels_interfere>:
xor    %eax,%eax
cmp    $0xfffffffe,%edi
je     1128 <channels_interfere+0x28>
cmp    $0xfffffffe,%esi
je     1128 <channels_interfere+0x28>
mov    $0x1,%eax
cmp    $0xff,%edi
je     1128 <channels_interfere+0x28>
cmp    $0xff,%esi
je     1128 <channels_interfere+0x28>
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @channels_interfere(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, -2
%4 = icmp eq i32 %1, -2
%5 = or i1 %3, %4
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = icmp eq i32 %0, 255
%8 = icmp eq i32 %1, 255
%9 = or i1 %7, %8
br i1 %9, label %13, label %10
10: ; preds = %6
%11 = icmp eq i32 %0, %1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %6, %2, %10
%14 = phi i32 [ %12, %10 ], [ 0, %2 ], [ 1, %6 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ tolower(char);
void str2lower(char *str) {
  int i = 0;
  while (str[i])
    tolower(str[i++]);
  return;
}


x86 assembly (clang, -O0):
<str2lower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1155 <str2lower+0x45>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <tolower@plt>
jmp    1123 <str2lower+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2lower>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <str2lower+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <str2lower+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @str2lower(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %19
11: ; preds = %4
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
%15 = sext i32 %13 to i64
%16 = getelementptr inbounds i8, i8* %12, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @tolower(i8 signext %17)
br label %4
19: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @str2lower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = add nuw i64 %5, 1
%8 = tail call i32 @tolower(i8 signext %6)
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void math_atan(void) {
  double d = luaL_check_number(1);
  lua_pushnumber(((atan(d)) * 180.0 / 3.14159265358979323846));
}


x86 assembly (clang, -O0):
<math_atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <atan@plt>
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    $0x1,%al
call   1040 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_atan>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
call   1050 <atan@plt>
mulsd  0xeb2(%rip),%xmm0
divsd  0xeb2(%rip),%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_atan() {
%1 = alloca double
%2 = call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%3 = sitofp i32 %2 to double
store double %3, double* %1
%4 = load double, double* %1
%5 = call double @atan(double %4)
%6 = fmul double %5, 1.800000e+02
%7 = fdiv double %6, 0x400921FB54442D18
%8 = call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %7)
ret void
}

LLVM IR (-O2):
define void @math_atan() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%2 = sitofp i32 %1 to double
%3 = tail call double @atan(double %2)
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D18
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ meat_time_align_range_to_day(long const, long const,
                                                long *const, long *const);
void meat_time_single_day_range(signed long int const i_now,
                                signed long int *const pi_begin,
                                signed long int *const pi_end) {
  meat_time_align_range_to_day(i_now, i_now, pi_begin, pi_end);
}


x86 assembly (clang, -O0):
<meat_time_single_day_range>:
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    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <meat_time_align_range_to_day@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<meat_time_single_day_range>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <meat_time_align_range_to_day@plt>

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

LLVM IR (-O2):
define void @meat_time_single_day_range(i64 %0, i64* %1, i64* %2) {
%4 = tail call i32 @meat_time_align_range_to_day(i64 %0, i64 %0, i64* %1, i64* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ SwapByteOrder_16(int /*<<< orphan*/);
void bswap_16(const int n, void *u) {
  uint16_t *T = u;
  int i;
#pragma omp parallel for private(i)
  for (i = 0; i < n; i++) {
    *(T + i) = SwapByteOrder_16(*(T + i));
  }
  return;
}


x86 assembly (clang, -O0):
<bswap_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1165 <bswap_16+0x55>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <SwapByteOrder_16@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112e <bswap_16+0x1e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_16>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1146 <bswap_16+0x36>
mov    %rsi,%r15
mov    %edi,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%edi
call   1030 <SwapByteOrder_16@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <bswap_16+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @bswap_16(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %3, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @SwapByteOrder_16(i32 %10)
store i32 %11, i32* %9
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %2
ret void
}
float circle(float *sqr_len) {
  float *sqr_ans;
  *sqr_ans = *sqr_len * 4;
  return (*sqr_ans);
}


x86 assembly (clang, -O0):
<circle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
mulss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define float @circle(float* %0) {
%2 = alloca float*
%3 = alloca float*
store float* %0, float** %2
%4 = load float*, float** %2
%5 = load float, float* %4
%6 = fmul float %5, 4.000000e+00
%7 = load float*, float** %3
store float %6, float* %7
%8 = load float*, float** %3
%9 = load float, float* %8
ret float %9
}

LLVM IR (-O2):
int do_824() { return 824; }


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

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

LLVM IR (-O0):
define i32 @do_824() {
ret i32 824
}

LLVM IR (-O2):
define i32 @do_824() {
ret i32 824
}
/* Variables and functions */
int /*<<< orphan*/ mu_init(char *);
int /*<<< orphan*/ test_seed();
int main(void) {
  mu_init("rand");
  test_seed();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <mu_init@plt>
mov    $0x0,%al
call   1040 <test_seed@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"rand\00"
define i32 @main() {
%1 = call i32 @mu_init(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_seed()
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"rand\00"
define i32 @main() {
%1 = tail call i32 @mu_init(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_seed()
ret i32 0
}
/* Variables and functions */
unsigned int stb_hash_number(unsigned int hash) {
  hash ^= hash << 3;
  hash += hash >> 5;
  hash ^= hash << 4;
  hash += hash >> 17;
  hash ^= hash << 25;
  hash += hash >> 6;
  return hash;
}


x86 assembly (clang, -O0):
<stb_hash_number>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x5,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x11,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x19,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x6,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_hash_number>:
lea    0x0(,%rdi,8),%eax
xor    %edi,%eax
mov    %eax,%ecx
shr    $0x5,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shl    $0x4,%eax
xor    %ecx,%eax
mov    %eax,%ecx
shr    $0x11,%ecx
add    %eax,%ecx
mov    %ecx,%edx
shl    $0x19,%edx
xor    %ecx,%edx
mov    %edx,%eax
shr    $0x6,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @stb_hash_number(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 3
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 5
%9 = load i32, i32* %2
%10 = add i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = shl i32 %11, 4
%13 = load i32, i32* %2
%14 = xor i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = lshr i32 %15, 17
%17 = load i32, i32* %2
%18 = add i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = shl i32 %19, 25
%21 = load i32, i32* %2
%22 = xor i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = lshr i32 %23, 6
%25 = load i32, i32* %2
%26 = add i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @stb_hash_number(i32 %0) {
%2 = shl i32 %0, 3
%3 = xor i32 %2, %0
%4 = lshr i32 %3, 5
%5 = add i32 %4, %3
%6 = shl i32 %5, 4
%7 = xor i32 %6, %5
%8 = lshr i32 %7, 17
%9 = add i32 %8, %7
%10 = shl i32 %9, 25
%11 = xor i32 %10, %9
%12 = lshr i32 %11, 6
%13 = add i32 %12, %11
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xdf() {
  Assert_real((isspace(223) == 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_isspace.c",
              1120, ("isspace should be 0 for 0xdf"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xdf>:
push   %rax
mov    $0xdf,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x460,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xdf\00"
define void @t_isspace_0xdf() {
%1 = call i64 @isspace(i32 223)
%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 1120, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xdf\00"
define void @t_isspace_0xdf() {
%1 = tail call i64 @isspace(i32 223)
%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 1120, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ os_cas(int, int, int);
main() { os_cas(1, 2, 3); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <os_cas@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @os_cas(i32 1, i32 2, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @os_cas(i32 1, i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gui_flush();
int /*<<< orphan*/ gui_gotoxy(int, int);
int /*<<< orphan*/ printf(char *);
void gui_delete_message() {
  gui_gotoxy(1, 22);
  printf("                                                  ");
  gui_flush();
}


x86 assembly (clang, -O0):
<gui_delete_message>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x16,%esi
call   1030 <gui_gotoxy@plt>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <gui_flush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_delete_message>:
push   %rax
mov    $0x1,%edi
mov    $0x16,%esi
call   1030 <gui_gotoxy@plt>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <gui_flush@plt>

LLVM IR (-O0):
@.str = [51 x i8] c" \00"
define void @gui_delete_message() {
%1 = call i32 @gui_gotoxy(i32 1, i32 22)
%2 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @gui_flush()
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c" \00"
define void @gui_delete_message() {
%1 = tail call i32 @gui_gotoxy(i32 1, i32 22)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @gui_flush()
ret void
}
void GLUE_MOVE_PX_STACKPTR_GEN(void *b, int wv) {
  *(unsigned int *)b = 0xe1a0000d + (wv << 12);
}


x86 assembly (clang, -O0):
<GLUE_MOVE_PX_STACKPTR_GEN>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
shl    $0xc,%ecx
add    $0xe1a0000d,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLUE_MOVE_PX_STACKPTR_GEN>:
shl    $0xc,%esi
add    $0xe1a0000d,%esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @GLUE_MOVE_PX_STACKPTR_GEN(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 = shl i32 %5, 12
%7 = add i32 -509607923, %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @GLUE_MOVE_PX_STACKPTR_GEN(i8* nocapture writeonly %0, i32 %1) {
%3 = shl i32 %1, 12
%4 = add i32 %3, -509607923
%5 = bitcast i8* %0 to i32*
store i32 %4, i32* %5
ret void
}
void init_zero(signed short buf[], int n) {
  int k;
  for (k = 0; k < 3000; k++)
    buf[k] = 0;
}


x86 assembly (clang, -O0):
<init_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xbb8,-0x10(%rbp)
jge    113b <init_zero+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movw   $0x0,(%rax,%rcx,2)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <init_zero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_zero>:
push   %rax
mov    $0x1770,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @init_zero(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i32
store i16* %0, i16** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %14, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 3000
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = load i16*, i16** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i16, i16* %10, i64 %12
store i16 0, i16* %13
br label %14
14: ; preds = %9
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
store i32 %16, i32* %5
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @init_zero(i16* nocapture writeonly %0, i32 %1) {
%3 = bitcast i16* %0 to i8*
ret void
}
void get_interface_name(char *mac) {}


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

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

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

LLVM IR (-O2):
define void @get_interface_name(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void ErrorHdrHook(FILE *where) { fflush(stdout); }


x86 assembly (clang, -O0):
<ErrorHdrHook>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ErrorHdrHook>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fflush@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @ErrorHdrHook(i32* nocapture readnone %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret void
}
int addit(int a, int b, int c) { return a + b; }


x86 assembly (clang, -O0):
<addit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addit>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @addit(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @addit(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
ret i32 %4
}
void gdk_drag_get_protocol() {}


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

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

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

LLVM IR (-O2):
define void @gdk_drag_get_protocol() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BITBOARD_init();
void ENGINE_init() {
  static int first_run = 1;
  if (first_run) {
    BITBOARD_init();
    first_run = 0;
  }
}


x86 assembly (clang, -O0):
<ENGINE_init>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f0d(%rip)
je     1132 <ENGINE_init+0x22>
mov    $0x0,%al
call   1030 <BITBOARD_init@plt>
movl   $0x0,0x2ef6(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ENGINE_init>:
push   %rax
cmpb   $0x0,0x2f14(%rip)
jne    1128 <ENGINE_init+0x18>
xor    %eax,%eax
call   1030 <BITBOARD_init@plt>
movb   $0x1,0x2f04(%rip)
pop    %rax
ret

LLVM IR (-O0):
@ENGINE_init.first_run = internal global i32 1
define void @ENGINE_init() {
%1 = load i32, i32* @ENGINE_init.first_run
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @BITBOARD_init()
store i32 0, i32* @ENGINE_init.first_run
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@ENGINE_init.first_run = internal unnamed_addr global i1 false
define void @ENGINE_init() {
%1 = load i1, i1* @ENGINE_init.first_run
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call i32 (...) @BITBOARD_init()
store i1 true, i1* @ENGINE_init.first_run
br label %4
4: ; preds = %2, %0
ret void
}
char *getenv(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @getenv(i8* nocapture readnone %0) {
ret i8* null
}
int uwsgi_startswith(char *src, char *what, int wlen) {
  int i;
  for (i = 0; i < wlen; i++) {
    if (src[i] != what[i])
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<uwsgi_startswith>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1161 <uwsgi_startswith+0x61>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114e <uwsgi_startswith+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <uwsgi_startswith+0x68>
jmp    1153 <uwsgi_startswith+0x53>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <uwsgi_startswith+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uwsgi_startswith>:
test   %edx,%edx
jle    1122 <uwsgi_startswith+0x22>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1125 <uwsgi_startswith+0x25>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <uwsgi_startswith+0x10>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @uwsgi_startswith(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%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 0, i32* %8
br label %9
9: ; preds = %29, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %32
13: ; preds = %9
%14 = load i8*, i8** %5
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8*, i8** %6
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %19, %25
br i1 %26, label %27, label %28
27: ; preds = %13
store i32 -1, i32* %4
br label %33
28: ; preds = %13
br label %29
29: ; preds = %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
br label %9
32: ; preds = %9
store i32 0, i32* %4
br label %33
33: ; preds = %32, %27
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
define i32 @uwsgi_startswith(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %1, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 0, %3 ], [ 0, %7 ], [ -1, %9 ]
ret i32 %18
}
double double_ceiling(double val) {
  return val > 0 ? (double)((long)(val + 1)) : (double)((long)val);
}


x86 assembly (clang, -O0):
<double_ceiling>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    113c <double_ceiling+0x3c>
movsd  0xedd(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114c <double_ceiling+0x4c>
cvttsd2si -0x8(%rbp),%rax
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_ceiling>:
movsd  0xef8(%rip),%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
cvttsd2si %xmm2,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
ret

LLVM IR (-O0):
define double @double_ceiling(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 1.000000e+00
%8 = fptosi double %7 to i64
%9 = sitofp i64 %8 to double
br label %14
10: ; preds = %1
%11 = load double, double* %2
%12 = fptosi double %11 to i64
%13 = sitofp i64 %12 to double
br label %14
14: ; preds = %10, %5
%15 = phi double [ %9, %5 ], [ %13, %10 ]
ret double %15
}

LLVM IR (-O2):
define double @double_ceiling(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fadd double %0, 1.000000e+00
%4 = select i1 %2, double %3, double %0
%5 = fptosi double %4 to i64
%6 = sitofp i64 %5 to double
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ kcm_is_eol(char const);
scalar_t__ kcm_is_token_separator(char const);
const char *kcm_skip_spaces(const char *str) {
  while (!kcm_is_eol(*str) && kcm_is_token_separator(*str)) {
    str++;
  }
  return str;
}


x86 assembly (clang, -O0):
<kcm_skip_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <kcm_is_eol@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    115e <kcm_skip_spaces+0x3e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <kcm_is_token_separator@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116e <kcm_skip_spaces+0x4e>
jmp    117f <kcm_skip_spaces+0x5f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <kcm_skip_spaces+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kcm_skip_spaces>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <kcm_is_eol@plt>
test   %eax,%eax
jne    1150 <kcm_skip_spaces+0x30>
movsbl (%rbx),%edi
call   1040 <kcm_is_token_separator@plt>
test   %rax,%rax
je     1150 <kcm_skip_spaces+0x30>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1130 <kcm_skip_spaces+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @kcm_skip_spaces(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @kcm_is_eol(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1, %10
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = tail call i64 @kcm_is_token_separator(i8 signext %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = tail call i32 @kcm_is_eol(i8 signext %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %5, label %15
15: ; preds = %5, %10, %1
%16 = phi i8* [ %0, %1 ], [ %11, %10 ], [ %6, %5 ]
ret i8* %16
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/, int /*<<< orphan*/);
void sig_chld_waitpid(int signal) {
  while (waitpid(-1, 0, WNOHANG) > 0)
    ;
}


x86 assembly (clang, -O0):
<sig_chld_waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    113f <sig_chld_waitpid+0x2f>
jmp    111b <sig_chld_waitpid+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chld_waitpid>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <sig_chld_waitpid+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @sig_chld_waitpid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32 0, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sig_chld_waitpid(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32 0, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_usage() {
  printf("analogRead --pin <pin>\n");
  printf("\t<pin>\tan analog pin number, Arduino style, e.g. 0, 1, ...\n");
  printf("\t\tmaps to the according AIN pin of the beaglebone.\n");
  printf("\t\tthe value is written to stdout\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<display_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xee3(%rip),%rdi
call   1040 <puts@plt>
lea    0xf12(%rip),%rdi
call   1040 <puts@plt>
lea    0xf39(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"analogRead --pin <pin>\0A\00"
@.str.1 = [60 x i8] c"\09<pin>\09an analog pin number, Arduino style, e.g. 0, 1, ...\0A\00"
@.str.2 = [52 x i8] c"\09\09maps to the according AIN pin of the beaglebone.\0A\00"
@.str.3 = [34 x i8] c"\09\09the value is written to stdout\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @display_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"analogRead --pin <pin>\00"
@str.5 = [59 x i8] c"\09<pin>\09an analog pin number, Arduino style, e.g. 0, 1, ...\00"
@str.6 = [51 x i8] c"\09\09maps to the according AIN pin of the beaglebone.\00"
@str.7 = [33 x i8] c"\09\09the value is written to stdout\00"
define void @display_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void hl_sys_exit(int code) { exit(code); }


x86 assembly (clang, -O0):
<hl_sys_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<hl_sys_exit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @hl_sys_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
unsigned long I2CSlaveStatus(unsigned long ulBase) {
  ;
  return ((*((volatile unsigned long *)(ulBase + 0x00000004))));
}


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

x86 assembly (clang, -O2):
<I2CSlaveStatus>:
mov    0x4(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @I2CSlaveStatus(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 4
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @I2CSlaveStatus(i64 %0) {
%2 = add i64 %0, 4
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
ret i64 %4
}
/* Variables and functions */
const char *sha256_hex_file(const char *path __attribute__((unused)),
                            size_t len __attribute__((unused))) {
  return "0000000000000000000000000000000000000000";
}


x86 assembly (clang, -O0):
<sha256_hex_file>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeed(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [41 x i8] c"0000000000000000000000000000000000000000\00"
define i8* @sha256_hex_file(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [41 x i8] c"0000000000000000000000000000000000000000\00"
define i8* @sha256_hex_file(i8* nocapture readnone %0, i64 %1) {
ret i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
}
int comfunc(const void *a, const void *b) {
  return *(double *)a - *(double *)b;
}


x86 assembly (clang, -O0):
<comfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comfunc>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
cvttsd2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @comfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fsub double %4, %6
%8 = fptosi double %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int neg = -2;
  size_t zero = 0;
  if (neg < zero)
    printf("Yes, -2 is less than 0.\n");
  else
    printf("No, -2 is not less than 0.\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xfffffffe,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movslq -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    114d <main+0x3d>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
jmp    1159 <main+0x49>
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%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 = [25 x i8] c"Yes, -2 is less than 0.\0A\00"
@.str.1 = [28 x i8] c"No, -2 is not less than 0.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
store i32 0, i32* %1
store i32 -2, i32* %2
store i64 0, i64* %3
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = load i64, i64* %3
%7 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@str = [27 x i8] c"No, -2 is not less than 0.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}
const char *default_scheme(void) { return ("PC98"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"PC98\00"
define i8* @default_scheme() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"PC98\00"
define i8* @default_scheme() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct skynet_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ skynet_handle_retireall();
const char *cmd_abort(struct skynet_context *context, const char *param) {
  skynet_handle_retireall();
  return NULL;
}


x86 assembly (clang, -O0):
<cmd_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <skynet_handle_retireall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.skynet_context = type { i32 }
define i8* @cmd_abort(%struct.skynet_context* %0, i8* %1) {
%3 = alloca %struct.skynet_context*
%4 = alloca i8*
store %struct.skynet_context* %0, %struct.skynet_context** %3
store i8* %1, i8** %4
%5 = call i32 (...) @skynet_handle_retireall()
ret i8* null
}

LLVM IR (-O2):
%struct.skynet_context = type { i32 }
define noalias i8* @cmd_abort(%struct.skynet_context* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @skynet_handle_retireall()
ret i8* null
}
/* Variables and functions */
void __builtin_aarch64_set_fpsr64(unsigned long long);
void set_fpsr64(long long unsigned x) {
  return __builtin_aarch64_set_fpsr64(x);
}


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

x86 assembly (clang, -O2):
<set_fpsr64>:
jmp    1030 <__builtin_aarch64_set_fpsr64@plt>

LLVM IR (-O0):
define void @set_fpsr64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @set_fpsr64(i64 %0) {
tail call void @__builtin_aarch64_set_fpsr64(i64 %0)
ret void
}