xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ regPrintPos(double, int, char *);
void regPrintPosPair(double x, double y, int world, char *xbuf, char *ybuf) {
  if (world)
    regPrintPos(x / 15.0, world, xbuf);
  else
    regPrintPos(x, world, xbuf);
  regPrintPos(y, world, ybuf);
}


x86 assembly (clang, -O0):
<regPrintPosPair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1159 <regPrintPosPair+0x49>
movsd  -0x8(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <regPrintPos@plt>
jmp    116a <regPrintPosPair+0x5a>
movsd  -0x8(%rbp),%xmm0
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%rsi
call   1030 <regPrintPos@plt>
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1030 <regPrintPos@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regPrintPosPair>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %edi,%ebp
movsd  %xmm1,(%rsp)
test   %edi,%edi
je     112d <regPrintPosPair+0x1d>
divsd  0xed7(%rip),%xmm0
mov    %ebp,%edi
jmp    112f <regPrintPosPair+0x1f>
xor    %edi,%edi
call   1030 <regPrintPos@plt>
movsd  (%rsp),%xmm0
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <regPrintPos@plt>

LLVM IR (-O0):
define void @regPrintPosPair(double %0, double %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store double %0, double* %6
store double %1, double* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i32, i32* %8
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %5
%14 = load double, double* %6
%15 = fdiv double %14, 1.500000e+01
%16 = load i32, i32* %8
%17 = load i8*, i8** %9
%18 = call i32 @regPrintPos(double %15, i32 %16, i8* %17)
br label %24
19: ; preds = %5
%20 = load double, double* %6
%21 = load i32, i32* %8
%22 = load i8*, i8** %9
%23 = call i32 @regPrintPos(double %20, i32 %21, i8* %22)
br label %24
24: ; preds = %19, %13
%25 = load double, double* %7
%26 = load i32, i32* %8
%27 = load i8*, i8** %10
%28 = call i32 @regPrintPos(double %25, i32 %26, i8* %27)
ret void
}

LLVM IR (-O2):
define void @regPrintPosPair(double %0, double %1, i32 %2, i8* %3, i8* %4) {
%6 = icmp eq i32 %2, 0
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = fdiv double %0, 1.500000e+01
%9 = tail call i32 @regPrintPos(double %8, i32 %2, i8* %3)
br label %12
10: ; preds = %5
%11 = tail call i32 @regPrintPos(double %0, i32 0, i8* %3)
br label %12
12: ; preds = %10, %7
%13 = tail call i32 @regPrintPos(double %1, i32 %2, i8* %4)
ret void
}
int calc_align(int size, int align) {
  return size / align * align + (size % align > 0) * align;
}


x86 assembly (clang, -O0):
<calc_align>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x0,%edx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_align>:
mov    %edi,%eax
cltd
idiv   %esi
sub    %edx,%edi
xor    %eax,%eax
test   %edx,%edx
cmovg  %esi,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @calc_align(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 = sdiv i32 %5, %6
%8 = load i32, i32* %4
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = srem i32 %10, %11
%13 = icmp sgt i32 %12, 0
%14 = zext i1 %13 to i32
%15 = load i32, i32* %4
%16 = mul nsw i32 %14, %15
%17 = add nsw i32 %9, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @calc_align(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = sub i32 %0, %3
%5 = icmp sgt i32 %3, 0
%6 = select i1 %5, i32 %1, i32 0
%7 = add nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ SAI3_TX_DriverIRQHandler();
__attribute__((weak)) void SAI3_TX_IRQHandler(void) {
  SAI3_TX_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @SAI3_TX_IRQHandler() {
%1 = call i32 (...) @SAI3_TX_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @SAI3_TX_IRQHandler() {
%1 = tail call i32 (...) @SAI3_TX_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f();
int main() {
  if (f() != 2)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
cmp    $0x2,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
cmp    $0x2,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 2
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Util_outOfMemory(char const *);
int /*<<< orphan*/ abort();
void *malloc(size_t);
void *Util_allocOrDie(size_t size, const char *message) {
  void *res = malloc(size);
  if (res == NULL) {
    Util_outOfMemory(message);
    abort();
    return NULL;
  }
  return res;
}


x86 assembly (clang, -O0):
<Util_allocOrDie>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1168 <Util_allocOrDie+0x38>
mov    -0x10(%rbp),%rdi
call   1040 <Util_outOfMemory@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Util_allocOrDie>:
push   %rbx
mov    %rsi,%rbx
call   1050 <malloc@plt>
test   %rax,%rax
je     1140 <Util_allocOrDie+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <Util_outOfMemory@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @Util_allocOrDie(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = call i32 @Util_outOfMemory(i8* %11)
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @Util_allocOrDie(i64 %0, i8* %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @Util_outOfMemory(i8* %1)
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i8* %3
}
int xispinf(double x) { return x == __builtin_inf(); }


x86 assembly (clang, -O0):
<xispinf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xispinf>:
xor    %eax,%eax
ucomisd 0xef6(%rip),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @xispinf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double %3, 0x7FF0000000000000
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @xispinf(double %0) {
%2 = fcmp oeq double %0, 0x7FF0000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int fabs(double);
int cmp(const void *a, const void *b) {
  double da = *(double *)a;
  double db = *(double *)b;
  if (fabs(da - db) < 1e-4)
    return 0;
  if (da - db > 1e-4)
    return 1;
  return -1;
}


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xeab(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    116b <cmp+0x5b>
movl   $0x0,-0x4(%rbp)
jmp    119a <cmp+0x8a>
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  0xe83(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1193 <cmp+0x83>
movl   $0x1,-0x4(%rbp)
jmp    119a <cmp+0x8a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
push   %rax
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
xor    %ecx,%ecx
movsd  (%rsp),%xmm0
ucomisd 0xece(%rip),%xmm0
seta   %cl
lea    (%rcx,%rcx,1),%edx
add    $0xffffffff,%edx
xor    %ecx,%ecx
test   %eax,%eax
cmovg  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @cmp(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 = fsub double %4, %6
%8 = tail call i32 @fabs(double %7)
%9 = fcmp ogt double %7, 1.000000e-04
%10 = select i1 %9, i32 1, i32 -1
%11 = icmp sgt i32 %8, 0
%12 = select i1 %11, i32 %10, i32 0
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ inputx_postn_coded(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void inputx_post_coded(const char *text) {
  inputx_postn_coded(text, strlen(text));
}


x86 assembly (clang, -O0):
<inputx_post_coded>:
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    %eax,%esi
call   1040 <inputx_postn_coded@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputx_post_coded>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <inputx_postn_coded@plt>

LLVM IR (-O0):
define void @inputx_post_coded(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @inputx_postn_coded(i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @inputx_post_coded(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @inputx_postn_coded(i8* %0, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ pow2test(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int x = 0;
  if (pow2test(x)) {
    printf("Hell yes!\n");
  } else {
    printf("Hell no!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <pow2test@plt>
cmp    $0x0,%rax
je     1159 <main+0x39>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    1165 <main+0x45>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <pow2test@plt>
test   %rax,%rax
lea    0xece(%rip),%rax
lea    0xed0(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Hell yes!\0A\00"
@.str.1 = [10 x i8] c"Hell no!\0A\00"
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 = call i64 @pow2test(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"Hell no!\00"
@str.2 = [10 x i8] c"Hell yes!\00"
define i32 @main() {
%1 = tail call i64 @pow2test(i32 0)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
int IsSpace(char m) { return m == ' ' || m == '\t'; }


x86 assembly (clang, -O0):
<IsSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1129 <IsSpace+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsSpace>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @IsSpace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @IsSpace(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ integer(long long);
int /*<<< orphan*/ pr(int /*<<< orphan*/);
void addInt(long long i) { pr(integer(i)); }


x86 assembly (clang, -O0):
<addInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <integer@plt>
mov    %eax,%edi
call   1040 <pr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addInt>:
push   %rax
call   1030 <integer@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pr@plt>

LLVM IR (-O0):
define void @addInt(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @integer(i64 %3)
%5 = call i32 @pr(i32 %4)
ret void
}

LLVM IR (-O2):
define void @addInt(i64 %0) {
%2 = tail call i32 @integer(i64 %0)
%3 = tail call i32 @pr(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmMix3fs(float *, float *, float const *, float);
void glmMix3fs_(float x[3], const float y[3], float a) {
  glmMix3fs(x, x, y, a);
}


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

x86 assembly (clang, -O2):
<glmMix3fs_>:
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <glmMix3fs@plt>

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

LLVM IR (-O2):
define void @glmMix3fs_(float* %0, float* %1, float %2) {
%4 = tail call i32 @glmMix3fs(float* %0, float* %0, float* %1, float %2)
ret void
}
A0AR1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((*((int *)10000000)) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<A0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x989680,%eax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    0x10f444(%rcx),%eax
jg     113b <A0AR1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <A0AR1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0AR1>:
mov    0x989680,%ecx
xor    %eax,%eax
cmp    0x10f444(%r9),%ecx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @A0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = load i32, i32* inttoptr (i64 10000000 to i32*)
%8 = getelementptr inbounds i32, i32* %5, i64 277777
%9 = load i32, i32* %8
%10 = icmp sle i32 %7, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x7d() {
  Assert_real((isalnum(125) == 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_isalnum.c",
              630, ("isalnum should be 0 for }"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x7d>:
push   %rax
mov    $0x7d,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x276,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for }\00"
define void @t_isalnum_0x7d() {
%1 = call i64 @isalnum(i32 125)
%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 630, 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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 0 for }\00"
define void @t_isalnum_0x7d() {
%1 = tail call i64 @isalnum(i32 125)
%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 630, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ omega2(double);
double pow(int /*<<< orphan*/, double);
double omega(double x) { return pow(omega2(x), .5); }


x86 assembly (clang, -O0):
<omega>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <omega2@plt>
mov    %eax,%edi
movsd  0xebf(%rip),%xmm0
call   1040 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<omega>:
push   %rax
call   1030 <omega2@plt>
movsd  0xed2(%rip),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1040 <pow@plt>

LLVM IR (-O0):
define double @omega(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @omega2(double %3)
%5 = call double @pow(i32 %4, double 5.000000e-01)
ret double %5
}

LLVM IR (-O2):
define double @omega(double %0) {
%2 = tail call i32 @omega2(double %0)
%3 = tail call double @pow(i32 %2, double 5.000000e-01)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ _bad_stack_set(int);
void stack_miss(void) { _bad_stack_set(0x87654320); }


x86 assembly (clang, -O0):
<stack_miss>:
push   %rbp
mov    %rsp,%rbp
mov    $0x87654320,%edi
call   1030 <_bad_stack_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_miss>:
mov    $0x87654320,%edi
jmp    1030 <_bad_stack_set@plt>

LLVM IR (-O0):
define void @stack_miss() {
%1 = call i32 @_bad_stack_set(i32 -2023406816)
ret void
}

LLVM IR (-O2):
define void @stack_miss() {
%1 = tail call i32 @_bad_stack_set(i32 -2023406816)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Usage(char *prog_name) {
  fprintf(stderr, "usage: %s <thread_count>\n", prog_name);
  exit(0);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"usage: %s <thread_count>\0A\00"
define void @Usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"usage: %s <thread_count>\0A\00"
define void @Usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void tft_fill_pattern(uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2,
                      uint8_t *fill, uint32_t fill_size) {
  (void)x1;
  (void)y1;
  (void)x2;
  (void)y2;
  (void)fill;
  (void)fill_size;
}


x86 assembly (clang, -O0):
<tft_fill_pattern>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @tft_fill_pattern(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32* %4, i32** %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32*, i32** %11
%18 = load i32, i32* %12
ret void
}

LLVM IR (-O2):
define void @tft_fill_pattern(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32 %5) {
ret void
}
void xy_to_upvp(float xc, float yc, float *up, float *vp) {
  *up = (4 * xc) / ((-2 * xc) + (12 * yc) + 3);
  *vp = (9 * yc) / ((-2 * xc) + (12 * yc) + 3);
}


x86 assembly (clang, -O0):
<xy_to_upvp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  0xeee(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xed4(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
addss  %xmm2,%xmm2
subss  %xmm2,%xmm1
movss  0xebb(%rip),%xmm2
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  0xeab(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xe95(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
addss  %xmm2,%xmm2
subss  %xmm2,%xmm1
movss  0xe7c(%rip),%xmm2
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xy_to_upvp>:
movss  0xef8(%rip),%xmm2
mulss  %xmm0,%xmm2
movss  0xef0(%rip),%xmm3
mulss  %xmm1,%xmm3
addss  %xmm0,%xmm0
subss  %xmm0,%xmm3
addss  0xee0(%rip),%xmm3
divss  %xmm3,%xmm2
movss  %xmm2,(%rdi)
mulss  0xed4(%rip),%xmm1
divss  %xmm3,%xmm1
movss  %xmm1,(%rsi)
ret

LLVM IR (-O0):
define void @xy_to_upvp(float %0, float %1, float* %2, float* %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float*
%8 = alloca float*
store float %0, float* %5
store float %1, float* %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float, float* %5
%10 = fmul float 4.000000e+00, %9
%11 = load float, float* %5
%12 = load float, float* %6
%13 = fmul float 1.200000e+01, %12
%14 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %11, float %13)
%15 = fadd float %14, 3.000000e+00
%16 = fdiv float %10, %15
%17 = load float*, float** %7
store float %16, float* %17
%18 = load float, float* %6
%19 = fmul float 9.000000e+00, %18
%20 = load float, float* %5
%21 = load float, float* %6
%22 = fmul float 1.200000e+01, %21
%23 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %20, float %22)
%24 = fadd float %23, 3.000000e+00
%25 = fdiv float %19, %24
%26 = load float*, float** %8
store float %25, float* %26
ret void
}

LLVM IR (-O2):
define void @xy_to_upvp(float %0, float %1, float* nocapture writeonly %2, float* nocapture writeonly %3) {
%5 = fmul float %0, 4.000000e+00
%6 = fmul float %1, 1.200000e+01
%7 = tail call float @llvm.fmuladd.f32(float %0, float -2.000000e+00, float %6)
%8 = fadd float %7, 3.000000e+00
%9 = fdiv float %5, %8
store float %9, float* %2
%10 = fmul float %1, 9.000000e+00
%11 = fdiv float %10, %8
store float %11, float* %3
ret void
}
/* Variables and functions */
int binToDec(int, int /*<<< orphan*/);
int decToBin(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
void main() {
  printf("%d", decToBin(1000, 0));
  printf("\n%d", binToDec(1111101000, 0));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
xor    %esi,%esi
call   1030 <decToBin@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x423a0e48,%edi
xor    %esi,%esi
call   1050 <binToDec@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3e8,%edi
xor    %esi,%esi
call   1030 <decToBin@plt>
lea    0xebd(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x423a0e48,%edi
xor    %esi,%esi
call   1050 <binToDec@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define void @main() {
%1 = call i32 @decToBin(i32 1000, i32 0)
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @binToDec(i32 1111101000, i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define void @main() {
%1 = tail call i32 @decToBin(i32 1000, i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @binToDec(i32 1111101000, i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}
void rcu_nocb_gp_cleanup(struct swait_queue_head *sq) {}


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

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

LLVM IR (-O0):
%struct.swait_queue_head = type opaque
define void @rcu_nocb_gp_cleanup(%struct.swait_queue_head* %0) {
%2 = alloca %struct.swait_queue_head*
store %struct.swait_queue_head* %0, %struct.swait_queue_head** %2
ret void
}

LLVM IR (-O2):
%struct.swait_queue_head = type opaque
define void @rcu_nocb_gp_cleanup(%struct.swait_queue_head* nocapture %0) {
ret void
}
int main(int argc, char **aRGv) { return 0; }


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

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int myexec(char *, char *, char *, char *, char *, int /*<<< orphan*/ *);
int dpkg_compare_versions(char *v1, char *op, char *v2) {
  return myexec("/usr/bin/dpkg", "--compare-versions", v1, op, v2, NULL);
}


x86 assembly (clang, -O0):
<dpkg_compare_versions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xec9(%rip),%rdi
lea    0xed0(%rip),%rsi
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <myexec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpkg_compare_versions>:
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xee0(%rip),%rdi
lea    0xee7(%rip),%rsi
xor    %r9d,%r9d
jmp    1030 <myexec@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"/usr/bin/dpkg\00"
@.str.1 = [19 x i8] c"--compare-versions\00"
define i32 @dpkg_compare_versions(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @myexec(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8, i8* %9, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"/usr/bin/dpkg\00"
@.str.1 = [19 x i8] c"--compare-versions\00"
define i32 @dpkg_compare_versions(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @myexec(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i32* null)
ret i32 %4
}
/* Variables and functions */
double HUGE_VAL;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  double d = HUGE_VAL;
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@HUGE_VAL = global double 0.000000e+00
@.str = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = load double, double* @HUGE_VAL
store double %3, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@HUGE_VAL = global double 0.000000e+00
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
double fcyc2(int /*<<< orphan*/ (*)(int, int), int, int, int /*<<< orphan*/);
int /*<<< orphan*/ test(int, int);
double run(int size, int stride, double Mhz) {
  double cycles;
  int elems = size / sizeof(double);
  test(elems, stride);
  cycles = fcyc2(test, elems, stride, 0);
  return (size / stride) / (cycles / Mhz);
}


x86 assembly (clang, -O0):
<run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movslq -0x4(%rbp),%rax
shr    $0x3,%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1048 <test@plt>
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2eb2(%rip),%rdi
xor    %ecx,%ecx
call   1030 <fcyc2@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %eax,%xmm0
movsd  -0x18(%rbp),%xmm1
divsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<run>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %esi,%ebx
mov    %edi,%r14d
mov    %edi,%ebp
sar    $0x3,%ebp
mov    %ebp,%edi
call   1048 <test@plt>
mov    0x2ec2(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %ecx,%ecx
call   1030 <fcyc2@plt>
mov    %r14d,%eax
cltd
idiv   %ebx
cvtsi2sd %eax,%xmm1
divsd  0x8(%rsp),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define double @run(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = udiv i64 %10, 8
%12 = trunc i64 %11 to i32
store i32 %12, i32* %8
%13 = load i32, i32* %8
%14 = load i32, i32* %5
%15 = call i32 @test(i32 %13, i32 %14)
%16 = load i32, i32* %8
%17 = load i32, i32* %5
%18 = call double @fcyc2(i32 (i32, i32)* @test, i32 %16, i32 %17, i32 0)
store double %18, double* %7
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = sdiv i32 %19, %20
%22 = sitofp i32 %21 to double
%23 = load double, double* %7
%24 = load double, double* %6
%25 = fdiv double %23, %24
%26 = fdiv double %22, %25
ret double %26
}

LLVM IR (-O2):
define double @run(i32 %0, i32 %1, double %2) {
%4 = ashr i32 %0, 3
%5 = tail call i32 @test(i32 %4, i32 %1)
%6 = tail call double @fcyc2(i32 (i32, i32)* @test, i32 %4, i32 %1, i32 0)
%7 = sdiv i32 %0, %1
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %2
%10 = fdiv double %8, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void error(int n) {
  printf("Error code: %d", n);
  return;
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Error code: %d\00"
define void @error(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Error code: %d\00"
define void @error(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void SteamAPI_vr_IVRCompositor_ClearOverlay(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_vr_IVRCompositor_ClearOverlay>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_IVRCompositor_ClearOverlay = [39 x i8] c"SteamAPI_vr_IVRCompositor_ClearOverlay\00"
define void @SteamAPI_vr_IVRCompositor_ClearOverlay(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @__func__.SteamAPI_vr_IVRCompositor_ClearOverlay, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_vr_IVRCompositor_ClearOverlay = [39 x i8] c"SteamAPI_vr_IVRCompositor_ClearOverlay\00"
define void @SteamAPI_vr_IVRCompositor_ClearOverlay(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @__func__.SteamAPI_vr_IVRCompositor_ClearOverlay, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ rand();
int /*<<< orphan*/ swap_correct(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  for (int i = 0; i < 100; i++) {
    uint32_t x = rand();
    uint32_t y = rand();
    assert(swap_correct(x, y));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1184 <main+0x54>
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <swap_correct@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x64,%ebp
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <rand@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <swap_correct@plt>
mov    %eax,%edi
call   1030 <assert@plt>
add    $0xffffffff,%ebp
jne    1140 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %15, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 100
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = call i32 (...) @rand()
store i32 %9, i32* %3
%10 = call i32 (...) @rand()
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @swap_correct(i32 %11, i32 %12)
%14 = call i32 @assert(i32 %13)
br label %15
15: ; preds = %8
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %5
18: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %2
1: ; preds = %2
ret i32 0
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %8, %2 ]
%4 = tail call i32 (...) @rand()
%5 = tail call i32 (...) @rand()
%6 = tail call i32 @swap_correct(i32 %4, i32 %5)
%7 = tail call i32 @assert(i32 %6)
%8 = add nuw nsw i32 %3, 1
%9 = icmp eq i32 %8, 100
br i1 %9, label %1, label %2
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int isqrt64(int);
long npix2nside64(int64_t npix) {
  int64_t res = isqrt64(npix / 12.);
  return (res * res * 12 == npix) ? (long)res : -1;
}


x86 assembly (clang, -O0):
<npix2nside64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed8(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <isqrt64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   $0xc,%eax,%eax
cmp    -0x4(%rbp),%eax
jne    1158 <npix2nside64+0x48>
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1168 <npix2nside64+0x58>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1168 <npix2nside64+0x58>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<npix2nside64>:
push   %rbx
mov    %edi,%ebx
cvtsi2sd %edi,%xmm0
divsd  0xee1(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <isqrt64@plt>
mov    %eax,%ecx
imul   %ecx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
cmp    %ebx,%ecx
mov    $0xffffffff,%ecx
cmove  %eax,%ecx
movslq %ecx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @npix2nside64(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to double
%6 = fdiv double %5, 1.200000e+01
%7 = fptosi double %6 to i32
%8 = call i32 @isqrt64(i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = mul nsw i32 %9, %10
%12 = mul nsw i32 %11, 12
%13 = load i32, i32* %2
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %18
15: ; preds = %1
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
br label %19
18: ; preds = %1
br label %19
19: ; preds = %18, %15
%20 = phi i64 [ %17, %15 ], [ -1, %18 ]
ret i64 %20
}

LLVM IR (-O2):
define i64 @npix2nside64(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double %2, 1.200000e+01
%4 = fptosi double %3 to i32
%5 = tail call i32 @isqrt64(i32 %4)
%6 = mul i32 %5, 12
%7 = mul i32 %6, %5
%8 = icmp eq i32 %7, %0
%9 = select i1 %8, i32 %5, i32 -1
%10 = sext i32 %9 to i64
ret i64 %10
}
void disable_usb_intr(void) {
  (void)((*(volatile unsigned int *)(((0xA0000000 + 0x1b000000) + 0x148))) =
             (0));
}


x86 assembly (clang, -O0):
<disable_usb_intr>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbb000148,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_usb_intr>:
mov    $0xbb000148,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @disable_usb_intr() {
store volatile i32 0, i32* inttoptr (i64 3137339720 to i32*)
ret void
}

LLVM IR (-O2):
define void @disable_usb_intr() {
store volatile i32 0, i32* inttoptr (i64 3137339720 to i32*)
ret void
}
char hidrd_char_uc(char c) {
  return (c >= 'a' && c <= 'z') ? (c - ('a' - 'A')) : c;
}


x86 assembly (clang, -O0):
<hidrd_char_uc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1133 <hidrd_char_uc+0x33>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1133 <hidrd_char_uc+0x33>
movsbl -0x1(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <hidrd_char_uc+0x3a>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hidrd_char_uc>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @hidrd_char_uc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = sub nsw i32 %12, 32
br label %17
14: ; preds = %6, %1
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
br label %17
17: ; preds = %14, %10
%18 = phi i32 [ %13, %10 ], [ %16, %14 ]
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @hidrd_char_uc(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
double sqr(x) { return (x * x); }


x86 assembly (clang, -O0):
<sqr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqr>:
imul   %edi,%edi
cvtsi2sd %edi,%xmm0
ret

LLVM IR (-O0):
define double @sqr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 %3, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @sqr(i32 %0) {
%2 = mul nsw i32 %0, %0
%3 = sitofp i32 %2 to double
ret double %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p224_selectznz(uintptr_t, uintptr_t, uintptr_t,
                                                uintptr_t);
void fiat_p224_selectznz(uint64_t out1[4], uint8_t arg1, const uint64_t arg2[4],
                         const uint64_t arg3[4]) {
  internal_fiat_p224_selectznz((uintptr_t)out1, (uintptr_t)arg1,
                               (uintptr_t)arg2, (uintptr_t)arg3);
}


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

x86 assembly (clang, -O2):
<fiat_p224_selectznz>:
jmp    1030 <internal_fiat_p224_selectznz@plt>

LLVM IR (-O0):
define void @fiat_p224_selectznz(i32* %0, i64 %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i64
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i64 %1, i64* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = ptrtoint i32* %9 to i64
%11 = load i64, i64* %6
%12 = load i32*, i32** %7
%13 = ptrtoint i32* %12 to i64
%14 = load i32*, i32** %8
%15 = ptrtoint i32* %14 to i64
%16 = call i32 @internal_fiat_p224_selectznz(i64 %10, i64 %11, i64 %13, i64 %15)
ret void
}

LLVM IR (-O2):
define void @fiat_p224_selectznz(i32* %0, i64 %1, i32* %2, i32* %3) {
%5 = ptrtoint i32* %0 to i64
%6 = ptrtoint i32* %2 to i64
%7 = ptrtoint i32* %3 to i64
%8 = tail call i32 @internal_fiat_p224_selectznz(i64 %5, i64 %1, i64 %6, i64 %7)
ret void
}
int test_imm_ECint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xEC << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_ECint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 15466496
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}