xunge/DecIR huggingface dataset:
void ClearBitfieldBit(char *bitfield, unsigned long index) {
  char *temp;
  unsigned byte;
  int bit;
  byte = (unsigned)(index / 8);
  bit = (unsigned)(index % 8);
  temp = bitfield + byte;
  *temp &= ~(1 << bit);
}


x86 assembly (clang, -O0):
<ClearBitfieldBit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3,%rax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearBitfieldBit>:
mov    %rsi,%rcx
mov    %rsi,%rax
shr    $0x3,%rax
mov    $0xfe,%dl
rol    %cl,%dl
mov    %eax,%eax
and    %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @ClearBitfieldBit(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%8 = load i64, i64* %4
%9 = udiv i64 %8, 8
%10 = trunc i64 %9 to i32
store i32 %10, i32* %6
%11 = load i64, i64* %4
%12 = urem i64 %11, 8
%13 = trunc i64 %12 to i32
store i32 %13, i32* %7
%14 = load i8*, i8** %3
%15 = load i32, i32* %6
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8* %17, i8** %5
%18 = load i32, i32* %7
%19 = shl i32 1, %18
%20 = xor i32 %19, -1
%21 = load i8*, i8** %5
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = and i32 %23, %20
%25 = trunc i32 %24 to i8
store i8 %25, i8* %21
ret void
}

LLVM IR (-O2):
define void @ClearBitfieldBit(i8* nocapture %0, i64 %1) {
%3 = lshr i64 %1, 3
%4 = trunc i64 %1 to i8
%5 = and i8 %4, 7
%6 = and i64 %3, 4294967295
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = shl nuw i8 1, %5
%9 = xor i8 %8, -1
%10 = load i8, i8* %7
%11 = and i8 %10, %9
store i8 %11, i8* %7
ret void
}
void div() {
  asm volatile("popq %%rbx\n\t"
               "popq %%rax\n\t"
               "cqo\n\t"
               "idivq %%rbx\n\t"
               "pushq %%rax\n\t" ::
                   :);
}


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
pop    %rbx
pop    %rax
cqto
idiv   %rbx
push   %rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
pop    %rbx
pop    %rax
cqto
idiv   %rbx
push   %rax
ret

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

LLVM IR (-O2):
define void @div() {
tail call void asm sideeffect "popq %rbx\0A\09popq %rax\0A\09cqo\0A\09idivq %rbx\0A\09pushq %rax\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int destroy_nth_position_bit(int number, int position) {
  return (number & (~(1 << position)));
}


