xunge/DecIR huggingface dataset:
/* Variables and functions */
char *getenv(char *);
scalar_t__ getuid();
int /*<<< orphan*/ pl_setup_user_ns();
void pl_unshare_user() {
  char *env = getenv("PLASH_NO_UNSHARE");
  if (env && env[0] != '\0')
    return;
  if (getuid())
    pl_setup_user_ns();
}


x86 assembly (clang, -O0):
<pl_unshare_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1168 <pl_unshare_user+0x38>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1168 <pl_unshare_user+0x38>
jmp    1180 <pl_unshare_user+0x50>
mov    $0x0,%al
call   1050 <getuid@plt>
cmp    $0x0,%rax
je     1180 <pl_unshare_user+0x50>
mov    $0x0,%al
call   1030 <pl_setup_user_ns@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_unshare_user>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <getenv@plt>
test   %rax,%rax
je     1147 <pl_unshare_user+0x17>
cmpb   $0x0,(%rax)
jne    115b <pl_unshare_user+0x2b>
xor    %eax,%eax
call   1050 <getuid@plt>
test   %rax,%rax
je     115b <pl_unshare_user+0x2b>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pl_setup_user_ns@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"PLASH_NO_UNSHARE\00"
define void @pl_unshare_user() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %5
br label %17
12: ; preds = %5, %0
%13 = call i64 (...) @getuid()
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (...) @pl_setup_user_ns()
br label %17
17: ; preds = %11, %15, %12
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"PLASH_NO_UNSHARE\00"
define void @pl_unshare_user() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %3, %0
%7 = tail call i64 (...) @getuid()
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 (...) @pl_setup_user_ns()
br label %11
11: ; preds = %6, %9, %3
ret void
}
/* Variables and functions */
float sqrtf(float);
float circular_ease_out(float p) { return sqrtf((2.0f - p) * p); }


x86 assembly (clang, -O0):
<circular_ease_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circular_ease_out>:
movaps %xmm0,%xmm1
movss  0xee5(%rip),%xmm0
subss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1130 <circular_ease_out+0x20>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @circular_ease_out(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float 2.000000e+00, %3
%5 = load float, float* %2
%6 = fmul float %4, %5
%7 = call float @sqrtf(float %6)
ret float %7
}

