xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ uuidgen(char *);
int main(int argc, char **argv) {
  char uuid[37];
  if (uuidgen(uuid) == 0)
    printf("%s\n", uuid);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <uuidgen@plt>
cmp    $0x0,%rax
jne    1159 <main+0x39>
lea    -0x40(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    %rsp,%rdi
call   1030 <uuidgen@plt>
test   %rax,%rax
jne    1140 <main+0x20>
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [37 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [37 x i8], [37 x i8]* %6, i64 0, i64 0
%8 = call i64 @uuidgen(i8* %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = getelementptr inbounds [37 x i8], [37 x i8]* %6, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [37 x i8]
%4 = getelementptr inbounds [37 x i8], [37 x i8]* %3, i64 0, i64 0
%5 = call i64 @uuidgen(i8* %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
br label %9
9: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ split_filename(char const *, char **, char **, int *);
char *filenametosymbol(const char *filename) {
  char *prefix = NULL, *name = NULL;
  int version = 0;
  split_filename(filename, &prefix, &name, &version);
  free(prefix);
  return name;
}


x86 assembly (clang, -O0):
<filenametosymbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
call   1040 <split_filename@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filenametosymbol>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
movl   $0x0,0x4(%rsp)
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
call   1040 <split_filename@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i8* @filenametosymbol(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = bitcast i8** %2 to i8*
store i8* null, i8** %2
%6 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%7 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%8 = call i32 @split_filename(i8* %0, i8** %2, i8** %3, i32* %4)
%9 = load i8*, i8** %2
%10 = call i32 @free(i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}
long __ocl_clz_long(long src) {
  long bit = ((long)1) << (64 - 1);
  int n;
  for (n = 0; n < 64; n++, bit >>= 1) {
    if (src & bit)
      break;
  }
  return n;
}


x86 assembly (clang, -O0):
<__ocl_clz_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x8000000000000000,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x40,-0x14(%rbp)
jge    115d <__ocl_clz_long+0x5d>
mov    -0x8(%rbp),%rax
and    -0x10(%rbp),%rax
cmp    $0x0,%rax
je     113e <__ocl_clz_long+0x3e>
jmp    115d <__ocl_clz_long+0x5d>
jmp    1143 <__ocl_clz_long+0x43>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111d <__ocl_clz_long+0x1d>
movslq -0x14(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_clz_long>:
test   %rdi,%rdi
js     1137 <__ocl_clz_long+0x37>
movabs $0x8000000000000000,%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%edx
add    $0x1,%rax
cmp    $0x3e,%edx
ja     1136 <__ocl_clz_long+0x36>
sar    %rcx
mov    %rcx,%rdx
and    %rdi,%rdx
je     1120 <__ocl_clz_long+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @__ocl_clz_long(i64 %0) {
%2 = icmp sgt i64 %0, -1
br i1 %2, label %3, label %14
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ -9223372036854775808, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = ashr i64 %5, 1
%8 = icmp ult i32 %4, 63
%9 = and i64 %7, %0
%10 = icmp eq i64 %9, 0
%11 = select i1 %8, i1 %10, i1 false
br i1 %11, label %3, label %12
12: ; preds = %3
%13 = zext i32 %6 to i64
br label %14
14: ; preds = %12, %1
%15 = phi i64 [ 0, %1 ], [ %13, %12 ]
ret i64 %15
}
__attribute__((always_)) void raid_avx_end(void) {
  raid_sse_end();
  asm volatile("vzeroupper" : : : "memory");
}


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

x86 assembly (clang, -O2):
<raid_avx_end>:
push   %rax
xor    %eax,%eax
call   1030 <raid_sse_end@plt>
vzeroupper
pop    %rax
ret

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

LLVM IR (-O2):
define void @raid_avx_end() {
%1 = tail call i32 (...) @raid_sse_end()
tail call void asm sideeffect "vzeroupper", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int m_strlcpy(char *, char const *, unsigned int);
int m_strncpy(char *dst, const char *src, unsigned int max_size) {
  return m_strlcpy(dst, src, max_size);
}


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

x86 assembly (clang, -O2):
<m_strncpy>:
jmp    1030 <m_strlcpy@plt>

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

LLVM IR (-O2):
define i32 @m_strncpy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @m_strlcpy(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
double globalRandomGenerate();
double rand_() { return globalRandomGenerate(); }


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

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

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

LLVM IR (-O2):
define double @rand_() {
%1 = tail call double (...) @globalRandomGenerate()
ret double %1
}
int bwx_RANDOM_RECORD_SIZE() { return 128; }


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

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

LLVM IR (-O0):
define i32 @bwx_RANDOM_RECORD_SIZE() {
ret i32 128
}

LLVM IR (-O2):
define i32 @bwx_RANDOM_RECORD_SIZE() {
ret i32 128
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Usage: loader -p [pid]\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Usage: loader -p [pid]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"Usage: loader -p [pid]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void terminate_comment() { putchar('\n'); }


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

x86 assembly (clang, -O2):
<terminate_comment>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @terminate_comment() {
%1 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @terminate_comment() {
%1 = tail call i32 @putchar(i8 signext 10)
ret void
}
yolo() {}


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

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

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

LLVM IR (-O2):
define i32 @yolo() {
ret i32 undef
}
void v2i_(vec) int vec[2];
{
  float v[2];
  v[0] = vec[0];
  v[1] = vec[1];
  vcall(v, 2);
}


x86 assembly (clang, -O0):
<v2i_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssl 0x4(%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <vcall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2i_>:
push   %rax
cvtsi2ssl (%rdi),%xmm0
movss  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x4(%rdi),%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <vcall@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @v2i_(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x float]
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 0
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to float
%8 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
store float %7, float* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = load i32, i32* %10
%12 = sitofp i32 %11 to float
%13 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
store float %12, float* %13
%14 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%15 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %14, i32 2)
ret void
}

LLVM IR (-O2):
define void @v2i_(i32* nocapture %0) {
%2 = alloca [2 x float]
%3 = bitcast [2 x float]* %2 to i8*
%4 = load i32, i32* %0
%5 = sitofp i32 %4 to float
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float %5, float* %6
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to float
%10 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float %9, float* %10
%11 = call i32 (float*, i32, ...) bitcast (i32 (...)* @vcall to i32 (float*, i32, ...)*)(float* %6, i32 2)
ret void
}
int checkPrime(int n) {
  int i, isPrime = 1;
  for (i = 2; i <= n / 2; ++i) {
    if (n % i == 0) {
      isPrime = 0;
      break;
    }
  }
  return isPrime;
}


x86 assembly (clang, -O0):
<checkPrime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jg     1162 <checkPrime+0x62>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    114f <checkPrime+0x4f>
movl   $0x0,-0xc(%rbp)
jmp    1162 <checkPrime+0x62>
jmp    1154 <checkPrime+0x54>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <checkPrime+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkPrime>:
mov    $0x1,%r8d
cmp    $0x4,%edi
jl     1137 <checkPrime+0x37>
mov    %edi,%esi
shr    %esi
neg    %esi
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     113b <checkPrime+0x3b>
lea    (%rsi,%rcx,1),%eax
add    $0x1,%eax
add    $0x1,%ecx
cmp    $0x1,%eax
jne    1120 <checkPrime+0x20>
mov    %r8d,%eax
ret
xor    %r8d,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @checkPrime(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = lshr i32 %0, 1
br label %8
5: ; preds = %8
%6 = add nuw nsw i32 %9, 1
%7 = icmp eq i32 %9, %4
br i1 %7, label %12, label %8
8: ; preds = %3, %5
%9 = phi i32 [ %6, %5 ], [ 2, %3 ]
%10 = srem i32 %0, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %8, %1
%13 = phi i32 [ 1, %1 ], [ 0, %8 ], [ 1, %5 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char zero = '\0';
  printf("%d\n", zero);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x5(%rbp)
lea    0xed6(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 0)
ret i32 0
}
long nextLevelXP(int newLevel) {
  int i = newLevel;
  int sum = 0;
  while (i > 0) {
    sum += i;
    --i;
  }
  return (long)(sum * 100);
}


x86 assembly (clang, -O0):
<nextLevelXP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1135 <nextLevelXP+0x35>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1114 <nextLevelXP+0x14>
imul   $0x64,-0xc(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextLevelXP>:
test   %edi,%edi
jle    111e <nextLevelXP+0x1e>
lea    -0x1(%rdi),%eax
lea    -0x2(%rdi),%ecx
imul   %rax,%rcx
imul   %eax,%eax
shr    %rcx
add    %edi,%eax
sub    %ecx,%eax
imul   $0x64,%eax,%eax
cltq
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @nextLevelXP(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %16
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = mul i32 %4, %4
%6 = zext i32 %4 to i33
%7 = add nsw i32 %0, -2
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %0
%13 = sub i32 %12, %11
%14 = mul i32 %13, 100
%15 = sext i32 %14 to i64
br label %16
16: ; preds = %3, %1
%17 = phi i64 [ 0, %1 ], [ %15, %3 ]
ret i64 %17
}
/* Variables and functions */
int /*<<< orphan*/ SLang_ungetkey_string(unsigned char *, int);
void SLang_ungetkey(unsigned char ch) { SLang_ungetkey_string(&ch, 1); }


x86 assembly (clang, -O0):
<SLang_ungetkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <SLang_ungetkey_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SLang_ungetkey>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <SLang_ungetkey_string@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SLang_ungetkey(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @SLang_ungetkey_string(i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @SLang_ungetkey(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @SLang_ungetkey_string(i8* %2, i32 1)
ret void
}
void _adc_start(void) {
  *(unsigned char *)0x5400 &= 0x7F;
  *(unsigned char *)0x5401 |= 1;
}


x86 assembly (clang, -O0):
<_adc_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5400,%eax
movzbl (%rax),%eax
and    $0x7f,%eax
mov    %al,%cl
mov    $0x5400,%eax
mov    %cl,(%rax)
mov    $0x5401,%eax
movzbl (%rax),%eax
or     $0x1,%eax
mov    %al,%cl
mov    $0x5401,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_adc_start>:
andb   $0x7f,0x5400
7f
orb    $0x1,0x5401
01
ret

LLVM IR (-O0):
define void @_adc_start() {
%1 = load i8, i8* inttoptr (i64 21504 to i8*)
%2 = zext i8 %1 to i32
%3 = and i32 %2, 127
%4 = trunc i32 %3 to i8
store i8 %4, i8* inttoptr (i64 21504 to i8*)
%5 = load i8, i8* inttoptr (i64 21505 to i8*)
%6 = zext i8 %5 to i32
%7 = or i32 %6, 1
%8 = trunc i32 %7 to i8
store i8 %8, i8* inttoptr (i64 21505 to i8*)
ret void
}

LLVM IR (-O2):
define void @_adc_start() {
%1 = load i8, i8* inttoptr (i64 21504 to i8*)
%2 = and i8 %1, 127
store i8 %2, i8* inttoptr (i64 21504 to i8*)
%3 = load i8, i8* inttoptr (i64 21505 to i8*)
%4 = or i8 %3, 1
store i8 %4, i8* inttoptr (i64 21505 to i8*)
ret void
}
int ft_modlen(const char *s, char c) {
  int i;
  i = 0;
  while (s[i] != c && s[i] != 0)
    i++;
  return (i);
}


x86 assembly (clang, -O0):
<ft_modlen>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
movsbl -0x9(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
je     1147 <ft_modlen+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1157 <ft_modlen+0x57>
jmp    1165 <ft_modlen+0x65>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <ft_modlen+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_modlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rdi),%ecx
add    $0x1,%eax
cmp    %sil,%cl
je     1123 <ft_modlen+0x23>
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_modlen+0x10>
ret

LLVM IR (-O0):
define i32 @ft_modlen(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i32
store i8* %0, i8** %3
store i8 %1, i8* %4
store i32 0, i32* %5
br label %6
6: ; preds = %26, %2
%7 = load i8*, i8** %3
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %12, %14
br i1 %15, label %16, label %24
16: ; preds = %6
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 0
br label %24
24: ; preds = %16, %6
%25 = phi i1 [ false, %6 ], [ %23, %16 ]
br i1 %25, label %26, label %29
26: ; preds = %24
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %6
29: ; preds = %24
%30 = load i32, i32* %5
ret i32 %30
}

LLVM IR (-O2):
define i32 @ft_modlen(i8* nocapture %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %10, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, %1
%8 = icmp eq i8 %6, 0
%9 = or i1 %7, %8
%10 = add nuw i64 %4, 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = trunc i64 %4 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
unsigned int sleep(unsigned int seconds) {
  usleep(seconds * (1000 * 1000));
  return 0;
}


x86 assembly (clang, -O0):
<sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0xf4240,-0x4(%rbp),%edi
call   1030 <usleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleep>:
push   %rax
imul   $0xf4240,%edi,%edi
call   1030 <usleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1000000
%5 = call i32 @usleep(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @sleep(i32 %0) {
%2 = mul i32 %0, 1000000
%3 = tail call i32 @usleep(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello\tWorld\n\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello\09World\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello\09World\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
A0AX1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (*((char *)10000000)) = (((char *)11111111)[x1]); }


x86 assembly (clang, -O0):
<A0AX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,1),%cl
mov    $0x989680,%eax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0AX1>:
movslq %ecx,%rax
mov    0xa98ac7(%rax),%al
mov    %al,0x989680
ret

LLVM IR (-O0):
define i32 @A0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* inttoptr (i64 11111111 to i8*), i64 %17
%19 = load i8, i8* %18
store i8 %19, i8* inttoptr (i64 10000000 to i8*)
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @A0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i8, i8* inttoptr (i64 11111111 to i8*), i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* inttoptr (i64 10000000 to i8*)
ret i32 undef
}
void add(char *s, char c) {
  char *p;
  for (p = s; *p != '\0' && *p != c; ++p)
    ;
  if (*p == '\0') {
    *p++ = c;
    *p = '\0';
  }
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x19(%rbp)
je     113e <add+0x3e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    114e <add+0x4e>
jmp    1164 <add+0x64>
jmp    1153 <add+0x53>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1116 <add+0x16>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    118f <add+0x8f>
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1110 <add+0x10>
cmp    %sil,%al
jne    1100 <add>
test   %al,%al
je     1115 <add+0x15>
ret
mov    %sil,-0x1(%rdi)
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @add(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
store i8* %0, i8** %3
store i8 %1, i8* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
br label %7
7: ; preds = %22, %2
%8 = load i8*, i8** %5
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %7
%13 = load i8*, i8** %5
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = load i8, i8* %4
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %15, %17
br label %19
19: ; preds = %12, %7
%20 = phi i1 [ false, %7 ], [ %18, %12 ]
br i1 %20, label %21, label %25
21: ; preds = %19
br label %22
22: ; preds = %21
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %5
br label %7
25: ; preds = %19
%26 = load i8*, i8** %5
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %35
30: ; preds = %25
%31 = load i8, i8* %4
%32 = load i8*, i8** %5
%33 = getelementptr inbounds i8, i8* %32, i32 1
store i8* %33, i8** %5
store i8 %31, i8* %32
%34 = load i8*, i8** %5
store i8 0, i8* %34
br label %35
35: ; preds = %30, %25
ret void
}

LLVM IR (-O2):
define void @add(i8* nocapture %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = icmp eq i8 %5, %1
%8 = or i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3
br i1 %6, label %11, label %12
11: ; preds = %10
store i8 %1, i8* %4
store i8 0, i8* %9
br label %12
12: ; preds = %11, %10
ret void
}
int mapCharToInt(char c) {
  int intVal = (int)c;
  if (intVal >= 97 && intVal <= 122) {
    intVal = intVal - 32;
  }
  return intVal - 65;
}


x86 assembly (clang, -O0):
<mapCharToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     112e <mapCharToInt+0x2e>
cmpl   $0x7a,-0x8(%rbp)
jg     112e <mapCharToInt+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mapCharToInt(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -97
%4 = icmp ult i8 %3, 26
%5 = add nsw i32 %2, -32
%6 = select i1 %4, i32 %5, i32 %2
%7 = add nsw i32 %6, -65
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *__stdio_open(char const *, char const *);
FILE *fopen(const char *path, const char *mode) {
  return __stdio_open(path, mode);
}


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

x86 assembly (clang, -O2):
<fopen>:
jmp    1030 <__stdio_open@plt>

LLVM IR (-O0):
define i32* @fopen(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* @__stdio_open(i8* %5, i8* %6)
ret i32* %7
}

LLVM IR (-O2):
define i32* @fopen(i8* %0, i8* %1) {
%3 = tail call i32* @__stdio_open(i8* %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
int getpid();
int getpgrp(void) { return getpid(); }


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

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

LLVM IR (-O0):
define i32 @getpgrp() {
%1 = call i32 (...) @getpid()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getpgrp() {
%1 = tail call i32 (...) @getpid()
ret i32 %1
}
/* Variables and functions */
int number_mm();
int number_door(void) {
  int door;
  while ((door = number_mm() & (8 - 1)) > 11)
    ;
  return door;
}


x86 assembly (clang, -O0):
<number_door>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <number_mm@plt>
and    $0x7,%eax
mov    %eax,-0x4(%rbp)
cmp    $0xb,%eax
jle    1133 <number_door+0x23>
jmp    1118 <number_door+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_door>:
push   %rax
xor    %eax,%eax
call   1030 <number_mm@plt>
and    $0x7,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @number_door() {
%1 = alloca i32
br label %2
2: ; preds = %6, %0
%3 = call i32 (...) @number_mm()
%4 = and i32 %3, 7
store i32 %4, i32* %1
%5 = icmp sgt i32 %4, 11
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @number_door() {
%1 = tail call i32 (...) @number_mm()
%2 = and i32 %1, 7
ret i32 %2
}
/* Variables and functions */
scalar_t__ uri_alphanum(int);
scalar_t__ uri_mark(int);
int uri_unreserved(int c) { return (uri_alphanum(c) || uri_mark(c)); }


x86 assembly (clang, -O0):
<uri_unreserved>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <uri_alphanum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <uri_unreserved+0x37>
mov    -0x4(%rbp),%edi
call   1040 <uri_mark@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uri_unreserved>:
push   %rbx
mov    %edi,%ebx
call   1030 <uri_alphanum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <uri_unreserved+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <uri_mark@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @uri_unreserved(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @uri_alphanum(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @uri_mark(i32 %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @uri_unreserved(i32 %0) {
%2 = tail call i64 @uri_alphanum(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @uri_mark(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
unsigned int f68(unsigned int x, int y __attribute__((unused))) {
  return (x << ((-1) & (8 * 4 - 1))) + (x >> 1);
}


x86 assembly (clang, -O0):
<f68>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1f,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f68>:
mov    %edi,%eax
ror    %eax
ret

LLVM IR (-O0):
define i32 @f68(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 = shl i32 %5, 31
%7 = load i32, i32* %3
%8 = lshr i32 %7, 1
%9 = add i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f68(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 31)
ret i32 %3
}
/* Variables and functions */
scalar_t__ IsEol(char const *);
int /*<<< orphan*/ g_assert(char const *);
extern int IsLineEmpty(const char *pLine) {
  g_assert(pLine);
  return IsEol(pLine) || *pLine == '\0';
}


x86 assembly (clang, -O0):
<IsLineEmpty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <g_assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <IsEol@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1160 <IsLineEmpty+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsLineEmpty>:
push   %rbx
mov    %rdi,%rbx
call   1040 <g_assert@plt>
mov    %rbx,%rdi
call   1030 <IsEol@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1140 <IsLineEmpty+0x20>
pop    %rbx
ret
xor    %eax,%eax
cmpb   $0x0,(%rbx)
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @IsLineEmpty(i8* %0) {
%2 = tail call i32 @g_assert(i8* %0)
%3 = tail call i64 @IsEol(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8, i8* %0
%7 = icmp eq i8 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ 1, %1 ], [ %8, %5 ]
ret i32 %10
}
page27() {}


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

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

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

LLVM IR (-O2):
define i32 @page27() {
ret i32 undef
}
void MirrorRow_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @MirrorRow_AVX2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ Machine_Check(int, char *);
int32_t get_byte(int32_t id, int32_t addr) {
  Machine_Check(0x00000008 | 0x00000002, "timer registers are word wide");
  return 0;
}


x86 assembly (clang, -O0):
<get_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xa,%edi
lea    0xed6(%rip),%rsi
call   1030 <Machine_Check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_byte>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0xa,%edi
call   1030 <Machine_Check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"timer registers are word wide\00"
define i32 @get_byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"timer registers are word wide\00"
define i32 @get_byte(i32 %0, i32 %1) {
%3 = tail call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int android_showOpenglesWindow(void *window, int x, int y, int width,
                               int height, float rotation) {
  return -1;
}


x86 assembly (clang, -O0):
<android_showOpenglesWindow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @android_showOpenglesWindow(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, float %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca float
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store float %5, float* %12
ret i32 -1
}

LLVM IR (-O2):
define i32 @android_showOpenglesWindow(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, float %5) {
ret i32 -1
}
int validate(float pH) {
  if ((pH < 1) || (pH > 14)) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<validate>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
ja     1131 <validate+0x31>
movss  -0x8(%rbp),%xmm0
movss  0xedc(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    113d <validate+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1144 <validate+0x44>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate>:
movss  0xef8(%rip),%xmm1
ucomiss %xmm0,%xmm1
setbe  %al
ucomiss 0xeef(%rip),%xmm0
setbe  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @validate(float %0) {
%2 = alloca i32
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 1.000000e+00
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load float, float* %3
%8 = fcmp ogt float %7, 1.400000e+01
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 0, i32* %2
br label %11
10: ; preds = %6
store i32 1, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @validate(float %0) {
%2 = fcmp uge float %0, 1.000000e+00
%3 = fcmp ule float %0, 1.400000e+01
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int BTIC4B_Pred_HalfAvg(int a, int b, int c) {
  return ((3 * a + 3 * b + 2 * c) >> 3);
}


x86 assembly (clang, -O0):
<BTIC4B_Pred_HalfAvg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
imul   $0x3,-0x4(%rbp),%eax
imul   $0x3,-0x8(%rbp),%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
sar    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTIC4B_Pred_HalfAvg>:
add    %esi,%edi
lea    (%rdi,%rdi,2),%eax
lea    (%rax,%rdx,2),%eax
sar    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @BTIC4B_Pred_HalfAvg(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %1, %0
%5 = mul i32 %4, 3
%6 = shl nsw i32 %2, 1
%7 = add nsw i32 %5, %6
%8 = ashr i32 %7, 3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  printf("Example Program Running...\n");
  int i = 0;
  for (i = 0; i < 200000; i++) {
    i += 1;
  }
  for (i = 0; i < 120; i++) {
    sleep(1);
  }
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x30d40,-0x14(%rbp)
jge    1174 <main+0x54>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1150 <main+0x30>
movl   $0x0,-0x14(%rbp)
cmpl   $0x78,-0x14(%rbp)
jge    119d <main+0x7d>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    117b <main+0x5b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x78,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%edi
call   1040 <sleep@plt>
add    $0xffffffff,%ebx
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Example Program Running...\0A\00"
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
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
store i32 0, i32* %6
br label %8
8: ; preds = %14, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 200000
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %6
%13 = add nsw i32 %12, 1
store i32 %13, i32* %6
br label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
store i32 %16, i32* %6
br label %8
17: ; preds = %8
store i32 0, i32* %6
br label %18
18: ; preds = %23, %17
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 120
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = call i32 @sleep(i32 1)
br label %23
23: ; preds = %21
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %18
26: ; preds = %18
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Example Program Running...\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @sleep(i32 1)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, 120
br i1 %8, label %9, label %4
9: ; preds = %4
ret i32 0
}
int GprsSignalToRssi(int signal) {
  if ((signal < 4) || (signal >= 99))
    return 0;
  else if (signal < 10)
    return 1;
  else if (signal < 16)
    return 2;
  else if (signal < 22)
    return 3;
  else if (signal < 28)
    return 4;
  else
    return 5;
}


x86 assembly (clang, -O0):
<GprsSignalToRssi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jl     111b <GprsSignalToRssi+0x1b>
cmpl   $0x63,-0x8(%rbp)
jl     1127 <GprsSignalToRssi+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1186 <GprsSignalToRssi+0x86>
cmpl   $0xa,-0x8(%rbp)
jge    113d <GprsSignalToRssi+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1186 <GprsSignalToRssi+0x86>
cmpl   $0x10,-0x8(%rbp)
jge    1153 <GprsSignalToRssi+0x53>
movl   $0x2,-0x4(%rbp)
jmp    1186 <GprsSignalToRssi+0x86>
cmpl   $0x16,-0x8(%rbp)
jge    1169 <GprsSignalToRssi+0x69>
movl   $0x3,-0x4(%rbp)
jmp    1186 <GprsSignalToRssi+0x86>
cmpl   $0x1c,-0x8(%rbp)
jge    117f <GprsSignalToRssi+0x7f>
movl   $0x4,-0x4(%rbp)
jmp    1186 <GprsSignalToRssi+0x86>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GprsSignalToRssi>:
lea    -0x63(%rdi),%ecx
xor    %eax,%eax
cmp    $0xffffffa1,%ecx
jb     1133 <GprsSignalToRssi+0x33>
mov    $0x1,%eax
cmp    $0xa,%edi
jb     1133 <GprsSignalToRssi+0x33>
mov    $0x2,%eax
cmp    $0x10,%edi
jb     1133 <GprsSignalToRssi+0x33>
mov    $0x3,%eax
cmp    $0x16,%edi
jb     1133 <GprsSignalToRssi+0x33>
cmp    $0x1c,%edi
mov    $0x5,%eax
sbb    $0x0,%eax
ret

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

LLVM IR (-O2):
define i32 @GprsSignalToRssi(i32 %0) {
%2 = add i32 %0, -99
%3 = icmp ult i32 %2, -95
br i1 %3, label %13, label %4
4: ; preds = %1
%5 = icmp ult i32 %0, 10
br i1 %5, label %13, label %6
6: ; preds = %4
%7 = icmp ult i32 %0, 16
br i1 %7, label %13, label %8
8: ; preds = %6
%9 = icmp ult i32 %0, 22
br i1 %9, label %13, label %10
10: ; preds = %8
%11 = icmp ult i32 %0, 28
%12 = select i1 %11, i32 4, i32 5
br label %13
13: ; preds = %10, %8, %6, %4, %1
%14 = phi i32 [ 0, %1 ], [ 1, %4 ], [ 2, %6 ], [ 3, %8 ], [ %12, %10 ]
ret i32 %14
}
void gdk_draw_segments() {}


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

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

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

LLVM IR (-O2):
define void @gdk_draw_segments() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void do_exit(int rc) { exit(rc); }


x86 assembly (clang, -O0):
<do_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<do_exit>:
push   %rax
call   1030 <exit@plt>

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

LLVM IR (-O2):
define void @do_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
void cs_register_messenger(cs_messenger) { return; }


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

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

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

LLVM IR (-O2):
define void @cs_register_messenger(i32 %0) {
ret void
}