xunge/DecIR huggingface dataset:
/* Variables and functions */
char *__my_memrchr(char const *, int, scalar_t__);
scalar_t__ my_strlen(char const *);
char *my_strrchr(const char *s, int c) {
  return __my_memrchr(s, c, my_strlen(s) + 1);
}


x86 assembly (clang, -O0):
<my_strrchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <__my_memrchr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strrchr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <__my_memrchr@plt>

LLVM IR (-O0):
define i8* @my_strrchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = call i64 @my_strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i8* @__my_memrchr(i8* %5, i32 %6, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @my_strrchr(i8* %0, i32 %1) {
%3 = tail call i64 @my_strlen(i8* %0)
%4 = add nsw i64 %3, 1
%5 = tail call i8* @__my_memrchr(i8* %0, i32 %1, i64 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Gamma_Down(int value) {
  if (value) {
    cpc_key_press(0x71);
  } else {
    cpc_key_unpress(0x71);
  };
}


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

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

LLVM IR (-O0):
define void @Joy_Gamma_Down(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 113)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 113)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Gamma_Down(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 113)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 113)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int gcdExtended(int, int, int *, int *);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int x, y;
  int a = 50, b = 20;
  int g = gcdExtended(a, b, &x, &y);
  printf("gcdExtended(%d, %d) = %d", a, b, g);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1030 <gcdExtended@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
mov    $0x32,%edi
mov    $0x14,%esi
call   1030 <gcdExtended@plt>
lea    0xec1(%rip),%rdi
mov    $0x32,%esi
mov    $0x14,%edx
mov    %eax,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"gcdExtended(%d, %d) = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 50, i32* %4
store i32 20, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @gcdExtended(i32 %7, i32 %8, i32* %2, i32* %3)
store i32 %9, i32* %6
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"gcdExtended(%d, %d) = %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @gcdExtended(i32 50, i32 20, i32* %1, i32* %2)
%6 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 50, i32 20, i32 %5)
ret i32 0
}
int main(int argc, char *argv[]) {
  int n;
  int *k;
  n = 25;
  k = &n;
  *k = 25;
  printf("n = %d\n", n);
  printf("k = %x\n", k);
  printf("*k = %d\n", *k);
  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)
movl   $0x19,-0x14(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x19,(%rax)
mov    -0x14(%rbp),%esi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xea1(%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
movl   $0x19,0x4(%rsp)
lea    0xee0(%rip),%rdi
mov    $0x19,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"n = %d\0A\00"
@.str.1 = [8 x i8] c"k = %x\0A\00"
@.str.2 = [9 x i8] c"*k = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 25, i32* %6
store i32* %6, i32** %7
%8 = load i32*, i32** %7
store i32 25, i32* %8
%9 = load i32, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32*, i32** %7
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %11)
%13 = load i32*, i32** %7
%14 = load i32, i32* %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"n = %d\0A\00"
@.str.1 = [8 x i8] c"k = %x\0A\00"
@.str.2 = [9 x i8] c"*k = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 25, i32* %3
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 25)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %7)
ret i32 0
}
void fa195(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
a:
  goto a;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa195>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa195+0x4>

x86 assembly (clang, -O2):
<fa195>:
jmp    1100 <fa195>

LLVM IR (-O0):
define void @fa195() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
27: ; preds = %27
br label %27
}