x86 assembly (clang, -O0):
<destroy_nth_position_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @destroy_nth_position_bit(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 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @destroy_nth_position_bit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
void RTFileTell(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileTell() {
ret void
}
double max_wrapper(double *arg_list) {
  if (arg_list[0] > arg_list[1])
    return arg_list[0];
  return arg_list[1];
}


x86 assembly (clang, -O0):
<max_wrapper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    1131 <max_wrapper+0x31>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113f <max_wrapper+0x3f>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_wrapper>:
movsd  (%rdi),%xmm0
maxsd  0x8(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @max_wrapper(double* %0) {
%2 = alloca double
%3 = alloca double*
store double* %0, double** %3
%4 = load double*, double** %3
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 1
%9 = load double, double* %8
%10 = fcmp ogt double %6, %9
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
store double %14, double* %2
br label %19
15: ; preds = %1
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
store double %18, double* %2
br label %19
19: ; preds = %15, %11
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
define double @max_wrapper(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fcmp ogt double %2, %4
%6 = select i1 %5, double %2, double %4
ret double %6
}
int EndianTest(void) {
  unsigned long int CT = 0L;
  ((char *)(&CT))[0] = 1;
  return ((CT == 1) ? 0 : 1);
}


x86 assembly (clang, -O0):
<EndianTest>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
movb   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x1,%rdx
cmove  %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @EndianTest() {
%1 = alloca i64
store i64 0, i64* %1
%2 = bitcast i64* %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 0
store i8 1, i8* %3
%4 = load i64, i64* %1
%5 = icmp eq i64 %4, 1
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 0, i32 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @EndianTest() {
ret i32 0
}
int test_lahf_sahf(void) {
  unsigned int test = 0;
  __asm__ __volatile__("xor %%rax, %%rax\n\t"
                       "sahf\n\t"
                       "lahf"
                       : "=a"(test));
  return test >> 8;
}


x86 assembly (clang, -O0):
<test_lahf_sahf>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %rax,%rax
sahf
lahf
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lahf_sahf>:
xor    %rax,%rax
sahf
lahf
shr    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @test_lahf_sahf() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 asm sideeffect "xor %rax, %rax\0A\09sahf\0A\09lahf", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = lshr i32 %3, 8
ret i32 %4
}

LLVM IR (-O2):
define i32 @test_lahf_sahf() {
%1 = tail call i32 asm sideeffect "xor %rax, %rax\0A\09sahf\0A\09lahf", "={ax},~{dirflag},~{fpsr},~{flags}"()
%2 = lshr i32 %1, 8
ret i32 %2
}
int compare(const void *a, const void *b) {
  double *pa = *(double **)a;
  double *pb = *(double **)b;
  int res;
  if (*pa < *pb)
    res = -1;
  if (*pa == *pb)
    res = 0;
  if (*pa > *pb)
    res = 1;
  return res;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1143 <compare+0x43>
movl   $0xffffffff,-0x24(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomisd (%rax),%xmm0
jne    1166 <compare+0x66>
jp     1166 <compare+0x66>
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1183 <compare+0x83>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double**
%4 = load double*, double** %3
%5 = bitcast i8* %1 to double**
%6 = load double*, double** %5
%7 = load double, double* %4
%8 = load double, double* %6
%9 = fcmp une double %7, %8
%10 = sext i1 %9 to i32
%11 = fcmp ogt double %7, %8
%12 = select i1 %11, i32 1, i32 %10
ret i32 %12
}
/* Variables and functions */
void *calloc(size_t num, size_t size) { return 0; }


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

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

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @calloc(i64 %0, i64 %1) {
ret i8* null
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *basename(const char *path) {
  const char *s;
  s = strrchr(path, '/');
  if (s) {
    return s + 1;
  }
  return path;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <basename+0x3a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <basename+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 47)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %3
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printInt(int *arreglo, int len) {
  int i = 0;
  for (; i < len; i++)
    printf("%d, ", arreglo[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printInt+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printInt+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printInt>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printInt+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printInt+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @printInt(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
char *basename(char *);
int /*<<< orphan*/ free(char *);
char *strdup(char *);
char *jx_basename_c(char *in_path) {
  char *temp = strdup(in_path);
  char *result = strdup(basename(temp));
  free(temp);
  return result;
}


x86 assembly (clang, -O0):
<jx_basename_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,%rdi
call   1050 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jx_basename_c>:
push   %r14
push   %rbx
push   %rax
call   1050 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <basename@plt>
mov    %rax,%rdi
call   1050 <strdup@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @jx_basename_c(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i8* @basename(i8* %2)
%4 = tail call i8* @strdup(i8* %3)
%5 = tail call i32 @free(i8* %2)
ret i8* %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void print_line_uint32_t(uint32_t i, uint32_t j, uint32_t v, int magma) {
  if (magma)
    printf("A[%u,%u]:=%d;\n", i, j, v);
  else
    printf("%u %u %d\n", i, j, v);
}


x86 assembly (clang, -O0):
<print_line_uint32_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1148 <print_line_uint32_t+0x38>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
jmp    115d <print_line_uint32_t+0x4d>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_line_uint32_t>:
mov    %edx,%eax
mov    %esi,%edx
mov    %edi,%esi
test   %ecx,%ecx
lea    0xef0(%rip),%rcx
lea    0xeda(%rip),%rdi
cmove  %rcx,%rdi
mov    %eax,%ecx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"A[%u,%u]:=%d;\0A\00"
@.str.1 = [10 x i8] c"%u %u %d\0A\00"
define void @print_line_uint32_t(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
%6 = select i1 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
%7 = tail call i32 @printf(i8* %6, i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
bool nrf52_errata_47(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_47() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sort_cstrings_example();
int /*<<< orphan*/ sort_integers_example();
int /*<<< orphan*/ sort_structs_example();
int main() {
  sort_integers_example();
  sort_cstrings_example();
  sort_structs_example();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sort_integers_example()
%2 = tail call i32 (...) @sort_cstrings_example()
%3 = tail call i32 (...) @sort_structs_example()
ret i32 0
}
/* Type definitions */
struct axtScoreScheme {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freez(struct axtScoreScheme **);
void axtScoreSchemeFree(struct axtScoreScheme **pObj) { freez(pObj); }


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

x86 assembly (clang, -O2):
<axtScoreSchemeFree>:
jmp    1030 <freez@plt>

LLVM IR (-O0):
%struct.axtScoreScheme = type { i32 }
define void @axtScoreSchemeFree(%struct.axtScoreScheme** %0) {
%2 = alloca %struct.axtScoreScheme**
store %struct.axtScoreScheme** %0, %struct.axtScoreScheme*** %2
%3 = load %struct.axtScoreScheme**, %struct.axtScoreScheme*** %2
%4 = call i32 @freez(%struct.axtScoreScheme** %3)
ret void
}

LLVM IR (-O2):
%struct.axtScoreScheme = type { i32 }
define void @axtScoreSchemeFree(%struct.axtScoreScheme** %0) {
%2 = tail call i32 @freez(%struct.axtScoreScheme** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TestLenient8Iterator();
extern int main(int argc, const char *argv[]) {
  TestLenient8Iterator();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @TestLenient8Iterator()
ret i32 0
}
/* Variables and functions */
int palind(char *, int /*<<< orphan*/, scalar_t__);
scalar_t__ strlen(char *);
int palin(char *val) { return palind(val, 0, strlen(val) - 1); }


x86 assembly (clang, -O0):
<palin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1040 <palind@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<palin>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
pop    %rbx
jmp    1040 <palind@plt>

LLVM IR (-O0):
define i32 @palin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = sub nsw i64 %5, 1
%7 = call i32 @palind(i8* %3, i32 0, i64 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @palin(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, -1
%4 = tail call i32 @palind(i8* %0, i32 0, i64 %3)
ret i32 %4
}
unsigned long long next_length(unsigned long long length,
                               unsigned long long multiplier,
                               unsigned long long increment) {
  if (length)
    return length * multiplier + increment;
  else if (increment)
    return increment;
  else
    return 1;
}


x86 assembly (clang, -O0):
<next_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1131 <next_length+0x31>
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1151 <next_length+0x51>
cmpq   $0x0,-0x20(%rbp)
je     1149 <next_length+0x49>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1151 <next_length+0x51>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_length>:
imul   %rdi,%rsi
test   %rdx,%rdx
mov    $0x1,%eax
cmovne %rdx,%rax
lea    (%rsi,%rdx,1),%rcx
test   %rdi,%rdi
cmovne %rcx,%rax
ret

LLVM IR (-O0):
define i64 @next_length(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %5
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i64, i64* %5
%12 = load i64, i64* %6
%13 = mul i64 %11, %12
%14 = load i64, i64* %7
%15 = add i64 %13, %14
store i64 %15, i64* %4
br label %22
16: ; preds = %3
%17 = load i64, i64* %7
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i64, i64* %7
store i64 %20, i64* %4
br label %22
21: ; preds = %16
store i64 1, i64* %4
br label %22
22: ; preds = %21, %19, %10
%23 = load i64, i64* %4
ret i64 %23
}

LLVM IR (-O2):
define i64 @next_length(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %0, 0
%5 = mul i64 %1, %0
%6 = add i64 %5, %2
%7 = icmp eq i64 %2, 0
%8 = select i1 %7, i64 1, i64 %2
%9 = select i1 %4, i64 %8, i64 %6
ret i64 %9
}
/* Variables and functions */
int PAPI_set_cmp_granularity(int, int);
void papif_set_cmp_granularity__(int *granularity, int *cidx, int *check) {
  *check = PAPI_set_cmp_granularity(*granularity, *cidx);
}


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

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

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

LLVM IR (-O2):
define void @papif_set_cmp_granularity__(i32* nocapture %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %1
%6 = tail call i32 @PAPI_set_cmp_granularity(i32 %4, i32 %5)
store i32 %6, i32* %2
ret void
}
/* Type definitions */
typedef scalar_t__ XML_Char;

/* Variables and functions */
int Xstrlen(const XML_Char *a) {
  int x;
  if (a == NULL)
    return 0;
  for (x = 0; a[x] != 0; x++)
    ;
  return x;
}


x86 assembly (clang, -O0):
<Xstrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <Xstrlen+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1152 <Xstrlen+0x52>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     114c <Xstrlen+0x4c>
jmp    113e <Xstrlen+0x3e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <Xstrlen+0x26>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xstrlen>:
test   %rdi,%rdi
je     111e <Xstrlen+0x1e>
mov    $0xffffffff,%eax
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpq   $0x0,(%rdi)
lea    0x8(%rdi),%rdi
jne    1110 <Xstrlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Xstrlen(i64* %0) {
%2 = icmp eq i64* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ 0, %1 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = icmp eq i64 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ 0, %1 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int strlen(char *);
void print_subsection(char *name, const unsigned char *edid, int start,
                      int end) {
  int i;
  (void)("%s:", name);
  for (i = strlen(name); i < 15; i++)
    (void)(" ");
  for (i = start; i <= end; i++)
    (void)(" %02x", edid[i]);
  (void)("\n");
}


x86 assembly (clang, -O0):
<print_subsection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xf,-0x1c(%rbp)
jge    114f <print_subsection+0x3f>
jmp    1141 <print_subsection+0x31>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1132 <print_subsection+0x22>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     116f <print_subsection+0x5f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1155 <print_subsection+0x45>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_subsection>:
jmp    1030 <strlen@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s:\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [6 x i8] c" %02x\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @print_subsection(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %5
%12 = call i32 @strlen(i8* %11)
store i32 %12, i32* %9
br label %13
13: ; preds = %17, %4
%14 = load i32, i32* %9
%15 = icmp slt i32 %14, 15
br i1 %15, label %16, label %20
16: ; preds = %13
br label %17
17: ; preds = %16
%18 = load i32, i32* %9
%19 = add nsw i32 %18, 1
store i32 %19, i32* %9
br label %13
20: ; preds = %13
%21 = load i32, i32* %7
store i32 %21, i32* %9
br label %22
22: ; preds = %32, %20
%23 = load i32, i32* %9
%24 = load i32, i32* %8
%25 = icmp sle i32 %23, %24
br i1 %25, label %26, label %35
26: ; preds = %22
%27 = load i8*, i8** %6
%28 = load i32, i32* %9
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
br label %32
32: ; preds = %26
%33 = load i32, i32* %9
%34 = add nsw i32 %33, 1
store i32 %34, i32* %9
br label %22
35: ; preds = %22
ret void
}

LLVM IR (-O2):
define void @print_subsection(i8* %0, i8* nocapture readnone %1, i32 %2, i32 %3) {
%5 = tail call i32 @strlen(i8* %0)
ret void
}
/* Variables and functions */
int errno;
int write(int, void *, int);
int cow_write_file(int fd, void *buf, int size) {
  int ret = write(fd, buf, size);
  if (ret == -1)
    return (-errno);
  return (ret);
}


x86 assembly (clang, -O0):
<cow_write_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1151 <cow_write_file+0x41>
xor    %eax,%eax
mov    0x2e99(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1157 <cow_write_file+0x47>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cow_write_file>:
push   %rax
call   1030 <write@plt>
mov    0x2ec3(%rip),%rcx
xor    %edx,%edx
sub    (%rcx),%edx
cmp    $0xffffffff,%eax
cmove  %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @cow_write_file(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = call i32 @write(i32 %9, i8* %10, i32 %11)
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %18
15: ; preds = %3
%16 = load i32, i32* @errno
%17 = sub nsw i32 0, %16
store i32 %17, i32* %4
br label %20
18: ; preds = %3
%19 = load i32, i32* %8
store i32 %19, i32* %4
br label %20
20: ; preds = %18, %15
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @cow_write_file(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 %7, i32 %4
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x7e() {
  Assert_real((islower(126) == 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",
              635, ("islower should be 0 for ~"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x7e>:
push   %rax
mov    $0x7e,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x27b,%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 ~\00"
define void @t_islower_0x7e() {
%1 = call i64 @islower(i32 126)
%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 635, 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 ~\00"
define void @t_islower_0x7e() {
%1 = tail call i64 @islower(i32 126)
%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 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *XXH_malloc(size_t s) { return malloc(s); }


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

x86 assembly (clang, -O2):
<XXH_malloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @XXH_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int pthread_setcanceltype(int __type, int *__oldtype) { return 0; }


x86 assembly (clang, -O0):
<pthread_setcanceltype>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @pthread_setcanceltype(i32 %0, i32* nocapture readnone %1) {
ret i32 0
}
int wrap_clone(int (*fn)(void *), void *child_stack, int flags, void *arg) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @wrap_clone(i32 (i8*)* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i32 (i8*)*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i32 (i8*)* %0, i32 (i8*)** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
define i32 @wrap_clone(i32 (i8*)* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printcharc(int /*<<< orphan*/);
void printstr(char *s) {
  while (*s)
    printcharc(*s++);
}


x86 assembly (clang, -O0):
<printstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <printstr+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <printcharc@plt>
jmp    111c <printstr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @printstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @printcharc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
int num_decimal_places(int number) {
  int num_places, ten_power;
  num_places = 1;
  ten_power = 10;
  while ((number / ten_power) != 0) {
    num_places++;
    ten_power *= 10;
  }
  return num_places;
}


x86 assembly (clang, -O0):
<num_decimal_places>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%eax
je     113a <num_decimal_places+0x3a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <num_decimal_places+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_decimal_places>:
lea    0x9(%rdi),%eax
mov    $0x1,%ecx
cmp    $0x13,%eax
jb     1131 <num_decimal_places+0x31>
mov    $0x1,%ecx
mov    $0xa,%esi
nopw   0x0(%rax,%rax,1)
add    $0x1,%ecx
add    %esi,%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%eax
cltd
idiv   %esi
test   %eax,%eax
jne    1120 <num_decimal_places+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @num_decimal_places(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 10, %1 ]
%6 = phi i32 [ %7, %4 ], [ 1, %1 ]
%7 = add nuw nsw i32 %6, 1
%8 = mul nuw nsw i32 %5, 10
%9 = sdiv i32 %0, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
unsigned short rand();
unsigned short oc_random_rand(void) { return rand(); }


x86 assembly (clang, -O0):
<oc_random_rand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @oc_random_rand() {
%1 = call zeroext i16 (...) @rand()
ret i16 %1
}

LLVM IR (-O2):
define zeroext i16 @oc_random_rand() {
%1 = tail call zeroext i16 (...) @rand()
ret i16 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int pthread_attr_setschedpolicy(int /*<<< orphan*/ *, int);
int my_pthread_attr_setschedpolicy(pthread_attr_t *__attr, int policy) {
  pthread_attr_t *realattr = (pthread_attr_t *)*(int *)__attr;
  return pthread_attr_setschedpolicy(realattr, policy);
}


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

x86 assembly (clang, -O2):
<my_pthread_attr_setschedpolicy>:
movslq (%rdi),%rdi
jmp    1030 <pthread_attr_setschedpolicy@plt>

LLVM IR (-O0):
define i32 @my_pthread_attr_setschedpolicy(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* %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i32, i32* %4
%12 = call i32 @pthread_attr_setschedpolicy(i32* %10, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_pthread_attr_setschedpolicy(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @pthread_attr_setschedpolicy(i32* %5, i32 %1)
ret i32 %6
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  double tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
double get_curr_time_usec() {
  struct timeval timeval_now;
  struct timezone timezone_now;
  gettimeofday(&timeval_now, &timezone_now);
  double now = timeval_now.tv_sec + (double)timeval_now.tv_usec / 1000000.0;
  return now;
}


x86 assembly (clang, -O0):
<get_curr_time_usec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  0xec8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_curr_time_usec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm0
divsd  0xed0(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
%struct.timezone = type { i32 }
define double @get_curr_time_usec() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = alloca double
%4 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %6, %10
store double %11, double* %3
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
%struct.timezone = type { i32 }
define double @get_curr_time_usec() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = fdiv double %10, 1.000000e+06
%12 = fadd double %7, %11
ret double %12
}
void mis_accelerate(const struct mis_dis *d1, const struct mis_dis *d2,
                    struct mis_dis *d3) {}


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

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

LLVM IR (-O0):
%struct.mis_dis = type opaque
define void @mis_accelerate(%struct.mis_dis* %0, %struct.mis_dis* %1, %struct.mis_dis* %2) {
%4 = alloca %struct.mis_dis*
%5 = alloca %struct.mis_dis*
%6 = alloca %struct.mis_dis*
store %struct.mis_dis* %0, %struct.mis_dis** %4
store %struct.mis_dis* %1, %struct.mis_dis** %5
store %struct.mis_dis* %2, %struct.mis_dis** %6
ret void
}

LLVM IR (-O2):
%struct.mis_dis = type opaque
define void @mis_accelerate(%struct.mis_dis* nocapture %0, %struct.mis_dis* nocapture %1, %struct.mis_dis* nocapture %2) {
ret void
}
int sort_alloc(char *database, int (*compare)(const void *x, const void *y)) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @sort_alloc(i8* nocapture readnone %0, i32 (i8*, i8*)* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int sse4a() {
  printf("SSE4A is not supported.");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"SSE4A is not supported.\00"
define i32 @sse4a() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"SSE4A is not supported.\00"
define i32 @sse4a() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 0
}