xunge/DecIR huggingface dataset:
int main() {
  int x = 0;
  if ((x + 2) * 2 != 4) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
shl    $0x1,%eax
cmp    $0x4,%eax
je     1130 <main+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <main+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
double EvalAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double);
double funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double *x, double *par) {
  double result;
  result = par[0] * EvalAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(x[0]);
  return result;
}


x86 assembly (clang, -O0):
<funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <EvalAngCor_alpha1_3minus_2plus_15097_L1_L3_L5@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5>:
push   %rax
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rdi),%xmm0
call   1030 <EvalAngCor_alpha1_3minus_2plus_15097_L1_L3_L5@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = call double @EvalAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double %11)
%13 = fmul double %8, %12
store double %13, double* %5
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @funcAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = load double, double* %0
%5 = tail call double @EvalAngCor_alpha1_3minus_2plus_15097_L1_L3_L5(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void divide(unsigned int a, unsigned int b) {
  double total = 0.0;
  if (b == 0)
    printf("Undefined.\n");
  else {
    total = (a + 0.0) / b;
    printf("%d / %d = %g\n", a, b, total);
  }
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1143 <divide+0x33>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    117c <divide+0x6c>
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0xe97(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
mov    %esi,%edx
test   %esi,%esi
je     1148 <divide+0x28>
mov    %edi,%esi
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
mov    %edx,%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
lea    0xebf(%rip),%rdi
mov    $0x1,%al
jmp    1040 <printf@plt>
lea    0xebf(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str.1 = [14 x i8] c"%d / %d = %g\0A\00"
@str = [11 x i8] c"Undefined.\00"
define void @divide(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %11
6: ; preds = %2
%7 = uitofp i32 %0 to double
%8 = uitofp i32 %1 to double
%9 = fdiv double %7, %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %1, double %9)
br label %11
11: ; preds = %6, %4
ret void
}
void testsubd_(double *z, double *x, double *y) { *z = *x - *y; }


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

x86 assembly (clang, -O2):
<testsubd_>:
movsd  (%rsi),%xmm0
subsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @testsubd_(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fsub double %4, %5
store double %6, double* %0
ret void
}
int test_imm_69int8_reg(signed char val) {
  return ((val) & (-0x69 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_69int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff97,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_69int8_reg>:
test   $0x97,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_69int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -105
%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_69int8_reg(i8 signext %0) {
%2 = and i8 %0, -105
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strlen(char *);
char *svz_malloc(scalar_t__);
char *dyn_create_file(char *description) {
  char *file;
  file = svz_malloc(strlen(description) +
                    strlen("lib"
                           "."
                           "so") +
                    1);
  sprintf(file,
          "lib"
          "%s."
          "so",
          description);
  return file;
}


x86 assembly (clang, -O0):
<dyn_create_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
lea    0xeb0(%rip),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1040 <svz_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe8f(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dyn_create_file>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x7(%rax),%rdi
call   1040 <svz_malloc@plt>
mov    %rax,%rbx
lea    0xeb1(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"lib.so\00"
@.str.1 = [9 x i8] c"lib%s.so\00"
define i8* @dyn_create_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = call i64 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = add nsw i64 %5, %6
%8 = add nsw i64 %7, 1
%9 = call i8* @svz_malloc(i64 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"lib%s.so\00"
define i8* @dyn_create_file(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 7
%4 = tail call i8* @svz_malloc(i64 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i8* %4
}
int cmpdefault(const void *x, const void *y) { return x - y; }


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

x86 assembly (clang, -O2):
<cmpdefault>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @cmpdefault(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 = ptrtoint i8* %5 to i64
%8 = ptrtoint i8* %6 to i64
%9 = sub i64 %7, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @cmpdefault(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *translateDate(char *);
int /*<<< orphan*/ write(char *, char *, char *);
void function_est_date_ini(char *est_ini) {
  char *new = translateDate(est_ini);
  write("msproject.xml", "\t<Start>%s</Start>\n", new);
  free(new);
}


x86 assembly (clang, -O0):
<function_est_date_ini>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <translateDate@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xeac(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_est_date_ini>:
push   %rbx
call   1050 <translateDate@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    %rax,%rdx
call   1040 <write@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [20 x i8] c"\09<Start>%s</Start>\0A\00"
define void @function_est_date_ini(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @translateDate(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [20 x i8] c"\09<Start>%s</Start>\0A\00"
define void @function_est_date_ini(i8* %0) {
%2 = tail call i8* @translateDate(i8* %0)
%3 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void flash_free(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<flash_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @flash_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void phylipifree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<phylipifree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @phylipifree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xaf() {
  Assert_real((ispunct(175) == 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_ispunct.c",
              880, ("ispunct should be 0 for 0xaf"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xaf>:
push   %rax
mov    $0xaf,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x370,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xaf\00"
define void @t_ispunct_0xaf() {
%1 = call i64 @ispunct(i32 175)
%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 880, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xaf\00"
define void @t_ispunct_0xaf() {
%1 = tail call i64 @ispunct(i32 175)
%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 880, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void rtc_irq() {
  while ((*(volatile unsigned int *)(0x44E3E000 + 0x44)) & 0x1)
    ;
  (*(volatile unsigned int *)(0x44E3E000 + 0x48) = (unsigned int)(0x4));
  (*(volatile unsigned int *)(0x48200000 + 0xC8) = (unsigned int)(0x1 << 11));
}


x86 assembly (clang, -O0):
<rtc_irq>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <rtc_irq+0x9>
mov    $0x44e3e044,%eax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1121 <rtc_irq+0x21>
jmp    1109 <rtc_irq+0x9>
mov    $0x44e3e048,%eax
movl   $0x4,(%rax)
mov    $0x482000c8,%eax
movl   $0x800,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtc_irq>:
mov    0x44e3e044,%eax
test   $0x1,%al
jne    1100 <rtc_irq>
movl   $0x4,0x44e3e048
movl   $0x800,0x482000c8
ret

LLVM IR (-O0):
define void @rtc_irq() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i32, i32* inttoptr (i64 1155784772 to i32*)
%3 = and i32 %2, 1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
store volatile i32 4, i32* inttoptr (i64 1155784776 to i32*)
store volatile i32 2048, i32* inttoptr (i64 1210056904 to i32*)
ret void
}

LLVM IR (-O2):
define void @rtc_irq() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i32, i32* inttoptr (i64 1155784772 to i32*)
%3 = and i32 %2, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
store volatile i32 4, i32* inttoptr (i64 1155784776 to i32*)
store volatile i32 2048, i32* inttoptr (i64 1210056904 to i32*)
ret void
}
void proc31() {}


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

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

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

LLVM IR (-O2):
define void @proc31() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Mali_WrReg(int, int, int, int);
int /*<<< orphan*/ printk(char *);
void Mali_clear_and_set_masks_for_gpu_irq(void) {
  printk("Clear the GPU IRQ flags\n");
  Mali_WrReg(0x20, 0x0, 0x0024, 0xFFFFFFFF);
  printk("Set the GPU IRQ Mask to all 1s\n");
  Mali_WrReg(0x20, 0x0, 0x0028, 0xFFFFFFFF);
}


x86 assembly (clang, -O0):
<Mali_clear_and_set_masks_for_gpu_irq>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printk@plt>
mov    $0x20,%edi
xor    %esi,%esi
mov    $0x24,%edx
mov    $0xffffffff,%ecx
call   1040 <Mali_WrReg@plt>
lea    0xecc(%rip),%rdi
call   1030 <printk@plt>
mov    $0x20,%edi
xor    %esi,%esi
mov    $0x28,%edx
mov    $0xffffffff,%ecx
call   1040 <Mali_WrReg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mali_clear_and_set_masks_for_gpu_irq>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printk@plt>
mov    $0x20,%edi
xor    %esi,%esi
mov    $0x24,%edx
mov    $0xffffffff,%ecx
call   1040 <Mali_WrReg@plt>
lea    0xecf(%rip),%rdi
call   1030 <printk@plt>
mov    $0x20,%edi
xor    %esi,%esi
mov    $0x28,%edx
mov    $0xffffffff,%ecx
pop    %rax
jmp    1040 <Mali_WrReg@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Clear the GPU IRQ flags\0A\00"
@.str.1 = [32 x i8] c"Set the GPU IRQ Mask to all 1s\0A\00"
define void @Mali_clear_and_set_masks_for_gpu_irq() {
%1 = call i32 @printk(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @Mali_WrReg(i32 32, i32 0, i32 36, i32 -1)
%3 = call i32 @printk(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @Mali_WrReg(i32 32, i32 0, i32 40, i32 -1)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Clear the GPU IRQ flags\0A\00"
@.str.1 = [32 x i8] c"Set the GPU IRQ Mask to all 1s\0A\00"
define void @Mali_clear_and_set_masks_for_gpu_irq() {
%1 = tail call i32 @printk(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Mali_WrReg(i32 32, i32 0, i32 36, i32 -1)
%3 = tail call i32 @printk(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @Mali_WrReg(i32 32, i32 0, i32 40, i32 -1)
ret void
}
int test_imm_D4int16_reg(short val) {
  return ((val) & (-0xD4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D4int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff2c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D4int16_reg>:
test   $0xff2c,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D4int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -212
%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_D4int16_reg(i16 signext %0) {
%2 = and i16 %0, -212
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_ldc2l(int, int, void const *);
void ldc2l(const void *i) { __builtin_arm_ldc2l(1, 2, i); }


x86 assembly (clang, -O0):
<ldc2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <__builtin_arm_ldc2l@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldc2l>:
mov    %rdi,%rdx
mov    $0x1,%edi
mov    $0x2,%esi
jmp    1030 <__builtin_arm_ldc2l@plt>

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

LLVM IR (-O2):
define void @ldc2l(i8* %0) {
%2 = tail call i32 @__builtin_arm_ldc2l(i32 1, i32 2, i8* %0)
ret void
}
/* Variables and functions */
unsigned int strtoul(char *, int /*<<< orphan*/ *, int);
unsigned int econfig_getUnsignedInt(char *value) {
  return strtoul(value, NULL, 10);
}


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

x86 assembly (clang, -O2):
<econfig_getUnsignedInt>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtoul@plt>

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

LLVM IR (-O2):
define i32 @econfig_getUnsignedInt(i8* nocapture %0) {
%2 = tail call i32 @strtoul(i8* nocapture %0, i32* null, i32 10)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndirectIndexedE0X0(int);
int /*<<< orphan*/ STA8(int /*<<< orphan*/);
void Op91E0M1X0(void) { STA8(DirectIndirectIndexedE0X0(2)); }


x86 assembly (clang, -O0):
<Op91E0M1X0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <DirectIndirectIndexedE0X0@plt>
mov    %eax,%edi
call   1030 <STA8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op91E0M1X0>:
push   %rax
mov    $0x2,%edi
call   1040 <DirectIndirectIndexedE0X0@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <STA8@plt>

LLVM IR (-O0):
define void @Op91E0M1X0() {
%1 = call i32 @DirectIndirectIndexedE0X0(i32 2)
%2 = call i32 @STA8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op91E0M1X0() {
%1 = tail call i32 @DirectIndirectIndexedE0X0(i32 2)
%2 = tail call i32 @STA8(i32 %1)
ret void
}
/* Variables and functions */
float __ocml_asin_f32(float);
float asinf(float x) { return __ocml_asin_f32(x); }


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

x86 assembly (clang, -O2):
<asinf>:
jmp    1030 <__ocml_asin_f32@plt>

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

LLVM IR (-O2):
define float @asinf(float %0) {
%2 = tail call float @__ocml_asin_f32(float %0)
ret float %2
}
void delete_files(path1, path2) char *path1, *path2;
{
  unlink(path1);
  unlink(path2);
}


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

x86 assembly (clang, -O2):
<delete_files>:
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <unlink@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <unlink@plt>

LLVM IR (-O0):
define void @delete_files(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 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %7)
ret void
}

LLVM IR (-O2):
define void @delete_files(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ explicit_bzero(void *, size_t);
void ftg_bzero(void *ptr, size_t num) {
  ((void)0);
  ((void)0);
  explicit_bzero(ptr, num);
}


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

x86 assembly (clang, -O2):
<ftg_bzero>:
jmp    1030 <explicit_bzero@plt>

LLVM IR (-O0):
define void @ftg_bzero(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @explicit_bzero(i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @ftg_bzero(i8* %0, i64 %1) {
%3 = tail call i32 @explicit_bzero(i8* %0, i64 %1)
ret void
}
unsigned int f66(unsigned int x, unsigned long int y) {
  return (x << y) + (x >> ((-y) & (8 * 4 - 1)));
}


x86 assembly (clang, -O0):
<f66>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shr    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f66>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f66(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = shl i32 %5, %7
%9 = load i32, i32* %3
%10 = load i64, i64* %4
%11 = sub i64 0, %10
%12 = and i64 %11, 31
%13 = trunc i64 %12 to i32
%14 = lshr i32 %9, %13
%15 = add i32 %8, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @f66(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl i32 %0, %3
%5 = sub i32 0, %3
%6 = and i32 %5, 31
%7 = lshr i32 %0, %6
%8 = add i32 %7, %4
ret i32 %8
}
/* Variables and functions */
void *Cyc_BansheeIf_internal_equality_constraint(void *, void *, int);
void *Cyc_BansheeIf_cond_equality_constraint(void *t1, void *t2) {
  void *_T0;
  _T0 = Cyc_BansheeIf_internal_equality_constraint(t1, t2, 1);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_BansheeIf_cond_equality_constraint>:
mov    $0x1,%edx
jmp    1030 <Cyc_BansheeIf_internal_equality_constraint@plt>

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

LLVM IR (-O2):
define i8* @Cyc_BansheeIf_cond_equality_constraint(i8* %0, i8* %1) {
%3 = tail call i8* @Cyc_BansheeIf_internal_equality_constraint(i8* %0, i8* %1, i32 1)
ret i8* %3
}
/* Variables and functions */
scalar_t__ genrand_int32();
double genrand_real3(void) {
  return (((double)genrand_int32()) + 0.5) * (1.0 / 4294967296.0);
}


x86 assembly (clang, -O0):
<genrand_real3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand_int32@plt>
cvtsi2sd %rax,%xmm0
movsd  0xee0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_real3>:
push   %rax
xor    %eax,%eax
call   1030 <genrand_int32@plt>
cvtsi2sd %rax,%xmm0
addsd  0xedb(%rip),%xmm0
mulsd  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand_real3() {
%1 = call i64 (...) @genrand_int32()
%2 = sitofp i64 %1 to double
%3 = fadd double %2, 5.000000e-01
%4 = fmul double %3, 0x3DF0000000000000
ret double %4
}

LLVM IR (-O2):
define double @genrand_real3() {
%1 = tail call i64 (...) @genrand_int32()
%2 = sitofp i64 %1 to double
%3 = fadd double %2, 5.000000e-01
%4 = fmul double %3, 0x3DF0000000000000
ret double %4
}
int stop_dht() {}


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

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

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

LLVM IR (-O2):
define i32 @stop_dht() {
ret i32 undef
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
double rtc(void) {
  struct timeval Tvalue;
  double etime;
  struct timezone dummy;
  gettimeofday(&Tvalue, &dummy);
  etime = (double)Tvalue.tv_sec + 1.e-6 * ((double)Tvalue.tv_usec);
  return etime;
}


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

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

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define double @rtc() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = alloca %struct.timezone
%4 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %3)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to double
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%9 = load i64, i64* %8
%10 = sitofp i64 %9 to double
%11 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %10, double %7)
store double %11, double* %2
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define double @rtc() {
%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 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3EB0C6F7A0B5ED8D, double %8)
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
bool isOpen_4(FILE *this) { return this != NULL; }


x86 assembly (clang, -O0):
<isOpen_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOpen_4>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @isOpen_4(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @isOpen_4(i32* readnone %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
double benchmark_get_counter();
double benchmark_stop() { return benchmark_get_counter(); }


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

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

LLVM IR (-O0):
define double @benchmark_stop() {
%1 = call double (...) @benchmark_get_counter()
ret double %1
}

LLVM IR (-O2):
define double @benchmark_stop() {
%1 = tail call double (...) @benchmark_get_counter()
ret double %1
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_lock(pthread_mutex_t *mutex) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @pthread_mutex_lock(i32* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ endswap_int64_t_array(void *, int);
void endswap_double_array(double *ptr, int len) {
  endswap_int64_t_array((void *)ptr, len);
}


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

x86 assembly (clang, -O2):
<endswap_double_array>:
jmp    1030 <endswap_int64_t_array@plt>

LLVM IR (-O0):
define void @endswap_double_array(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = bitcast double* %5 to i8*
%7 = load i32, i32* %4
%8 = call i32 @endswap_int64_t_array(i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
define void @endswap_double_array(double* %0, i32 %1) {
%3 = bitcast double* %0 to i8*
%4 = tail call i32 @endswap_int64_t_array(i8* %3, i32 %1)
ret void
}
int base64_decode_value(char value_in) {
  static const char decoding[] = {
      62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1,
      -1, -1, -2, -1, -1, -1, 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
      10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
      -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
      36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51};
  static const char decoding_size = sizeof(decoding);
  value_in -= 43;
  if (value_in < 0 || value_in > decoding_size)
    return -1;
  return decoding[(int)value_in];
}


x86 assembly (clang, -O0):
<base64_decode_value>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
sub    $0x2b,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jl     112e <base64_decode_value+0x2e>
movsbl -0x5(%rbp),%eax
cmp    $0x50,%eax
jle    113a <base64_decode_value+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    114f <base64_decode_value+0x4f>
movsbl -0x5(%rbp),%eax
movslq %eax,%rcx
lea    0xeb8(%rip),%rax
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decode_value>:
add    $0xd5,%dil
mov    $0xffffffff,%eax
cmp    $0x50,%dil
ja     111e <base64_decode_value+0x1e>
movzbl %dil,%eax
lea    0xee6(%rip),%rcx
movsbl (%rax,%rcx,1),%eax
ret

LLVM IR (-O0):
@base64_decode_value.decoding = internal constant [80 x i8] c">\FF\FF\FF?456789:;<=\FF\FF\FF\FE\FF\FF\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\FF\FF\FF\FF\FF\FF\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123"
@base64_decode_value.decoding_size = internal constant i8 80
define i32 @base64_decode_value(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = sub nsw i32 %5, 43
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp slt i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sgt i32 %13, 80
br i1 %14, label %15, label %16
15: ; preds = %11, %1
store i32 -1, i32* %2
br label %23
16: ; preds = %11
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [80 x i8], [80 x i8]* @base64_decode_value.decoding, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
store i32 %22, i32* %2
br label %23
23: ; preds = %16, %15
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
@base64_decode_value.decoding = internal unnamed_addr constant [80 x i8] c">\FF\FF\FF?456789:;<=\FF\FF\FF\FE\FF\FF\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\FF\FF\FF\FF\FF\FF\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123"
define i32 @base64_decode_value(i8 signext %0) {
%2 = add i8 %0, -43
%3 = icmp ugt i8 %2, 80
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = zext i8 %2 to i64
%6 = getelementptr inbounds [80 x i8], [80 x i8]* @base64_decode_value.decoding, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
br label %9
9: ; preds = %1, %4
%10 = phi i32 [ %8, %4 ], [ -1, %1 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ regex_t;

/* Variables and functions */
int /*<<< orphan*/ regfree(int /*<<< orphan*/ *);
void xregfree(regex_t *preg) { regfree(preg); }


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

x86 assembly (clang, -O2):
<xregfree>:
jmp    1030 <regfree@plt>

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

LLVM IR (-O2):
define void @xregfree(i32* %0) {
%2 = tail call i32 @regfree(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_o_rpdata_submit();
void test_rpdu() { test_o_rpdata_submit(); }


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

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

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

LLVM IR (-O2):
define void @test_rpdu() {
%1 = tail call i32 (...) @test_o_rpdata_submit()
ret void
}
void fill_short(short *s, char *buf) {
  *s = buf[1] & 0xFF;
  *s = ((*s) << 8) + (buf[0] & 0xFF);
}


x86 assembly (clang, -O0):
<fill_short>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
and    $0xff,%eax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
and    $0xff,%ecx
add    %ecx,%eax
mov    %ax,%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_short>:
movzbl 0x1(%rsi),%eax
mov    %ax,(%rdi)
shl    $0x8,%eax
movzbl (%rsi),%ecx
or     %eax,%ecx
mov    %cx,(%rdi)
ret

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

LLVM IR (-O2):
define void @fill_short(i16* nocapture writeonly %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = load i8, i8* %3
%5 = zext i8 %4 to i16
store i16 %5, i16* %0
%6 = shl nuw i16 %5, 8
%7 = load i8, i8* %1
%8 = zext i8 %7 to i16
%9 = or i16 %6, %8
store i16 %9, i16* %0
ret void
}
/* Variables and functions */
int inportb(int);
int is_transmit_empty() { return inportb(0x3f8 + 5) & 0x20; }


x86 assembly (clang, -O0):
<is_transmit_empty>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3fd,%edi
call   1030 <inportb@plt>
and    $0x20,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_transmit_empty>:
push   %rax
mov    $0x3fd,%edi
call   1030 <inportb@plt>
and    $0x20,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_transmit_empty() {
%1 = call i32 @inportb(i32 1021)
%2 = and i32 %1, 32
ret i32 %2
}

LLVM IR (-O2):
define i32 @is_transmit_empty() {
%1 = tail call i32 @inportb(i32 1021)
%2 = and i32 %1, 32
ret i32 %2
}
/* Variables and functions */
int sum_DWTAnlz(float *, int, int /*<<< orphan*/ *);
float mean_DWTAnlz(float *dwt, int n, float *mean) {
  float tmean;
  tmean = sum_DWTAnlz(dwt, n, NULL) / (n - 1);
  if (mean)
    *mean = tmean;
  return tmean;
}


x86 assembly (clang, -O0):
<mean_DWTAnlz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sum_DWTAnlz@plt>
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x1c(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115d <mean_DWTAnlz+0x4d>
movss  -0x1c(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x1c(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mean_DWTAnlz>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
xor    %edx,%edx
call   1030 <sum_DWTAnlz@plt>
add    $0xffffffff,%ebp
cltd
idiv   %ebp
cvtsi2ss %eax,%xmm0
test   %rbx,%rbx
je     1132 <mean_DWTAnlz+0x22>
movss  %xmm0,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @mean_DWTAnlz(float* %0, i32 %1, float* %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca float*
%7 = alloca float
store float* %0, float** %4
store i32 %1, i32* %5
store float* %2, float** %6
%8 = load float*, float** %4
%9 = load i32, i32* %5
%10 = call i32 @sum_DWTAnlz(float* %8, i32 %9, i32* null)
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
%13 = sdiv i32 %10, %12
%14 = sitofp i32 %13 to float
store float %14, float* %7
%15 = load float*, float** %6
%16 = icmp ne float* %15, null
br i1 %16, label %17, label %20
17: ; preds = %3
%18 = load float, float* %7
%19 = load float*, float** %6
store float %18, float* %19
br label %20
20: ; preds = %17, %3
%21 = load float, float* %7
ret float %21
}

LLVM IR (-O2):
define float @mean_DWTAnlz(float* %0, i32 %1, float* writeonly %2) {
%4 = tail call i32 @sum_DWTAnlz(float* %0, i32 %1, i32* null)
%5 = add nsw i32 %1, -1
%6 = sdiv i32 %4, %5
%7 = sitofp i32 %6 to float
%8 = icmp eq float* %2, null
br i1 %8, label %10, label %9
9: ; preds = %3
store float %7, float* %2
br label %10
10: ; preds = %9, %3
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_239() {
  Assert_real((isqrt(239) == 15),
              "/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/stdlib/isqrt.c",
              1200, ("Integer square root of 239 should be 15"));
}


x86 assembly (clang, -O0):
<t_sqrt_239>:
push   %rbp
mov    %rsp,%rbp
mov    $0xef,%edi
call   1030 <isqrt@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x4b0,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_239>:
push   %rax
mov    $0xef,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x4b0,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 239 should be 15\00"
define void @t_sqrt_239() {
%1 = call i32 @isqrt(i32 239)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1200, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 239 should be 15\00"
define void @t_sqrt_239() {
%1 = tail call i32 @isqrt(i32 239)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1200, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main() {
  int foo[4];
  int *x;
  return sizeof(foo) + sizeof(x);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca i32*
store i32 0, i32* %1
ret i32 24
}

LLVM IR (-O2):
define i32 @main() {
ret i32 24
}
void freeCellsStorage(char **pointer) {
  for (int i = 0; i < 255; i++)
    free(pointer[i]);
  free(pointer);
}


x86 assembly (clang, -O0):
<freeCellsStorage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xff,-0xc(%rbp)
jge    114f <freeCellsStorage+0x3f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <freeCellsStorage+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeCellsStorage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    $0xff,%rbx
jne    1120 <freeCellsStorage+0x10>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeCellsStorage(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 255
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i8**, i8*** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %8, i64 %10
%12 = load i8*, i8** %11
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i8**, i8*** %2
%18 = bitcast i8** %17 to i8*
ret void
}

LLVM IR (-O2):
define void @freeCellsStorage(i8** nocapture %0) {
br label %4
2: ; preds = %4
%3 = bitcast i8** %0 to i8*
tail call void @free(i8* %3)
ret void
4: ; preds = %1, %4
%5 = phi i64 [ 0, %1 ], [ %8, %4 ]
%6 = getelementptr inbounds i8*, i8** %0, i64 %5
%7 = load i8*, i8** %6
tail call void @free(i8* %7)
%8 = add nuw nsw i64 %5, 1
%9 = icmp eq i64 %8, 255
br i1 %9, label %2, label %4
}