xunge/DecIR huggingface dataset:
int delay(int ms) {
  unsigned char i, j;
  for (; ms != 0; ms--)
    for (j = 98; j > 0; j--)
      ;
  return 0;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1147 <delay+0x47>
movb   $0x62,-0x6(%rbp)
movzbl -0x6(%rbp),%eax
cmp    $0x0,%eax
jle    1134 <delay+0x34>
jmp    1127 <delay+0x27>
mov    -0x6(%rbp),%al
add    $0xff,%al
mov    %al,-0x6(%rbp)
jmp    1115 <delay+0x15>
jmp    1139 <delay+0x39>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <delay+0x7>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
store i32 %0, i32* %2
br label %5
5: ; preds = %18, %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %21
8: ; preds = %5
store i8 98, i8* %4
br label %9
9: ; preds = %14, %8
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
br label %14
14: ; preds = %13
%15 = load i8, i8* %4
%16 = add i8 %15, -1
store i8 %16, i8* %4
br label %9
17: ; preds = %9
br label %18
18: ; preds = %17
%19 = load i32, i32* %2
%20 = add nsw i32 %19, -1
store i32 %20, i32* %2
br label %5
21: ; preds = %5
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ fread(char *, size_t, size_t, int /*<<< orphan*/ *);
void src_fstr_read(FILE *fd, char *val, int slen) {
  fread(val, (size_t)slen, (size_t)1, fd);
}


x86 assembly (clang, -O0):
<src_fstr_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rsi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<src_fstr_read>:
mov    %rsi,%rax
mov    %rdi,%rcx
movslq %edx,%rsi
mov    $0x1,%edx
mov    %rax,%rdi
jmp    1030 <fread@plt>

LLVM IR (-O0):
define void @src_fstr_read(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 = load i32, i32* %6
%9 = sext i32 %8 to i64
%10 = load i32*, i32** %4
%11 = call i32 @fread(i8* %7, i64 %9, i64 1, i32* %10)
ret void
}

LLVM IR (-O2):
define void @src_fstr_read(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = tail call i32 @fread(i8* %1, i64 %4, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int f(int);
int main() {
  if (f(-1) != -1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1040 <f@plt>
cmp    $0xffffffff,%eax
je     1149 <main+0x29>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffff,%edi
call   1040 <f@plt>
cmp    $0xffffffff,%eax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 -1)
%3 = icmp ne i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 -1)
%2 = icmp eq i32 %1, -1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage:  transist.flt [params]\n"
          "params: -o num   opacity of second input at the beginning [0-255]\n"
          "        -O num   opacity of second input at the end [0-255]\n"
          "        -d num   duration of transistion in frames (REQUIRED!)\n"
          "        -s num   skip first num frames of transistion\n"
          "        -n num   only process num frames of the transistion\n"
          "        -r num   repeat each frame 'num' times. (default = 1)\n"
          "        -v num   verbosity [0..2]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [430 x i8] c"usage: transist.flt [params]\0Aparams: -o num opacity of second input at the beginning [0-255]\0A -O num opacity of second input at the end [0-255]\0A -d num duration of transistion in frames (REQUIRED!)\0A -s num skip first num frames of transistion\0A -n num only process num frames of the transistion\0A -r num repeat each frame 'num' times. (default = 1)\0A -v num verbosity [0..2]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [430 x i8] c"usage: transist.flt [params]\0Aparams: -o num opacity of second input at the beginning [0-255]\0A -O num opacity of second input at the end [0-255]\0A -d num duration of transistion in frames (REQUIRED!)\0A -s num skip first num frames of transistion\0A -n num only process num frames of the transistion\0A -r num repeat each frame 'num' times. (default = 1)\0A -v num verbosity [0..2]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([430 x i8], [430 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int iswprint(wint_t wc) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @iswprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @iswprint(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
unsigned int irq_disable();
int /*<<< orphan*/ irq_restore(unsigned int);
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void __atomic_load_c(size_t size, const void *src, void *dest, int memorder) {
  (void)memorder;
  unsigned int mask = irq_disable();
  memcpy(dest, src, size);
  irq_restore(mask);
}


x86 assembly (clang, -O0):
<__atomic_load_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <irq_disable@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%edi
call   1050 <irq_restore@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__atomic_load_c>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %eax,%eax
call   1030 <irq_disable@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <irq_restore@plt>

LLVM IR (-O0):
define void @__atomic_load_c(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i64 %0, i64* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i32, i32* %8
%11 = call i32 (...) @irq_disable()
store i32 %11, i32* %9
%12 = load i8*, i8** %7
%13 = load i8*, i8** %6
%14 = load i64, i64* %5
%15 = call i32 @memcpy(i8* %12, i8* %13, i64 %14)
%16 = load i32, i32* %9
%17 = call i32 @irq_restore(i32 %16)
ret void
}

LLVM IR (-O2):
define void @__atomic_load_c(i64 %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 (...) @irq_disable()
%6 = tail call i32 @memcpy(i8* %2, i8* %1, i64 %0)
%7 = tail call i32 @irq_restore(i32 %5)
ret void
}
long zu() { return 0x00007fffL; }


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

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

LLVM IR (-O0):
define i64 @zu() {
ret i64 32767
}

LLVM IR (-O2):
define i64 @zu() {
ret i64 32767
}
/* Variables and functions */
int /*<<< orphan*/ display_main_menu();
int /*<<< orphan*/ force_system_colors();
int /*<<< orphan*/ move_replay();
void handle_save_film(void) {
  force_system_colors();
  move_replay();
  display_main_menu();
  return;
}


x86 assembly (clang, -O0):
<handle_save_film>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <force_system_colors@plt>
mov    $0x0,%al
call   1040 <move_replay@plt>
mov    $0x0,%al
call   1050 <display_main_menu@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_save_film>:
push   %rax
xor    %eax,%eax
call   1030 <force_system_colors@plt>
xor    %eax,%eax
call   1040 <move_replay@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <display_main_menu@plt>

LLVM IR (-O0):
define void @handle_save_film() {
%1 = call i32 (...) @force_system_colors()
%2 = call i32 (...) @move_replay()
%3 = call i32 (...) @display_main_menu()
ret void
}

LLVM IR (-O2):
define void @handle_save_film() {
%1 = tail call i32 (...) @force_system_colors()
%2 = tail call i32 (...) @move_replay()
%3 = tail call i32 (...) @display_main_menu()
ret void
}
/* Variables and functions */
bool SHAREMIND_MAP_KEY_EQUALS_unsigned_int(unsigned int const k1,
                                           unsigned int const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_EQUALS_unsigned_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_EQUALS_unsigned_int>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_EQUALS_unsigned_int(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 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_EQUALS_unsigned_int(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void sleep() {
  int start = (*(volatile unsigned int *)(0x4804A03C));
  volatile unsigned int *cur = (unsigned int *)0x4804A03C;
  while (*cur - start < 0x01000000)
    ;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4804a03c,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x4804a03c,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sub    -0x4(%rbp),%eax
cmp    $0x1000000,%eax
jae    1130 <sleep+0x30>
jmp    1117 <sleep+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
mov    0x4804a03c,%eax
nopw   0x0(%rax,%rax,1)
mov    0x4804a03c,%ecx
sub    %eax,%ecx
cmp    $0x1000000,%ecx
jb     1110 <sleep+0x10>
ret

LLVM IR (-O0):
define void @sleep() {
%1 = alloca i32
%2 = alloca i32*
%3 = load volatile i32, i32* inttoptr (i64 1208262716 to i32*)
store i32 %3, i32* %1
store i32* inttoptr (i64 1208262716 to i32*), i32** %2
br label %4
4: ; preds = %10, %0
%5 = load i32*, i32** %2
%6 = load volatile i32, i32* %5
%7 = load i32, i32* %1
%8 = sub i32 %6, %7
%9 = icmp ult i32 %8, 16777216
br i1 %9, label %10, label %11
10: ; preds = %4
br label %4
11: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @sleep() {
%1 = load volatile i32, i32* inttoptr (i64 1208262716 to i32*)
br label %2
2: ; preds = %2, %0
%3 = load volatile i32, i32* inttoptr (i64 1208262716 to i32*)
%4 = sub i32 %3, %1
%5 = icmp ult i32 %4, 16777216
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR88_get(void) { return U_WMRCORENONE_get("U_WMR88"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR88\00"
define i32 @U_WMR88_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR88\00"
define i32 @U_WMR88_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int getTTySize(int fd, int *width, int *height) { return -1; }


x86 assembly (clang, -O0):
<getTTySize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @getTTySize(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
ret i32 -1
}

LLVM IR (-O2):
define i32 @getTTySize(i32 %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ clock_t;

/* Variables and functions */
double CLOCKS_PER_SEC;
scalar_t__ clock();
int /*<<< orphan*/ srand48(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
void drandom_init_memo() {
  int seed;
  clock_t start, end;
  double cpu_time_used;
  start = clock();
  seed = cpu_time_used;
  end = clock();
  cpu_time_used = ((double)(end - start)) / CLOCKS_PER_SEC;
  srand48(seed);
  srand48((unsigned int)time(NULL));
}


x86 assembly (clang, -O0):
<drandom_init_memo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x10(%rbp)
cvttsd2si -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2e7e(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <srand48@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1050 <srand48@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drandom_init_memo>:
push   %rax
xor    %eax,%eax
call   1030 <clock@plt>
xor    %eax,%eax
call   1030 <clock@plt>
call   1050 <srand48@plt>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <srand48@plt>

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @drandom_init_memo() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca double
%5 = call i64 (...) @clock()
store i64 %5, i64* %2
%6 = load double, double* %4
%7 = fptosi double %6 to i32
store i32 %7, i32* %1
%8 = call i64 (...) @clock()
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = load i64, i64* %2
%11 = sub nsw i64 %9, %10
%12 = sitofp i64 %11 to double
%13 = load double, double* @CLOCKS_PER_SEC
%14 = fdiv double %12, %13
store double %14, double* %4
%15 = load i32, i32* %1
%16 = call i32 @srand48(i32 %15)
%17 = call i64 @time(i32* null)
%18 = trunc i64 %17 to i32
%19 = call i32 @srand48(i32 %18)
ret void
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define void @drandom_init_memo() {
%1 = tail call i64 (...) @clock()
%2 = tail call i64 (...) @clock()
%3 = tail call i32 @srand48(i32 undef)
%4 = tail call i64 @time(i32* null)
%5 = trunc i64 %4 to i32
%6 = tail call i32 @srand48(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t size) {
  void *retval = malloc(size);
  if (retval == NULL) {
    fprintf(stderr, "malloc failed!\n");
    abort();
  }
  return retval;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1170 <xmalloc+0x40>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rax
call   1050 <malloc@plt>
test   %rax,%rax
je     113d <xmalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"malloc failed!\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"malloc failed!\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret i8* %2
}
int subt(int x, int y) {
  int sresult;
  sresult = (x - y);
  return sresult;
}


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

x86 assembly (clang, -O2):
<subt>:
mov    %edi,%eax
sub    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @subt(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
int multiplo(int a, int b) {
  int res;
  if ((b % a) == 0)
    res = 1;
  else
    res = 0;
  return res;
}


x86 assembly (clang, -O0):
<multiplo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
cmp    $0x0,%edx
jne    1126 <multiplo+0x26>
movl   $0x1,-0xc(%rbp)
jmp    112d <multiplo+0x2d>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplo>:
mov    %esi,%eax
cltd
idiv   %edi
xor    %eax,%eax
test   %edx,%edx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @multiplo(i32 %0, i32 %1) {
%3 = srem i32 %1, %0
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void test_builtin_cimagl(_Complex long double ld) {
  if (__builtin_cimagl(ld) != __builtin_cimagl(ld))
    link_failure_builtin_cimagl();
}


x86 assembly (clang, -O0):
<test_builtin_cimagl>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   0x10(%rax)
fucomip %st(0),%st
jnp    112f <test_builtin_cimagl+0x1f>
jmp    1128 <test_builtin_cimagl+0x18>
mov    $0x0,%al
call   1030 <link_failure_builtin_cimagl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_cimagl>:
fldt   0x18(%rsp)
fucomip %st(0),%st
jp     1119 <test_builtin_cimagl+0x9>
ret
xor    %eax,%eax
jmp    1030 <link_failure_builtin_cimagl@plt>

LLVM IR (-O0):
define void @test_builtin_cimagl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
%6 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%7 = load x86_fp80, x86_fp80* %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%9 = load x86_fp80, x86_fp80* %8
%10 = fcmp une x86_fp80 %5, %9
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = call i32 (...) @link_failure_builtin_cimagl()
br label %13
13: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_cimagl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp uno x86_fp80 %3, 0xK00000000000000000000
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_builtin_cimagl()
br label %7
7: ; preds = %5, %1
ret void
}
void _delay_cycl(unsigned short __ticks) {
  volatile unsigned short t;
  t = __ticks;
  __asm__("nop\n nop\n");
  do {
    t--;
  } while (t);
  __asm__("nop\n");
}


x86 assembly (clang, -O0):
<_delay_cycl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
mov    %ax,-0x4(%rbp)
nop
nop
mov    -0x4(%rbp),%ax
add    $0xffff,%ax
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
cmp    $0x0,%ax
jne    1115 <_delay_cycl+0x15>
nop
pop    %rbp
ret

x86 assembly (clang, -O2):
<_delay_cycl>:
mov    %di,-0x2(%rsp)
nop
nop
nopw   0x0(%rax,%rax,1)
addw   $0xffff,-0x2(%rsp)
cmpw   $0x0,-0x2(%rsp)
jne    1110 <_delay_cycl+0x10>
nop
ret

LLVM IR (-O0):
define void @_delay_cycl(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
store volatile i16 %4, i16* %3
br label %5
5: ; preds = %8, %1
%6 = load volatile i16, i16* %3
%7 = add i16 %6, -1
store volatile i16 %7, i16* %3
br label %8
8: ; preds = %5
%9 = load volatile i16, i16* %3
%10 = icmp ne i16 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @_delay_cycl(i16 zeroext %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
store volatile i16 %0, i16* %2
tail call void asm sideeffect "nop\0A nop\0A", "~{dirflag},~{fpsr},~{flags}"()
br label %4
4: ; preds = %4, %1
%5 = load volatile i16, i16* %2
%6 = add i16 %5, -1
store volatile i16 %6, i16* %2
%7 = load volatile i16, i16* %2
%8 = icmp eq i16 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4
tail call void asm sideeffect "nop\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int variance(int sum, int sum_squared, int size) {
  return sum_squared / size - (sum / size) * (sum / size);
}


x86 assembly (clang, -O0):
<variance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,%edx
mov    -0x10(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<variance>:
mov    %edx,%ecx
mov    %esi,%eax
cltd
idiv   %ecx
mov    %eax,%esi
mov    %edi,%eax
cltd
idiv   %ecx
imul   %eax,%eax
sub    %eax,%esi
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @variance(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* %5
%8 = load i32, i32* %6
%9 = sdiv i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %6
%12 = sdiv i32 %10, %11
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = sdiv i32 %13, %14
%16 = mul nsw i32 %12, %15
%17 = sub nsw i32 %9, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @variance(i32 %0, i32 %1, i32 %2) {
%4 = sdiv i32 %1, %2
%5 = sdiv i32 %0, %2
%6 = mul nsw i32 %5, %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int number_of_digits_ulong(unsigned long num) {
  int digits = 0;
  while (num != 0) {
    digits += 1;
    num /= 10;
  }
  return digits;
}


x86 assembly (clang, -O0):
<number_of_digits_ulong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113a <number_of_digits_ulong+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
jmp    110f <number_of_digits_ulong+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_digits_ulong>:
xor    %ecx,%ecx
test   %rdi,%rdi
je     1136 <number_of_digits_ulong+0x36>
movabs $0xcccccccccccccccd,%rsi
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ecx
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
cmp    $0x9,%rdi
mov    %rdx,%rdi
ja     1120 <number_of_digits_ulong+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @number_of_digits_ulong(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = udiv i64 %5, 10
%8 = icmp ult i64 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
void on_data(void *p, size_t len, const void *data) {}


x86 assembly (clang, -O0):
<on_data>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @on_data(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @on_data(i8* nocapture %0, i64 %1, i8* nocapture %2) {
ret void
}
void av_hex_dump() {}


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

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

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

LLVM IR (-O2):
define void @av_hex_dump() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x5e() {
  Assert_real((isdigit(94) == 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_isdigit.c",
              475, ("isdigit should be 0 for ^"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x5e>:
push   %rax
mov    $0x5e,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1db,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for ^\00"
define void @t_isdigit_0x5e() {
%1 = call i64 @isdigit(i32 94)
%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 475, i8* getelementptr inbounds ([26 x i8], [26 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for ^\00"
define void @t_isdigit_0x5e() {
%1 = tail call i64 @isdigit(i32 94)
%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 475, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ lacf_getline_impl(char **, size_t *, int /*<<< orphan*/ *);
__attribute__((unused)) ssize_t lacf_getline(char **line_p, size_t *cap_p,
                                             FILE *fp) {
  return (lacf_getline_impl(line_p, cap_p, fp));
}


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

x86 assembly (clang, -O2):
<lacf_getline>:
jmp    1030 <lacf_getline_impl@plt>

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

LLVM IR (-O2):
define i32 @lacf_getline(i8** %0, i64* %1, i32* %2) {
%4 = tail call i32 @lacf_getline_impl(i8** %0, i64* %1, i32* %2)
ret i32 %4
}
convi1() {}


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

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

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

LLVM IR (-O2):
define i32 @convi1() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ dfs(int, int *);
scalar_t__ empty();
int pop();
int /*<<< orphan*/ printf(char *);
void ssc(int visit[]) {
  int vertex;
  while (empty() != 0) {
    vertex = pop();
    if (visit[vertex] != 1) {
      dfs(vertex, visit);
      printf("\n");
    }
  }
}


x86 assembly (clang, -O0):
<ssc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <empty@plt>
cmp    $0x0,%rax
je     1196 <ssc+0x56>
mov    $0x0,%al
call   1040 <pop@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
je     1191 <ssc+0x51>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1060 <dfs@plt>
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
jmp    114c <ssc+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssc>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <empty@plt>
test   %rax,%rax
je     1182 <ssc+0x42>
xor    %eax,%eax
call   1040 <pop@plt>
movslq %eax,%rcx
cmpl   $0x1,(%rbx,%rcx,4)
je     1150 <ssc+0x10>
mov    %eax,%edi
mov    %rbx,%rsi
call   1060 <dfs@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1150 <ssc+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @ssc(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %20, %1
%5 = call i64 (...) @empty()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = call i32 (...) @pop()
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 1
br i1 %14, label %15, label %20
15: ; preds = %7
%16 = load i32, i32* %3
%17 = load i32*, i32** %2
%18 = call i32 @dfs(i32 %16, i32* %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %20
20: ; preds = %15, %7
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ssc(i32* %0) {
%2 = tail call i64 (...) @empty()
%3 = icmp eq i64 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %13
%5 = tail call i32 (...) @pop()
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = tail call i32 @dfs(i32 %5, i32* %0)
%12 = tail call i32 @putchar(i32 10)
br label %13
13: ; preds = %10, %4
%14 = tail call i64 (...) @empty()
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %13, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x79() {
  Assert_real((isspace(121) == 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",
              610, ("isspace should be 0 for y"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x79>:
push   %rax
mov    $0x79,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x262,%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 = [26 x i8] c"isspace should be 0 for y\00"
define void @t_isspace_0x79() {
%1 = call i64 @isspace(i32 121)
%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 610, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"isspace should be 0 for y\00"
define void @t_isspace_0x79() {
%1 = tail call i64 @isspace(i32 121)
%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 610, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void UYVYToARGBRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToARGBRow_Any_AVX2() {
ret void
}
int f_blg_rc1(float a1) { return (__builtin_islessgreater(a1, 100)); }


x86 assembly (clang, -O0):
<f_blg_rc1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_blg_rc1>:
xor    %eax,%eax
ucomiss 0xef7(%rip),%xmm0
setne  %al
ret

LLVM IR (-O0):
define i32 @f_blg_rc1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp one float %3, 1.000000e+02
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f_blg_rc1(float %0) {
%2 = fcmp one float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mtd_srv_main();
int main(int argc, char *argv[]) { mtd_srv_main(); }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @mtd_srv_main()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @mtd_srv_main()
ret i32 0
}
void doStuff_arrayOfConstInt(const int a[]) {}


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

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

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

LLVM IR (-O2):
define void @doStuff_arrayOfConstInt(i32* nocapture %0) {
ret void
}
unsigned xrop3_170_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  return (D & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_170_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_170_1_1>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %edi,%esi
mov    %edi,%ecx
not    %cl
movzbl %cl,%ecx
not    %eax
and    %ecx,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_170_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
store i32 %13, i32* %6
%14 = load i8, i8* %4
%15 = zext i8 %14 to i32
%16 = shl i32 %15, 8
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
store i32 %19, i32* %7
%20 = load i32, i32* %5
%21 = load i32, i32* %6
%22 = xor i32 %21, -1
%23 = and i32 %20, %22
%24 = load i32, i32* %7
%25 = xor i32 %24, -1
%26 = and i32 %23, %25
%27 = load i32, i32* %5
%28 = load i32, i32* %6
%29 = and i32 %27, %28
%30 = or i32 %26, %29
%31 = load i32, i32* %5
%32 = load i32, i32* %7
%33 = and i32 %31, %32
%34 = or i32 %30, %33
ret i32 %34
}

LLVM IR (-O2):
define i32 @xrop3_170_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %0, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %8, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void _Z_errexit() { (void)exit(2); }


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

x86 assembly (clang, -O2):
<_Z_errexit>:
push   %rax
mov    $0x2,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @_Z_errexit() {
%1 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
define void @_Z_errexit() {
%1 = tail call i32 @exit(i32 2)
unreachable
}
int test_imm_76uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x76 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_76uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 118
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ j64_earr_encode(char *, int);
int /*<<< orphan*/ memset(char *, char, int);
scalar_t__ strcmp(char *, char *);
int test_earr_encode_1(void) {
  char buf[1 + 1];
  memset(buf, '\0', sizeof(buf));
  j64_earr_encode(buf, 1);
  return strcmp(buf, "[") == 0;
}


x86 assembly (clang, -O0):
<test_earr_encode_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x2(%rbp),%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1040 <memset@plt>
lea    -0x2(%rbp),%rdi
mov    $0x1,%esi
call   1030 <j64_earr_encode@plt>
lea    -0x2(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_earr_encode_1>:
push   %rbx
sub    $0x10,%rsp
lea    0xe(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <j64_earr_encode@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"[\00"
define i32 @test_earr_encode_1() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 2)
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%5 = call i32 @j64_earr_encode(i8* %4, i32 1)
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [2 x i8] c"[\00"
define i32 @test_earr_encode_1() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 2)
%4 = call i32 @j64_earr_encode(i8* %2, i32 1)
%5 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int htonll(int);
int ntohll(int);
int /*<<< orphan*/ printf(char *, int, char *, int);
int main(int argc, char **argv) {
  uint64_t var64bit;
  uint64_t tmp;
  uint64_t var64bitResult;
  var64bit = 0x76543210L;
  tmp = 0xFEDCBA98L;
  var64bit = var64bit | (tmp << 32);
  var64bitResult = htonll(var64bit);
  var64bitResult = ntohll(var64bit);
  printf("Argc = %i\nArgv[0] = %s\nResult 64bit = %"
         "llu"
         "\n",
         argc, argv[0], var64bitResult);
  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   $0x76543210,-0x14(%rbp)
movl   $0xfedcba98,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <htonll@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <ntohll@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1050 <htonll@plt>
call   1040 <ntohll@plt>
mov    (%rbx),%rdx
lea    0xeb4(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Argc = %i\0AArgv[0] = %s\0AResult 64bit = %llu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1985229328, i32* %6
store i32 -19088744, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = shl i32 %10, 32
%12 = or i32 %9, %11
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @htonll(i32 %13)
store i32 %14, i32* %8
%15 = load i32, i32* %6
%16 = call i32 @ntohll(i32 %15)
store i32 %16, i32* %8
%17 = load i32, i32* %4
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = load i32, i32* %8
%22 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %17, i8* %20, i32 %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"Argc = %i\0AArgv[0] = %s\0AResult 64bit = %llu\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @htonll(i32 poison)
%4 = tail call i32 @ntohll(i32 poison)
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %5, i32 %4)
ret i32 0
}