xunge/DecIR huggingface dataset:
/* Variables and functions */
float brrand();
float tan(float);
float cauchy() {
  float alpha = .00628338;
  float pi = 3.1415927;
  float output;
  float randnum;
  output = -1.0;
  while ((output < 0.0) && (output > 1.0)) {
    randnum = brrand();
    randnum *= pi;
    output = (alpha * tan(randnum)) + 0.5;
  }
  return (output);
}


x86 assembly (clang, -O0):
<cauchy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  0xed8(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xec7(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeb6(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xor    %eax,%eax
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jbe    1185 <cauchy+0x65>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe95(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1195 <cauchy+0x75>
jmp    11ee <cauchy+0xce>
mov    $0x0,%al
call   1040 <brrand@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
call   1030 <tan@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe3c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    114f <cauchy+0x2f>
movss  -0xc(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cauchy>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @cauchy() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float 0x3F79BC9A00000000, float* %1
store float 0x400921FB60000000, float* %2
store float -1.000000e+00, float* %3
br label %5
5: ; preds = %15, %0
%6 = load float, float* %3
%7 = fpext float %6 to double
%8 = fcmp olt double %7, 0.000000e+00
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fcmp ogt double %11, 1.000000e+00
br label %13
13: ; preds = %9, %5
%14 = phi i1 [ false, %5 ], [ %12, %9 ]
br i1 %14, label %15, label %27
15: ; preds = %13
%16 = call float (...) @brrand()
store float %16, float* %4
%17 = load float, float* %2
%18 = load float, float* %4
%19 = fmul float %18, %17
store float %19, float* %4
%20 = load float, float* %1
%21 = load float, float* %4
%22 = call float @tan(float %21)
%23 = fmul float %20, %22
%24 = fpext float %23 to double
%25 = fadd double %24, 5.000000e-01
%26 = fptrunc double %25 to float
store float %26, float* %3
br label %5
27: ; preds = %13
%28 = load float, float* %3
ret float %28
}

LLVM IR (-O2):
define float @cauchy() {
ret float -1.000000e+00
}
int searchIndex(int argc, char *argv[], char c) {
  int i;
  for (i = 0; i < argc; i++) {
    if (c == argv[i][0]) {
      return i;
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<searchIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115c <searchIndex+0x5c>
movsbl -0x11(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
mov    (%rcx,%rdx,8),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1149 <searchIndex+0x49>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <searchIndex+0x63>
jmp    114e <searchIndex+0x4e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1117 <searchIndex+0x17>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<searchIndex>:
mov    $0xffffffff,%eax
test   %edi,%edi
jle    1121 <searchIndex+0x21>
mov    %edi,%r8d
xor    %ecx,%ecx
xchg   %ax,%ax
mov    (%rsi,%rcx,8),%rdi
cmp    %dl,(%rdi)
je     1122 <searchIndex+0x22>
add    $0x1,%rcx
cmp    %rcx,%r8
jne    1110 <searchIndex+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @searchIndex(i32 %0, i8** nocapture %1, i8 signext %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = zext i32 %0 to i64
br label %7
7: ; preds = %5, %13
%8 = phi i64 [ 0, %5 ], [ %14, %13 ]
%9 = getelementptr inbounds i8*, i8** %1, i64 %8
%10 = load i8*, i8** %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, %2
br i1 %12, label %16, label %13
13: ; preds = %7
%14 = add nuw nsw i64 %8, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %18, label %7
16: ; preds = %7
%17 = trunc i64 %8 to i32
br label %18
18: ; preds = %13, %16, %3
%19 = phi i32 [ -1, %3 ], [ %17, %16 ], [ -1, %13 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hej(void) { printf("Hej ! ty mogalski wojowniku !\n"); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"Hej ! ty mogalski wojowniku !\0A\00"
define void @hej() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [30 x i8] c"Hej ! ty mogalski wojowniku !\00"
define void @hej() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned long long maximo(unsigned long long num1, unsigned long long num2) {
  if (num1 > num2) {
    return num1;
  } else {
    return num2;
  }
}


x86 assembly (clang, -O0):
<maximo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1127 <maximo+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <maximo+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximo>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @maximo(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp ugt i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i64, i64* %4
store i64 %10, i64* %3
br label %13
11: ; preds = %2
%12 = load i64, i64* %5
store i64 %12, i64* %3
br label %13
13: ; preds = %11, %9
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @maximo(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
int vectors_are_equal(double *A, double *B, int vlen) {
  int i;
  for (i = 0; i < vlen; i++) {
    if (A[i] != B[i])
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<vectors_are_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    116c <vectors_are_equal+0x6c>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    114d <vectors_are_equal+0x4d>
jp     114d <vectors_are_equal+0x4d>
jmp    1159 <vectors_are_equal+0x59>
movl   $0x0,-0x4(%rbp)
jmp    1173 <vectors_are_equal+0x73>
jmp    115e <vectors_are_equal+0x5e>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <vectors_are_equal+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectors_are_equal>:
mov    $0x1,%eax
test   %edx,%edx
jle    1127 <vectors_are_equal+0x27>
mov    %edx,%ecx
xor    %edx,%edx
nopl   (%rax)
movsd  (%rdi,%rdx,8),%xmm0
ucomisd (%rsi,%rdx,8),%xmm0
jne    1128 <vectors_are_equal+0x28>
jp     1128 <vectors_are_equal+0x28>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <vectors_are_equal+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @vectors_are_equal(double* nocapture %0, double* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds double, double* %0, i64 %10
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 %10
%14 = load double, double* %13
%15 = fcmp une double %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %17, label %7
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ output(char *);
void printCPUWaitInfo(const char *cmd) {
  (void)cmd;
  output("CPU Wait Load\t0\t100\t%%\n");
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"CPU Wait Load\090\09100\09%%\0A\00"
define void @printCPUWaitInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"CPU Wait Load\090\09100\09%%\0A\00"
define void @printCPUWaitInfo(i8* nocapture readnone %0) {
%2 = tail call i32 @output(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int main(int argc, char **argv) {
  setuid(0);
  execvp("ping", argv);
  perror("What, no ping?");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1060 <setuid@plt>
mov    -0x10(%rbp),%rsi
lea    0xe98(%rip),%rdi
call   1040 <execvp@plt>
lea    0xe91(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
xor    %edi,%edi
call   1060 <setuid@plt>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
call   1040 <execvp@plt>
lea    0xea4(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ping\00"
@.str.1 = [15 x i8] c"What, no ping?\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @setuid(i32 0)
%7 = load i8**, i8*** %5
%8 = call i32 @execvp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %7)
%9 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [5 x i8] c"ping\00"
@.str.1 = [15 x i8] c"What, no ping?\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @setuid(i32 0)
%4 = tail call i32 @execvp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1)
%5 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
char *strcpy(char *dest, const char *src) {
  while (*src)
    *dest++ = *src++;
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1140 <strcpy+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110c <strcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1121 <strcpy+0x21>
add    $0x1,%rsi
nopl   (%rax)
mov    %cl,(%rax)
add    $0x1,%rax
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <strcpy+0x10>
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
%12 = load i8, i8* %10
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
store i8 %12, i8* %13
br label %5
15: ; preds = %5
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @strcpy(i8* writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %10, %5 ]
ret i8* %14
}
int f5() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @f5() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void usage() {
  fputs("\nubuntupaste -t <syntax-type> -p <path-of-your-file>\n\n-s - To Get "
        "help about Syntax Type List \n-u - Usage \n-a - About Plugin & "
        "Author\n\n",
        stdout);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [136 x i8] c"\0Aubuntupaste -t <syntax-type> -p <path-of-your-file>\0A\0A-s - To Get help about Syntax Type List \0A-u - Usage \0A-a - About Plugin & Author\0A\0A\00"
@stdout = global i32 0
define void @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [136 x i8] c"\0Aubuntupaste -t <syntax-type> -p <path-of-your-file>\0A\0A-s - To Get help about Syntax Type List \0A-u - Usage \0A-a - About Plugin & Author\0A\0A\00"
@stdout = global i32 0
define void @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ myscheduler_context_switch();
void myscheduler_quantum_ended(int signal) { myscheduler_context_switch(); }


x86 assembly (clang, -O0):
<myscheduler_quantum_ended>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <myscheduler_context_switch@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @myscheduler_quantum_ended(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @myscheduler_context_switch()
ret void
}

LLVM IR (-O2):
define void @myscheduler_quantum_ended(i32 %0) {
%2 = tail call i32 (...) @myscheduler_context_switch()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int readl(int /*<<< orphan*/);
int icodec_mapped_test_bits(uint32_t xreg, int xmask, int xval) {
  int val = readl(xreg);
  val &= xmask;
  return (val == xval);
}


x86 assembly (clang, -O0):
<icodec_mapped_test_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <readl@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icodec_mapped_test_bits>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1030 <readl@plt>
and    %ebp,%eax
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @icodec_mapped_test_bits(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @readl(i32 %8)
store i32 %9, i32* %7
%10 = load i32, i32* %5
%11 = load i32, i32* %7
%12 = and i32 %11, %10
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %6
%15 = icmp eq i32 %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @icodec_mapped_test_bits(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @readl(i32 %0)
%5 = and i32 %4, %1
%6 = icmp eq i32 %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
__attribute__((no_sanitize("implicit-integer-truncation"))) signed char
unsigned_int_to_signed_char__no_truncation_sanitizer(unsigned int src) {
  return src;
}


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

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

LLVM IR (-O0):
define signext i8 @unsigned_int_to_signed_char__no_truncation_sanitizer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @unsigned_int_to_signed_char__no_truncation_sanitizer(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
unsigned ixp23xx_cpp_boot(void) {
  return (*((volatile unsigned long *)(0xfffc0000 + (0x20))) & (1 << 4));
}


x86 assembly (clang, -O0):
<ixp23xx_cpp_boot>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffc0020,%eax
mov    (%rax),%rax
and    $0x10,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ixp23xx_cpp_boot>:
mov    $0xfffc0020,%eax
mov    (%rax),%rax
and    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @ixp23xx_cpp_boot() {
%1 = load volatile i64, i64* inttoptr (i64 4294705184 to i64*)
%2 = and i64 %1, 16
%3 = trunc i64 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @ixp23xx_cpp_boot() {
%1 = load volatile i64, i64* inttoptr (i64 4294705184 to i64*)
%2 = trunc i64 %1 to i32
%3 = and i32 %2, 16
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int BUFSIZ;
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ process_line(char *);
void process_file(FILE *fp) {
  char line[BUFSIZ];
  while (fgets(line, BUFSIZ, fp))
    process_line(line);
}


x86 assembly (clang, -O0):
<process_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rdi
mov    0x2e7d(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
call   1030 <fgets@plt>
cmp    $0x0,%rax
je     1186 <process_file+0x66>
mov    -0x20(%rbp),%rdi
call   1040 <process_line@plt>
jmp    1158 <process_file+0x38>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_file>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    0x2eac(%rip),%r15
mov    (%r15),%esi
mov    %rsp,%rbx
mov    %rsi,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
xchg   %ax,%ax
mov    %r14,%rdx
call   1030 <fgets@plt>
test   %rax,%rax
je     116d <process_file+0x4d>
mov    %rbx,%rdi
call   1040 <process_line@plt>
mov    (%r15),%esi
mov    %rbx,%rdi
jmp    1150 <process_file+0x30>
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
define void @process_file(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32, i32* @BUFSIZ
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
store i8* %7, i8** %3
%8 = alloca i8, i64 %6
store i64 %6, i64* %4
br label %9
9: ; preds = %14, %1
%10 = load i32, i32* @BUFSIZ
%11 = load i32*, i32** %2
%12 = call i64 @fgets(i8* %8, i32 %10, i32* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = call i32 @process_line(i8* %8)
br label %9
16: ; preds = %9
%17 = load i8*, i8** %3
ret void
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
define void @process_file(i32* nocapture %0) {
%2 = load i32, i32* @BUFSIZ
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = call i64 @fgets(i8* %4, i32 %2, i32* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1, %7
%8 = call i32 @process_line(i8* %4)
%9 = load i32, i32* @BUFSIZ
%10 = call i64 @fgets(i8* %4, i32 %9, i32* %0)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %1
ret void
}
struct servent *getservbyname(const char *name, const char *proto) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<getservbyname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
lea    0xed7(%rip),%rsi
lea    0xee2(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1137 <getservbyname+0x27>

x86 assembly (clang, -O2):
<getservbyname>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <getservbyname+0x20>

LLVM IR (-O0):
%struct.servent = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.getservbyname = [14 x i8] c"getservbyname\00"
define %struct.servent* @getservbyname(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.getservbyname, i64 0, i64 0))
br label %6
6: ; preds = %2, %6
br label %6
}

LLVM IR (-O2):
%struct.servent = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.getservbyname = [14 x i8] c"getservbyname\00"
define %struct.servent* @getservbyname(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__FUNCTION__.getservbyname, i64 0, i64 0))
br label %4
4: ; preds = %2, %4
br label %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
FILE *Fopen(const char *p, const char *m) {
  FILE *F = fopen(p, m);
  if (F == NULL) {
    fprintf(stderr, "[x] Error opening: %s (mode %s). Does it exists?\n", p, m);
    exit(1);
  }
  return F;
}


x86 assembly (clang, -O0):
<Fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1183 <Fopen+0x53>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe8c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fopen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     114c <Fopen+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"[x] Error opening: %s (mode %s). Does it exists?\0A\00"
define i32* @Fopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
%18 = load i32*, i32** %5
ret i32* %18
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"[x] Error opening: %s (mode %s). Does it exists?\0A\00"
define noalias i32* @Fopen(i8* %0, i8* %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void batadc_reset() {
  mbus_remote_register_write(0x6, 0x3B,
                             ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) |
                              (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7) |
                              (1 << 8) | (1 << 9) | (1 << 10) | (0 << 11) |
                              (0 << 12) | (0 << 13) | (1 << 14) | (1 << 15) |
                              (1 << 16) | (1 << 17) | (1 << 18) | (1 << 19)));
  delay(100);
}


x86 assembly (clang, -O0):
<batadc_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x3b,%esi
mov    $0xfc7ff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<batadc_reset>:
push   %rax
mov    $0x6,%edi
mov    $0x3b,%esi
mov    $0xfc7ff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @batadc_reset() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 59, i32 1034239)
%2 = call i32 @delay(i32 100)
ret void
}

LLVM IR (-O2):
define void @batadc_reset() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 59, i32 1034239)
%2 = tail call i32 @delay(i32 100)
ret void
}
/* Variables and functions */
int do_work(int, char **);
int st_do_work(int a, char **b) { return do_work(a, b); }


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

x86 assembly (clang, -O2):
<st_do_work>:
jmp    1030 <do_work@plt>

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

LLVM IR (-O2):
define i32 @st_do_work(i32 %0, i8** %1) {
%3 = tail call i32 @do_work(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int mkstemp(char *);
__attribute__((__weak__, __always___)) int
softboundcets_mkstemp(char *template) {
  return mkstemp(template);
}


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

x86 assembly (clang, -O2):
<softboundcets_mkstemp>:
jmp    1030 <mkstemp@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_mkstemp(i8* %0) {
%2 = tail call i32 @mkstemp(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(
      stderr, "usage: %s %s\n", getprogname(),
      "[-abdp] [-F bit] [-f bit] [-k key] [-m bit] [-o bit] [-v vector]");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea8(%rip),%rsi
lea    0xeaf(%rip),%rcx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb8(%rip),%rsi
lea    0xebf(%rip),%rcx
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"usage: %s %s\0A\00"
@.str.1 = [65 x i8] c"[-abdp] [-F bit] [-f bit] [-k key] [-m bit] [-o bit] [-v vector]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"usage: %s %s\0A\00"
@.str.1 = [65 x i8] c"[-abdp] [-F bit] [-f bit] [-k key] [-m bit] [-o bit] [-v vector]\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
double DaylightSavingTA(double t) { return 0; }


x86 assembly (clang, -O0):
<DaylightSavingTA>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<DaylightSavingTA>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @DaylightSavingTA(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @DaylightSavingTA(double %0) {
ret double 0.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
extern int pcoprocClose(FILE *fp) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @pcoprocClose(i32* nocapture readnone %0) {
ret i32 1
}
XQueryKeymap() {}


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

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

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

LLVM IR (-O2):
define i32 @XQueryKeymap() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void banner(void) {
  printf("\n1234 1.0 BY CAMELEON G.\n");
  printf("reprise de came.c and ssping.c\n\n");
}


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

x86 assembly (clang, -O2):
<banner>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef5(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"\0A1234 1.0 BY CAMELEON G.\0A\00"
@.str.1 = [33 x i8] c"reprise de came.c and ssping.c\0A\0A\00"
define void @banner() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"\0A1234 1.0 BY CAMELEON G.\00"
@str.2 = [32 x i8] c"reprise de came.c and ssping.c\0A\00"
define void @banner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execle(char *, char *, char *, char *, char *);
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int main() {
  setuid(0);
  execle("/bin/bash", "bash", "/Users/jcuzella/bin/kill_misbehaving_mcafee.sh",
         (char *)NULL, (char *)NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xece(%rip),%rdi
lea    0xecc(%rip),%rsi
lea    0xeca(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rcx
call   1030 <execle@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <setuid@plt>
lea    0xed1(%rip),%rdi
lea    0xecf(%rip),%rsi
lea    0xecd(%rip),%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <execle@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/bash\00"
@.str.1 = [5 x i8] c"bash\00"
@.str.2 = [47 x i8] c"/Users/jcuzella/bin/kill_misbehaving_mcafee.sh\00"
define i32 @main() {
%1 = call i32 @setuid(i32 0)
%2 = call i32 @execle(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i8* null, i8* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/bash\00"
@.str.1 = [5 x i8] c"bash\00"
@.str.2 = [47 x i8] c"/Users/jcuzella/bin/kill_misbehaving_mcafee.sh\00"
define i32 @main() {
%1 = tail call i32 @setuid(i32 0)
%2 = tail call i32 @execle(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i8* null, i8* null)
ret i32 0
}
/* Variables and functions */
short SPI_get(int);
void MRF24J40_error(void) {
  short error;
  error = SPI_get(0xFF);
}


x86 assembly (clang, -O0):
<MRF24J40_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xff,%edi
call   1030 <SPI_get@plt>
mov    %ax,-0x2(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MRF24J40_error>:
mov    $0xff,%edi
jmp    1030 <SPI_get@plt>

LLVM IR (-O0):
define void @MRF24J40_error() {
%1 = alloca i16
%2 = call signext i16 @SPI_get(i32 255)
store i16 %2, i16* %1
ret void
}

LLVM IR (-O2):
define void @MRF24J40_error() {
%1 = tail call signext i16 @SPI_get(i32 255)
ret void
}
void array() {
  int i;
  int j[i];
}


x86 assembly (clang, -O0):
<array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @array() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
%4 = load i32, i32* %1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
store i8* %6, i8** %2
%7 = alloca i32, i64 %5
store i64 %5, i64* %3
%8 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
define void @array() {
ret void
}
int ispunct(int c) {
  return ((c >= 0x21 && c <= 0x2F) || (c >= 0x3A && c <= 0x40) ||
          (c >= 0x5B && c <= 0x60) || (c >= 0x7B && c <= 0x7E));
}


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x21,-0x4(%rbp)
jl     1120 <ispunct+0x20>
mov    $0x1,%al
cmpl   $0x2f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1171 <ispunct+0x71>
cmpl   $0x3a,-0x4(%rbp)
jl     1139 <ispunct+0x39>
mov    $0x1,%al
cmpl   $0x40,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1171 <ispunct+0x71>
cmpl   $0x5b,-0x4(%rbp)
jl     1152 <ispunct+0x52>
mov    $0x1,%al
cmpl   $0x60,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1171 <ispunct+0x71>
xor    %eax,%eax
cmpl   $0x7b,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     116b <ispunct+0x6b>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
movd   %edi,%xmm0
pshufd $0x0,%xmm0,%xmm0
paddd  0xeef(%rip),%xmm0
pxor   0xef7(%rip),%xmm0
movdqa 0xeff(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
movmskps %xmm1,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 33
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 47
br i1 %7, label %28, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 58
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 64
br i1 %13, label %28, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 91
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 96
br i1 %19, label %28, label %20
20: ; preds = %17, %14
%21 = load i32, i32* %2
%22 = icmp sge i32 %21, 123
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 126
br label %26
26: ; preds = %23, %20
%27 = phi i1 [ false, %20 ], [ %25, %23 ]
br label %28
28: ; preds = %26, %17, %11, %5
%29 = phi i1 [ true, %17 ], [ true, %11 ], [ true, %5 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = insertelement <4 x i32> poison, i32 %0, i64 0
%3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> zeroinitializer
%4 = add <4 x i32> %3, <i32 -123, i32 -91, i32 -33, i32 -58>
%5 = icmp ult <4 x i32> %4, <i32 4, i32 6, i32 15, i32 7>
%6 = bitcast <4 x i1> %5 to i4
%7 = icmp ne i4 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Say(char *, int);
void talk(void) { Say("A lovely scroll.", 1); }


x86 assembly (clang, -O0):
<talk>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <Say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <Say@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"A lovely scroll.\00"
define void @talk() {
%1 = call i32 @Say(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"A lovely scroll.\00"
define void @talk() {
%1 = tail call i32 @Say(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Bytes(int);
int /*<<< orphan*/ DwReconnect();
int /*<<< orphan*/ DwSend(int /*<<< orphan*/);
int /*<<< orphan*/ DwSync();
void DwReset(void) {
  DwSend(Bytes(0x07));
  DwSync();
  DwReconnect();
}


x86 assembly (clang, -O0):
<DwReset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1050 <Bytes@plt>
mov    %eax,%edi
call   1040 <DwSend@plt>
mov    $0x0,%al
call   1060 <DwSync@plt>
mov    $0x0,%al
call   1030 <DwReconnect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DwReset>:
push   %rax
mov    $0x7,%edi
call   1050 <Bytes@plt>
mov    %eax,%edi
call   1040 <DwSend@plt>
xor    %eax,%eax
call   1060 <DwSync@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <DwReconnect@plt>

LLVM IR (-O0):
define void @DwReset() {
%1 = call i32 @Bytes(i32 7)
%2 = call i32 @DwSend(i32 %1)
%3 = call i32 (...) @DwSync()
%4 = call i32 (...) @DwReconnect()
ret void
}

LLVM IR (-O2):
define void @DwReset() {
%1 = tail call i32 @Bytes(i32 7)
%2 = tail call i32 @DwSend(i32 %1)
%3 = tail call i32 (...) @DwSync()
%4 = tail call i32 (...) @DwReconnect()
ret void
}
void av_opt_eval_float() {}


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

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

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

LLVM IR (-O2):
define void @av_opt_eval_float() {
ret void
}
int noop(int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @noop(i32 returned %0) {
ret i32 %0
}
int d1eq(void *key1, void *key2) { return *(double *)key1 == *(double *)key2; }


x86 assembly (clang, -O0):
<d1eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d1eq>:
movsd  (%rsi),%xmm0
cmpeqsd (%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @d1eq(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 = bitcast i8* %5 to double*
%7 = load double, double* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
%11 = fcmp oeq double %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @d1eq(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp oeq double %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Linux() { printf("This is a Linux build.\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"This is a Linux build.\0A\00"
define void @Linux() {
%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"This is a Linux build.\00"
define void @Linux() {
%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*/ test_uri_cmp();
int /*<<< orphan*/ test_uri_parser();
void test_uri() {
  test_uri_parser();
  test_uri_cmp();
}


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

x86 assembly (clang, -O2):
<test_uri>:
push   %rax
xor    %eax,%eax
call   1030 <test_uri_parser@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_uri_cmp@plt>

LLVM IR (-O0):
define void @test_uri() {
%1 = call i32 (...) @test_uri_parser()
%2 = call i32 (...) @test_uri_cmp()
ret void
}

LLVM IR (-O2):
define void @test_uri() {
%1 = tail call i32 (...) @test_uri_parser()
%2 = tail call i32 (...) @test_uri_cmp()
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int AMCStrComp(const char *str1, const char *str2) {
  return strcmp(str1, str2);
}


x86 assembly (clang, -O0):
<AMCStrComp>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AMCStrComp>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @AMCStrComp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
int do_460() { return 460; }


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

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

LLVM IR (-O0):
define i32 @do_460() {
ret i32 460
}

LLVM IR (-O2):
define i32 @do_460() {
ret i32 460
}
void __clear_bit(int nr, volatile unsigned long *addr) {
  __asm__ __volatile__("btrl %1,%0" : "=m"(addr) : "Ir"(nr));
}


x86 assembly (clang, -O0):
<__clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
btr    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__clear_bit>:
mov    %rsi,-0x8(%rsp)
btr    %edi,-0x8(%rsp)
ret

LLVM IR (-O0):
define void @__clear_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
ret void
}

LLVM IR (-O2):
define void @__clear_bit(i32 %0, i64* %1) {
%3 = alloca i64*
store i64* %1, i64** %3
ret void
}