LLVM IR (-O2):
define void @fa195() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *mfree(void *memory) {
  free(memory);
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @mfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i8* null
}
int add(int a, int b) { return a + b; }


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

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

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

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void main() {
  int32_t a;
  a = (1 + 2) * 3;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x9,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 9, i32* %1
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void sig_lock(sigset_t *s) {
  sigset_t new;
  sigemptyset(&new);
  sigprocmask(SIG_BLOCK, &new, s);
}


x86 assembly (clang, -O0):
<sig_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rsi
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_lock>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <sigemptyset@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <sigprocmask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SIG_BLOCK = global i32 0
define void @sig_lock(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* @SIG_BLOCK
%6 = load i32*, i32** %2
%7 = call i32 @sigprocmask(i32 %5, i32* %3, i32* %6)
ret void
}

LLVM IR (-O2):
@SIG_BLOCK = global i32 0
define void @sig_lock(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = load i32, i32* @SIG_BLOCK
%6 = call i32 @sigprocmask(i32 %5, i32* %2, i32* %0)
ret void
}
int accumulate(int x) {
  static int y;
  y += x;
  return y;
}


x86 assembly (clang, -O0):
<accumulate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    0x2f14(%rip),%eax
mov    %eax,0x2f0e(%rip)
mov    0x2f08(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<accumulate>:
mov    %edi,%eax
add    0x2f1c(%rip),%eax
mov    %eax,0x2f16(%rip)
ret

LLVM IR (-O0):
@accumulate.y = internal global i32 0
define i32 @accumulate(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @accumulate.y
%5 = add nsw i32 %4, %3
store i32 %5, i32* @accumulate.y
%6 = load i32, i32* @accumulate.y
ret i32 %6
}

LLVM IR (-O2):
@accumulate.y = internal unnamed_addr global i32 0
define i32 @accumulate(i32 %0) {
%2 = load i32, i32* @accumulate.y
%3 = add nsw i32 %2, %0
store i32 %3, i32* @accumulate.y
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ alloc(int);
void t0(int align) { alloc(align); }


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

x86 assembly (clang, -O2):
<t0>:
jmp    1030 <alloc@plt>

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

LLVM IR (-O2):
define void @t0(i32 %0) {
%2 = tail call i32 @alloc(i32 %0)
ret void
}
void type_base_vector_placeholder(void) {}


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

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

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

LLVM IR (-O2):
define void @type_base_vector_placeholder() {
ret void
}
/* Variables and functions */
int rpmvercmp(char const *, char const *);
int simpleStringCmp(const void *a, const void *b) {
  const char *first = *((const char **)a);
  const char *second = *((const char **)b);
  return rpmvercmp(first, second);
}


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

x86 assembly (clang, -O2):
<simpleStringCmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <rpmvercmp@plt>

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

LLVM IR (-O2):
define i32 @simpleStringCmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @rpmvercmp(i8* %4, i8* %6)
ret i32 %7
}
unsigned sizeof_bool(void) { return (unsigned)sizeof(_Bool); }


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

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

LLVM IR (-O0):
define i32 @sizeof_bool() {
ret i32 1
}

LLVM IR (-O2):
define i32 @sizeof_bool() {
ret i32 1
}
/* Variables and functions */
unsigned char dxl_read_byte(unsigned char, int);
unsigned char getAlarmLed(unsigned char id) { return dxl_read_byte(id, (17)); }


x86 assembly (clang, -O0):
<getAlarmLed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x11,%esi
movzbl -0x1(%rbp),%edi
call   1030 <dxl_read_byte@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAlarmLed>:
mov    $0x11,%esi
jmp    1030 <dxl_read_byte@plt>

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

LLVM IR (-O2):
define zeroext i8 @getAlarmLed(i8 zeroext %0) {
%2 = tail call zeroext i8 @dxl_read_byte(i8 zeroext %0, i32 17)
ret i8 %2
}
/* Variables and functions */
double RAND_MAX;
double rand();
size_t TestingMostlyEqual(size_t index, size_t total) {
  return 1000 + rand() * 1.0 / RAND_MAX * 4;
}


x86 assembly (clang, -O0):
<TestingMostlyEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2eba(%rip),%rax
movsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  0xec2(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebe(%rip),%xmm1
addsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xeab(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestingMostlyEqual>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec9(%rip),%rax
divsd  (%rax),%xmm0
mulsd  0xed5(%rip),%xmm0
addsd  0xed5(%rip),%xmm0
cvttsd2si %xmm0,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xec9(%rip),%xmm0
cvttsd2si %xmm0,%rax
and    %rdx,%rax
or     %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i64 @TestingMostlyEqual(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call double (...) @rand()
%6 = fmul double %5, 1.000000e+00
%7 = load double, double* @RAND_MAX
%8 = fdiv double %6, %7
%9 = call double @llvm.fmuladd.f64(double %8, double 4.000000e+00, double 1.000000e+03)
%10 = fptoui double %9 to i64
ret i64 %10
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i64 @TestingMostlyEqual(i64 %0, i64 %1) {
%3 = tail call double (...) @rand()
%4 = load double, double* @RAND_MAX
%5 = fdiv double %3, %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double 4.000000e+00, double 1.000000e+03)
%7 = fptoui double %6 to i64
ret i64 %7
}
int test_failures() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @test_failures() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ m52_reset();
int /*<<< orphan*/ mmc3init(int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void m52_init(uint8_t *prgROMin, uint32_t prgROMsizeIn, uint8_t *prgRAMin,
              uint32_t prgRAMsizeIn, uint8_t *chrROMin, uint32_t chrROMsizeIn) {
  mmc3init(prgROMin, prgROMsizeIn, prgRAMin, prgRAMsizeIn, chrROMin,
           chrROMsizeIn);
  m52_reset();
  printf("Mapper 52 (Mapper 4 Game Select) inited\n");
}


x86 assembly (clang, -O0):
<m52_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1030 <mmc3init@plt>
mov    $0x0,%al
call   1040 <m52_reset@plt>
lea    0xe89(%rip),%rdi
call   1050 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m52_init>:
push   %rax
call   1030 <mmc3init@plt>
xor    %eax,%eax
call   1050 <m52_reset@plt>
lea    0xebc(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Mapper 52 (Mapper 4 Game Select) inited\0A\00"
define void @m52_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32* %2, i32** %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = load i32*, i32** %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
%19 = call i32 @mmc3init(i32* %13, i32 %14, i32* %15, i32 %16, i32* %17, i32 %18)
%20 = call i32 (...) @m52_reset()
%21 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"Mapper 52 (Mapper 4 Game Select) inited\00"
define void @m52_init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5) {
%7 = tail call i32 @mmc3init(i32* %0, i32 %1, i32* %2, i32 %3, i32* %4, i32 %5)
%8 = tail call i32 (...) @m52_reset()
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int syscall(int, int, unsigned int, void *, unsigned int);
int io_uring_register(int fd, unsigned int opcode, void *arg,
                      unsigned int nr_args) {
  return syscall(427, fd, opcode, arg, nr_args);
}


x86 assembly (clang, -O0):
<io_uring_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x1ab,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_uring_register>:
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x1ab,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @io_uring_register(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @syscall(i32 427, i32 %0, i32 %1, i8* %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ le16toh(int /*<<< orphan*/);
void unaligned_write_le16(void *_u, uint16_t a) {
  struct __attribute__((__packed__, __may_alias__)) {
    uint16_t x;
  } *u = _u;
  u->x = le16toh(a);
}


x86 assembly (clang, -O0):
<unaligned_write_le16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <le16toh@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned_write_le16>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <le16toh@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @unaligned_write_le16(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @le16toh(i32 %1)
%4 = bitcast i8* %0 to i32*
store i32 %3, i32* %4
ret void
}
void ff_hevc_put_hevc_epel_v8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v8_12_sse4() {
ret void
}
long long ffi_test_21(long x, long y) { return (long long)x * (long long)y; }


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

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

LLVM IR (-O0):
define i64 @ffi_test_21(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @ffi_test_21(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
double bnot_wrapper(double *arg_list) { return (double)(!(int)arg_list[0]); }


x86 assembly (clang, -O0):
<bnot_wrapper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bnot_wrapper>:
cvttsd2si (%rdi),%eax
test   %eax,%eax
je     110c <bnot_wrapper+0xc>
xorps  %xmm0,%xmm0
ret
movsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @bnot_wrapper(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
%10 = sitofp i32 %9 to double
ret double %10
}

LLVM IR (-O2):
define double @bnot_wrapper(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = icmp eq i32 %3, 0
%5 = uitofp i1 %4 to double
ret double %5
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_asm_string_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_asm_string(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_asm_string_rec(lexbuf, 8);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_asm_string>:
mov    $0x8,%esi
jmp    1030 <Cyc_asm_string_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_asm_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_asm_string_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 8)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_asm_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_asm_string_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 8)
ret i32 %2
}
int dns_v_api(void) { return 0x20150612; }


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

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

LLVM IR (-O0):
define i32 @dns_v_api() {
ret i32 538248722
}

LLVM IR (-O2):
define i32 @dns_v_api() {
ret i32 538248722
}
/* Variables and functions */
int /*<<< orphan*/ sync();
void target_sync(void) { sync(); }


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

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

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

LLVM IR (-O2):
define void @target_sync() {
%1 = tail call i32 (...) @sync()
ret void
}
char *crypt(buf, salt) const char *buf;
const char *salt;
{
  static char buff[14];
  return (des_fcrypt(buf, salt, buff));
}


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

x86 assembly (clang, -O2):
<crypt>:
push   %rax
lea    0x2f11(%rip),%rdx
xor    %eax,%eax
call   1030 <des_fcrypt@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
@crypt.buff = internal global [14 x i8] zeroinitializer
define i8* @crypt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @des_fcrypt to i32 (i8*, i8*, i8*, ...)*)(i8* %5, i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @crypt.buff, i64 0, i64 0))
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
@crypt.buff = internal global [14 x i8] zeroinitializer
define i8* @crypt(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @des_fcrypt to i32 (i8*, i8*, i8*, ...)*)(i8* %0, i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @crypt.buff, i64 0, i64 0))
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_move_current_multprec_to_next(int *cursor) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(458, cursor, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_move_current_multprec_to_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1ca,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_move_current_multprec_to_next>:
mov    %rdi,%rsi
mov    $0x1ca,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @solcon_move_current_multprec_to_next(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %3
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 458, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_move_current_multprec_to_next(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 458, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
void SysCfgRegistersLock(void) {
  (*((volatile unsigned int *)((0x01C14000) + (0x38)))) = (0xFFFFFFFFu);
  (*((volatile unsigned int *)((0x01C14000) + (0x3C)))) = (0xFFFFFFFFu);
}


x86 assembly (clang, -O0):
<SysCfgRegistersLock>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c14038,%eax
movl   $0xffffffff,(%rax)
mov    $0x1c1403c,%eax
movl   $0xffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCfgRegistersLock>:
movl   $0xffffffff,0x1c14038
ff ff ff ff
movl   $0xffffffff,0x1c1403c
ff ff ff ff
ret

LLVM IR (-O0):
define void @SysCfgRegistersLock() {
store volatile i32 -1, i32* inttoptr (i64 29442104 to i32*)
store volatile i32 -1, i32* inttoptr (i64 29442108 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysCfgRegistersLock() {
store volatile i32 -1, i32* inttoptr (i64 29442104 to i32*)
store volatile i32 -1, i32* inttoptr (i64 29442108 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xd1() {
  Assert_real((isspace(209) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              1050, ("isspace should be 0 for 0xd1"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xd1\00"
define void @t_isspace_0xd1() {
%1 = call i64 @isspace(i32 209)
%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 1050, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xd1\00"
define void @t_isspace_0xd1() {
%1 = tail call i64 @isspace(i32 209)
%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 1050, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MCUSendCmdLatitudeAndLongitude(int, int);
void sendLatitudeAndLongitude() { MCUSendCmdLatitudeAndLongitude(234, 456); }


x86 assembly (clang, -O0):
<sendLatitudeAndLongitude>:
push   %rbp
mov    %rsp,%rbp
mov    $0xea,%edi
mov    $0x1c8,%esi
call   1030 <MCUSendCmdLatitudeAndLongitude@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendLatitudeAndLongitude>:
mov    $0xea,%edi
mov    $0x1c8,%esi
jmp    1030 <MCUSendCmdLatitudeAndLongitude@plt>

LLVM IR (-O0):
define void @sendLatitudeAndLongitude() {
%1 = call i32 @MCUSendCmdLatitudeAndLongitude(i32 234, i32 456)
ret void
}

LLVM IR (-O2):
define void @sendLatitudeAndLongitude() {
%1 = tail call i32 @MCUSendCmdLatitudeAndLongitude(i32 234, i32 456)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void die(const char *msg) {
  perror(msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
double bb_alb_landsat(double bluechan, double greenchan, double redchan,
                      double nirchan, double chan5, double chan7) {
  double result;
  result = (0.293 * bluechan + 0.274 * greenchan + 0.233 * redchan +
            0.156 * nirchan + 0.033 * chan5 + 0.011 * chan7);
  return result;
}


x86 assembly (clang, -O0):
<bb_alb_landsat>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef9(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xee4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xe8d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xe70(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bb_alb_landsat>:
mulsd  0xef8(%rip),%xmm1
mulsd  0xef8(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm2
mulsd  0xef4(%rip),%xmm3
addsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
mulsd  0xeec(%rip),%xmm4
addsd  %xmm4,%xmm0
mulsd  0xee8(%rip),%xmm5
addsd  %xmm5,%xmm0
ret

LLVM IR (-O0):
define double @bb_alb_landsat(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%14 = load double, double* %7
%15 = load double, double* %8
%16 = fmul double 2.740000e-01, %15
%17 = call double @llvm.fmuladd.f64(double 2.930000e-01, double %14, double %16)
%18 = load double, double* %9
%19 = call double @llvm.fmuladd.f64(double 2.330000e-01, double %18, double %17)
%20 = load double, double* %10
%21 = call double @llvm.fmuladd.f64(double 1.560000e-01, double %20, double %19)
%22 = load double, double* %11
%23 = call double @llvm.fmuladd.f64(double 3.300000e-02, double %22, double %21)
%24 = load double, double* %12
%25 = call double @llvm.fmuladd.f64(double 1.100000e-02, double %24, double %23)
store double %25, double* %13
%26 = load double, double* %13
ret double %26
}

LLVM IR (-O2):
define double @bb_alb_landsat(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fmul double %1, 2.740000e-01
%8 = tail call double @llvm.fmuladd.f64(double %0, double 2.930000e-01, double %7)
%9 = tail call double @llvm.fmuladd.f64(double %2, double 2.330000e-01, double %8)
%10 = tail call double @llvm.fmuladd.f64(double %3, double 1.560000e-01, double %9)
%11 = tail call double @llvm.fmuladd.f64(double %4, double 3.300000e-02, double %10)
%12 = tail call double @llvm.fmuladd.f64(double %5, double 1.100000e-02, double %11)
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int /*<<< orphan*/, int);
int /*<<< orphan*/ west_span(int);
void west_span_test(void **state) {
  assert_int_equal(west_span(0x80ul),
                   0x00000000000000FFul & ~0x8080808080808080ul);
}


x86 assembly (clang, -O0):
<west_span_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x80,%edi
call   1030 <west_span@plt>
mov    %eax,%edi
mov    $0x7f,%esi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<west_span_test>:
push   %rax
mov    $0x80,%edi
call   1030 <west_span@plt>
mov    %eax,%edi
mov    $0x7f,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @west_span_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @west_span(i32 128)
%4 = call i32 @assert_int_equal(i32 %3, i32 127)
ret void
}

LLVM IR (-O2):
define void @west_span_test(i8** nocapture readnone %0) {
%2 = tail call i32 @west_span(i32 128)
%3 = tail call i32 @assert_int_equal(i32 %2, i32 127)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, unsigned int);
void KeccakF200_StateOverwriteBytes(void *state, const unsigned char *data,
                                    unsigned int offset, unsigned int length) {
  memcpy((unsigned char *)state + offset, data, length);
}


x86 assembly (clang, -O0):
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    -0x14(%rbp),%eax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    %edx,%eax
add    %rax,%rdi
mov    %ecx,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @KeccakF200_StateOverwriteBytes(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 i32, i32* %7
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8*, i8** %6
%14 = load i32, i32* %8
%15 = call i32 @memcpy(i8* %12, i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @KeccakF200_StateOverwriteBytes(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = tail call i32 @memcpy(i8* %6, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abortexecution_();
int /*<<< orphan*/ printf(char *, char *, char *);
void execerror(char *message, char *op) {
  printf("run time error: %s needed for %s\n", message, op);
  abortexecution_();
}


x86 assembly (clang, -O0):
<execerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <abortexecution_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execerror>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <abortexecution_@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"run time error: %s needed for %s\0A\00"
define void @execerror(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 (...) @abortexecution_()
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"run time error: %s needed for %s\0A\00"
define void @execerror(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 (...) @abortexecution_()
ret void
}
int do_428() { return 428; }


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

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

LLVM IR (-O0):
define i32 @do_428() {
ret i32 428
}

LLVM IR (-O2):
define i32 @do_428() {
ret i32 428
}
void setup_endstop_interrupts(void) {}


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

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

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

LLVM IR (-O2):
define void @setup_endstop_interrupts() {
ret void
}
int is_cross(unsigned x, unsigned y) {
  x %= 24;
  y %= 24;
  return (x < 2 * 3 && y < 2 * 3);
}


x86 assembly (clang, -O0):
<is_cross>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x18,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x18,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x6,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jae    1141 <is_cross+0x41>
cmpl   $0x6,-0x8(%rbp)
setb   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_cross>:
mov    %edi,%eax
mov    $0xaaaaaaab,%ecx
imul   %rcx,%rax
shr    $0x24,%rax
shl    $0x3,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%edi
mov    %esi,%eax
imul   %rcx,%rax
shr    $0x24,%rax
shl    $0x3,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
cmp    $0x6,%edi
setb   %al
cmp    $0x6,%esi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_cross(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = urem i32 %5, 24
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = urem i32 %7, 24
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = icmp ult i32 %9, 6
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* %4
%13 = icmp ult i32 %12, 6
br label %14
14: ; preds = %11, %2
%15 = phi i1 [ false, %2 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_cross(i32 %0, i32 %1) {
%3 = urem i32 %0, 24
%4 = urem i32 %1, 24
%5 = icmp ult i32 %3, 6
%6 = icmp ult i32 %4, 6
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool errata_31(void) {
  if (*(uint32_t *)0x10000130ul == 0xEul) {
    if (*(uint32_t *)0x10000134ul == 0x0ul) {
      return true;
    }
  }
  return true;
}


x86 assembly (clang, -O0):
<errata_31>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10000130,%eax
movslq (%rax),%rax
cmp    $0xe,%rax
jne    1139 <errata_31+0x39>
mov    $0x10000134,%eax
movslq (%rax),%rax
cmp    $0x0,%rax
jne    1134 <errata_31+0x34>
movl   $0x1,-0x4(%rbp)
jmp    1140 <errata_31+0x40>
jmp    1139 <errata_31+0x39>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @errata_31() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 268435760 to i32*)
%3 = sext i32 %2 to i64
%4 = icmp eq i64 %3, 14
br i1 %4, label %5, label %11
5: ; preds = %0
%6 = load i32, i32* inttoptr (i64 268435764 to i32*)
%7 = sext i32 %6 to i64
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
store i32 1, i32* %1
br label %12
10: ; preds = %5
br label %11
11: ; preds = %10, %0
store i32 1, i32* %1
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @errata_31() {
ret i32 1
}