xunge/DecIR huggingface dataset:
int issetcc(unsigned int *x, unsigned int bit) {
  return x[bit / 32] & (1 << ((bit % 32) - 1));
}


x86 assembly (clang, -O0):
<issetcc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x5,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,4),%eax
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
sub    $0x1,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<issetcc>:
mov    %esi,%edx
and    $0x1f,%sil
lea    -0x1(%rsi),%ecx
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x5,%edx
and    (%rdi,%rdx,4),%eax
ret

LLVM IR (-O0):
define i32 @issetcc(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 = udiv i32 %6, 32
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = load i32, i32* %4
%12 = urem i32 %11, 32
%13 = sub i32 %12, 1
%14 = shl i32 1, %13
%15 = and i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @issetcc(i32* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 5
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = and i32 %1, 31
%8 = add nsw i32 %7, -1
%9 = shl nuw nsw i32 1, %8
%10 = and i32 %6, %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ M_PI;
float deg_to_radf(float deg) { return deg * (float)M_PI / 180.0f; }


x86 assembly (clang, -O0):
<deg_to_radf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
cvtsi2ssq (%rax),%xmm1
mulss  %xmm1,%xmm0
movss  0xeda(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg_to_radf>:
mov    0x2ee1(%rip),%rax
cvtsi2ssq (%rax),%xmm1
mulss  %xmm1,%xmm0
divss  0xee8(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global i64 0
define float @deg_to_radf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load i64, i64* @M_PI
%5 = sitofp i64 %4 to float
%6 = fmul float %3, %5
%7 = fdiv float %6, 1.800000e+02
ret float %7
}

LLVM IR (-O2):
@M_PI = global i64 0
define float @deg_to_radf(float %0) {
%2 = load i64, i64* @M_PI
%3 = sitofp i64 %2 to float
%4 = fmul float %3, %0
%5 = fdiv float %4, 1.800000e+02
ret float %5
}
int main() {
  char out = 0x55;
  __asm__("movb $0x02, %%al; cmpb $0xFF, %%al; seto %%al" : "=a"(out));
  return out;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x55,-0x5(%rbp)
mov    $0x2,%al
cmp    $0xff,%al
seto   %al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x2,%al
cmp    $0xff,%al
seto   %al
movsbl %al,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 85, i8* %2
%3 = call i8 asm "movb $$0x02, %al; cmpb $$0xFF, %al; seto %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8 asm "movb $$0x02, %al; cmpb $$0xFF, %al; seto %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
%2 = sext i8 %1 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x = 1, y = 2;
  unsigned ux = x;
  unsigned uy = y;
  unsigned r = -(unsigned)(y - x);
  printf("%u\n", (ux - uy) == r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
%7 = load i32, i32* %2
store i32 %7, i32* %4
%8 = load i32, i32* %3
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = sub nsw i32 %9, %10
%12 = sub i32 0, %11
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = sub i32 %13, %14
%16 = load i32, i32* %6
%17 = icmp eq i32 %15, %16
%18 = zext i1 %17 to i32
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void TIM3_IRQHandler() { default_handler(); }


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

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

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

LLVM IR (-O2):
define weak void @TIM3_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
int main(int argc, char *argv[]) {
  int i = 0;
  while (i < 100) {
    usleep(3000);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1146 <main+0x36>
mov    $0xbb8,%edi
call   1030 <usleep@plt>
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xbb8,%edi
call   1030 <usleep@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %10, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 100
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @usleep(i32 3000)
br label %7
12: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @usleep(i32 3000)
br label %3
}
/* Variables and functions */
int jit_tmp_f0(double const **, double **, long long *, double *, void *);
int f(const double **arg, double **res, long long int *iw, double *w,
      void *mem) {
  return jit_tmp_f0(arg, res, iw, w, mem);
}


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

x86 assembly (clang, -O2):
<f>:
jmp    1030 <jit_tmp_f0@plt>

LLVM IR (-O0):
define i32 @f(double** %0, double** %1, i64* %2, double* %3, i8* %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i64*
%9 = alloca double*
%10 = alloca i8*
store double** %0, double*** %6
store double** %1, double*** %7
store i64* %2, i64** %8
store double* %3, double** %9
store i8* %4, i8** %10
%11 = load double**, double*** %6
%12 = load double**, double*** %7
%13 = load i64*, i64** %8
%14 = load double*, double** %9
%15 = load i8*, i8** %10
%16 = call i32 @jit_tmp_f0(double** %11, double** %12, i64* %13, double* %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @f(double** %0, double** %1, i64* %2, double* %3, i8* %4) {
%6 = tail call i32 @jit_tmp_f0(double** %0, double** %1, i64* %2, double* %3, i8* %4)
ret i32 %6
}
int unused(int x, int y) { return (x + y) / 2; }


x86 assembly (clang, -O0):
<unused>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<unused>:
lea    (%rdi,%rsi,1),%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @unused(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 = add nsw i32 %5, %6
%8 = sdiv i32 %7, 2
ret i32 %8
}

LLVM IR (-O2):
define i32 @unused(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sdiv i32 %3, 2
ret i32 %4
}
int main() {
  void create_letter_distribution_diagram();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Foo(int, int, int);
int /*<<< orphan*/ Inner(int);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This is the main routine\n");
  Foo(1, 2, 3);
  Inner(10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1050 <Foo@plt>
mov    $0xa,%edi
call   1030 <Inner@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1050 <Foo@plt>
mov    $0xa,%edi
call   1030 <Inner@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"This is the main routine\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @Foo(i32 1, i32 2, i32 3)
%4 = call i32 @Inner(i32 10)
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"This is the main routine\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @Foo(i32 1, i32 2, i32 3)
%3 = tail call i32 @Inner(i32 10)
ret i32 0
}
/* Variables and functions */
int Q_isprint(int c) {
  if (c >= 0x20 && c <= 0x7E)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<Q_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jl     1127 <Q_isprint+0x27>
cmpl   $0x7e,-0x8(%rbp)
jg     1127 <Q_isprint+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <Q_isprint+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @Q_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ callrts(char *);
mult() { callrts("ccmult"); }


x86 assembly (clang, -O0):
<mult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <callrts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"ccmult\00"
define i32 @mult() {
%1 = alloca i32
%2 = call i32 @callrts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [7 x i8] c"ccmult\00"
define i32 @mult() {
%1 = tail call i32 @callrts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int ehPar(int n) {
  int x;
  if (n % 2 == 0)
    x = 1;
  else
    x = 0;
  return x;
}


x86 assembly (clang, -O0):
<ehPar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <ehPar+0x27>
movl   $0x1,-0x8(%rbp)
jmp    112e <ehPar+0x2e>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehPar>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ehPar(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
int toggle_bit(int reg, int bit) { return reg ^ (1 << bit); }


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

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

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

LLVM IR (-O2):
define i32 @toggle_bit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, %0
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int main(void) {
  off_t offset = 0;
  (void)offset;
  return sizeof(off_t);
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0x4,%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
ret i32 4
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ voronoi(float, float, float, float *, float *, int,
                           int /*<<< orphan*/);
float voronoi_F1F2(float x, float y, float z) {
  float da[4], pa[12];
  voronoi(x, y, z, da, pa, 1, 0);
  return (da[1] - da[0]);
}


x86 assembly (clang, -O0):
<voronoi_F1F2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    -0x20(%rbp),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <voronoi@plt>
movss  -0x1c(%rbp),%xmm0
subss  -0x20(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<voronoi_F1F2>:
sub    $0x48,%rsp
mov    %rsp,%rdi
lea    0x10(%rsp),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <voronoi@plt>
movss  0x4(%rsp),%xmm0
subss  (%rsp),%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define float @voronoi_F1F2(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca [4 x float]
%8 = alloca [12 x float]
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %4
%10 = load float, float* %5
%11 = load float, float* %6
%12 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 0
%13 = getelementptr inbounds [12 x float], [12 x float]* %8, i64 0, i64 0
%14 = call i32 @voronoi(float %9, float %10, float %11, float* %12, float* %13, i32 1, i32 0)
%15 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 1
%16 = load float, float* %15
%17 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 0
%18 = load float, float* %17
%19 = fsub float %16, %18
ret float %19
}

LLVM IR (-O2):
define float @voronoi_F1F2(float %0, float %1, float %2) {
%4 = alloca [4 x float]
%5 = alloca [12 x float]
%6 = bitcast [4 x float]* %4 to i8*
%7 = bitcast [12 x float]* %5 to i8*
%8 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 0
%9 = getelementptr inbounds [12 x float], [12 x float]* %5, i64 0, i64 0
%10 = call i32 @voronoi(float %0, float %1, float %2, float* %8, float* %9, i32 1, i32 0)
%11 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 1
%12 = load float, float* %11
%13 = load float, float* %8
%14 = fsub float %12, %13
ret float %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void motion(int x, int y) { printf("motion: %d,%d\n", x, y); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"motion: %d,%d\0A\00"
define void @motion(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 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"motion: %d,%d\0A\00"
define void @motion(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ enqueue(char);
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pushToStack(char);
void main() {
  char inputChar;
  printf("Kindly Enter the Word to be checked :");
  while ((inputChar = getchar()) != '\n') {
    pushToStack(inputChar);
    enqueue(inputChar);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     1181 <main+0x41>
movsbl -0x1(%rbp),%edi
call   1040 <pushToStack@plt>
movsbl -0x1(%rbp),%edi
call   1060 <enqueue@plt>
jmp    1154 <main+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
nopl   (%rax)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%al
je     116e <main+0x2e>
movsbl %al,%ebx
mov    %ebx,%edi
call   1040 <pushToStack@plt>
mov    %ebx,%edi
call   1060 <enqueue@plt>
jmp    1150 <main+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Kindly Enter the Word to be checked :\00"
define void @main() {
%1 = alloca i8
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %7, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %1
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = load i8, i8* %1
%9 = call i32 @pushToStack(i8 signext %8)
%10 = load i8, i8* %1
%11 = call i32 @enqueue(i8 signext %10)
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Kindly Enter the Word to be checked :\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %10, label %4
4: ; preds = %0, %4
%5 = phi i8 [ %8, %4 ], [ %2, %0 ]
%6 = tail call i32 @pushToStack(i8 signext %5)
%7 = tail call i32 @enqueue(i8 signext %5)
%8 = tail call signext i8 (...) @getchar()
%9 = icmp eq i8 %8, 10
br i1 %9, label %10, label %4
10: ; preds = %4, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ tmp;
struct nlattr {
  int dummy;
};
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int /*<<< orphan*/ nla_memcpy(int /*<<< orphan*/ *, struct nlattr const *, int);
__u64 nla_get_u64(const struct nlattr *nla) {
  __u64 tmp;
  nla_memcpy(&tmp, nla, sizeof(tmp));
  return tmp;
}


x86 assembly (clang, -O0):
<nla_get_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <nla_memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nla_get_u64>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <nla_memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define i32 @nla_get_u64(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
%3 = alloca i32
store %struct.nlattr* %0, %struct.nlattr** %2
%4 = load %struct.nlattr*, %struct.nlattr** %2
%5 = call i32 @nla_memcpy(i32* %3, %struct.nlattr* %4, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define i32 @nla_get_u64(%struct.nlattr* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @nla_memcpy(i32* %2, %struct.nlattr* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
int getFileLen(int *p) { *p = 41; }


x86 assembly (clang, -O0):
<getFileLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x29,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileLen>:
movl   $0x29,(%rdi)
ret

LLVM IR (-O0):
define i32 @getFileLen(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
store i32 41, i32* %4
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @getFileLen(i32* nocapture writeonly %0) {
store i32 41, i32* %0
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ console_print(char *);
void game_process_connecting() { console_print(">"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c">\00"
define void @game_process_connecting() {
%1 = tail call i32 @console_print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
int fcntl(int fd, int cmd, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fcntl(i32 %0, i32 %1, ...) {
ret i32 0
}
void gtk_button_set_focus_on_click() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_set_focus_on_click() {
ret void
}
/* Type definitions */
typedef int uint32_t;
struct vhash_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ print_block(int **);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vhash_update(struct vhash_ctx *, int **);
void vhash_final(struct vhash_ctx *vctx, uint32_t len) {
  uint32_t f[4];
  f[0] = 0x80000000;
  f[1] = len;
  f[2] = 0x00000000;
  f[3] = 0xffffffff;
  if (0) {
    fprintf(stderr, "\n");
    fprintf(stderr, "Adding final block to state:\n");
    print_block(&(f));
    fprintf(stderr, "\n");
  }
  vhash_update(vctx, &f);
}


x86 assembly (clang, -O0):
<vhash_final>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x80000000,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <vhash_update@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vhash_final>:
sub    $0x18,%rsp
movl   $0x80000000,(%rsp)
mov    %esi,0x4(%rsp)
movabs $0xffffffff00000000,%rax
ff ff ff
mov    %rax,0x8(%rsp)
mov    %rsp,%rsi
call   1030 <vhash_update@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.vhash_ctx = type { i32 }
@stderr = global i32 0
define void @vhash_final(%struct.vhash_ctx* %0, i32 %1) {
%3 = alloca %struct.vhash_ctx*
%4 = alloca i32
%5 = alloca [4 x i32]
store %struct.vhash_ctx* %0, %struct.vhash_ctx** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
store i32 -2147483648, i32* %6
%7 = load i32, i32* %4
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 1
store i32 %7, i32* %8
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 2
store i32 0, i32* %9
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 3
store i32 -1, i32* %10
%11 = load %struct.vhash_ctx*, %struct.vhash_ctx** %3
%12 = bitcast [4 x i32]* %5 to i32**
%13 = call i32 @vhash_update(%struct.vhash_ctx* %11, i32** %12)
ret void
}

LLVM IR (-O2):
%struct.vhash_ctx = type { i32 }
@stderr = global i32 0
define void @vhash_final(%struct.vhash_ctx* %0, i32 %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
store i32 -2147483648, i32* %5
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 1
store i32 %1, i32* %6
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
store i32 0, i32* %7
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 3
store i32 -1, i32* %8
%9 = bitcast [4 x i32]* %3 to i32**
%10 = call i32 @vhash_update(%struct.vhash_ctx* %0, i32** %9)
ret void
}
unsigned xrop3_238_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = D | S;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


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

x86 assembly (clang, -O2):
<xrop3_238_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
lea    (%rdi,%rcx,1),%eax
mov    %esi,%edx
shl    $0x8,%edx
or     %esi,%edx
or     $0xff,%ecx
not    %edx
and    %ecx,%edx
or     %esi,%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_238_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = mul nuw nsw i32 %6, 257
%8 = or i32 %4, 255
%9 = xor i32 %7, -1
%10 = and i32 %8, %9
%11 = or i32 %5, %6
%12 = or i32 %11, %10
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ caractere;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  char caractere, *caractere_ptr = &caractere;
  printf("Caractere: foi alocado %zu byte\n", sizeof(caractere));
  printf("Endereço: %p", caractere_ptr);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xed9(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Caractere: foi alocado %zu byte\0A\00"
@.str.1 = [14 x i8] c"Endere\C3\A7o: %p\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8*
store i8* %1, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 1)
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Caractere: foi alocado %zu byte\0A\00"
@.str.1 = [14 x i8] c"Endere\C3\A7o: %p\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i64 1)
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool uDMAChannelIsEnabled(uint32_t ui32ChannelNum) {
  ;
  return (((*((volatile unsigned long *)(0x400FF028))) &
           (1 << (ui32ChannelNum & 0x1f)))
              ? 1
              : 0);
}


x86 assembly (clang, -O0):
<uDMAChannelIsEnabled>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x400ff028,%eax
mov    (%rax),%rdx
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
and    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAChannelIsEnabled>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
xor    %eax,%eax
and    0x400ff028,%rcx
40
setne  %al
ret

LLVM IR (-O0):
define i32 @uDMAChannelIsEnabled(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load volatile i64, i64* inttoptr (i64 1074786344 to i64*)
%4 = load i32, i32* %2
%5 = and i32 %4, 31
%6 = shl i32 1, %5
%7 = sext i32 %6 to i64
%8 = and i64 %3, %7
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @uDMAChannelIsEnabled(i32 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074786344 to i64*)
%3 = and i32 %0, 31
%4 = shl nuw i32 1, %3
%5 = sext i32 %4 to i64
%6 = and i64 %2, %5
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
int test_imm_18uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x18 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_18uint64_highword_reg>:
movabs $0x1800000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_18uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 103079215104
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ the_assert(char *, char *, char *, int, int);
void assert_false_(char *file, char *func, int line, bool val) {
  the_assert("Assert_false", file, func, line, val);
}


x86 assembly (clang, -O0):
<assert_false_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
lea    0xec4(%rip),%rdi
call   1030 <the_assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_false_>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xede(%rip),%rdi
jmp    1030 <the_assert@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Assert_false\00"
define void @assert_false_(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @the_assert(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Assert_false\00"
define void @assert_false_(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @the_assert(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i32 %2, i32 %3)
ret void
}
int FBTest_Exit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @FBTest_Exit() {
ret i32 0
}
unsigned long long powll(unsigned long long base, unsigned short exp) {
  unsigned long long result = 1llu;
  while (exp) {
    if (exp & 1) {
      result *= base;
    }
    exp >>= 1;
    base *= base;
  }
  return result;
}


x86 assembly (clang, -O0):
<powll>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movq   $0x1,-0x18(%rbp)
cmpw   $0x0,-0xa(%rbp)
je     115c <powll+0x5c>
movzwl -0xa(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113f <powll+0x3f>
mov    -0x8(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x1,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1117 <powll+0x17>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<powll>:
test   %esi,%esi
je     1130 <powll+0x30>
mov    $0x1,%ecx
mov    $0x1,%eax
xchg   %ax,%ax
movzwl %si,%edx
test   $0x1,%dl
mov    %rdi,%rsi
cmove  %rcx,%rsi
imul   %rsi,%rax
mov    %edx,%esi
shr    %esi
imul   %rdi,%rdi
cmp    $0x1,%dx
ja     1110 <powll+0x10>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @powll(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
%5 = alloca i64
store i64 %0, i64* %3
store i16 %1, i16* %4
store i64 1, i64* %5
br label %6
6: ; preds = %18, %2
%7 = load i16, i16* %4
%8 = icmp ne i16 %7, 0
br i1 %8, label %9, label %26
9: ; preds = %6
%10 = load i16, i16* %4
%11 = zext i16 %10 to i32
%12 = and i32 %11, 1
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %9
%15 = load i64, i64* %3
%16 = load i64, i64* %5
%17 = mul i64 %16, %15
store i64 %17, i64* %5
br label %18
18: ; preds = %14, %9
%19 = load i16, i16* %4
%20 = zext i16 %19 to i32
%21 = ashr i32 %20, 1
%22 = trunc i32 %21 to i16
store i16 %22, i16* %4
%23 = load i64, i64* %3
%24 = load i64, i64* %3
%25 = mul i64 %24, %23
store i64 %25, i64* %3
br label %6
26: ; preds = %6
%27 = load i64, i64* %5
ret i64 %27
}

LLVM IR (-O2):
define i64 @powll(i64 %0, i16 zeroext %1) {
%3 = icmp eq i16 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %11, %4 ], [ 1, %2 ]
%6 = phi i16 [ %12, %4 ], [ %1, %2 ]
%7 = phi i64 [ %13, %4 ], [ %0, %2 ]
%8 = and i16 %6, 1
%9 = icmp eq i16 %8, 0
%10 = select i1 %9, i64 1, i64 %7
%11 = mul i64 %10, %5
%12 = lshr i16 %6, 1
%13 = mul i64 %7, %7
%14 = icmp ult i16 %6, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi i64 [ 1, %2 ], [ %11, %4 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ mstring_find(char *, char);
char *mstring_get_sub_py(char *, int /*<<< orphan*/, int /*<<< orphan*/);
char *mstring_find_before(char *old, char c) {
  return mstring_get_sub_py(old, 0, mstring_find(old, c));
}


x86 assembly (clang, -O0):
<mstring_find_before>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <mstring_find@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1040 <mstring_get_sub_py@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstring_find_before>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mstring_find@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <mstring_get_sub_py@plt>

LLVM IR (-O0):
define i8* @mstring_find_before(i8* %0, i8 signext %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** %3
%7 = load i8, i8* %4
%8 = call i32 @mstring_find(i8* %6, i8 signext %7)
%9 = call i8* @mstring_get_sub_py(i8* %5, i32 0, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @mstring_find_before(i8* %0, i8 signext %1) {
%3 = tail call i32 @mstring_find(i8* %0, i8 signext %1)
%4 = tail call i8* @mstring_get_sub_py(i8* %0, i32 0, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ testParseBinaryStatement();
int /*<<< orphan*/ testParseCascadeStatement();
int /*<<< orphan*/ testParseClass();
int /*<<< orphan*/ testParseError();
int /*<<< orphan*/ testParsePattern();
int /*<<< orphan*/ testParseTempVars();
int /*<<< orphan*/ testParseUnaryStatement();
int main(void) {
  testParsePattern();
  testParseTempVars();
  testParseError();
  testParseUnaryStatement();
  testParseBinaryStatement();
  testParseCascadeStatement();
  testParseClass();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <testParsePattern@plt>
mov    $0x0,%al
call   1070 <testParseTempVars@plt>
mov    $0x0,%al
call   1030 <testParseError@plt>
mov    $0x0,%al
call   1040 <testParseUnaryStatement@plt>
mov    $0x0,%al
call   1050 <testParseBinaryStatement@plt>
mov    $0x0,%al
call   1090 <testParseCascadeStatement@plt>
mov    $0x0,%al
call   1060 <testParseClass@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <testParsePattern@plt>
xor    %eax,%eax
call   1070 <testParseTempVars@plt>
xor    %eax,%eax
call   1030 <testParseError@plt>
xor    %eax,%eax
call   1040 <testParseUnaryStatement@plt>
xor    %eax,%eax
call   1050 <testParseBinaryStatement@plt>
xor    %eax,%eax
call   1090 <testParseCascadeStatement@plt>
xor    %eax,%eax
call   1060 <testParseClass@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @testParsePattern()
%2 = call i32 (...) @testParseTempVars()
%3 = call i32 (...) @testParseError()
%4 = call i32 (...) @testParseUnaryStatement()
%5 = call i32 (...) @testParseBinaryStatement()
%6 = call i32 (...) @testParseCascadeStatement()
%7 = call i32 (...) @testParseClass()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testParsePattern()
%2 = tail call i32 (...) @testParseTempVars()
%3 = tail call i32 (...) @testParseError()
%4 = tail call i32 (...) @testParseUnaryStatement()
%5 = tail call i32 (...) @testParseBinaryStatement()
%6 = tail call i32 (...) @testParseCascadeStatement()
%7 = tail call i32 (...) @testParseClass()
ret i32 0
}
int f(int a, int b) { return ~(a ^ -(b + 1)); }


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

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

LLVM IR (-O0):
define i32 @f(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 = add nsw i32 %6, 1
%8 = sub nsw i32 0, %7
%9 = xor i32 %5, %8
%10 = xor i32 %9, -1
ret i32 %10
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
const char *filename(const char *name) {
  static const char this_file[] =
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/rutgers-apl/Atomicity-Violation-Detector/refs/"
      "heads/master/3rd/templight/llvm/tools/clang/test/CoverageMapping/"
      "builtinmacro.c";
  return this_file;
}


x86 assembly (clang, -O0):
<filename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<filename>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@filename.this_file = internal constant [216 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rutgers-apl/Atomicity-Violation-Detector/refs/heads/master/3rd/templight/llvm/tools/clang/test/CoverageMapping/builtinmacro.c\00"
define i8* @filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([216 x i8], [216 x i8]* @filename.this_file, i64 0, i64 0)
}

LLVM IR (-O2):
@filename.this_file = internal constant [216 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rutgers-apl/Atomicity-Violation-Detector/refs/heads/master/3rd/templight/llvm/tools/clang/test/CoverageMapping/builtinmacro.c\00"
define i8* @filename(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([216 x i8], [216 x i8]* @filename.this_file, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ is_cpu_pre_c0();
int /*<<< orphan*/ outb(int, int);
void memreset_setup(void) {
  if (is_cpu_pre_c0()) {
    outb((0 << 7) | (0 << 6) | (0 << 5) | (0 << 4) | (1 << 2) | (0 << 0),
         0x0f00 + 0xc0 + 28);
    outb((0 << 7) | (0 << 6) | (0 << 5) | (0 << 4) | (1 << 2) | (0 << 0),
         0x0f00 + 0xc0 + 29);
  } else {
    outb((0 << 7) | (0 << 6) | (0 << 5) | (0 << 4) | (1 << 2) | (1 << 0),
         0x0f00 + 0xc0 + 29);
  }
}


x86 assembly (clang, -O0):
<memreset_setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <is_cpu_pre_c0@plt>
cmp    $0x0,%rax
je     1158 <memreset_setup+0x38>
mov    $0x4,%edi
mov    $0xfdc,%esi
call   1030 <outb@plt>
mov    $0x4,%edi
mov    $0xfdd,%esi
call   1030 <outb@plt>
jmp    1167 <memreset_setup+0x47>
mov    $0x5,%edi
mov    $0xfdd,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<memreset_setup>:
push   %rbx
xor    %eax,%eax
call   1040 <is_cpu_pre_c0@plt>
test   %rax,%rax
je     1143 <memreset_setup+0x23>
mov    $0x4,%ebx
mov    $0x4,%edi
mov    $0xfdc,%esi
call   1030 <outb@plt>
jmp    1148 <memreset_setup+0x28>
mov    $0x5,%ebx
mov    %ebx,%edi
mov    $0xfdd,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @memreset_setup() {
%1 = call i64 (...) @is_cpu_pre_c0()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 @outb(i32 4, i32 4060)
%5 = call i32 @outb(i32 4, i32 4061)
br label %8
6: ; preds = %0
%7 = call i32 @outb(i32 5, i32 4061)
br label %8
8: ; preds = %6, %3
ret void
}

LLVM IR (-O2):
define void @memreset_setup() {
%1 = tail call i64 (...) @is_cpu_pre_c0()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @outb(i32 4, i32 4060)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ 4, %3 ], [ 5, %0 ]
%7 = tail call i32 @outb(i32 %6, i32 4061)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ japi_setmax(int, int);
void j_setmax(int arg0, int arg1) { japi_setmax(arg0, arg1); }


x86 assembly (clang, -O0):
<j_setmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <japi_setmax@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_setmax>:
jmp    1030 <japi_setmax@plt>

LLVM IR (-O0):
define void @j_setmax(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 = call i32 @japi_setmax(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @j_setmax(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setmax(i32 %0, i32 %1)
ret void
}