xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ my_pthread_self();
int /*<<< orphan*/ my_pthread_self_970();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ pthread_self();
int main(void) {
  printf("library: %p\n", pthread_self());
  printf("UFT    : %p\n", my_pthread_self());
  printf("SPRG3  : %p\n", my_pthread_self_970());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <my_pthread_self@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <my_pthread_self_970@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <my_pthread_self@plt>
lea    0xea9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <my_pthread_self_970@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"library: %p\0A\00"
@.str.1 = [13 x i8] c"UFT : %p\0A\00"
@.str.2 = [13 x i8] c"SPRG3 : %p\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @pthread_self()
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @my_pthread_self()
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @my_pthread_self_970()
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"library: %p\0A\00"
@.str.1 = [13 x i8] c"UFT : %p\0A\00"
@.str.2 = [13 x i8] c"SPRG3 : %p\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @pthread_self()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @my_pthread_self()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @my_pthread_self_970()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
int main() {
  unsigned long out1, out2;
  asm("rdtsc" : "=a"(out1), "=d"(out2));
  printf("tsc %lx\n", out1 | (out2 << 32));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
rdtsc
mov    %rax,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
shl    $0x20,%rax
or     %rax,%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
rdtsc
shl    $0x20,%rdx
or     %rax,%rdx
lea    0xedf(%rip),%rdi
mov    %rdx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"tsc %lx\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call { i64, i64 } asm "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%5 = extractvalue { i64, i64 } %4, 0
%6 = extractvalue { i64, i64 } %4, 1
store i64 %5, i64* %2
store i64 %6, i64* %3
%7 = load i64, i64* %2
%8 = load i64, i64* %3
%9 = shl i64 %8, 32
%10 = or i64 %7, %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"tsc %lx\0A\00"
define i32 @main() {
%1 = tail call { i64, i64 } asm "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i64, i64 } %1, 0
%3 = extractvalue { i64, i64 } %1, 1
%4 = shl i64 %3, 32
%5 = or i64 %4, %2
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %5)
ret i32 0
}
int utilsInit(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @utilsInit() {
ret i32 0
}

LLVM IR (-O2):
define i32 @utilsInit() {
ret i32 0
}
/* Variables and functions */
float quick_trig_sin(float);
float quick_trig_cos(float x) {
  return quick_trig_sin(3.141592653589793f / 2.0f + x);
}


x86 assembly (clang, -O0):
<quick_trig_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
call   1030 <quick_trig_sin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_trig_cos>:
addss  0xee8(%rip),%xmm0
jmp    1030 <quick_trig_sin@plt>

LLVM IR (-O0):
define float @quick_trig_cos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float 0x3FF921FB60000000, %3
%5 = call float @quick_trig_sin(float %4)
ret float %5
}

LLVM IR (-O2):
define float @quick_trig_cos(float %0) {
%2 = fadd float %0, 0x3FF921FB60000000
%3 = tail call float @quick_trig_sin(float %2)
ret float %3
}
void VecAdd3fv(float v[3], const float a[3], float b0, float b1, float b2) {
  v[0] = a[0] + b0;
  v[1] = a[1] + b1;
  v[2] = a[2] + b2;
}


x86 assembly (clang, -O0):
<VecAdd3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
movss  %xmm2,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
addss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
addss  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
addss  -0x1c(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecAdd3fv>:
addss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
addss  0x4(%rsi),%xmm1
movss  %xmm1,0x4(%rdi)
addss  0x8(%rsi),%xmm2
movss  %xmm2,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecAdd3fv(float* %0, float* %1, float %2, float %3, float %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float* %0, float** %6
store float* %1, float** %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float*, float** %7
%12 = getelementptr inbounds float, float* %11, i64 0
%13 = load float, float* %12
%14 = load float, float* %8
%15 = fadd float %13, %14
%16 = load float*, float** %6
%17 = getelementptr inbounds float, float* %16, i64 0
store float %15, float* %17
%18 = load float*, float** %7
%19 = getelementptr inbounds float, float* %18, i64 1
%20 = load float, float* %19
%21 = load float, float* %9
%22 = fadd float %20, %21
%23 = load float*, float** %6
%24 = getelementptr inbounds float, float* %23, i64 1
store float %22, float* %24
%25 = load float*, float** %7
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = load float, float* %10
%29 = fadd float %27, %28
%30 = load float*, float** %6
%31 = getelementptr inbounds float, float* %30, i64 2
store float %29, float* %31
ret void
}

LLVM IR (-O2):
define void @VecAdd3fv(float* nocapture writeonly %0, float* nocapture %1, float %2, float %3, float %4) {
%6 = load float, float* %1
%7 = fadd float %6, %2
store float %7, float* %0
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = fadd float %9, %3
%11 = getelementptr inbounds float, float* %0, i64 1
store float %10, float* %11
%12 = getelementptr inbounds float, float* %1, i64 2
%13 = load float, float* %12
%14 = fadd float %13, %4
%15 = getelementptr inbounds float, float* %0, i64 2
store float %14, float* %15
ret void
}
/* Variables and functions */
unsigned int from_gps(int);
unsigned int ch_epoch_chk(int ch) { return (from_gps((ch << 3) + 7)); }


x86 assembly (clang, -O0):
<ch_epoch_chk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
add    $0x7,%edi
call   1030 <from_gps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_epoch_chk>:
lea    0x7(,%rdi,8),%edi
jmp    1030 <from_gps@plt>

LLVM IR (-O0):
define i32 @ch_epoch_chk(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 3
%5 = add nsw i32 %4, 7
%6 = call i32 @from_gps(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @ch_epoch_chk(i32 %0) {
%2 = shl i32 %0, 3
%3 = or i32 %2, 7
%4 = tail call i32 @from_gps(i32 %3)
ret i32 %4
}
void PointerReferenced() { return; }


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

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

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

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

/* Variables and functions */
bool _dl_file_id_match_p(const struct r_file_id *a __attribute__((unused)),
                         const struct r_file_id *b __attribute__((unused))) {
  return false;
}


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

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

LLVM IR (-O0):
%struct.r_file_id = type { i32 }
define i32 @_dl_file_id_match_p(%struct.r_file_id* %0, %struct.r_file_id* %1) {
%3 = alloca %struct.r_file_id*
%4 = alloca %struct.r_file_id*
store %struct.r_file_id* %0, %struct.r_file_id** %3
store %struct.r_file_id* %1, %struct.r_file_id** %4
ret i32 0
}

LLVM IR (-O2):
%struct.r_file_id = type { i32 }
define i32 @_dl_file_id_match_p(%struct.r_file_id* nocapture readnone %0, %struct.r_file_id* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, const char *argv[]) {
  char *text = "Hell\0o, World!\n";
  printf("Hello, World!\n");
  printf("%s\n", text);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xed8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [16 x i8] c"Hell\00o, World!\0A\00"
@.str.1 = [15 x i8] c"Hello, World!\0A\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8*, i8** %6
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Hell\00o, World!\0A\00"
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ err(char *, int /*<<< orphan*/, char const *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ *opendir(char const *);
DIR *open_dir(const char *p) {
  DIR *dir;
  dir = opendir(p);
  if (!dir)
    err("failed to open directory", errno, p);
  return dir;
}


x86 assembly (clang, -O0):
<open_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115d <open_dir+0x3d>
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
lea    0xea8(%rip),%rdi
call   1040 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_dir>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <opendir@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114c <open_dir+0x2c>
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
mov    %r14,%rdx
call   1040 <err@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [25 x i8] c"failed to open directory\00"
@errno = global i32 0
define i32* @open_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @opendir(i8* %4)
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @errno
%10 = load i8*, i8** %2
%11 = call i32 @err(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10)
br label %12
12: ; preds = %8, %1
%13 = load i32*, i32** %3
ret i32* %13
}

LLVM IR (-O2):
@.str = [25 x i8] c"failed to open directory\00"
@errno = global i32 0
define noalias i32* @open_dir(i8* %0) {
%2 = tail call i32* @opendir(i8* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @err(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %5, i8* %0)
br label %7
7: ; preds = %4, %1
ret i32* %2
}
/* Type definitions */
struct hostent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ gethostbyname2_r(char *, int /*<<< orphan*/,
                                    struct hostent *, char *, int,
                                    struct hostent **, int *);
int main() {
  struct hostent ret;
  struct hostent *retptr;
  char buf[4096];
  int error;
  gethostbyname2_r("localhost", AF_INET, &ret, buf, 4096, &retptr, &error);
  return retptr == NULL;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
lea    -0x1010(%rbp),%rcx
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rdx
mov    $0x1000,%r8d
lea    -0x10(%rbp),%r9
lea    -0x1014(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <gethostbyname2_r@plt>
cmpq   $0x0,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1028,%rsp
mov    0x2eca(%rip),%rax
mov    (%rax),%esi
lea    0x1c(%rsp),%rax
mov    %rax,(%rsp)
lea    0xed0(%rip),%rdi
lea    0x18(%rsp),%rdx
lea    0x20(%rsp),%rcx
lea    0x10(%rsp),%r9
mov    $0x1000,%r8d
call   1030 <gethostbyname2_r@plt>
xor    %eax,%eax
cmpq   $0x0,0x10(%rsp)
sete   %al
add    $0x1028,%rsp
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@.str = [10 x i8] c"localhost\00"
@AF_INET = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.hostent
%3 = alloca %struct.hostent*
%4 = alloca [4096 x i8]
%5 = alloca i32
store i32 0, i32* %1
%6 = load i32, i32* @AF_INET
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %4, i64 0, i64 0
%8 = call i32 @gethostbyname2_r(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6, %struct.hostent* %2, i8* %7, i32 4096, %struct.hostent** %3, i32* %5)
%9 = load %struct.hostent*, %struct.hostent** %3
%10 = icmp eq %struct.hostent* %9, null
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@.str = [10 x i8] c"localhost\00"
@AF_INET = global i32 0
define i32 @main() {
%1 = alloca %struct.hostent
%2 = alloca %struct.hostent*
%3 = alloca [4096 x i8]
%4 = alloca i32
%5 = bitcast %struct.hostent* %1 to i8*
%6 = bitcast %struct.hostent** %2 to i8*
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%8 = bitcast i32* %4 to i8*
%9 = load i32, i32* @AF_INET
%10 = call i32 @gethostbyname2_r(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %9, %struct.hostent* %1, i8* %7, i32 4096, %struct.hostent** %2, i32* %4)
%11 = load %struct.hostent*, %struct.hostent** %2
%12 = icmp eq %struct.hostent* %11, null
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int __LDMpthread_mutex_unlock(int /*<<< orphan*/ *);
int pthread_mutex_unlock(pthread_mutex_t *lock) {
  return __LDMpthread_mutex_unlock(lock);
}


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

x86 assembly (clang, -O2):
<pthread_mutex_unlock>:
jmp    1030 <__LDMpthread_mutex_unlock@plt>

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

LLVM IR (-O2):
define i32 @pthread_mutex_unlock(i32* %0) {
%2 = tail call i32 @__LDMpthread_mutex_unlock(i32* %0)
ret i32 %2
}
void GET_PROMPT_NBR(r, s, d) int *r, d;
char *s;
{
  puts((char *)s);
  GET_NBR(r, d);
}


x86 assembly (clang, -O0):
<GET_PROMPT_NBR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1040 <GET_NBR@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GET_PROMPT_NBR>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %rsi,%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <GET_NBR@plt>

LLVM IR (-O0):
define void @GET_PROMPT_NBR(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %7)
%9 = load i32*, i32** %4
%10 = load i32, i32* %6
%11 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @GET_NBR to i32 (i32*, i32, ...)*)(i32* %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @GET_PROMPT_NBR(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %1)
%5 = tail call i32 (i32*, i32, ...) bitcast (i32 (...)* @GET_NBR to i32 (i32*, i32, ...)*)(i32* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int, int);
void C67_CMPGTDP(int s1, int s2, int dst) {
  C67_asm("CMPGTDP.S1", s1, s2, dst);
}


x86 assembly (clang, -O0):
<C67_CMPGTDP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecf(%rip),%rdi
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_CMPGTDP>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <C67_asm@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"CMPGTDP.S1\00"
define void @C67_CMPGTDP(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 @C67_asm(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"CMPGTDP.S1\00"
define void @C67_CMPGTDP(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @C67_asm(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}
void yydestruct(const char *yymsg, int yytype, void **yyvaluep) {
  ((void)(yyvaluep));
  if (!yymsg)
    yymsg = "Deleting";
  ;
  switch (yytype) {
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<yydestruct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1125 <yydestruct+0x25>
lea    0xedf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <yydestruct+0x2a>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @yydestruct(i8* nocapture %0, i32 %1, i8** nocapture %2) {
ret void
}
void XtRemoveAllCallbacks() {}


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

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

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

LLVM IR (-O2):
define void @XtRemoveAllCallbacks() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ tmp;
typedef int /*<<< orphan*/ int16_t;
typedef scalar_t__ caddr_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, scalar_t__, int);
int16_t ptr_ret_int16_t(void *arg1, int offset) {
  int16_t tmp;
  memcpy(&tmp, (caddr_t)arg1 + offset, sizeof(tmp));
  return tmp;
}


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

x86 assembly (clang, -O2):
<ptr_ret_int16_t>:
push   %rax
movslq %esi,%rsi
add    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ptr_ret_int16_t(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = add nsw i64 %7, %9
%11 = call i32 @memcpy(i32* %5, i64 %10, i32 4)
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @ptr_ret_int16_t(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = ptrtoint i8* %0 to i64
%6 = sext i32 %1 to i64
%7 = add nsw i64 %6, %5
%8 = call i32 @memcpy(i32* %3, i64 %7, i32 4)
%9 = load i32, i32* %3
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ out_asm(char *);
void impl_func_prologue_save_fp(void) {
  out_asm("addi  $sp, $sp, -8");
  out_asm("sw    $ra, 4($sp)");
  out_asm("sw    $fp,  ($sp)");
  out_asm("move  $fp, $sp");
}


x86 assembly (clang, -O0):
<impl_func_prologue_save_fp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <out_asm@plt>
lea    0xeec(%rip),%rdi
call   1030 <out_asm@plt>
lea    0xef2(%rip),%rdi
call   1030 <out_asm@plt>
lea    0xef8(%rip),%rdi
call   1030 <out_asm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<impl_func_prologue_save_fp>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <out_asm@plt>
lea    0xeef(%rip),%rdi
call   1030 <out_asm@plt>
lea    0xef5(%rip),%rdi
call   1030 <out_asm@plt>
lea    0xefb(%rip),%rdi
pop    %rax
jmp    1030 <out_asm@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"addi $sp, $sp, -8\00"
@.str.1 = [18 x i8] c"sw $ra, 4($sp)\00"
@.str.2 = [18 x i8] c"sw $fp, ($sp)\00"
@.str.3 = [15 x i8] c"move $fp, $sp\00"
define void @impl_func_prologue_save_fp() {
%1 = call i32 @out_asm(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @out_asm(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @out_asm(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @out_asm(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"addi $sp, $sp, -8\00"
@.str.1 = [18 x i8] c"sw $ra, 4($sp)\00"
@.str.2 = [18 x i8] c"sw $fp, ($sp)\00"
@.str.3 = [15 x i8] c"move $fp, $sp\00"
define void @impl_func_prologue_save_fp() {
%1 = tail call i32 @out_asm(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @out_asm(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @out_asm(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @out_asm(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_MultiplyMat4ByVec4_init(void) {
  _hmt_register_covercase("HMM_MultiplyMat4ByVec4", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_MultiplyMat4ByVec4_init>:
lea    0xee9(%rip),%rdi
lea    0xef9(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"HMM_MultiplyMat4ByVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_MultiplyMat4ByVec4_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"HMM_MultiplyMat4ByVec4\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_MultiplyMat4ByVec4_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int abs(int j) {
  if (j < 0)
    return -j;
  return j;
}


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <abs+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Dorado9211ClearClock();
int /*<<< orphan*/ Dorado9211SetClock();
void Dorado9211ToggleClock(void) {
  Dorado9211SetClock();
  Dorado9211ClearClock();
}


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

x86 assembly (clang, -O2):
<Dorado9211ToggleClock>:
push   %rax
xor    %eax,%eax
call   1040 <Dorado9211SetClock@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Dorado9211ClearClock@plt>

LLVM IR (-O0):
define void @Dorado9211ToggleClock() {
%1 = call i32 (...) @Dorado9211SetClock()
%2 = call i32 (...) @Dorado9211ClearClock()
ret void
}

LLVM IR (-O2):
define void @Dorado9211ToggleClock() {
%1 = tail call i32 (...) @Dorado9211SetClock()
%2 = tail call i32 (...) @Dorado9211ClearClock()
ret void
}
/* Type definitions */
typedef char *uint16_t;

/* Variables and functions */
uint16_t get_fpcw(void) {
  uint16_t fpcw;
  __asm__ __volatile__("fnstcw %0" : "=m"(fpcw));
  return fpcw;
}


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

x86 assembly (clang, -O2):
<get_fpcw>:
fnstcw -0x8(%rsp)
mov    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i8* @get_fpcw() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define i8* @get_fpcw() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = load i8*, i8** %1
ret i8* %3
}
/* Type definitions */
typedef int uint8_t;
typedef int int32_t;

/* Variables and functions */
int32_t make_version(uint8_t major, uint8_t minor, uint8_t revision) {
  int32_t ver = major;
  ver = (ver << 8) | minor;
  ver = (ver << 8) | revision;
  ver = (ver << 8);
  return ver;
}


x86 assembly (clang, -O0):
<make_version>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_version>:
mov    %esi,%eax
shl    $0x10,%edi
shl    $0x8,%eax
or     %edi,%eax
or     %edx,%eax
shl    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @make_version(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
store i32 %8, i32* %7
%9 = load i32, i32* %7
%10 = shl i32 %9, 8
%11 = load i32, i32* %5
%12 = or i32 %10, %11
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = shl i32 %13, 8
%15 = load i32, i32* %6
%16 = or i32 %14, %15
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = shl i32 %17, 8
store i32 %18, i32* %7
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @make_version(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 16
%5 = shl i32 %1, 8
%6 = or i32 %5, %4
%7 = or i32 %6, %2
%8 = shl i32 %7, 8
ret i32 %8
}
/* Variables and functions */
int add_rec(int, int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
int some_callback(int x) {
  printf("some_callback(%d)\n", x);
  fflush(stdout);
  return add_rec(x, 9);
}


x86 assembly (clang, -O0):
<some_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0x4(%rbp),%edi
mov    $0x9,%esi
call   1050 <add_rec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<some_callback>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    %ebx,%edi
mov    $0x9,%esi
pop    %rbx
jmp    1050 <add_rec@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"some_callback(%d)\0A\00"
@stdout = global i32 0
define i32 @some_callback(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @add_rec(i32 %7, i32 9)
ret i32 %8
}

LLVM IR (-O2):
@.str = [19 x i8] c"some_callback(%d)\0A\00"
@stdout = global i32 0
define i32 @some_callback(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 @add_rec(i32 %0, i32 9)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xb9() {
  Assert_real((isascii(185) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              930, ("isascii should be 0 for 0xb9"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xb9\00"
define void @t_isascii_0xb9() {
%1 = tail call i64 @isascii(i32 185)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 930, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintRTF(char *);
int /*<<< orphan*/ free(char *);
char *getBraceParam();
void CmdMatrix(int code) {
  char *contents;
  fprintRTF(" matrix not implemented ");
  contents = getBraceParam();
  free(contents);
}


x86 assembly (clang, -O0):
<CmdMatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1050 <fprintRTF@plt>
mov    $0x0,%al
call   1040 <getBraceParam@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdMatrix>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <fprintRTF@plt>
xor    %eax,%eax
call   1040 <getBraceParam@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [25 x i8] c" matrix not implemented \00"
define void @CmdMatrix(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i32 @fprintRTF(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = call i8* (...) @getBraceParam()
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c" matrix not implemented \00"
define void @CmdMatrix(i32 %0) {
%2 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i8* (...) @getBraceParam()
%4 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
char tolower(char const);
int arrayIndex(const char c) {
  if (c == '\'') {
    return 26;
  } else {
    return tolower(c) % 'a';
  }
}


x86 assembly (clang, -O0):
<arrayIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x27,%eax
jne    1137 <arrayIndex+0x27>
movl   $0x1a,-0x4(%rbp)
jmp    114e <arrayIndex+0x3e>
movsbl -0x5(%rbp),%edi
call   1030 <tolower@plt>
movsbl %al,%eax
mov    $0x61,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrayIndex>:
mov    $0x1a,%eax
cmp    $0x27,%dil
je     1145 <arrayIndex+0x35>
push   %rax
movsbl %dil,%edi
call   1030 <tolower@plt>
movsbl %al,%eax
imul   $0x55,%eax,%ecx
movzwl %cx,%edx
shr    $0xd,%ecx
shr    $0xf,%edx
add    %cl,%dl
movzbl %dl,%ecx
imul   $0x61,%ecx,%ecx
sub    %cl,%al
movsbl %al,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @arrayIndex(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 39
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 26, i32* %2
br label %13
8: ; preds = %1
%9 = load i8, i8* %3
%10 = call signext i8 @tolower(i8 signext %9)
%11 = sext i8 %10 to i32
%12 = srem i32 %11, 97
store i32 %12, i32* %2
br label %13
13: ; preds = %8, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @arrayIndex(i8 signext %0) {
%2 = icmp eq i8 %0, 39
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call signext i8 @tolower(i8 signext %0)
%5 = srem i8 %4, 97
%6 = sext i8 %5 to i32
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 26, %1 ]
ret i32 %8
}
int test_imm_88uint16_mem(unsigned short *val) {
  return ((*val) & (-0x88 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_88uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff78,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_88uint16_mem>:
movzwl (%rdi),%eax
test   $0xff78,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_88uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -136
%7 = icmp ne i32 %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_88uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -136
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void sif_platform_check_r1_ready(struct esp_pub *epub) {}


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

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

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

LLVM IR (-O2):
%struct.esp_pub = type opaque
define void @sif_platform_check_r1_ready(%struct.esp_pub* nocapture %0) {
ret void
}
unsigned get_page_mask() { return 0xFFF; }


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

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

LLVM IR (-O0):
define i32 @get_page_mask() {
ret i32 4095
}

LLVM IR (-O2):
define i32 @get_page_mask() {
ret i32 4095
}
void X509_ATTRIBUTE_get0_data(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_ATTRIBUTE_get0_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello world from QA bundle s!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"Hello world from QA bundle s!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"Hello world from QA bundle s!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void vuln(char *str) {
  char buf[64];
  strcpy(buf, str);
  for (int i = 0; i < 0x31337; i++)
    ;
}


x86 assembly (clang, -O0):
<vuln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x54(%rbp)
cmpl   $0x31337,-0x54(%rbp)
jge    1150 <vuln+0x40>
jmp    1142 <vuln+0x32>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1130 <vuln+0x20>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vuln>:
sub    $0x48,%rsp
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
define void @vuln(i8* %0) {
%2 = alloca i8*
%3 = alloca [64 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @strcpy(i8* %5, i8* %6)
store i32 0, i32* %4
br label %8
8: ; preds = %12, %1
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 201527
br i1 %10, label %11, label %15
11: ; preds = %8
br label %12
12: ; preds = %11
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %4
br label %8
15: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @vuln(i8* %0) {
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* %0)
ret void
}
/* Type definitions */
struct extent_buffer {
  int dummy;
};
struct btrfs_item {
  int dummy;
};

/* Variables and functions */
scalar_t__ btrfs_item_nr_offset(int);
struct btrfs_item *btrfs_item_nr(struct extent_buffer *eb, int nr) {
  return (struct btrfs_item *)btrfs_item_nr_offset(nr);
}


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

x86 assembly (clang, -O2):
<btrfs_item_nr>:
mov    %esi,%edi
jmp    1030 <btrfs_item_nr_offset@plt>

LLVM IR (-O0):
%struct.btrfs_item = type { i32 }
%struct.extent_buffer = type { i32 }
define %struct.btrfs_item* @btrfs_item_nr(%struct.extent_buffer* %0, i32 %1) {
%3 = alloca %struct.extent_buffer*
%4 = alloca i32
store %struct.extent_buffer* %0, %struct.extent_buffer** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i64 @btrfs_item_nr_offset(i32 %5)
%7 = inttoptr i64 %6 to %struct.btrfs_item*
ret %struct.btrfs_item* %7
}

LLVM IR (-O2):
%struct.btrfs_item = type { i32 }
%struct.extent_buffer = type { i32 }
define %struct.btrfs_item* @btrfs_item_nr(%struct.extent_buffer* nocapture readnone %0, i32 %1) {
%3 = tail call i64 @btrfs_item_nr_offset(i32 %1)
%4 = inttoptr i64 %3 to %struct.btrfs_item*
ret %struct.btrfs_item* %4
}
void ch_asm_volatile_pause() { asm volatile("pause"); }


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

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

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

LLVM IR (-O2):
define void @ch_asm_volatile_pause() {
tail call void asm sideeffect "pause", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vector_subtract(int, double const *, double const *,
                                   double *);
int /*<<< orphan*/ wgsecef2ned(double *, double const *, double *);
void wgsecef2ned_d(const double ecef[3], const double ref_ecef[3],
                   double ned[3]) {
  double tempv[3];
  vector_subtract(3, ecef, ref_ecef, tempv);
  wgsecef2ned(tempv, ref_ecef, ned);
}


x86 assembly (clang, -O0):
<wgsecef2ned_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    -0x30(%rbp),%rcx
mov    $0x3,%edi
call   1040 <vector_subtract@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <wgsecef2ned@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wgsecef2ned_d>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rsp,%r15
mov    $0x3,%edi
mov    %rbx,%rdx
mov    %r15,%rcx
call   1040 <vector_subtract@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <wgsecef2ned@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @wgsecef2ned_d(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
%7 = alloca [3 x double]
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double*, double** %4
%9 = load double*, double** %5
%10 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%11 = call i32 @vector_subtract(i32 3, double* %8, double* %9, double* %10)
%12 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 0, i64 0
%13 = load double*, double** %5
%14 = load double*, double** %6
%15 = call i32 @wgsecef2ned(double* %12, double* %13, double* %14)
ret void
}

LLVM IR (-O2):
define void @wgsecef2ned_d(double* %0, double* %1, double* %2) {
%4 = alloca [3 x double]
%5 = bitcast [3 x double]* %4 to i8*
%6 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%7 = call i32 @vector_subtract(i32 3, double* %0, double* %1, double* %6)
%8 = call i32 @wgsecef2ned(double* %6, double* %1, double* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *name) {
  fprintf(stderr,
          "Usage: %s blocksize file\n"
          "\n"
          "PARAMS:\n"
          " blocksize  the byte-length of blocks\n"
          " file       the name of the file to be analyzed\n",
          name);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [121 x i8] c"Usage: %s blocksize file\0A\0APARAMS:\0A blocksize the byte-length of blocks\0A file the name of the file to be analyzed\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [121 x i8] c"Usage: %s blocksize file\0A\0APARAMS:\0A blocksize the byte-length of blocks\0A file the name of the file to be analyzed\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}