xunge/DecIR huggingface dataset:
int max_pick_loops(const int c_pages, const int c_colors) {
  return (c_pages * ((12 * 1024) / 16 / (((unsigned long)1 << 12) / 1024)) /
              256 +
          10);
}


x86 assembly (clang, -O0):
<max_pick_loops>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
imul   $0xc0,%rax,%rax
shr    $0x8,%rax
add    $0xa,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_pick_loops>:
movslq %edi,%rax
shl    $0x6,%rax
lea    (%rax,%rax,2),%rax
shr    $0x8,%rax
add    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @max_pick_loops(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 = sext i32 %5 to i64
%7 = mul i64 %6, 192
%8 = udiv i64 %7, 256
%9 = add i64 %8, 10
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @max_pick_loops(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = mul nsw i64 %3, 192
%5 = lshr i64 %4, 8
%6 = trunc i64 %5 to i32
%7 = add i32 %6, 10
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void presenta() {
  printf("\n");
  printf("test-tramas. (c) Juan Gonzalez. Febrero 2005. Licencia GPL\n");
  printf("Visualizacion de tramas de ChronoPic [Proyecto ChronoJump]\n");
  printf("Ejecute test-tramas -h para OBTENER AYUDA\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<presenta>:
push   %rbp
mov    %rsp,%rbp
lea    0xf86(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
call   1030 <printf@plt>
lea    0xf39(%rip),%rdi
call   1030 <printf@plt>
lea    0xf56(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<presenta>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2c(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [60 x i8] c"test-tramas. (c) Juan Gonzalez. Febrero 2005. Licencia GPL\0A\00"
@.str.2 = [60 x i8] c"Visualizacion de tramas de ChronoPic [Proyecto ChronoJump]\0A\00"
@.str.3 = [43 x i8] c"Ejecute test-tramas -h para OBTENER AYUDA\0A\00"
define void @presenta() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [59 x i8] c"test-tramas. (c) Juan Gonzalez. Febrero 2005. Licencia GPL\00"
@str.4 = [59 x i8] c"Visualizacion de tramas de ChronoPic [Proyecto ChronoJump]\00"
@str.5 = [42 x i8] c"Ejecute test-tramas -h para OBTENER AYUDA\00"
define void @presenta() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret void
}
__attribute__((always_)) int api5(int api_no, int arg1, int arg2, int arg3,
                                  int arg4, int arg5) {
  int ret = 0;
  __asm__ __volatile__("int $0x44"
                       : "=a"(ret)
                       : "0"(api_no), "b"(arg1), "c"(arg2), "d"(arg3),
                         "S"(arg4), "D"(arg5));
  return ret;
}


x86 assembly (clang, -O0):
<api5>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ebx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edi
int    $0x44
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<api5>:
push   %rbx
mov    %ecx,%r10d
mov    %edx,%ecx
mov    %esi,%ebx
mov    %edi,%eax
mov    %r10d,%edx
mov    %r9d,%edi
mov    %r8d,%esi
int    $0x44
pop    %rbx
ret

LLVM IR (-O0):
define i32 @api5(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
%13 = 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
store i32 0, i32* %13
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = call i32 asm sideeffect "int $$0x44", "={ax},0,{bx},{cx},{dx},{si},{di},~{dirflag},~{fpsr},~{flags}"(i32 %14, i32 %15, i32 %16, i32 %17, i32 %18, i32 %19)
store i32 %20, i32* %13
%21 = load i32, i32* %13
ret i32 %21
}

LLVM IR (-O2):
define i32 @api5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 asm sideeffect "int $$0x44", "={ax},0,{bx},{cx},{dx},{si},{di},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
ret i32 %7
}
double pal_trim(double p) {
  if (p < 0)
    p = 0;
  if (p > 1)
    p = 1;
  return p;
}


x86 assembly (clang, -O0):
<pal_trim>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    111f <pal_trim+0x1f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1143 <pal_trim+0x43>
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pal_trim>:
xorpd  %xmm1,%xmm1
maxsd  %xmm0,%xmm1
movsd  0xef0(%rip),%xmm0
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @pal_trim(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
store double 0.000000e+00, double* %2
br label %6
6: ; preds = %5, %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
store double 1.000000e+00, double* %2
br label %10
10: ; preds = %9, %6
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
define double @pal_trim(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double 0.000000e+00, double %0
%4 = fcmp ogt double %3, 1.000000e+00
%5 = select i1 %4, double 1.000000e+00, double %3
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char *, char const *, int /*<<< orphan*/);
int strings_equal(char *type, const char *expected) {
  return strncmp(type, expected, strlen(expected)) == 0;
}


x86 assembly (clang, -O0):
<strings_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strings_equal>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @strings_equal(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 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @strings_equal(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int qsort_asc_rvector(const void *a, const void *b) {
  const double *aa = a;
  const double *bb = b;
  if (*aa > *bb)
    return 1;
  else if (*aa == *bb)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<qsort_asc_rvector>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    113e <qsort_asc_rvector+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1172 <qsort_asc_rvector+0x72>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1166 <qsort_asc_rvector+0x66>
jp     1166 <qsort_asc_rvector+0x66>
movl   $0x0,-0x4(%rbp)
jmp    1172 <qsort_asc_rvector+0x72>
jmp    116b <qsort_asc_rvector+0x6b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_asc_rvector>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
ucomisd %xmm1,%xmm0
cmpneqsd %xmm1,%xmm0
movq   %xmm0,%rcx
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @qsort_asc_rvector(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fcmp ogt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %3
br label %27
18: ; preds = %2
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = load double*, double** %7
%22 = load double, double* %21
%23 = fcmp oeq double %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 0, i32* %3
br label %27
25: ; preds = %18
br label %26
26: ; preds = %25
store i32 -1, i32* %3
br label %27
27: ; preds = %26, %24, %17
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @qsort_asc_rvector(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = fcmp une double %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
unsigned ff(unsigned a) { return (a + 1) & 0xfff00fffu; }


x86 assembly (clang, -O0):
<ff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
and    $0xfff00fff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff>:
lea    0x1(%rdi),%eax
and    $0xfff00fff,%eax
ret

LLVM IR (-O0):
define i32 @ff(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 1
%5 = and i32 %4, -1044481
ret i32 %5
}

LLVM IR (-O2):
define i32 @ff(i32 %0) {
%2 = add i32 %0, 1
%3 = and i32 %2, -1044481
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ merge(int *, int /*<<< orphan*/, int, int *);
void main() {
  int a[] = {6, 7, 3, 4, 6, 9, 3, 1};
  int len = sizeof(a) / sizeof(a[0]);
  int temp[len];
  merge(a, 0, len - 1, temp);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movaps 0xef1(%rip),%xmm0
movaps %xmm0,-0x10(%rbp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
movl   $0x8,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <merge@plt>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    %rsp,%rbx
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
lea    0x20(%rsp),%rcx
xor    %esi,%esi
mov    $0x7,%edx
call   1030 <merge@plt>
mov    %rbx,%rsp
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [8 x i32] [i32 6, i32 7, i32 3, i32 4, i32 6, i32 9, i32 3, i32 1]
define void @main() {
%1 = alloca [8 x i32]
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = bitcast [8 x i32]* %1 to i8*
store i32 8, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i32, i64 %7
store i64 %7, i64* %4
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%11 = load i32, i32* %2
%12 = sub nsw i32 %11, 1
%13 = call i32 @merge(i32* %10, i32 0, i32 %12, i32* %9)
%14 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@__const.main.a = [8 x i32] [i32 6, i32 7, i32 3, i32 4, i32 6, i32 9, i32 3, i32 1]
define void @main() {
%1 = alloca [8 x i32]
%2 = bitcast [8 x i32]* %1 to i8*
%3 = tail call i8* @llvm.stacksave()
%4 = alloca [8 x i32]
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%7 = call i32 @merge(i32* %6, i32 0, i32 7, i32* %5)
ret void
}
void fa105(int n) {
  {
    int b[n];
    {
      int c[n];
      0;
    }
  a : {
    int d[n];
    0;
  };
    int e[n];
    goto a;
    0;
  };
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa105>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rax,-0x40(%rbp)
jmp    1131 <fa105+0x31>

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

LLVM IR (-O0):
define void @fa105(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %3
%22 = alloca i32, i64 %20
store i64 %20, i64* %4
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
%25 = call i8* @llvm.stacksave()
store i8* %25, i8** %5
%26 = alloca i32, i64 %24
store i64 %24, i64* %6
%27 = load i8*, i8** %5
br label %28
28: ; preds = %28, %1
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %7
%32 = alloca i32, i64 %30
store i64 %30, i64* %8
%33 = load i8*, i8** %7
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
%36 = alloca i32, i64 %35
store i64 %35, i64* %9
br label %28
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
%40 = call i8* @llvm.stacksave()
store i8* %40, i8** %10
%41 = alloca i32, i64 %39
store i64 %39, i64* %11
%42 = load i32, i32* %2
%43 = zext i32 %42 to i64
%44 = call i8* @llvm.stacksave()
store i8* %44, i8** %12
%45 = alloca i32, i64 %43
store i64 %43, i64* %13
%46 = load i8*, i8** %12
%47 = load i32, i32* %2
%48 = zext i32 %47 to i64
%49 = call i8* @llvm.stacksave()
store i8* %49, i8** %14
%50 = alloca i32, i64 %48
store i64 %48, i64* %15
%51 = load i8*, i8** %14
%52 = load i32, i32* %2
%53 = zext i32 %52 to i64
%54 = alloca i32, i64 %53
store i64 %53, i64* %16
%55 = load i8*, i8** %10
%56 = load i32, i32* %2
%57 = zext i32 %56 to i64
%58 = call i8* @llvm.stacksave()
store i8* %58, i8** %17
%59 = alloca i32, i64 %57
store i64 %57, i64* %18
%60 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
define void @fa105(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
void intel_rdt_sched_in(void) {}


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

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

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

LLVM IR (-O2):
define void @intel_rdt_sched_in() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void out8(uint8_t v, uint32_t a) {
  *((volatile uint8_t *)(((a - 0x3f8) << 2) + 0x83e01003)) = (uint8_t)(v);
}


x86 assembly (clang, -O0):
<out8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
sub    $0x3f8,%eax
shl    $0x2,%eax
add    $0x83e01003,%eax
mov    %eax,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<out8>:
lea    -0x7c1fffdd(,%rsi,4),%eax
mov    %rdi,(%rax)
ret

LLVM IR (-O0):
define void @out8(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1016
%8 = shl i32 %7, 2
%9 = add i32 %8, -2082467837
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i64*
store volatile i64 %5, i64* %11
ret void
}

LLVM IR (-O2):
define void @out8(i64 %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = add i32 %3, -2082471901
%5 = zext i32 %4 to i64
%6 = inttoptr i64 %5 to i64*
store volatile i64 %0, i64* %6
ret void
}
/* Variables and functions */
char *strdup2(char *);
char *unused_drive() { return strdup2("/"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define i8* @unused_drive() {
%1 = call i8* @strdup2(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define i8* @unused_drive() {
%1 = tail call i8* @strdup2(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int test_imm_E9int16_mem(short *val) {
  return ((*val) & (-0xE9 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E9int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -233
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void handle_tag_end(char *tag) { return; }


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

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

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

LLVM IR (-O2):
define void @handle_tag_end(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_smaxabs(int, float *, int);
int main() {
  float x[] = {1.0, -2.0, -3.0, 4.0, -5.0, -6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_smaxabs(N, x, stride);
  printf("maxabs: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
call   1030 <stdlib_strided_smaxabs@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1030 <stdlib_strided_smaxabs@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float -2.000000e+00, float -3.000000e+00, float 4.000000e+00, float -5.000000e+00, float -6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [12 x i8] c"maxabs: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_smaxabs(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float -2.000000e+00, float -3.000000e+00, float 4.000000e+00, float -5.000000e+00, float -6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [12 x i8] c"maxabs: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_smaxabs(i32 4, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ absolutex();
int /*<<< orphan*/ adc16(int /*<<< orphan*/);
int /*<<< orphan*/ readmemw65816(int /*<<< orphan*/);
void adcAbsx16(void) { adc16(readmemw65816(absolutex())); }


x86 assembly (clang, -O0):
<adcAbsx16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <absolutex@plt>
mov    %eax,%edi
call   1030 <readmemw65816@plt>
mov    %eax,%edi
call   1050 <adc16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adcAbsx16>:
push   %rax
xor    %eax,%eax
call   1040 <absolutex@plt>
mov    %eax,%edi
call   1030 <readmemw65816@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <adc16@plt>

LLVM IR (-O0):
define void @adcAbsx16() {
%1 = call i32 (...) @absolutex()
%2 = call i32 @readmemw65816(i32 %1)
%3 = call i32 @adc16(i32 %2)
ret void
}

LLVM IR (-O2):
define void @adcAbsx16() {
%1 = tail call i32 (...) @absolutex()
%2 = tail call i32 @readmemw65816(i32 %1)
%3 = tail call i32 @adc16(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_fmt(char *, char *);
void version() {
  print_fmt("6502 FPGA Computer OS ported to MIPS, version 1.2 %s",
            "(Feb 2015)\n");
}


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

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
lea    0xf17(%rip),%rsi
jmp    1030 <print_fmt@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"6502 FPGA Computer OS ported to MIPS, version 1.2 %s\00"
@.str.1 = [12 x i8] c"(Feb 2015)\0A\00"
define void @version() {
%1 = call i32 @print_fmt(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"6502 FPGA Computer OS ported to MIPS, version 1.2 %s\00"
@.str.1 = [12 x i8] c"(Feb 2015)\0A\00"
define void @version() {
%1 = tail call i32 @print_fmt(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void XkbAllocGeomKeyAliases() {}


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

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

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

LLVM IR (-O2):
define void @XkbAllocGeomKeyAliases() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void f(int n) {
  int i;
  int values[10];
  for (i = 0; i < 10; i++) {
    values[i] = n;
    assert(values[i] == n);
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    115d <f+0x4d>
mov    -0x4(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <f+0x12>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x i32]
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %21, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %11
store i32 %9, i32* %12
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %2
%18 = icmp eq i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
br label %21
21: ; preds = %8
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %5
24: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 @assert(i32 1)
%6 = tail call i32 @assert(i32 1)
%7 = tail call i32 @assert(i32 1)
%8 = tail call i32 @assert(i32 1)
%9 = tail call i32 @assert(i32 1)
%10 = tail call i32 @assert(i32 1)
%11 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
int afficheMenu(char **);
int /*<<< orphan*/ createDic(char **, int);
main(int argc, char *argv[]) {
  char *dic[100];
  createDic(dic, 100);
  while (afficheMenu(dic) != 1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x330(%rbp),%rdi
mov    $0x64,%esi
call   1030 <createDic@plt>
lea    -0x330(%rbp),%rdi
call   1040 <afficheMenu@plt>
cmp    $0x1,%eax
je     1164 <main+0x44>
jmp    114a <main+0x2a>
mov    -0x4(%rbp),%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x320,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <createDic@plt>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <afficheMenu@plt>
cmp    $0x1,%eax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x320,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [100 x i8*], [100 x i8*]* %6, i64 0, i64 0
%8 = call i32 @createDic(i8** %7, i32 100)
br label %9
9: ; preds = %13, %2
%10 = getelementptr inbounds [100 x i8*], [100 x i8*]* %6, i64 0, i64 0
%11 = call i32 @afficheMenu(i8** %10)
%12 = icmp ne i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %9
br label %9
14: ; preds = %9
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8*]
%4 = bitcast [100 x i8*]* %3 to i8*
%5 = getelementptr inbounds [100 x i8*], [100 x i8*]* %3, i64 0, i64 0
%6 = call i32 @createDic(i8** %5, i32 100)
br label %7
7: ; preds = %7, %2
%8 = call i32 @afficheMenu(i8** %5)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %7
10: ; preds = %7
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int validarComprimentoSenha(int len) {
  if (len < 1 || len > 50) {
    printf("\t\033[31mErro: O comprimento da senha e invalido.\n\tComprimentos "
           "validos vao de 1 ate 50 caracteres.\033[0m\n\n");
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<validarComprimentoSenha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jl     112f <validarComprimentoSenha+0x1f>
cmpl   $0x32,-0x8(%rbp)
jle    1147 <validarComprimentoSenha+0x37>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    114e <validarComprimentoSenha+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validarComprimentoSenha>:
add    $0xffffffcd,%edi
xor    %eax,%eax
cmp    $0xffffffcd,%edi
ja     1130 <validarComprimentoSenha+0x20>
push   %rax
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [103 x i8] c"\09\1B[31mErro: O comprimento da senha e invalido.\0A\09Comprimentos validos vao de 1 ate 50 caracteres.\1B[0m\0A\0A\00"
define i32 @validarComprimentoSenha(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 1
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 50
br i1 %8, label %9, label %11
9: ; preds = %6, %1
%10 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %12
11: ; preds = %6
store i32 0, i32* %2
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@str = [102 x i8] c"\09\1B[31mErro: O comprimento da senha e invalido.\0A\09Comprimentos validos vao de 1 ate 50 caracteres.\1B[0m\0A\00"
define i32 @validarComprimentoSenha(i32 %0) {
%2 = add i32 %0, -51
%3 = icmp ult i32 %2, -50
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
int test_imm_ACuint32_mem(unsigned int *val) {
  return ((*val) & (0xAC << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_ACuint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 172
%6 = icmp ne i32 %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_ACuint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 172
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x4c() {
  Assert_real((islower(76) == 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_islower.c",
              385, ("islower should be 0 for L"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x4c>:
push   %rax
mov    $0x4c,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x181,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for L\00"
define void @t_islower_0x4c() {
%1 = call i64 @islower(i32 76)
%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 385, 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 0 for L\00"
define void @t_islower_0x4c() {
%1 = tail call i64 @islower(i32 76)
%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 385, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_C3int32_mem(int *val) {
  return ((*val) & (0xC3 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C3int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 195
%6 = icmp ne i32 %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_C3int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 195
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int fail(int /*<<< orphan*/);
int udiv_i16(int, int);
int test_udiv(void) {
  if (udiv_i16(-534, 7) != 9286)
    return fail(0);
  return 0x40;
}


x86 assembly (clang, -O0):
<test_udiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xfffffdea,%edi
mov    $0x7,%esi
call   1040 <udiv_i16@plt>
cmp    $0x2446,%eax
je     1151 <test_udiv+0x31>
xor    %edi,%edi
call   1030 <fail@plt>
mov    %eax,-0x4(%rbp)
jmp    1158 <test_udiv+0x38>
movl   $0x40,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_udiv>:
push   %rax
mov    $0xfffffdea,%edi
mov    $0x7,%esi
call   1040 <udiv_i16@plt>
cmp    $0x2446,%eax
jne    113e <test_udiv+0x1e>
mov    $0x40,%eax
pop    %rcx
ret
xor    %edi,%edi
pop    %rax
jmp    1030 <fail@plt>

LLVM IR (-O0):
define i32 @test_udiv() {
%1 = alloca i32
%2 = call i32 @udiv_i16(i32 -534, i32 7)
%3 = icmp ne i32 %2, 9286
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @fail(i32 0)
store i32 %5, i32* %1
br label %7
6: ; preds = %0
store i32 64, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_udiv() {
%1 = tail call i32 @udiv_i16(i32 -534, i32 7)
%2 = icmp eq i32 %1, 9286
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @fail(i32 0)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 64, %0 ]
ret i32 %6
}
/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int usage(const char *exe) {
  fprintf(stderr,
          "Usage:\t%s [-tRTHgGBi] "
          "[-x X] "
          "[-y Y] "
          "[-r radius] "
          "[-w width] "
          "[-l size] "
          "[-n height] "
          "[-m width] "
          "[-p samples] image\n",
          exe);
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [112 x i8] c"Usage:\09%s [-tRTHgGBi] [-x X] [-y Y] [-r radius] [-w width] [-l size] [-n height] [-m width] [-p samples] image\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
ret i32 %6
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [112 x i8] c"Usage:\09%s [-tRTHgGBi] [-x X] [-y Y] [-r radius] [-w width] [-l size] [-n height] [-m width] [-p samples] image\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
ret i32 %4
}
void save_thCtx(void) {}


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

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

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

LLVM IR (-O2):
define void @save_thCtx() {
ret void
}
int do_983() { return 983; }


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

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

LLVM IR (-O0):
define i32 @do_983() {
ret i32 983
}

LLVM IR (-O2):
define i32 @do_983() {
ret i32 983
}
void emulator_outputstr(char *str) {
  volatile char *addr = (char *)0x40000000;
  while (*str != 0) {
    *addr = *str;
    str++;
  }
}


x86 assembly (clang, -O0):
<emulator_outputstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x40000000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113e <emulator_outputstr+0x3e>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1111 <emulator_outputstr+0x11>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emulator_outputstr>:
mov    (%rdi),%al
test   %al,%al
je     1122 <emulator_outputstr+0x22>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
mov    %al,0x40000000
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <emulator_outputstr+0x10>
ret

LLVM IR (-O0):
define void @emulator_outputstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* inttoptr (i64 1073741824 to i8*), i8** %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = load i8*, i8** %3
store volatile i8 %11, i8* %12
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @emulator_outputstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %8, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
store volatile i8 %5, i8* inttoptr (i64 1073741824 to i8*)
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4, %1
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, long);
int main(void) {
  long line_count;
  int cur_char;
  line_count = 0;
  while ((cur_char = getchar()) != EOF) {
    if (cur_char == '\n') {
      line_count++;
    }
  }
  printf("Count of lines is: %ld\n", line_count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea0(%rip),%rcx
cmp    (%rcx),%eax
je     116b <main+0x4b>
cmpl   $0xa,-0x14(%rbp)
jne    1166 <main+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1157 <main+0x37>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %rcx,%rbx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [24 x i8] c"Count of lines is: %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
store i64 0, i64* %2
br label %4
4: ; preds = %14, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %3
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i64, i64* %2
%13 = add nsw i64 %12, 1
store i64 %13, i64* %2
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
%16 = load i64, i64* %2
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %16)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [24 x i8] c"Count of lines is: %ld\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i64 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i64
%9 = add nuw nsw i64 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i64 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %14)
ret i32 0
}
void ExttMonthLogAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttMonthLogAuxTable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void panic(const char *err) {
  fputs(err, stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
define void @panic(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void led_off() { (*(volatile unsigned long *)0x7F008824) = 0xf; }


x86 assembly (clang, -O0):
<led_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008824,%eax
movq   $0xf,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_off>:
movq   $0xf,0x7f008824
ret

LLVM IR (-O0):
define void @led_off() {
store volatile i64 15, i64* inttoptr (i64 2130741284 to i64*)
ret void
}

LLVM IR (-O2):
define void @led_off() {
store volatile i64 15, i64* inttoptr (i64 2130741284 to i64*)
ret void
}
void initSineFourierCoeff(double fourierCoeff[2][11]) {
  int i;
  for (i = 0; i < 11; i++) {
    fourierCoeff[0][i] = 0.0;
    fourierCoeff[1][i] = 0.0;
  }
  fourierCoeff[1][1] = 1.0;
}


x86 assembly (clang, -O0):
<initSineFourierCoeff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xb,-0xc(%rbp)
jge    1148 <initSineFourierCoeff+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,0x58(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <initSineFourierCoeff+0xf>
mov    -0x8(%rbp),%rax
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,0x60(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<initSineFourierCoeff>:
xorps  %xmm0,%xmm0
movups %xmm0,0x60(%rdi)
movups %xmm0,0xa0(%rdi)
movups %xmm0,0x90(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x60(%rdi)
ret

LLVM IR (-O0):
define void @initSineFourierCoeff([11 x double]* %0) {
%2 = alloca [11 x double]*
%3 = alloca i32
store [11 x double]* %0, [11 x double]** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 11
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load [11 x double]*, [11 x double]** %2
%9 = getelementptr inbounds [11 x double], [11 x double]* %8, i64 0
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [11 x double], [11 x double]* %9, i64 0, i64 %11
store double 0.000000e+00, double* %12
%13 = load [11 x double]*, [11 x double]** %2
%14 = getelementptr inbounds [11 x double], [11 x double]* %13, i64 1
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [11 x double], [11 x double]* %14, i64 0, i64 %16
store double 0.000000e+00, double* %17
br label %18
18: ; preds = %7
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
%22 = load [11 x double]*, [11 x double]** %2
%23 = getelementptr inbounds [11 x double], [11 x double]* %22, i64 1
%24 = getelementptr inbounds [11 x double], [11 x double]* %23, i64 0, i64 1
store double 1.000000e+00, double* %24
ret void
}

LLVM IR (-O2):
define void @initSineFourierCoeff([11 x double]* nocapture writeonly %0) {
%2 = getelementptr inbounds [11 x double], [11 x double]* %0, i64 1, i64 1
%3 = bitcast [11 x double]* %0 to i8*
store double 1.000000e+00, double* %2
ret void
}