xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void a52e_set_fscod2(uint8_t *p_a52, uint8_t i_fscod) {
  p_a52[4] &= ~0x30;
  p_a52[4] |= (i_fscod & 0x3) << 4;
}


x86 assembly (clang, -O0):
<a52e_set_fscod2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
and    $0xffffffcf,%ecx
mov    %ecx,0x10(%rax)
mov    -0xc(%rbp),%ecx
and    $0x3,%ecx
shl    $0x4,%ecx
mov    -0x8(%rbp),%rax
or     0x10(%rax),%ecx
mov    %ecx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a52e_set_fscod2>:
mov    0x10(%rdi),%eax
and    $0xffffffcf,%eax
shl    $0x4,%esi
and    $0x30,%esi
or     %eax,%esi
mov    %esi,0x10(%rdi)
ret

LLVM IR (-O0):
define void @a52e_set_fscod2(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 = getelementptr inbounds i32, i32* %5, i64 4
%7 = load i32, i32* %6
%8 = and i32 %7, -49
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 3
%11 = shl i32 %10, 4
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 4
%14 = load i32, i32* %13
%15 = or i32 %14, %11
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @a52e_set_fscod2(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = load i32, i32* %3
%5 = and i32 %4, -49
%6 = shl i32 %1, 4
%7 = and i32 %6, 48
%8 = or i32 %5, %7
store i32 %8, i32* %3
ret void
}
/* Variables and functions */
int __bitmap_weight(unsigned long const *, int);
__attribute__((always_)) int bitmap_weight(const unsigned long *src,
                                           int nbits) {
  return __bitmap_weight(src, nbits);
}


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

x86 assembly (clang, -O2):
<bitmap_weight>:
jmp    1030 <__bitmap_weight@plt>

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

LLVM IR (-O2):
define i32 @bitmap_weight(i64* %0, i32 %1) {
%3 = tail call i32 @__bitmap_weight(i64* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ report(int /*<<< orphan*/, char *);
void log_lookup_self(void) {
  report(LOG_ERR, "Error while trying to lookup current user login");
}


x86 assembly (clang, -O0):
<log_lookup_self>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <report@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_lookup_self>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <report@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [48 x i8] c"Error while trying to lookup current user login\00"
define void @log_lookup_self() {
%1 = load i32, i32* @LOG_ERR
%2 = call i32 @report(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [48 x i8] c"Error while trying to lookup current user login\00"
define void @log_lookup_self() {
%1 = load i32, i32* @LOG_ERR
%2 = tail call i32 @report(i32 %1, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double sinus(double, int);
double cos(double x) {
  if (x < 0)
    x = -x;
  return sinus(x, 1);
}


x86 assembly (clang, -O0):
<cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    114c <cos+0x3c>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x1,%edi
call   1030 <sinus@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cos>:
movapd 0xee8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
mov    $0x1,%edi
jmp    1030 <sinus@plt>

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

LLVM IR (-O2):
define double @cos(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
%5 = tail call double @sinus(double %4, i32 1)
ret double %5
}
__attribute__((weak)) int foo() { return 2; }


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

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

LLVM IR (-O0):
define weak i32 @foo() {
ret i32 2
}

LLVM IR (-O2):
define weak i32 @foo() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void tosThread_exit(void *exitCode) { pthread_exit(exitCode); }


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

x86 assembly (clang, -O2):
<tosThread_exit>:
jmp    1030 <pthread_exit@plt>

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

LLVM IR (-O2):
define void @tosThread_exit(i8* %0) {
%2 = tail call i32 @pthread_exit(i8* %0)
ret void
}
/* Variables and functions */
double sqrt(double);
extern int aspect_fixed(double aspect, double area, double *lp, double *wp) {
  double wdt, len;
  wdt = sqrt(area / aspect);
  len = aspect * wdt;
  *wp = wdt;
  *lp = len;
  return 0;
}


x86 assembly (clang, -O0):
<aspect_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aspect_fixed>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm2
divsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     1135 <aspect_fixed+0x25>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1148 <aspect_fixed+0x38>
movapd %xmm1,%xmm0
movsd  %xmm2,(%rsp)
call   1030 <sqrt@plt>
movsd  (%rsp),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm0,(%r14)
movsd  %xmm2,(%rbx)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @aspect_fixed(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%11 = load double, double* %6
%12 = load double, double* %5
%13 = fdiv double %11, %12
%14 = call double @sqrt(double %13)
store double %14, double* %9
%15 = load double, double* %5
%16 = load double, double* %9
%17 = fmul double %15, %16
store double %17, double* %10
%18 = load double, double* %9
%19 = load double*, double** %8
store double %18, double* %19
%20 = load double, double* %10
%21 = load double*, double** %7
store double %20, double* %21
ret i32 0
}

LLVM IR (-O2):
define i32 @aspect_fixed(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fdiv double %1, %0
%6 = tail call double @sqrt(double %5)
%7 = fmul double %6, %0
store double %6, double* %3
store double %7, double* %2
ret i32 0
}
/* Variables and functions */
int errno;
scalar_t__ write(int, char *, size_t);
int primwrite(int fildes, char buf[], int offset, int nbyte) {
  int n = (int)write(fildes, buf + offset, (size_t)nbyte);
  if (n == -1) {
    return -errno;
  }
  return n;
}


x86 assembly (clang, -O0):
<primwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
movslq -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    115c <primwrite+0x4c>
xor    %eax,%eax
mov    0x2e8e(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1162 <primwrite+0x52>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primwrite>:
push   %rax
movslq %edx,%rax
add    %rax,%rsi
movslq %ecx,%rdx
call   1030 <write@plt>
mov    0x2eba(%rip),%rcx
xor    %edx,%edx
sub    (%rcx),%edx
cmp    $0xffffffff,%eax
cmove  %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @primwrite(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = call i64 @write(i32 %11, i8* %15, i64 %17)
%19 = trunc i64 %18 to i32
store i32 %19, i32* %10
%20 = load i32, i32* %10
%21 = icmp eq i32 %20, -1
br i1 %21, label %22, label %25
22: ; preds = %4
%23 = load i32, i32* @errno
%24 = sub nsw i32 0, %23
store i32 %24, i32* %5
br label %27
25: ; preds = %4
%26 = load i32, i32* %10
store i32 %26, i32* %5
br label %27
27: ; preds = %25, %22
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @primwrite(i32 %0, i8* nocapture %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %1, i64 %5
%7 = sext i32 %3 to i64
%8 = tail call i64 @write(i32 %0, i8* %6, i64 %7)
%9 = trunc i64 %8 to i32
%10 = icmp eq i32 %9, -1
%11 = load i32, i32* @errno
%12 = sub nsw i32 0, %11
%13 = select i1 %10, i32 %12, i32 %9
ret i32 %13
}
/* Variables and functions */
int floor(double);
double binlik_tam_sayiya_yuvarla(double girilen_sayi) {
  double yuvarlanan_sayi;
  yuvarlanan_sayi = floor((girilen_sayi * 1000) + .5) / 1000;
  return yuvarlanan_sayi;
}


x86 assembly (clang, -O0):
<binlik_tam_sayiya_yuvarla>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <floor@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binlik_tam_sayiya_yuvarla>:
push   %rax
mulsd  0xee7(%rip),%xmm0
addsd  0xee7(%rip),%xmm0
call   1030 <floor@plt>
cltq
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @binlik_tam_sayiya_yuvarla(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+03, double 5.000000e-01)
%6 = call i32 @floor(double %5)
%7 = sdiv i32 %6, 1000
%8 = sitofp i32 %7 to double
store double %8, double* %3
%9 = load double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @binlik_tam_sayiya_yuvarla(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e+03, double 5.000000e-01)
%3 = tail call i32 @floor(double %2)
%4 = sdiv i32 %3, 1000
%5 = sitofp i32 %4 to double
ret double %5
}
void test_non_identifiers() {
  int i, x;
#pragma omp parallel for;
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel for linear(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel for private(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel for, private(x);
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_non_identifiers+0x28>
jmp    111a <test_non_identifiers+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_non_identifiers+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_non_identifiers+0x4c>
jmp    113e <test_non_identifiers+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_non_identifiers+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_non_identifiers+0x70>
jmp    1162 <test_non_identifiers+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_non_identifiers+0x53>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1194 <test_non_identifiers+0x94>
jmp    1186 <test_non_identifiers+0x86>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <test_non_identifiers+0x77>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_non_identifiers() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %1
br label %3
10: ; preds = %3
store i32 0, i32* %1
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %1
%13 = icmp slt i32 %12, 16
br i1 %13, label %14, label %18
14: ; preds = %11
br label %15
15: ; preds = %14
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %11
18: ; preds = %11
store i32 0, i32* %1
br label %19
19: ; preds = %23, %18
%20 = load i32, i32* %1
%21 = icmp slt i32 %20, 16
br i1 %21, label %22, label %26
22: ; preds = %19
br label %23
23: ; preds = %22
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %19
26: ; preds = %19
store i32 0, i32* %1
br label %27
27: ; preds = %31, %26
%28 = load i32, i32* %1
%29 = icmp slt i32 %28, 16
br i1 %29, label %30, label %34
30: ; preds = %27
br label %31
31: ; preds = %30
%32 = load i32, i32* %1
%33 = add nsw i32 %32, 1
store i32 %33, i32* %1
br label %27
34: ; preds = %27
ret void
}

LLVM IR (-O2):
define void @test_non_identifiers() {
ret void
}
cbuf39(f, n) int f, n;
{ cbuf(f, n, 39); }


x86 assembly (clang, -O0):
<cbuf39>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x27,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf39>:
mov    $0x27,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf39(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %7, i32 39)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cbuf39(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 39)
ret i32 undef
}
reg0adrx1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ r0 = (((int *)11111111)[x1]); }


x86 assembly (clang, -O0):
<reg0adrx1_set>:
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)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0adrx1_set(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* %11
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %15
%17 = load i32, i32* %16
store i32 %17, i32* %8
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @reg0adrx1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
ret i32 undef
}
void foo4f() {}


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

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

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

LLVM IR (-O2):
define void @foo4f() {
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 "
         "REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed "
         "Nov 28 19:14:47 CST 2012 BUILD=RELEASE CPU= USING_UMP=1 "
         "USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c "
         "platform/meson_platform/mali_fix.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [464 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Nov 28 19:14:47 CST 2012 BUILD=RELEASE CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([464 x i8], [464 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [464 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Nov 28 19:14:47 CST 2012 BUILD=RELEASE CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([464 x i8], [464 x i8]* @.str, i64 0, i64 0)
}
void xxx(int argc) {
  int x;
#pragma omp for
  for (int i = 0; i < 10; ++i)
    argc = x;
}


x86 assembly (clang, -O0):
<xxx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    112c <xxx+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <xxx+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @xxx(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_exception_illegal();
int /*<<< orphan*/ m68ki_exception_trap(int);
void m68k_op_trapt_16(void) {
  if (0) {
    m68ki_exception_trap(7);
    return;
  }
  m68ki_exception_illegal();
}


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

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

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

LLVM IR (-O2):
define void @m68k_op_trapt_16() {
%1 = tail call i32 (...) @m68ki_exception_illegal()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ put16(int /*<<< orphan*/ *, int);
void put32(FILE *f, int c) {
  put16(f, c & 0xffff);
  put16(f, c >> 16);
}


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

x86 assembly (clang, -O2):
<put32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
movzwl %bx,%esi
call   1030 <put16@plt>
sar    $0x10,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <put16@plt>

LLVM IR (-O0):
define void @put32(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 = and i32 %6, 65535
%8 = call i32 @put16(i32* %5, i32 %7)
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = call i32 @put16(i32* %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @put32(i32* %0, i32 %1) {
%3 = and i32 %1, 65535
%4 = tail call i32 @put16(i32* %0, i32 %3)
%5 = ashr i32 %1, 16
%6 = tail call i32 @put16(i32* %0, i32 %5)
ret void
}
/* Variables and functions */
scalar_t__ atoi(char *);
int /*<<< orphan*/ startFunction(int, char *, char *);
int stopFunction(char *portno, char *filename) {
  startFunction((int)atoi(portno), filename, "0:1");
  return 0;
}


x86 assembly (clang, -O0):
<stopFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
lea    0xeba(%rip),%rdx
call   1030 <startFunction@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stopFunction>:
push   %rbx
mov    %rsi,%rbx
call   1040 <atoi@plt>
lea    0xed0(%rip),%rdx
mov    %eax,%edi
mov    %rbx,%rsi
call   1030 <startFunction@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"0:1\00"
define i32 @stopFunction(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i64 @atoi(i8* %5)
%7 = trunc i64 %6 to i32
%8 = load i8*, i8** %4
%9 = call i32 @startFunction(i32 %7, i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"0:1\00"
define i32 @stopFunction(i8* nocapture %0, i8* %1) {
%3 = tail call i64 @atoi(i8* %0)
%4 = trunc i64 %3 to i32
%5 = tail call i32 @startFunction(i32 %4, i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned retro_get_region() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @retro_get_region() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
void procB(int *inpA) {
  int i;
  int j;
  int x;
  for (i = 0; i < 4; ++i) {
    printf("procB\n");
    sleep(1);
  }
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<procB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1171 <procB+0x41>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <procB+0x13>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<procB>:
push   %rbx
lea    0xec8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
pop    %rbx
jmp    1040 <pthread_exit@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"procB\00"
define void @procB(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @sleep(i32 1)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @sleep(i32 1)
%10 = tail call i32 @pthread_exit(i32* null)
ret void
}
int test_imm_7Dint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x7D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Dint64_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, 125
%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_7Dint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 8192000
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ run_test_a();
int /*<<< orphan*/ run_test_b();
int main(void) {
  run_test_a();
  run_test_b();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @run_test_a()
%2 = tail call i32 (...) @run_test_b()
ret i32 0
}
/* Variables and functions */
double qcs_randu();
void qcs_fill_randu(int n, double *p) {
  int i;
  for (i = 0; i < n; i++)
    p[i] = qcs_randu();
}


x86 assembly (clang, -O0):
<qcs_fill_randu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1154 <qcs_fill_randu+0x44>
mov    $0x0,%al
call   1030 <qcs_randu@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <qcs_fill_randu+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcs_fill_randu>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1146 <qcs_fill_randu+0x36>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <qcs_randu@plt>
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <qcs_fill_randu+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @qcs_fill_randu(i32 %0, double* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = tail call double (...) @qcs_randu()
%9 = getelementptr inbounds double, double* %1, i64 %7
store double %8, double* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
void(flush_write_buffers)(void) {
  {
    ;
    return;
  }
}


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

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

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

LLVM IR (-O2):
define void @flush_write_buffers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() { printf("Built by BS\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Built by BS\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Built by BS\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
float nextPowOf2(float num) {
  float f = (float)(num - 1);
  return 1U << ((*(unsigned int *)(&f) >> 23) - 126);
}


x86 assembly (clang, -O0):
<nextPowOf2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x17,%eax
mov    %al,%cl
add    $0x82,%cl
mov    $0x1,%eax
shl    %cl,%eax
cvtsi2ss %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextPowOf2>:
addss  0xef8(%rip),%xmm0
movd   %xmm0,%ecx
shr    $0x17,%ecx
add    $0x82,%cl
mov    $0x1,%eax
shl    %cl,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
ret

LLVM IR (-O0):
define float @nextPowOf2(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fsub float %4, 1.000000e+00
store float %5, float* %3
%6 = bitcast float* %3 to i32*
%7 = load i32, i32* %6
%8 = lshr i32 %7, 23
%9 = sub i32 %8, 126
%10 = shl i32 1, %9
%11 = uitofp i32 %10 to float
ret float %11
}

LLVM IR (-O2):
define float @nextPowOf2(float %0) {
%2 = fadd float %0, -1.000000e+00
%3 = bitcast float %2 to i32
%4 = lshr i32 %3, 23
%5 = add nsw i32 %4, -126
%6 = shl nuw i32 1, %5
%7 = uitofp i32 %6 to float
ret float %7
}
/* Variables and functions */
int /*<<< orphan*/ jeux(int);
void multi(void) { jeux(1); }


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

x86 assembly (clang, -O2):
<multi>:
mov    $0x1,%edi
jmp    1030 <jeux@plt>

LLVM IR (-O0):
define void @multi() {
%1 = call i32 @jeux(i32 1)
ret void
}

LLVM IR (-O2):
define void @multi() {
%1 = tail call i32 @jeux(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writeLog(char *, char *, char *);
void logForbidden(char *ip, char *get) { writeLog(ip, get, "403 Forbidden"); }


x86 assembly (clang, -O0):
<logForbidden>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xed1(%rip),%rdx
call   1030 <writeLog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logForbidden>:
lea    0xee9(%rip),%rdx
jmp    1030 <writeLog@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"403 Forbidden\00"
define void @logForbidden(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @writeLog(i8* %5, i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"403 Forbidden\00"
define void @logForbidden(i8* %0, i8* %1) {
%3 = tail call i32 @writeLog(i8* %0, i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int index_2D_to_1D(int i, int ni, int j, int nj) { return j + nj * i; }


x86 assembly (clang, -O0):
<index_2D_to_1D>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_2D_to_1D>:
imul   %ecx,%edi
lea    (%rdi,%rdx,1),%eax
ret

LLVM IR (-O0):
define i32 @index_2D_to_1D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = load i32, i32* %8
%11 = load i32, i32* %5
%12 = mul nsw i32 %10, %11
%13 = add nsw i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @index_2D_to_1D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %3, %0
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Type definitions */
struct client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ NFS_MNT3_VERSION;
int mount_call(int, int /*<<< orphan*/, char const *, struct client *);
int umount_v3(const char *path, struct client *clnt) {
  return mount_call(3, NFS_MNT3_VERSION, path, clnt);
}


x86 assembly (clang, -O0):
<umount_v3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x3,%edi
call   1030 <mount_call@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umount_v3>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ecb(%rip),%rax
mov    (%rax),%esi
mov    $0x3,%edi
jmp    1030 <mount_call@plt>

LLVM IR (-O0):
%struct.client = type { i32 }
@NFS_MNT3_VERSION = global i32 0
define i32 @umount_v3(i8* %0, %struct.client* %1) {
%3 = alloca i8*
%4 = alloca %struct.client*
store i8* %0, i8** %3
store %struct.client* %1, %struct.client** %4
%5 = load i32, i32* @NFS_MNT3_VERSION
%6 = load i8*, i8** %3
%7 = load %struct.client*, %struct.client** %4
%8 = call i32 @mount_call(i32 3, i32 %5, i8* %6, %struct.client* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.client = type { i32 }
@NFS_MNT3_VERSION = global i32 0
define i32 @umount_v3(i8* %0, %struct.client* %1) {
%3 = load i32, i32* @NFS_MNT3_VERSION
%4 = tail call i32 @mount_call(i32 3, i32 %3, i8* %0, %struct.client* %1)
ret i32 %4
}
void vec3_copy(const float a[3], float out[3]) {
  out[0] = a[0];
  out[1] = a[1];
  out[2] = a[2];
}


x86 assembly (clang, -O0):
<vec3_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_copy>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rsi)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rsi)
movss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rsi)
ret

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

LLVM IR (-O2):
define void @vec3_copy(float* nocapture %0, float* nocapture writeonly %1) {
%3 = load float, float* %0
store float %3, float* %1
%4 = getelementptr inbounds float, float* %0, i64 1
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %1, i64 1
store float %5, float* %6
%7 = getelementptr inbounds float, float* %0, i64 2
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %1, i64 2
store float %8, float* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_set_prebuf() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_set_prebuf"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [41 x i8] c"NOT IMPLEMENTED:pa_memblockq_set_prebuf\0A\00"
define i32 @pa_memblockq_set_prebuf() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [40 x i8] c"NOT IMPLEMENTED:pa_memblockq_set_prebuf\00"
define i32 @pa_memblockq_set_prebuf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void free(void *ptr) { (void)ptr; }


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

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

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

LLVM IR (-O2):
define void @free(i8* nocapture %0) {
ret void
}
Swap(a, b) int *a, *b;
{
  int t;
  t = *a;
  *a = *b;
  *b = t;
}


x86 assembly (clang, -O0):
<Swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Swap>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define i32 @Swap(i32* %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
store i32 %8, i32* %6
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %4
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = load i32*, i32** %5
store i32 %12, i32* %13
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @Swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 undef
}
void XRaiseWindow() {}


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

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

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

LLVM IR (-O2):
define void @XRaiseWindow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "usage: %s <wid>\n", name);
  exit(1);
}


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>
mov    $0x1,%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>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"usage: %s <wid>\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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"usage: %s <wid>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ permutation(int /*<<< orphan*/, int);
int main() {
  int n = 3;
  permutation(0, n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <permutation@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @permutation(i32 0, i32 3)
ret i32 0
}
unsigned long GET_GPCLR_ADDR(int pin) {
  if (pin < 29) {
    return 0x20200028UL;
  } else {
    return 0x2020002cUL;
  }
  return 0;
}


x86 assembly (clang, -O0):
<GET_GPCLR_ADDR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x1d,-0xc(%rbp)
jge    111e <GET_GPCLR_ADDR+0x1e>
movq   $0x20200028,-0x8(%rbp)
20
jmp    1126 <GET_GPCLR_ADDR+0x26>
movq   $0x2020002c,-0x8(%rbp)
20
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GET_GPCLR_ADDR>:
xor    %eax,%eax
cmp    $0x1d,%edi
setge  %al
lea    0x20200028(,%rax,4),%rax
20
ret

LLVM IR (-O0):
define i64 @GET_GPCLR_ADDR(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 29
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 538968104, i64* %2
br label %8
7: ; preds = %1
store i64 538968108, i64* %2
br label %8
8: ; preds = %7, %6
%9 = load i64, i64* %2
ret i64 %9
}

LLVM IR (-O2):
define i64 @GET_GPCLR_ADDR(i32 %0) {
%2 = icmp slt i32 %0, 29
%3 = select i1 %2, i64 538968104, i64 538968108
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ is_prime_long(int, int /*<<< orphan*/ *, int /*<<< orphan*/,
                                 int /*<<< orphan*/ *, int /*<<< orphan*/);
int find_pseudo_fortunate(int admissible) {
  int fortunate = 2;
  while (!is_prime_long(admissible + fortunate, NULL, 0, NULL, 0))
    fortunate++;
  return fortunate;
}


x86 assembly (clang, -O0):
<find_pseudo_fortunate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <is_prime_long@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114f <find_pseudo_fortunate+0x3f>
jmp    115d <find_pseudo_fortunate+0x4d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <find_pseudo_fortunate+0x12>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_pseudo_fortunate>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
mov    $0x1,%ebx
nopl   0x0(%rax)
lea    (%r14,%rbx,1),%edi
add    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <is_prime_long@plt>
add    $0x1,%ebx
test   %eax,%eax
je     1120 <find_pseudo_fortunate+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @find_pseudo_fortunate(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 2, %1 ], [ %7, %2 ]
%4 = add nsw i32 %3, %0
%5 = tail call i32 @is_prime_long(i32 %4, i32* null, i32 0, i32* null, i32 0)
%6 = icmp eq i32 %5, 0
%7 = add nuw nsw i32 %3, 1
br i1 %6, label %2, label %8
8: ; preds = %2
ret i32 %3
}
/* Variables and functions */
void *realloc(void *, unsigned int);
void *av_realloc(void *ptr, unsigned int size) { return realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<av_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define i8* @av_realloc(i8* %0, i32 %1) {
%3 = tail call i8* @realloc(i8* %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void zlibc_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @zlibc_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}