LLVM IR (-O2):
define float @circular_ease_out(float %0) {
%2 = fsub float 2.000000e+00, %0
%3 = fmul float %2, %0
%4 = tail call float @sqrtf(float %3)
ret float %4
}
int compare(const void *aIn, const void *bIn) {
  float a = *((float *)aIn);
  float b = *((float *)bIn);
  if (a < b)
    return -1;
  else if (a > b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm1
movss  -0x20(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1145 <compare+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <compare+0x6c>
movss  -0x1c(%rbp),%xmm0
ucomiss -0x20(%rbp),%xmm0
jbe    1160 <compare+0x60>
movl   $0x1,-0x4(%rbp)
jmp    116c <compare+0x6c>
jmp    1165 <compare+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fcmp olt float %4, %6
%8 = fcmp ogt float %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ f1();
int /*<<< orphan*/ f2();
int main(int argc, char *argv[]) {
  f1();
  f2();
#pragma omp taskwait
  return 0;
}


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)
mov    $0x0,%al
call   1040 <f1@plt>
mov    $0x0,%al
call   1030 <f2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @f1()
%4 = tail call i32 (...) @f2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello RT-Thread!\n");
  return 0;
}


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)
lea    0xed3(%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 = [18 x i8] c"Hello RT-Thread!\0A\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 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"Hello RT-Thread!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
#pragma omp parallel
  {
    int ID = omp_get_thread_num();
    printf("Hello(%d)", ID);
    printf(" world(%d)\n", ID);
  }
  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)
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebx
lea    0xecf(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xecb(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Hello(%d)\00"
@.str.1 = [12 x i8] c" world(%d)\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 (...) @omp_get_thread_num()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Hello(%d)\00"
@.str.1 = [12 x i8] c" world(%d)\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @omp_get_thread_num()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ system(char *);
int main() {
  puts("Will execute sh with the following script :");
  puts(
      "#/bin/bash \necho \"hello\" \necho \"how are you\" \necho \"today\" \n");
  puts("Starting now:");
  system("git status");
  system("ls");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1d(%rip),%rdi
call   1040 <system@plt>
lea    0xf1c(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2b(%rip),%rdi
call   1040 <system@plt>
lea    0xf2a(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Will execute sh with the following script :\00"
@.str.1 = [61 x i8] c"#/bin/bash \0Aecho \22hello\22 \0Aecho \22how are you\22 \0Aecho \22today\22 \0A\00"
@.str.2 = [14 x i8] c"Starting now:\00"
@.str.3 = [11 x i8] c"git status\00"
@.str.4 = [3 x i8] c"ls\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @puts(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"Will execute sh with the following script :\00"
@.str.1 = [61 x i8] c"#/bin/bash \0Aecho \22hello\22 \0Aecho \22how are you\22 \0Aecho \22today\22 \0A\00"
@.str.2 = [14 x i8] c"Starting now:\00"
@.str.3 = [11 x i8] c"git status\00"
@.str.4 = [3 x i8] c"ls\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}
void f13(a15) register struct file *a15;
{}


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

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

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

LLVM IR (-O2):
%struct.file = type opaque
define void @f13(%struct.file* nocapture %0) {
ret void
}
int idiv(int x, int y) { return x / y; }


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

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

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

LLVM IR (-O2):
define i32 @idiv(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Type definitions */
struct p9_fid {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ p9l_fxattrget(struct p9_fid *, int /*<<< orphan*/ *, char *,
                                 size_t);
ssize_t p9l_fxattrlist(struct p9_fid *fid, char *buf, size_t count) {
  return p9l_fxattrget(fid, NULL, buf, count);
}


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

x86 assembly (clang, -O2):
<p9l_fxattrlist>:
mov    %rdx,%rcx
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <p9l_fxattrget@plt>

LLVM IR (-O0):
%struct.p9_fid = type { i32 }
define i32 @p9l_fxattrlist(%struct.p9_fid* %0, i8* %1, i64 %2) {
%4 = alloca %struct.p9_fid*
%5 = alloca i8*
%6 = alloca i64
store %struct.p9_fid* %0, %struct.p9_fid** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.p9_fid*, %struct.p9_fid** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @p9l_fxattrget(%struct.p9_fid* %7, i32* null, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.p9_fid = type { i32 }
define i32 @p9l_fxattrlist(%struct.p9_fid* %0, i8* %1, i64 %2) {
%4 = tail call i32 @p9l_fxattrget(%struct.p9_fid* %0, i32* null, i8* %1, i64 %2)
ret i32 %4
}
int test_imm_07uint16_reg(unsigned short val) {
  return ((val) & (-0x07 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_07uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xfffffff9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_07uint16_reg>:
test   $0xfff9,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_07uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -7
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int suma();
void main() {
  int r;
  r = suma();
  printf("%d\n", r);
  return;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <suma@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 (...) @suma()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf(
      "usage: tcprelay -l xx.xx.xx.xx:<port> -t xx.xx.xx.xx:<port> [-D]\n"
      "Repeat everything received in -l addr to -t addr and vice versa.\n"
      "  -l -- address and port at which to listen to\n"
      "  -t -- address and port where to connect to, when accepted\n"
      "        connection at -l address\n"
      "  -D -- run in foreground, outputting debug messages;\n"
      "        specify twice to also output raw communication between hosts\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [394 x i8] c"usage: tcprelay -l xx.xx.xx.xx:<port> -t xx.xx.xx.xx:<port> [-D]\0ARepeat everything received in -l addr to -t addr and vice versa.\0A -l -- address and port at which to listen to\0A -t -- address and port where to connect to, when accepted\0A connection at -l address\0A -D -- run in foreground, outputting debug messages;\0A specify twice to also output raw communication between hosts\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([394 x i8], [394 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [393 x i8] c"usage: tcprelay -l xx.xx.xx.xx:<port> -t xx.xx.xx.xx:<port> [-D]\0ARepeat everything received in -l addr to -t addr and vice versa.\0A -l -- address and port at which to listen to\0A -t -- address and port where to connect to, when accepted\0A connection at -l address\0A -D -- run in foreground, outputting debug messages;\0A specify twice to also output raw communication between hosts\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([393 x i8], [393 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
struct lconv {
  int dummy;
};

/* Variables and functions */
struct lconv *wceex_localeconv(void) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.lconv = type { i32 }
define %struct.lconv* @wceex_localeconv() {
ret %struct.lconv* null
}

LLVM IR (-O2):
%struct.lconv = type { i32 }
define noalias %struct.lconv* @wceex_localeconv() {
ret %struct.lconv* null
}
float anglemod(float a) {
  a = (360.0f / 65536) * ((int)(a * (65536 / 360.0f)) & 65535);
  return a;
}


x86 assembly (clang, -O0):
<anglemod>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
and    $0xffff,%eax
cvtsi2ss %eax,%xmm1
movss  0xed5(%rip),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<anglemod>:
mulss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
movzwl %ax,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0xee6(%rip),%xmm0
ret

LLVM IR (-O0):
define float @anglemod(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x4066C16C20000000
%5 = fptosi float %4 to i32
%6 = and i32 %5, 65535
%7 = sitofp i32 %6 to float
%8 = fmul float 0x3F76800000000000, %7
store float %8, float* %2
%9 = load float, float* %2
ret float %9
}

LLVM IR (-O2):
define float @anglemod(float %0) {
%2 = fmul float %0, 0x4066C16C20000000
%3 = fptosi float %2 to i32
%4 = and i32 %3, 65535
%5 = sitofp i32 %4 to float
%6 = fmul float %5, 0x3F76800000000000
ret float %6
}
void intercambiar(char vector[], int pos1, int pos2) {
  char aux = vector[pos1];
  vector[pos1] = vector[pos2];
  vector[pos2] = aux;
}


x86 assembly (clang, -O0):
<intercambiar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<intercambiar>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%sil
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

LLVM IR (-O0):
define void @intercambiar(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
store i8 %12, i8* %7
%13 = load i8*, i8** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 %17, i8* %21
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %23, i64 %25
store i8 %22, i8* %26
ret void
}

LLVM IR (-O2):
define void @intercambiar(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rot16r1(uint16_t x) { return (x >> 1) | (x << 15); }


x86 assembly (clang, -O0):
<rot16r1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
shl    $0xf,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot16r1>:
mov    %edi,%eax
sar    %eax
shl    $0xf,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot16r1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = load i32, i32* %2
%6 = shl i32 %5, 15
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot16r1(i32 %0) {
%2 = ashr i32 %0, 1
%3 = shl i32 %0, 15
%4 = or i32 %2, %3
ret i32 %4
}
void cprop_result6(int *data) {
  if (data[0])
    data[1] = 50;
  else
    data[2] = 75;
  data[3] = 105;
}


x86 assembly (clang, -O0):
<cprop_result6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1125 <cprop_result6+0x25>
mov    -0x8(%rbp),%rax
movl   $0x32,0x4(%rax)
jmp    1130 <cprop_result6+0x30>
mov    -0x8(%rbp),%rax
movl   $0x4b,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x69,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_result6>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
mov    $0x4b,%ecx
mov    $0x32,%edx
cmove  %ecx,%edx
mov    %edx,0x4(%rdi,%rax,4)
movl   $0x69,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @cprop_result6(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i64 2, i64 1
%5 = select i1 %3, i32 75, i32 50
%6 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 105, i32* %7
ret void
}
chconbrk(l) {
  if (l == 0)
    error("Break/continue error");
}


x86 assembly (clang, -O0):
<chconbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1133 <chconbrk+0x23>
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chconbrk>:
test   %edi,%edi
je     1115 <chconbrk+0x5>
ret
push   %rax
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <error@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Break/continue error\00"
define i32 @chconbrk(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@.str = [21 x i8] c"Break/continue error\00"
define i32 @chconbrk(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @error to i32 (i8*, ...)*)(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret i32 undef
}
void rop3_153_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = *D ^ S;
  stk1 = ~stk1;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_153_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_153_0_1>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
or     %dl,%cl
not    %cl
or     %sil,%dl
and    %al,%dl
or     %cl,%dl
mov    %dl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_153_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %6, -1
%8 = or i8 %2, %1
%9 = and i8 %8, %4
%10 = or i8 %9, %7
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ port_enable();
void chSysEnable(void) {
  ;
  port_enable();
}


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

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

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

LLVM IR (-O2):
define void @chSysEnable() {
%1 = tail call i32 (...) @port_enable()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ updatefeas();
int mkclist(void) {
  updatefeas();
  return 18;
}


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

x86 assembly (clang, -O2):
<mkclist>:
push   %rax
xor    %eax,%eax
call   1030 <updatefeas@plt>
mov    $0x12,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mkclist() {
%1 = call i32 (...) @updatefeas()
ret i32 18
}

LLVM IR (-O2):
define i32 @mkclist() {
%1 = tail call i32 (...) @updatefeas()
ret i32 18
}
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
int /*<<< orphan*/ ngen(char *, char *, int);
void cgincbstat(char *i, int a, int v) {
  ngen("%s\tcl,%d", "mov", v);
  lgen("%s\t%c%d,cl", i, a);
}


x86 assembly (clang, -O0):
<cgincbstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
lea    0xec4(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <ngen@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xeb7(%rip),%rdi
call   1030 <lgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgincbstat>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <ngen@plt>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s\09cl,%d\00"
@.str.1 = [4 x i8] c"mov\00"
@.str.2 = [11 x i8] c"%s\09%c%d,cl\00"
define void @cgincbstat(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @ngen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i32 @lgen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s\09cl,%d\00"
@.str.1 = [4 x i8] c"mov\00"
@.str.2 = [11 x i8] c"%s\09%c%d,cl\00"
define void @cgincbstat(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @ngen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%5 = tail call i32 @lgen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int countLines(int /*<<< orphan*/ *);
char *getNthLine(int /*<<< orphan*/ *, char *, int);
char *getNthLineFromBottom(FILE *file, char *line, int n) {
  n = countLines(file) - n;
  return getNthLine(file, line, n);
}


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

x86 assembly (clang, -O2):
<getNthLineFromBottom>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <countLines@plt>
sub    %ebp,%eax
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <getNthLine@plt>

LLVM IR (-O0):
define i8* @getNthLineFromBottom(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = call i32 @countLines(i32* %7)
%9 = load i32, i32* %6
%10 = sub nsw i32 %8, %9
store i32 %10, i32* %6
%11 = load i32*, i32** %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i8* @getNthLine(i32* %11, i8* %12, i32 %13)
ret i8* %14
}

LLVM IR (-O2):
define i8* @getNthLineFromBottom(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @countLines(i32* %0)
%5 = sub nsw i32 %4, %2
%6 = tail call i8* @getNthLine(i32* %0, i8* %1, i32 %5)
ret i8* %6
}
/* Type definitions */
struct svc_req {
  int dummy;
};

/* Variables and functions */
int l2tp_tunnel_list_1_svc(void *, struct svc_req *);
int _l2tp_tunnel_list_1(void *argp, void *result, struct svc_req *rqstp) {
  return (l2tp_tunnel_list_1_svc(result, rqstp));
}


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

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

LLVM IR (-O0):
%struct.svc_req = type { i32 }
define i32 @_l2tp_tunnel_list_1(i8* %0, i8* %1, %struct.svc_req* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.svc_req*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.svc_req* %2, %struct.svc_req** %6
%7 = load i8*, i8** %5
%8 = load %struct.svc_req*, %struct.svc_req** %6
%9 = call i32 @l2tp_tunnel_list_1_svc(i8* %7, %struct.svc_req* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
define i32 @_l2tp_tunnel_list_1(i8* nocapture readnone %0, i8* %1, %struct.svc_req* %2) {
%4 = tail call i32 @l2tp_tunnel_list_1_svc(i8* %1, %struct.svc_req* %2)
ret i32 %4
}
/* Variables and functions */
float noise3_perlin(float *);
float BLI_hnoisep(float noisesize, float x, float y, float z) {
  float vec[3];
  vec[0] = x / noisesize;
  vec[1] = y / noisesize;
  vec[2] = z / noisesize;
  return noise3_perlin(vec);
}


x86 assembly (clang, -O0):
<BLI_hnoisep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
divss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x10(%rbp),%xmm0
divss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <noise3_perlin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLI_hnoisep>:
sub    $0x18,%rsp
divss  %xmm0,%xmm1
movss  %xmm1,0xc(%rsp)
divss  %xmm0,%xmm2
movss  %xmm2,0x10(%rsp)
divss  %xmm0,%xmm3
movss  %xmm3,0x14(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <noise3_perlin@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @BLI_hnoisep(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca [3 x float]
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%10 = load float, float* %6
%11 = load float, float* %5
%12 = fdiv float %10, %11
%13 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
store float %12, float* %13
%14 = load float, float* %7
%15 = load float, float* %5
%16 = fdiv float %14, %15
%17 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 1
store float %16, float* %17
%18 = load float, float* %8
%19 = load float, float* %5
%20 = fdiv float %18, %19
%21 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 2
store float %20, float* %21
%22 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
%23 = call float @noise3_perlin(float* %22)
ret float %23
}

LLVM IR (-O2):
define float @BLI_hnoisep(float %0, float %1, float %2, float %3) {
%5 = alloca [3 x float]
%6 = bitcast [3 x float]* %5 to i8*
%7 = fdiv float %1, %0
%8 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
store float %7, float* %8
%9 = fdiv float %2, %0
%10 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 1
store float %9, float* %10
%11 = fdiv float %3, %0
%12 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 2
store float %11, float* %12
%13 = call float @noise3_perlin(float* %8)
ret float %13
}
/* Variables and functions */
scalar_t__ BUILTIN_EXPECT(int, int /*<<< orphan*/);
size_t strlen(const char *str) {
  size_t len = 0;
  if (BUILTIN_EXPECT(!str, 0))
    return len;
  while (str[len] != '\0')
    len++;
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
xor    %esi,%esi
call   1030 <BUILTIN_EXPECT@plt>
cmp    $0x0,%rax
je     1151 <strlen+0x41>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1184 <strlen+0x74>
jmp    1156 <strlen+0x46>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     117c <strlen+0x6c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1156 <strlen+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
sete   %dil
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <BUILTIN_EXPECT@plt>
test   %rax,%rax
jne    114f <strlen+0x3f>
mov    $0xffffffffffffffff,%rax
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%rax),%rbx
cmpb   $0x0,0x1(%r14,%rax,1)
mov    %rbx,%rax
jne    1140 <strlen+0x30>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @strlen(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 0, i64* %4
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = call i64 @BUILTIN_EXPECT(i32 %8, i32 0)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load i64, i64* %4
store i64 %12, i64* %2
br label %26
13: ; preds = %1
br label %14
14: ; preds = %21, %13
%15 = load i8*, i8** %3
%16 = load i64, i64* %4
%17 = getelementptr inbounds i8, i8* %15, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %14
%22 = load i64, i64* %4
%23 = add i64 %22, 1
store i64 %23, i64* %4
br label %14
24: ; preds = %14
%25 = load i64, i64* %4
store i64 %25, i64* %2
br label %26
26: ; preds = %24, %11
%27 = load i64, i64* %2
ret i64 %27
}

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i64 @BUILTIN_EXPECT(i32 %3, i32 0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1, %6
%7 = phi i64 [ %11, %6 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = add i64 %7, 1
br i1 %10, label %12, label %6
12: ; preds = %6, %1
%13 = phi i64 [ 0, %1 ], [ %7, %6 ]
ret i64 %13
}
/* Variables and functions */
double atan2(double, double);
double SDL_atan2(double x, double y) { return atan2(x, y); }


x86 assembly (clang, -O0):
<SDL_atan2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDL_atan2>:
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @SDL_atan2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @atan2(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @SDL_atan2(double %0, double %1) {
%3 = tail call double @atan2(double %0, double %1)
ret double %3
}
/* Variables and functions */
void *malloc(size_t);
void *__dmmalloc(void *x, size_t n) { return (malloc(n)); }


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

x86 assembly (clang, -O2):
<__dmmalloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @__dmmalloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @__dmmalloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
int skiplist_default_cmp(unsigned long score1, unsigned long score2) {
  return score1 - score2;
}


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

x86 assembly (clang, -O2):
<skiplist_default_cmp>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @skiplist_default_cmp(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @skiplist_default_cmp(i64 %0, i64 %1) {
%3 = sub i64 %0, %1
%4 = trunc i64 %3 to i32
ret i32 %4
}
void BN_cmp(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_cmp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_sample_rate_valid() {
  printf("NOT IMPLEMENTED:"
         "pa_sample_rate_valid"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_sample_rate_valid\00"
define i32 @pa_sample_rate_valid() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int IFF_NO_PI;
int IFF_TUN;
int tun_alloc(char *, int);
int init_tun(char *dev) { return tun_alloc(dev, IFF_TUN | IFF_NO_PI); }


x86 assembly (clang, -O0):
<init_tun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2ea0(%rip),%rax
or     (%rax),%esi
call   1030 <tun_alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_tun>:
mov    0x2ec9(%rip),%rax
mov    0x2eb2(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
jmp    1030 <tun_alloc@plt>

LLVM IR (-O0):
@IFF_TUN = global i32 0
@IFF_NO_PI = global i32 0
define i32 @init_tun(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @IFF_TUN
%5 = load i32, i32* @IFF_NO_PI
%6 = or i32 %4, %5
%7 = call i32 @tun_alloc(i8* %3, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@IFF_TUN = global i32 0
@IFF_NO_PI = global i32 0
define i32 @init_tun(i8* %0) {
%2 = load i32, i32* @IFF_TUN
%3 = load i32, i32* @IFF_NO_PI
%4 = or i32 %3, %2
%5 = tail call i32 @tun_alloc(i8* %0, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void jle_near_rj(unsigned int saut) {
  put8(0x0F);
  put8(0x8E);
  put32(saut);
}


x86 assembly (clang, -O0):
<jle_near_rj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xf,%edi
call   1030 <put8@plt>
mov    $0x8e,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jle_near_rj>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <put8@plt>
mov    $0x8e,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @jle_near_rj(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 15)
%4 = call i32 @put8(i32 142)
%5 = load i32, i32* %2
%6 = call i32 @put32(i32 %5)
ret void
}

LLVM IR (-O2):
define void @jle_near_rj(i32 %0) {
%2 = tail call i32 @put8(i32 15)
%3 = tail call i32 @put8(i32 142)
%4 = tail call i32 @put32(i32 %0)
ret void
}
void f69(void) {
  ({
    ({ 0; });
    ({
      a:
        goto a;
        0;
    });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f69>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
jmp    110b <f69+0xb>

x86 assembly (clang, -O2):
<f69>:
jmp    1100 <f69>

LLVM IR (-O0):
define void @f69() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %1
br label %5
5: ; preds = %5, %0
br label %5
}

LLVM IR (-O2):
define void @f69() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G22_f(char *s) {
  debug("G22_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G22_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G22_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G22_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G22_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G22_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G22_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}