xunge/DecIR huggingface dataset:
void bu_compile_fixp(args) struct conscell *args;
{
  int n = bu_compile_arg_list(args);
  if (n != 1)
    goto er;
  EMIT1ATM("FIXP");
  EMITEND();
  return;
er:
  cerror("fixp: wrong # of args", args);
}


x86 assembly (clang, -O0):
<bu_compile_fixp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <bu_compile_arg_list@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1169 <bu_compile_fixp+0x29>
jmp    1183 <bu_compile_fixp+0x43>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1050 <EMIT1ATM@plt>
mov    $0x0,%al
call   1030 <EMITEND@plt>
jmp    1195 <bu_compile_fixp+0x55>
mov    -0x8(%rbp),%rsi
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1060 <cerror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bu_compile_fixp>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <bu_compile_arg_list@plt>
cmp    $0x1,%eax
jne    1166 <bu_compile_fixp+0x26>
lea    0xea9(%rip),%rdi
xor    %eax,%eax
call   1050 <EMIT1ATM@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <EMITEND@plt>
lea    0xe98(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1060 <cerror@plt>

LLVM IR (-O0):
%struct.conscell = type opaque
@.str = [5 x i8] c"FIXP\00"
@.str.1 = [22 x i8] c"fixp: wrong # of args\00"
define void @bu_compile_fixp(%struct.conscell* %0) {
%2 = alloca %struct.conscell*
%3 = alloca i32
store %struct.conscell* %0, %struct.conscell** %2
%4 = load %struct.conscell*, %struct.conscell** %2
%5 = call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
br label %12
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @EMITEND()
br label %15
12: ; preds = %8
%13 = load %struct.conscell*, %struct.conscell** %2
%14 = call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %13)
br label %15
15: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
%struct.conscell = type opaque
@.str = [5 x i8] c"FIXP\00"
@.str.1 = [22 x i8] c"fixp: wrong # of args\00"
define void @bu_compile_fixp(%struct.conscell* %0) {
%2 = tail call i32 (%struct.conscell*, ...) bitcast (i32 (...)* @bu_compile_arg_list to i32 (%struct.conscell*, ...)*)(%struct.conscell* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @EMIT1ATM to i32 (i8*, ...)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @EMITEND()
br label %9
7: ; preds = %1
%8 = tail call i32 (i8*, %struct.conscell*, ...) bitcast (i32 (...)* @cerror to i32 (i8*, %struct.conscell*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %struct.conscell* %0)
br label %9
9: ; preds = %7, %4
ret void
}
/* Variables and functions */
double sin(double);
double smileDsp_lcSinc(double x) {
  double y = 3.14159265358979323846264338327950288 * x;
  return sin(y) / (y);
}


x86 assembly (clang, -O0):
<smileDsp_lcSinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smileDsp_lcSinc>:
push   %rax
mulsd  0xee7(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @smileDsp_lcSinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double 0x400921FB54442D18, %4
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @sin(double %6)
%8 = load double, double* %3
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @smileDsp_lcSinc(double %0) {
%2 = fmul double %0, 0x400921FB54442D18
%3 = tail call double @sin(double %2)
%4 = fdiv double %3, %2
ret double %4
}
void testDequeAddHeadRange() {}


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

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

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

LLVM IR (-O2):
define void @testDequeAddHeadRange() {
ret void
}
__attribute__((__format__(__printf__, 1, 2))) void
cpuinfo_log_debug(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @cpuinfo_log_debug(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(int *, int, int, int);
void sort(int *elements, int low, int high) {
  if (low < high) {
    int mid = (low + high) / 2;
    sort(elements, low, mid);
    sort(elements, mid + 1, high);
    merge(elements, low, mid, high);
  }
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <sort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <sort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
cmp    %edx,%esi
jge    1172 <sort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <sort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <sort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

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

LLVM IR (-O2):
define void @sort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @sort(i32* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @sort(i32* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(i32* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
void SteamAPI_vr_IVRCompositor_CompositorBringToFront(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_vr_IVRCompositor_CompositorBringToFront>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_vr_IVRCompositor_CompositorBringToFront>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_IVRCompositor_CompositorBringToFront = [49 x i8] c"SteamAPI_vr_IVRCompositor_CompositorBringToFront\00"
define void @SteamAPI_vr_IVRCompositor_CompositorBringToFront(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @__func__.SteamAPI_vr_IVRCompositor_CompositorBringToFront, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_IVRCompositor_CompositorBringToFront = [49 x i8] c"SteamAPI_vr_IVRCompositor_CompositorBringToFront\00"
define void @SteamAPI_vr_IVRCompositor_CompositorBringToFront(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([49 x i8], [49 x i8]* @__func__.SteamAPI_vr_IVRCompositor_CompositorBringToFront, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *malloc(unsigned long);
int /*<<< orphan*/ memcpy(char *, char *, unsigned long);
char *copy_string(char *str, unsigned long sz) {
  char *out = malloc(sz + 1);
  if (!out)
    return NULL;
  memcpy(out, str, sz);
  out[sz] = '\0';
  return out;
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1159 <copy_string+0x39>
movq   $0x0,-0x8(%rbp)
jmp    117e <copy_string+0x5e>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     114f <copy_string+0x2f>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @copy_string(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
%8 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %8
br label %9
9: ; preds = %2, %6
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ ptrdiff_t;

/* Variables and functions */
int /*<<< orphan*/ ff_bfin_put_pixels8uc_nornd(int /*<<< orphan*/ *,
                                               int /*<<< orphan*/ const *,
                                               int /*<<< orphan*/ const *,
                                               int /*<<< orphan*/, int);
void bfin_put_pixels8_nornd(uint8_t *block, const uint8_t *pixels,
                            ptrdiff_t line_size, int h) {
  ff_bfin_put_pixels8uc_nornd(block, pixels, pixels, line_size, h);
}


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

x86 assembly (clang, -O2):
<bfin_put_pixels8_nornd>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
jmp    1030 <ff_bfin_put_pixels8uc_nornd@plt>

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

LLVM IR (-O2):
define void @bfin_put_pixels8_nornd(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @ff_bfin_put_pixels8uc_nornd(i32* %0, i32* %1, i32* %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void getUsage(char *s) {
  (void)printf("Usage: %s host:file host:file ... file, or\n", s);
  (void)printf("       %s file file ... file if connected\n", s);
}


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

x86 assembly (clang, -O2):
<getUsage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"Usage: %s host:file host:file ... file, or\0A\00"
@.str.1 = [43 x i8] c" %s file file ... file if connected\0A\00"
define void @getUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"Usage: %s host:file host:file ... file, or\0A\00"
@.str.1 = [43 x i8] c" %s file file ... file if connected\0A\00"
define void @getUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
void c64_start_freq_vic(void) {}


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

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

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

LLVM IR (-O2):
define void @c64_start_freq_vic() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_1469() {
  Assert_real((isqrt(1469) == 38),
              "/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/stdlib/isqrt.c",
              1295, ("Integer square root of 1469 should be 38"));
}


x86 assembly (clang, -O0):
<t_sqrt_1469>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5bd,%edi
call   1030 <isqrt@plt>
cmp    $0x26,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x50f,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_1469>:
push   %rax
mov    $0x5bd,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x26,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x50f,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 1469 should be 38\00"
define void @t_sqrt_1469() {
%1 = call i32 @isqrt(i32 1469)
%2 = icmp eq i32 %1, 38
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1295, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [41 x i8] c"Integer square root of 1469 should be 38\00"
define void @t_sqrt_1469() {
%1 = tail call i32 @isqrt(i32 1469)
%2 = icmp eq i32 %1, 38
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1295, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct winsize {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TIOCGWINSZ;
int syscall(int, int, int /*<<< orphan*/, struct winsize *);
int tcgetwinsize(int fd, struct winsize *wsz) {
  return syscall(54, fd, TIOCGWINSZ, wsz);
}


x86 assembly (clang, -O0):
<tcgetwinsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    0x2eaf(%rip),%rax
mov    (%rax),%edx
mov    -0x10(%rbp),%rcx
mov    $0x36,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcgetwinsize>:
mov    %rsi,%rcx
mov    %edi,%esi
mov    0x2ebc(%rip),%rax
mov    (%rax),%edx
mov    $0x36,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
define i32 @tcgetwinsize(i32 %0, %struct.winsize* %1) {
%3 = alloca i32
%4 = alloca %struct.winsize*
store i32 %0, i32* %3
store %struct.winsize* %1, %struct.winsize** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @TIOCGWINSZ
%7 = load %struct.winsize*, %struct.winsize** %4
%8 = call i32 @syscall(i32 54, i32 %5, i32 %6, %struct.winsize* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
define i32 @tcgetwinsize(i32 %0, %struct.winsize* %1) {
%3 = load i32, i32* @TIOCGWINSZ
%4 = tail call i32 @syscall(i32 54, i32 %0, i32 %3, %struct.winsize* %1)
ret i32 %4
}
/* Type definitions */
struct ddr_set {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ serial_puts(char *);
void ddr_info_dump(struct ddr_set *timing_set) {
  serial_puts("DDR pll bypass: Disabled");
}


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

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

LLVM IR (-O0):
%struct.ddr_set = type { i32 }
@.str = [25 x i8] c"DDR pll bypass: Disabled\00"
define void @ddr_info_dump(%struct.ddr_set* %0) {
%2 = alloca %struct.ddr_set*
store %struct.ddr_set* %0, %struct.ddr_set** %2
%3 = call i32 @serial_puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ddr_set = type { i32 }
@.str = [25 x i8] c"DDR pll bypass: Disabled\00"
define void @ddr_info_dump(%struct.ddr_set* nocapture readnone %0) {
%2 = tail call i32 @serial_puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
void foo620(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo620(i32 %0) {
ret void
}
/* Variables and functions */
double fabs(double);
double errR(double val1, double val2) {
  double absoluto;
  double relativo;
  absoluto = fabs(val1 - val2);
  relativo = fabs(absoluto / val1);
  return relativo;
}


x86 assembly (clang, -O0):
<errR>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movaps 0xee1(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
movaps 0xec7(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<errR>:
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
movapd 0xef0(%rip),%xmm1
andpd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
andpd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @errR(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = call double @llvm.fabs.f64(double %9)
store double %10, double* %5
%11 = load double, double* %5
%12 = load double, double* %3
%13 = fdiv double %11, %12
%14 = call double @llvm.fabs.f64(double %13)
store double %14, double* %6
%15 = load double, double* %6
ret double %15
}

LLVM IR (-O2):
define double @errR(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fdiv double %4, %0
%6 = tail call double @llvm.fabs.f64(double %5)
ret double %6
}
_Complex long double test_cexpl(_Complex long double x) {
  return __builtin_cexpl(x);
}


x86 assembly (clang, -O0):
<test_cexpl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fxch   %st(1)
fstpt  -0x40(%rbp)
fstpt  -0x30(%rbp)
movaps -0x40(%rbp),%xmm0
movaps -0x30(%rbp),%xmm1
mov    %rsp,%rax
movaps %xmm1,0x10(%rax)
movaps %xmm0,(%rax)
call   1030 <cexpl@plt>
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cexpl>:
sub    $0x48,%rsp
fldt   0x50(%rsp)
fldt   0x60(%rsp)
fxch   %st(1)
fstpt  0x20(%rsp)
fstpt  0x30(%rsp)
movaps 0x20(%rsp),%xmm0
movaps 0x30(%rsp),%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
call   1030 <cexpl@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_cexpl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = alloca { x86_fp80, x86_fp80 }
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %5, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = call { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %3)
%11 = extractvalue { x86_fp80, x86_fp80 } %10, 0
%12 = extractvalue { x86_fp80, x86_fp80 } %10, 1
%13 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%14 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %11, x86_fp80* %13
store x86_fp80 %12, x86_fp80* %14
%15 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %15
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_cexpl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 0
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i64 0, i32 1
store x86_fp80 %4, x86_fp80* %7
store x86_fp80 %6, x86_fp80* %8
%9 = tail call { x86_fp80, x86_fp80 } @cexpl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %2)
ret { x86_fp80, x86_fp80 } %9
}
/* Variables and functions */
int /*<<< orphan*/ CountDown(int, int, int, int);
void CntDwn(int Time) { CountDown(Time, 8, 1, 1); }


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

x86 assembly (clang, -O2):
<CntDwn>:
mov    $0x8,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    1030 <CountDown@plt>

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

LLVM IR (-O2):
define void @CntDwn(i32 %0) {
%2 = tail call i32 @CountDown(i32 %0, i32 8, i32 1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void a() { printf("a2.c\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"a2.c\00"
define void @a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ errno;
int _times(struct tms *buf) {
  errno = ENOTSUP;
  return -1;
}


x86 assembly (clang, -O0):
<_times>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_times>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.tms = type { i32 }
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
%3 = load i32, i32* @ENOTSUP
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.tms = type { i32 }
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @_times(%struct.tms* nocapture readnone %0) {
%2 = load i32, i32* @ENOTSUP
store i32 %2, i32* @errno
ret i32 -1
}
void VSetRedraw(f) int (*f)();
{}


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

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

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

LLVM IR (-O2):
define void @VSetRedraw(i32 (...)* nocapture %0) {
ret void
}
void RTFileAioReqCancel(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileAioReqCancel() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insertionSort(int *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int numbers[10000], i;
  srand(time(NULL));
  for (i = 0; i < 10000; i++)
    numbers[i] = rand();
  insertionSort(numbers, 10000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c60,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x9c54(%rbp)
cmpl   $0x2710,-0x9c54(%rbp)
jge    11a7 <main+0x67>
mov    $0x0,%al
call   1060 <rand@plt>
mov    %eax,%ecx
movslq -0x9c54(%rbp),%rax
mov    %ecx,-0x9c50(%rbp,%rax,4)
mov    -0x9c54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x9c54(%rbp)
jmp    116c <main+0x2c>
lea    -0x9c50(%rbp),%rdi
mov    $0x2710,%esi
call   1050 <insertionSort@plt>
xor    %eax,%eax
add    $0x9c60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x9c40,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <rand@plt>
mov    %eax,(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x2710,%rbx
jne    1160 <main+0x20>
mov    %rsp,%rdi
mov    $0x2710,%esi
call   1050 <insertionSort@plt>
xor    %eax,%eax
add    $0x9c40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10000 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
store i32 0, i32* %3
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10000
br i1 %8, label %9, label %17
9: ; preds = %6
%10 = call i32 (...) @rand()
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [10000 x i32], [10000 x i32]* %2, i64 0, i64 %12
store i32 %10, i32* %13
br label %14
14: ; preds = %9
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %6
17: ; preds = %6
%18 = getelementptr inbounds [10000 x i32], [10000 x i32]* %2, i64 0, i64 0
%19 = call i32 @insertionSort(i32* %18, i32 10000)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10000 x i32]
%2 = bitcast [10000 x i32]* %1 to i8*
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %9, %5 ]
%7 = tail call i32 (...) @rand()
%8 = getelementptr inbounds [10000 x i32], [10000 x i32]* %1, i64 0, i64 %6
store i32 %7, i32* %8
%9 = add nuw nsw i64 %6, 1
%10 = icmp eq i64 %9, 10000
br i1 %10, label %11, label %5
11: ; preds = %5
%12 = getelementptr inbounds [10000 x i32], [10000 x i32]* %1, i64 0, i64 0
%13 = call i32 @insertionSort(i32* %12, i32 10000)
ret i32 0
}
/* Variables and functions */
char *malloc(int);
size_t snprintf(int /*<<< orphan*/, int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
size_t scim_bridge_string_from_uint(char **str, unsigned int value) {
  const size_t str_length = snprintf(0, 0, "%u", value);
  *str = malloc(sizeof(char) * (str_length + 1));
  sprintf(*str, "%u", value);
  return str_length;
}


x86 assembly (clang, -O0):
<scim_bridge_string_from_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
xor    %esi,%esi
lea    0xeb5(%rip),%rdx
mov    %esi,%edi
call   1030 <snprintf@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%edx
lea    0xe7c(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scim_bridge_string_from_uint>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%r14
lea    0xebd(%rip),%r15
xor    %edi,%edi
xor    %esi,%esi
mov    %r15,%rdx
mov    %ebp,%ecx
call   1030 <snprintf@plt>
mov    %rax,%rbx
lea    0x1(%rax),%edi
call   1040 <malloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define i64 @scim_bridge_string_from_uint(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i64
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i64 @snprintf(i32 0, i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = add i64 %8, 1
%10 = mul i64 1, %9
%11 = trunc i64 %10 to i32
%12 = call i8* @malloc(i32 %11)
%13 = load i8**, i8*** %3
store i8* %12, i8** %13
%14 = load i8**, i8*** %3
%15 = load i8*, i8** %14
%16 = load i32, i32* %4
%17 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i64, i64* %5
ret i64 %18
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i64 @scim_bridge_string_from_uint(i8** nocapture writeonly %0, i32 %1) {
%3 = tail call i64 @snprintf(i32 0, i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = trunc i64 %3 to i32
%5 = add i32 %4, 1
%6 = tail call i8* @malloc(i32 %5)
store i8* %6, i8** %0
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void test() {
  printf("%d", 233);
  if (1 >= 2) {
    printf("1>=2!");
  } else {
    printf("1<2!");
  }
  if (1 < 2 && 3 > 4 || 2 > 1) {
    printf("233");
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xe9,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xe9,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"1<2!\00"
@.str.2 = [4 x i8] c"233\00"
define void @test() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 233)
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"1<2!\00"
@.str.2 = [4 x i8] c"233\00"
define void @test() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 233)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int is_cpu_feature_present(int, int, int);
int /*<<< orphan*/ is_cpu_genuine_intel();
int is_cpu_clflushopt_present(void) {
  if (!is_cpu_genuine_intel())
    return 0;
  int ret = is_cpu_feature_present(0x7, 1, (1 << 23));
  return ret;
}


x86 assembly (clang, -O0):
<is_cpu_clflushopt_present>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <is_cpu_genuine_intel@plt>
cmp    $0x0,%eax
jne    1144 <is_cpu_clflushopt_present+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1161 <is_cpu_clflushopt_present+0x41>
mov    $0x7,%edi
mov    $0x1,%esi
mov    $0x800000,%edx
call   1030 <is_cpu_feature_present@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_cpu_clflushopt_present>:
push   %rax
xor    %eax,%eax
call   1040 <is_cpu_genuine_intel@plt>
test   %eax,%eax
je     1141 <is_cpu_clflushopt_present+0x21>
mov    $0x7,%edi
mov    $0x1,%esi
mov    $0x800000,%edx
pop    %rax
jmp    1030 <is_cpu_feature_present@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_cpu_clflushopt_present() {
%1 = tail call i32 (...) @is_cpu_genuine_intel()
%2 = icmp eq i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @is_cpu_feature_present(i32 7, i32 1, i32 8388608)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 0, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
int main() {
  int c;
  float mm[2] = {1, 2};
  c = mm[1] >= mm[0];
  print("c 1");
  printid(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
mov    $0x1,%edi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.mm = [2 x float] [float 1.000000e+00, float 2.000000e+00]
@.str = [4 x i8] c"c 1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2 x float]
store i32 0, i32* %1
%4 = bitcast [2 x float]* %3 to i8*
%5 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%8 = load float, float* %7
%9 = fcmp oge float %6, %8
%10 = zext i1 %9 to i32
store i32 %10, i32* %2
%11 = call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = call i32 @printid(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"c 1\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 1)
ret i32 0
}
void ChatBoardSendOKIRQ(void) {
  const char *s = "OK\015\012";
  while (*s) {
    while ((*(volatile unsigned *)0x15000018) & (1 << 9))
      ;
    (*(volatile unsigned char *)0x15000020) = *(s++);
  }
}


x86 assembly (clang, -O0):
<ChatBoardSendOKIRQ>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <ChatBoardSendOKIRQ+0x58>
jmp    1121 <ChatBoardSendOKIRQ+0x21>
mov    $0x15000018,%eax
mov    (%rax),%eax
and    $0x200,%eax
cmp    $0x0,%eax
je     113b <ChatBoardSendOKIRQ+0x3b>
jmp    1121 <ChatBoardSendOKIRQ+0x21>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    $0x15000020,%eax
mov    %cl,(%rax)
jmp    110f <ChatBoardSendOKIRQ+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ChatBoardSendOKIRQ>:
testl  $0x200,0x15000018
jne    1100 <ChatBoardSendOKIRQ>
movb   $0x4f,0x15000020
4f
cs nopw 0x0(%rax,%rax,1)
nop
testl  $0x200,0x15000018
jne    1120 <ChatBoardSendOKIRQ+0x20>
movb   $0x4b,0x15000020
4b
cs nopw 0x0(%rax,%rax,1)
nop
testl  $0x200,0x15000018
jne    1140 <ChatBoardSendOKIRQ+0x40>
movb   $0xd,0x15000020
0d
cs nopw 0x0(%rax,%rax,1)
nop
testl  $0x200,0x15000018
jne    1160 <ChatBoardSendOKIRQ+0x60>
movb   $0xa,0x15000020
0a
ret

LLVM IR (-O0):
@.str = [5 x i8] c"OK\0D\0A\00"
define void @ChatBoardSendOKIRQ() {
%1 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
br label %2
2: ; preds = %12, %0
%3 = load i8*, i8** %1
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %2
br label %7
7: ; preds = %11, %6
%8 = load volatile i32, i32* inttoptr (i64 352321560 to i32*)
%9 = and i32 %8, 512
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
br label %7
12: ; preds = %7
%13 = load i8*, i8** %1
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %1
%15 = load i8, i8* %13
store volatile i8 %15, i8* inttoptr (i64 352321568 to i8*)
br label %2
16: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @ChatBoardSendOKIRQ() {
br label %1
1: ; preds = %0, %1
%2 = load volatile i32, i32* inttoptr (i64 352321560 to i32*)
%3 = and i32 %2, 512
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
store volatile i8 79, i8* inttoptr (i64 352321568 to i8*)
br label %6
6: ; preds = %6, %5
%7 = load volatile i32, i32* inttoptr (i64 352321560 to i32*)
%8 = and i32 %7, 512
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %6
10: ; preds = %6
store volatile i8 75, i8* inttoptr (i64 352321568 to i8*)
br label %11
11: ; preds = %11, %10
%12 = load volatile i32, i32* inttoptr (i64 352321560 to i32*)
%13 = and i32 %12, 512
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %11
15: ; preds = %11
store volatile i8 13, i8* inttoptr (i64 352321568 to i8*)
br label %16
16: ; preds = %16, %15
%17 = load volatile i32, i32* inttoptr (i64 352321560 to i32*)
%18 = and i32 %17, 512
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %16
20: ; preds = %16
store volatile i8 10, i8* inttoptr (i64 352321568 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FixedWingPathFollowerStatusHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void FixedWingPathFollowerStatusUpdated() {
  UAVObjUpdated(FixedWingPathFollowerStatusHandle());
}


x86 assembly (clang, -O0):
<FixedWingPathFollowerStatusUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <FixedWingPathFollowerStatusHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FixedWingPathFollowerStatusUpdated>:
push   %rax
xor    %eax,%eax
call   1040 <FixedWingPathFollowerStatusHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @FixedWingPathFollowerStatusUpdated() {
%1 = call i32 (...) @FixedWingPathFollowerStatusHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FixedWingPathFollowerStatusUpdated() {
%1 = tail call i32 (...) @FixedWingPathFollowerStatusHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
int socket_v_rel(void) { return 0x20170505; }


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

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

LLVM IR (-O0):
define i32 @socket_v_rel() {
ret i32 538379525
}

LLVM IR (-O2):
define i32 @socket_v_rel() {
ret i32 538379525
}
float dloglaplace_loc(float x, float loc, float sc, float logsc) {
  return ((x > loc) - (x < loc)) / sc;
}


x86 assembly (clang, -O0):
<dloglaplace_loc>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
divss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dloglaplace_loc>:
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @dloglaplace_loc(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = fcmp ogt float %9, %10
%12 = zext i1 %11 to i32
%13 = load float, float* %5
%14 = load float, float* %6
%15 = fcmp olt float %13, %14
%16 = zext i1 %15 to i32
%17 = sub nsw i32 %12, %16
%18 = sitofp i32 %17 to float
%19 = load float, float* %7
%20 = fdiv float %18, %19
ret float %20
}

LLVM IR (-O2):
define float @dloglaplace_loc(float %0, float %1, float %2, float %3) {
%5 = fcmp ogt float %0, %1
%6 = zext i1 %5 to i32
%7 = fcmp olt float %0, %1
%8 = sext i1 %7 to i32
%9 = add nsw i32 %8, %6
%10 = sitofp i32 %9 to float
%11 = fdiv float %10, %2
ret float %11
}
/* Variables and functions */
int foo_inline();
int bar2() { return foo_inline(); }


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

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

LLVM IR (-O0):
define i32 @bar2() {
%1 = call i32 (...) @foo_inline()
ret i32 %1
}

LLVM IR (-O2):
define i32 @bar2() {
%1 = tail call i32 (...) @foo_inline()
ret i32 %1
}
int compare(const void *_a, const void *_b) {
  int *a, *b;
  a = (int *)_a;
  b = (int *)_b;
  return (*a - *b);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @compare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}