xunge/DecIR huggingface dataset:
int waitpid(int pid, int *status, int options) {
  int r;
  __asm__ __volatile__("\tint $0x80\n"
                       : "=a"(r)
                       : "a"(7), "b"(pid), "c"(status), "d"(options)
                       : "memory");
  return set_errno(r);
}


x86 assembly (clang, -O0):
<waitpid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0xc(%rbp),%ebx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%edx
mov    $0x7,%eax
int    $0x80
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
mov    $0x0,%al
call   1030 <set_errno@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitpid>:
push   %rbx
mov    %rsi,%rcx
mov    %edi,%ebx
mov    $0x7,%eax
int    $0x80
mov    %eax,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <set_errno@plt>

LLVM IR (-O0):
define i32 @waitpid(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* %4
%9 = load i32*, i32** %5
%10 = load i32, i32* %6
%11 = call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},{bx},{cx},{dx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 7, i32 %8, i32* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = call i32 (i32, ...) bitcast (i32 (...)* @set_errno to i32 (i32, ...)*)(i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @waitpid(i32 %0, i32* %1, i32 %2) {
%4 = tail call i32 asm sideeffect "\09int $$0x80\0A", "={ax},{ax},{bx},{cx},{dx},~{memory},~{dirflag},~{fpsr},~{flags}"(i32 7, i32 %0, i32* %1, i32 %2)
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @set_errno to i32 (i32, ...)*)(i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g();
void h(unsigned char *j) {
  int a = *j;
  if (a > 0xFF)
    f();
  else
    g();
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xff,-0xc(%rbp)
jle    114f <h+0x2f>
mov    $0x0,%al
call   1030 <f@plt>
jmp    1156 <h+0x36>
mov    $0x0,%al
call   1040 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @h(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 255
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 (...) @f()
br label %13
11: ; preds = %1
%12 = call i32 (...) @g()
br label %13
13: ; preds = %11, %9
ret void
}

LLVM IR (-O2):
define void @h(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @g()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void trap_sigsegv(int sig) {
  (void)sig;
  puts("\n"
       "--a94e2gfwdd--");
  puts("$success");
  puts("$shudown");
  while (1)
    ;
  ;
}


x86 assembly (clang, -O0):
<trap_sigsegv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
jmp    113f <trap_sigsegv+0x2f>

x86 assembly (clang, -O2):
<trap_sigsegv>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeec(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1140 <trap_sigsegv+0x30>

LLVM IR (-O0):
@.str = [16 x i8] c"\0A--a94e2gfwdd--\00"
@.str.1 = [9 x i8] c"$success\00"
@.str.2 = [9 x i8] c"$shudown\00"
define void @trap_sigsegv(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %1, %7
br label %7
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0A--a94e2gfwdd--\00"
@.str.1 = [9 x i8] c"$success\00"
@.str.2 = [9 x i8] c"$shudown\00"
define void @trap_sigsegv(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %5
5: ; preds = %1, %5
br label %5
}
void set_best_resolution(int width, int height) {}


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

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

LLVM IR (-O0):
define void @set_best_resolution(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @set_best_resolution(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x5a() {
  Assert_real((isbdigit(90) == 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_isbdigit.c",
              455, ("isbdigit should be 0 for Z"));
}


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

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

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

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for Z\00"
define void @t_isbdigit_0x5a() {
%1 = tail call i64 @isbdigit(i32 90)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 455, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_ctime;
};

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ stat(char const *, struct stat *);
int /*<<< orphan*/ strftime(char *, int, char *, int /*<<< orphan*/);
char *db_last_modified(const char *path) {
  static char date[20];
  struct stat st;
  stat(path, &st);
  strftime(date, 20, "%Y-%m-%d %H:%M:%S", localtime(&(st.st_ctime)));
  return date;
}


x86 assembly (clang, -O0):
<db_last_modified>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
lea    -0x10(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%ecx
lea    0x2ef5(%rip),%rdi
mov    $0x14,%esi
lea    0xe99(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2edd(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_last_modified>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <stat@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0x2eff(%rip),%rbx
lea    0xea8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x14,%esi
mov    %eax,%ecx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@db_last_modified.date = internal global [20 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @db_last_modified(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = call i32 @localtime(i32* %6)
%8 = call i32 @strftime(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @db_last_modified.date, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @db_last_modified.date, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@db_last_modified.date = internal global [20 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @db_last_modified(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = call i32 @localtime(i32* %5)
%7 = call i32 @strftime(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @db_last_modified.date, i64 0, i64 0), i32 20, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @db_last_modified.date, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, int, int,
                           char *);
char *pS(char *);
void genPrefix(FILE *out, char *op, int prior, int right, char *cmt) {
  fprintf(out, "  preOp(\'%s\',%d,%d).\t\t-- %s\n", pS(op), prior, right, cmt);
}


x86 assembly (clang, -O0):
<genPrefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <pS@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x20(%rbp),%r9
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genPrefix>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %rdi,%rbp
mov    %rsi,%rdi
call   1040 <pS@plt>
lea    0xebf(%rip),%rsi
mov    %rbp,%rdi
mov    %rax,%rdx
mov    %ebx,%ecx
mov    %r15d,%r8d
mov    %r14,%r9
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c" preOp('%s',%d,%d).\09\09-- %s\0A\00"
define void @genPrefix(i32* %0, i8* %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32* %0, i32** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i32*, i32** %6
%12 = load i8*, i8** %7
%13 = call i8* @pS(i8* %12)
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i8*, i8** %10
%17 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i32 %15, i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c" preOp('%s',%d,%d).\09\09-- %s\0A\00"
define void @genPrefix(i32* nocapture %0, i8* %1, i32 %2, i32 %3, i8* %4) {
%6 = tail call i8* @pS(i8* %1)
%7 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %2, i32 %3, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ remove(char *);
int remove_file(char *file_name) {
  remove(file_name);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @remove_file(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
ret i32 0
}
/* Variables and functions */
scalar_t__ lround(double);
float lroundf(float s) { return (float)lround((double)s); }


x86 assembly (clang, -O0):
<lroundf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <lround@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lroundf>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <lround@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @lroundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = call i64 @lround(double %4)
%6 = sitofp i64 %5 to float
ret float %6
}

LLVM IR (-O2):
define float @lroundf(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @lround(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ XExtData;
struct TYPE_2__ {
  int /*<<< orphan*/ *ext_data;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_ext_data(void *_p, void *_v) {
  ((Screen *)_p)->ext_data = (XExtData *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_Screen_ext_data(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_Screen_ext_data(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
int /*<<< orphan*/ sleep(int);
int main(void) {
  if (fork() > 0)
    sleep(5);
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
cmp    $0x0,%rax
jle    115a <main+0x2a>
mov    $0x5,%edi
call   1040 <sleep@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
jle    1147 <main+0x17>
mov    $0x5,%edi
call   1040 <sleep@plt>
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @fork()
%3 = icmp sgt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @sleep(i32 5)
br label %6
6: ; preds = %4, %0
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp sgt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @sleep(i32 5)
br label %5
5: ; preds = %3, %0
%6 = tail call i32 @exit(i32 1)
unreachable
}
void s5p64x0_default_sdhci1(void) {}


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

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

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

LLVM IR (-O2):
define void @s5p64x0_default_sdhci1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void safe_free(void *p) {
  free(p);
  if (p != NULL) {
    p = NULL;
  }
}


x86 assembly (clang, -O0):
<safe_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x8(%rbp)
je     1138 <safe_free+0x28>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @safe_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @safe_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_224() {
  Assert_real((isqrt(224) == 14),
              "/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",
              1125, ("Integer square root of 224 should be 14"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_224>:
push   %rax
mov    $0xe0,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x465,%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 = [40 x i8] c"Integer square root of 224 should be 14\00"
define void @t_sqrt_224() {
%1 = call i32 @isqrt(i32 224)
%2 = icmp eq i32 %1, 14
%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 1125, i8* getelementptr inbounds ([40 x i8], [40 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 = [40 x i8] c"Integer square root of 224 should be 14\00"
define void @t_sqrt_224() {
%1 = tail call i32 @isqrt(i32 224)
%2 = icmp eq i32 %1, 14
%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 1125, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct uniform_random {
  int dummy;
};

/* Variables and functions */
double int64(struct uniform_random *);
double uniform_random_value(struct uniform_random *ran) {
  return 5.42101086242752217E-20 * int64(ran);
}


x86 assembly (clang, -O0):
<uniform_random_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <int64@plt>
movaps %xmm0,%xmm1
movsd  0xed0(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform_random_value>:
push   %rax
call   1030 <int64@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.uniform_random = type { i32 }
define double @uniform_random_value(%struct.uniform_random* %0) {
%2 = alloca %struct.uniform_random*
store %struct.uniform_random* %0, %struct.uniform_random** %2
%3 = load %struct.uniform_random*, %struct.uniform_random** %2
%4 = call double @int64(%struct.uniform_random* %3)
%5 = fmul double 0x3BF0000000000000, %4
ret double %5
}

LLVM IR (-O2):
%struct.uniform_random = type { i32 }
define double @uniform_random_value(%struct.uniform_random* %0) {
%2 = tail call double @int64(%struct.uniform_random* %0)
%3 = fmul double %2, 0x3BF0000000000000
ret double %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XCreateWindowEvent;

/* Variables and functions */
int get_XCreateWindowEvent_y(void *_p) {
  return (int)((XCreateWindowEvent *)_p)->y;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XCreateWindowEvent_y(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XCreateWindowEvent_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 0;
  i = !i;
  printf("%d", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned short)8426;
    if ((state[0UL] >> (unsigned short)4) & (unsigned short)1) {
      state[0UL] += state[0UL];
    } else {
      state[0UL] += state[0UL];
    }
    output[0UL] = (state[0UL] + 119333056UL) - (unsigned short)11438;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
add    $0x30dd5ac,%rax
add    $0x20ea,%rax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
sar    $0x4,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1149 <RandomFunc+0x49>
movzwl -0x12(%rbp),%ecx
movzwl -0x12(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x12(%rbp)
jmp    1157 <RandomFunc+0x57>
movzwl -0x12(%rbp),%ecx
movzwl -0x12(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
add    $0x71ce0c0,%rax
sub    $0x2cae,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
add    %eax,%eax
add    $0xffffa13e,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
store i16* %0, i16** %3
store i16* %1, i16** %4
%6 = load i16*, i16** %3
%7 = getelementptr inbounds i16, i16* %6, i64 0
%8 = load i16, i16* %7
%9 = zext i16 %8 to i64
%10 = add i64 %9, 51238316
%11 = add i64 %10, 8426
%12 = trunc i64 %11 to i16
%13 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %12, i16* %13
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%15 = load i16, i16* %14
%16 = zext i16 %15 to i32
%17 = ashr i32 %16, 4
%18 = and i32 %17, 1
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %29
20: ; preds = %2
%21 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%22 = load i16, i16* %21
%23 = zext i16 %22 to i32
%24 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%25 = load i16, i16* %24
%26 = zext i16 %25 to i32
%27 = add nsw i32 %26, %23
%28 = trunc i32 %27 to i16
store i16 %28, i16* %24
br label %38
29: ; preds = %2
%30 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%31 = load i16, i16* %30
%32 = zext i16 %31 to i32
%33 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%34 = load i16, i16* %33
%35 = zext i16 %34 to i32
%36 = add nsw i32 %35, %32
%37 = trunc i32 %36 to i16
store i16 %37, i16* %33
br label %38
38: ; preds = %29, %20
%39 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%40 = load i16, i16* %39
%41 = zext i16 %40 to i64
%42 = add i64 %41, 119333056
%43 = sub i64 %42, 11438
%44 = trunc i64 %43 to i16
%45 = load i16*, i16** %4
%46 = getelementptr inbounds i16, i16* %45, i64 0
store i16 %44, i16* %46
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 1
%5 = add i16 %4, -24258
store i16 %5, i16* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void kill_usage(void) {
  fprintf(stderr,
          "Usage:\n"
          "  kill pid ...              Send SIGTERM to every process listed.\n"
          "  kill signal pid ...       Send a signal to every process listed.\n"
          "  kill -s signal pid ...    Send a signal to every process listed.\n"
          "  kill -l                   List all signal names.\n"
          "  kill -L                   List all signal names in a nice table.\n"
          "  kill -l signal            Convert between signal numbers and "
          "names.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<kill_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<kill_usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [396 x i8] c"Usage:\0A kill pid ... Send SIGTERM to every process listed.\0A kill signal pid ... Send a signal to every process listed.\0A kill -s signal pid ... Send a signal to every process listed.\0A kill -l List all signal names.\0A kill -L List all signal names in a nice table.\0A kill -l signal Convert between signal numbers and names.\0A\00"
define void @kill_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([396 x i8], [396 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [396 x i8] c"Usage:\0A kill pid ... Send SIGTERM to every process listed.\0A kill signal pid ... Send a signal to every process listed.\0A kill -s signal pid ... Send a signal to every process listed.\0A kill -l List all signal names.\0A kill -L List all signal names in a nice table.\0A kill -l signal Convert between signal numbers and names.\0A\00"
define void @kill_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([396 x i8], [396 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *NormalizeStringN(char *, int /*<<< orphan*/);
char *NormalizeString(char *Input) { return (NormalizeStringN(Input, 0)); }


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

x86 assembly (clang, -O2):
<NormalizeString>:
xor    %esi,%esi
jmp    1030 <NormalizeStringN@plt>

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

LLVM IR (-O2):
define i8* @NormalizeString(i8* %0) {
%2 = tail call i8* @NormalizeStringN(i8* %0, i32 0)
ret i8* %2
}
int test_imm_40int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x40 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_40int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x40,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_40int64_midword_mem>:
testb  $0x40,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_40int64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 64
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_40int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 4194304
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int wl_bssiovar_set(char *, char *, int, int *, int);
int wl_bssiovar_setint(char *ifname, char *iovar, int bssidx, int val) {
  return wl_bssiovar_set(ifname, iovar, bssidx, &val, sizeof(int));
}


x86 assembly (clang, -O0):
<wl_bssiovar_setint>:
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    -0x14(%rbp),%edx
lea    -0x18(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <wl_bssiovar_set@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_bssiovar_setint>:
push   %rax
mov    %ecx,0x4(%rsp)
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <wl_bssiovar_set@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @wl_bssiovar_setint(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
store i32 %3, i32* %5
%6 = call i32 @wl_bssiovar_set(i8* %0, i8* %1, i32 %2, i32* %5, i32 4)
ret i32 %6
}
/* Variables and functions */
char *strchr(char *, char);
void ZeroReturn(char *input) {
  char *c = strchr(input, '\n');
  if (c)
    *c = 0;
}


x86 assembly (clang, -O0):
<ZeroReturn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <ZeroReturn+0x30>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZeroReturn>:
push   %rax
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1123 <ZeroReturn+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @ZeroReturn(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 10)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @ZeroReturn(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
void wnm_clear_coloc_intf_reporting(struct wpa_supplicant *wpa_s) {}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
define void @wnm_clear_coloc_intf_reporting(%struct.wpa_supplicant* %0) {
%2 = alloca %struct.wpa_supplicant*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %2
ret void
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define void @wnm_clear_coloc_intf_reporting(%struct.wpa_supplicant* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ansi_escape(char *);
void ansi_close() {
  ansi_escape(">4;0m");
  ansi_escape("?47l");
}


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

x86 assembly (clang, -O2):
<ansi_close>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ansi_escape@plt>
lea    0xee2(%rip),%rdi
pop    %rax
jmp    1030 <ansi_escape@plt>

LLVM IR (-O0):
@.str = [6 x i8] c">4;0m\00"
@.str.1 = [5 x i8] c"?47l\00"
define void @ansi_close() {
%1 = call i32 @ansi_escape(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @ansi_escape(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c">4;0m\00"
@.str.1 = [5 x i8] c"?47l\00"
define void @ansi_close() {
%1 = tail call i32 @ansi_escape(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ansi_escape(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int Operand_bs4_encode(unsigned int *valp) {
  int error;
  error = (*valp & ~(0x3 << 2)) != 0;
  *valp = *valp >> 2;
  return error;
}


x86 assembly (clang, -O0):
<Operand_bs4_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xfffffff3,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shr    $0x2,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_bs4_encode>:
mov    (%rdi),%ecx
xor    %eax,%eax
test   $0xfffffff3,%ecx
setne  %al
shr    $0x2,%ecx
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define i32 @Operand_bs4_encode(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = and i32 %5, -13
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = lshr i32 %10, 2
%12 = load i32*, i32** %2
store i32 %11, i32* %12
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @Operand_bs4_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, -13
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
%6 = lshr i32 %2, 2
store i32 %6, i32* %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Beta_Left(int value) {
  if (value) {
    cpc_key_press(0x62);
  } else {
    cpc_key_unpress(0x62);
  };
}


x86 assembly (clang, -O0):
<Joy_Beta_Left>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Beta_Left+0x24>
mov    $0x62,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Beta_Left+0x2e>
mov    $0x62,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Beta_Left>:
test   %edi,%edi
je     112e <Joy_Beta_Left+0xe>
mov    $0x62,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x62,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Beta_Left(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 98)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 98)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Beta_Left(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 98)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 98)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
void *__thinthin_dlsym(long, char const *);
void *dlsym(void *handle, const char *symbol) {
  void *ret = __thinthin_dlsym((long)handle, symbol);
  return ret;
}


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

x86 assembly (clang, -O2):
<dlsym>:
jmp    1030 <__thinthin_dlsym@plt>

LLVM IR (-O0):
define i8* @dlsym(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = load i8*, i8** %4
%9 = call i8* @__thinthin_dlsym(i64 %7, i8* %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
define i8* @dlsym(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i8* @__thinthin_dlsym(i64 %3, i8* %1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ uart_putc(unsigned char);
void uart_puts(const char *str) {
  for (size_t i = 0; str[i] != '\0'; i++) {
    uart_putc((unsigned char)str[i]);
  }
}


x86 assembly (clang, -O0):
<uart_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115b <uart_puts+0x4b>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%edi
call   1030 <uart_putc@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <uart_puts+0x14>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @uart_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i8 [ %11, %5 ], [ %2, %1 ]
%7 = phi i64 [ %9, %5 ], [ 0, %1 ]
%8 = tail call i32 @uart_putc(i8 zeroext %6)
%9 = add i64 %7, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %4, label %5
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ timespecsubp(struct timespec *, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void timespecsub(struct timespec *t1, const struct timespec *t2) {
  timespecsubp(t1, t2->tv_sec, t2->tv_nsec);
}


x86 assembly (clang, -O0):
<timespecsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
call   1030 <timespecsubp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespecsub>:
mov    (%rsi),%edx
mov    0x4(%rsi),%esi
jmp    1030 <timespecsubp@plt>

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @timespecsub(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %3
%6 = load %struct.timespec*, %struct.timespec** %4
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %6, i32 0, i32 1
%8 = load i32, i32* %7
%9 = load %struct.timespec*, %struct.timespec** %4
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %9, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @timespecsubp(%struct.timespec* %5, i32 %8, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @timespecsub(%struct.timespec* %0, %struct.timespec* nocapture %1) {
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @timespecsubp(%struct.timespec* %0, i32 %4, i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_http();
int /*<<< orphan*/ check_netlink();
int /*<<< orphan*/ check_ssh();
void network_test(void) {
  check_ssh();
  check_http();
  check_netlink();
}


x86 assembly (clang, -O0):
<network_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <check_ssh@plt>
mov    $0x0,%al
call   1030 <check_http@plt>
mov    $0x0,%al
call   1050 <check_netlink@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<network_test>:
push   %rax
xor    %eax,%eax
call   1040 <check_ssh@plt>
xor    %eax,%eax
call   1030 <check_http@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <check_netlink@plt>

LLVM IR (-O0):
define void @network_test() {
%1 = call i32 (...) @check_ssh()
%2 = call i32 (...) @check_http()
%3 = call i32 (...) @check_netlink()
ret void
}

LLVM IR (-O2):
define void @network_test() {
%1 = tail call i32 (...) @check_ssh()
%2 = tail call i32 (...) @check_http()
%3 = tail call i32 (...) @check_netlink()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ list2(int, int);
int pair(int, int /*<<< orphan*/);
int list3(int a, int b, int c) { return pair(a, list2(b, c)); }


x86 assembly (clang, -O0):
<list3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <list2@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <pair@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list3>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
mov    %edx,%esi
call   1040 <list2@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <pair@plt>

LLVM IR (-O0):
define i32 @list3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @list2(i32 %8, i32 %9)
%11 = call i32 @pair(i32 %7, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @list3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @list2(i32 %1, i32 %2)
%5 = tail call i32 @pair(i32 %0, i32 %4)
ret i32 %5
}
void ff_hevc_put_hevc_bi_w_qpel_v48_8_sse4() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
scalar_t__ sysinfo(struct sysinfo *);
int main() {
  struct sysinfo sys_info;
  if (sysinfo(&sys_info) != 0)
    perror("sysinfo");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sysinfo@plt>
cmp    $0x0,%rax
je     114e <main+0x2e>
lea    0xeb7(%rip),%rdi
call   1030 <perror@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
call   1040 <sysinfo@plt>
test   %rax,%rax
jne    1132 <main+0x12>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1030 <perror@plt>
jmp    112e <main+0xe>

LLVM IR (-O0):
%struct.sysinfo = type { i32 }
@.str = [8 x i8] c"sysinfo\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.sysinfo
store i32 0, i32* %1
%3 = call i64 @sysinfo(%struct.sysinfo* %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 0
}

LLVM IR (-O2):
%struct.sysinfo = type { i32 }
@.str = [8 x i8] c"sysinfo\00"
define i32 @main() {
%1 = alloca %struct.sysinfo
%2 = bitcast %struct.sysinfo* %1 to i8*
%3 = call i64 @sysinfo(%struct.sysinfo* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ caracteres();
int main() {
  caracteres();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @caracteres()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @caracteres()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcslen(const wchar_t *str) {
  size_t n = 0;
  while (*(str++))
    n++;
  return n;
}


x86 assembly (clang, -O0):
<wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
cmpl   $0x0,(%rax)
je     1139 <wcslen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <wcslen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcslen>:
cmpl   $0x0,(%rdi)
je     111f <wcslen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpl   $0x0,0x4(%rdi,%rcx,4)
mov    %rax,%rcx
jne    1110 <wcslen+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @wcslen(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
store i64 0, i64* %3
br label %4
4: ; preds = %9, %1
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i32 1
store i32* %6, i32** %2
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = load i64, i64* %3
%11 = add i64 %10, 1
store i64 %11, i64* %3
br label %4
12: ; preds = %4
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
define i64 @wcslen(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = add i64 %5, 1
%9 = load i32, i32* %7
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}