xunge/DecIR huggingface dataset:
int isLessOrEqual(int x, int y) { return 2; }


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

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

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

LLVM IR (-O2):
define i32 @isLessOrEqual(i32 %0, i32 %1) {
ret i32 2
}
int m_max(int arg1, int arg2) { return (arg1 > arg2) ? arg1 : arg2; }


x86 assembly (clang, -O0):
<m_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <m_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <m_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @m_max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @m_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
char *getenv(char const *);
char *os_getenv(const char *name) { return getenv(name); }


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

x86 assembly (clang, -O2):
<os_getenv>:
jmp    1030 <getenv@plt>

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

LLVM IR (-O2):
define i8* @os_getenv(i8* nocapture %0) {
%2 = tail call i8* @getenv(i8* %0)
ret i8* %2
}
float m3dSmoothStep(const float edge1, const float edge2, const float x) {
  float t;
  t = (x - edge1) / (edge2 - edge1);
  if (t > 1.0f)
    t = 1.0f;
  if (t < 0.0)
    t = 0.0f;
  return t * t * (3.0f - 2.0f * t);
}


x86 assembly (clang, -O0):
<m3dSmoothStep>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xec3(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1153 <m3dSmoothStep+0x53>
movss  0xeb2(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1171 <m3dSmoothStep+0x71>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
addss  %xmm2,%xmm2
movss  0xe78(%rip),%xmm1
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<m3dSmoothStep>:
subss  %xmm0,%xmm2
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
movss  0xeec(%rip),%xmm0
minss  %xmm2,%xmm0
xorps  %xmm1,%xmm1
maxss  %xmm0,%xmm1
movaps %xmm1,%xmm2
mulss  %xmm1,%xmm2
addss  %xmm1,%xmm1
movss  0xed2(%rip),%xmm0
subss  %xmm1,%xmm0
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @m3dSmoothStep(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %6
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %5
%12 = load float, float* %4
%13 = fsub float %11, %12
%14 = fdiv float %10, %13
store float %14, float* %7
%15 = load float, float* %7
%16 = fcmp ogt float %15, 1.000000e+00
br i1 %16, label %17, label %18
17: ; preds = %3
store float 1.000000e+00, float* %7
br label %18
18: ; preds = %17, %3
%19 = load float, float* %7
%20 = fpext float %19 to double
%21 = fcmp olt double %20, 0.000000e+00
br i1 %21, label %22, label %23
22: ; preds = %18
store float 0.000000e+00, float* %7
br label %23
23: ; preds = %22, %18
%24 = load float, float* %7
%25 = load float, float* %7
%26 = fmul float %24, %25
%27 = load float, float* %7
%28 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %27, float 3.000000e+00)
%29 = fmul float %26, %28
ret float %29
}

LLVM IR (-O2):
define float @m3dSmoothStep(float %0, float %1, float %2) {
%4 = fsub float %2, %0
%5 = fsub float %1, %0
%6 = fdiv float %4, %5
%7 = fcmp ogt float %6, 1.000000e+00
%8 = select i1 %7, float 1.000000e+00, float %6
%9 = fcmp olt float %8, 0.000000e+00
%10 = select i1 %9, float 0.000000e+00, float %8
%11 = fmul float %10, %10
%12 = tail call float @llvm.fmuladd.f32(float %10, float -2.000000e+00, float 3.000000e+00)
%13 = fmul float %11, %12
ret float %13
}
/* Type definitions */
struct radix_tree_root {
  int dummy;
};

/* Variables and functions */
int root_tag_get(struct radix_tree_root *, unsigned int);
int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag) {
  return root_tag_get(root, tag);
}


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

x86 assembly (clang, -O2):
<radix_tree_tagged>:
jmp    1030 <root_tag_get@plt>

LLVM IR (-O0):
%struct.radix_tree_root = type { i32 }
define i32 @radix_tree_tagged(%struct.radix_tree_root* %0, i32 %1) {
%3 = alloca %struct.radix_tree_root*
%4 = alloca i32
store %struct.radix_tree_root* %0, %struct.radix_tree_root** %3
store i32 %1, i32* %4
%5 = load %struct.radix_tree_root*, %struct.radix_tree_root** %3
%6 = load i32, i32* %4
%7 = call i32 @root_tag_get(%struct.radix_tree_root* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.radix_tree_root = type { i32 }
define i32 @radix_tree_tagged(%struct.radix_tree_root* %0, i32 %1) {
%3 = tail call i32 @root_tag_get(%struct.radix_tree_root* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int open(char *, int /*<<< orphan*/);
int _open_random_dev() {
  int fd = open("/dev/urandom", O_RDONLY);
  if (-1 == fd)
    _exit(errno);
  return fd;
}


x86 assembly (clang, -O0):
<_open_random_dev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1040 <open@plt>
mov    %eax,-0x4(%rbp)
mov    $0xffffffff,%eax
cmp    -0x4(%rbp),%eax
jne    115c <_open_random_dev+0x3c>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_open_random_dev>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <open@plt>
cmp    $0xffffffff,%eax
je     113d <_open_random_dev+0x1d>
pop    %rcx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
@errno = global i32 0
define i32 @_open_random_dev() {
%1 = alloca i32
%2 = load i32, i32* @O_RDONLY
%3 = call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp eq i32 -1, %4
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* @errno
%8 = call i32 @_exit(i32 %7)
unreachable
9: ; preds = %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [13 x i8] c"/dev/urandom\00"
@O_RDONLY = global i32 0
@errno = global i32 0
define i32 @_open_random_dev() {
%1 = load i32, i32* @O_RDONLY
%2 = tail call i32 @open(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = load i32, i32* @errno
%6 = tail call i32 @_exit(i32 %5)
unreachable
7: ; preds = %0
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ __NR_mkdirat;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, char const *,
            int /*<<< orphan*/);
__attribute__((always_)) int _syscall_mkdir(const char *pathname, mode_t mode) {
  return syscall(__NR_mkdirat, AT_FDCWD, pathname, mode);
}


x86 assembly (clang, -O0):
<_syscall_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_mkdir>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_mkdirat = global i32 0
@AT_FDCWD = global i32 0
define i32 @_syscall_mkdir(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @__NR_mkdirat
%6 = load i32, i32* @AT_FDCWD
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @syscall(i32 %5, i32 %6, i8* %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
@__NR_mkdirat = global i32 0
@AT_FDCWD = global i32 0
define i32 @_syscall_mkdir(i8* %0, i32 %1) {
%3 = load i32, i32* @__NR_mkdirat
%4 = load i32, i32* @AT_FDCWD
%5 = tail call i32 @syscall(i32 %3, i32 %4, i8* %0, i32 %1)
ret i32 %5
}
void av_image_copy() {}


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

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

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

LLVM IR (-O2):
define void @av_image_copy() {
ret void
}
void glmMultVectorByScalar3f(float v[3], float a) {
  v[0] *= a;
  v[1] *= a;
  v[2] *= a;
}


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

x86 assembly (clang, -O2):
<glmMultVectorByScalar3f>:
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @glmMultVectorByScalar3f(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fmul float %3, %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fmul float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fmul float %9, %1
store float %10, float* %8
ret void
}
int GetMasterPID(PID, MasterPID)
int PID;
int *MasterPID;
{
  if (PID != 0)
    return ((-72 - 1) & (~0x10000));
  *MasterPID = getppid();
  return (1);
}


x86 assembly (clang, -O0):
<GetMasterPID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1135 <GetMasterPID+0x25>
movl   $0xfffeffb7,-0x4(%rbp)
jmp    114b <GetMasterPID+0x3b>
mov    $0x0,%al
call   1030 <getppid@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetMasterPID>:
mov    $0xfffeffb7,%eax
test   %edi,%edi
je     111a <GetMasterPID+0xa>
ret
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1030 <getppid@plt>
mov    %eax,(%rbx)
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @GetMasterPID(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -65609, i32* %3
br label %12
9: ; preds = %2
%10 = call i32 (...) @getppid()
%11 = load i32*, i32** %5
store i32 %10, i32* %11
store i32 1, i32* %3
br label %12
12: ; preds = %9, %8
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @GetMasterPID(i32 %0, i32* nocapture writeonly %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @getppid()
store i32 %5, i32* %1
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ 1, %4 ], [ -65609, %2 ]
ret i32 %7
}
void OBJ_NAME_do_all(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void WriteArrayEndExpression(FILE *out) {
  fputs("};\n", out);
  fputs("\n", out);
  return;
}


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

x86 assembly (clang, -O2):
<WriteArrayEndExpression>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"};\0A\00"
define void @WriteArrayEndExpression(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3, i64 1, i32* %0)
%3 = tail call i32 @fputc(i32 10, i32* %0)
ret void
}
void ClearMatrix(int *matrix) {
  static char RoutineName[] = "ClearMatrix";
  int *mptr;
  for (mptr = matrix; mptr < matrix + 64; mptr++) {
    *mptr = 0;
  }
}


x86 assembly (clang, -O0):
<ClearMatrix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
add    $0x100,%rcx
cmp    %rcx,%rax
jae    1143 <ClearMatrix+0x43>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ClearMatrix+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearMatrix>:
xorps  %xmm0,%xmm0
movups %xmm0,0xf0(%rdi)
movups %xmm0,0xe0(%rdi)
movups %xmm0,0xd0(%rdi)
movups %xmm0,0xc0(%rdi)
movups %xmm0,0xb0(%rdi)
movups %xmm0,0xa0(%rdi)
movups %xmm0,0x90(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
@ClearMatrix.RoutineName = internal global [12 x i8] c"ClearMatrix\00"
define void @ClearMatrix(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
%4 = load i32*, i32** %2
store i32* %4, i32** %3
br label %5
5: ; preds = %12, %1
%6 = load i32*, i32** %3
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 64
%9 = icmp ult i32* %6, %8
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = load i32*, i32** %3
store i32 0, i32* %11
br label %12
12: ; preds = %10
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %3
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @ClearMatrix(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to i8*
ret void
}
/* Variables and functions */
char const *strong_s2();
const char *__attribute__((section(".test.b"))) call_strong_s2(void) {
  return strong_s2() + 1;
}


x86 assembly (clang, -O0):
<call_strong_s2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <strong_s2@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_strong_s2>:
push   %rax
xor    %eax,%eax
call   1030 <strong_s2@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_strong_s2() section ".test.b" {
%1 = call i8* (...) @strong_s2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_strong_s2() section ".test.b" {
%1 = tail call i8* (...) @strong_s2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int munmap(void *, size_t);
void dropcore(void *p, size_t size_in_bytes) {
  int ret = munmap(p, size_in_bytes);
  assert(ret == 0);
}


x86 assembly (clang, -O0):
<dropcore>:
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 <munmap@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dropcore>:
push   %rax
call   1040 <munmap@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @dropcore(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @munmap(i8* %6, i64 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
define void @dropcore(i8* %0, i64 %1) {
%3 = tail call i32 @munmap(i8* %0, i64 %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int swapping() {
  int i, n, z;
  printf("Enter two numbers: ");
  scanf("%d %d", &i, &n);
  z = i;
  i = n;
  n = z;
  printf("Now =%d %d", i, n);
}


x86 assembly (clang, -O0):
<swapping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapping>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
mov    (%rsp),%esi
mov    %esi,0x4(%rsp)
mov    %edx,(%rsp)
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter two numbers: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [11 x i8] c"Now =%d %d\00"
define i32 @swapping() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%7 = load i32, i32* %2
store i32 %7, i32* %4
%8 = load i32, i32* %3
store i32 %8, i32* %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter two numbers: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [11 x i8] c"Now =%d %d\00"
define i32 @swapping() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
store i32 %8, i32* %1
store i32 %7, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %7)
ret i32 undef
}
void ASN1_primitive_free(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_primitive_free() {
ret void
}
/* Variables and functions */
unsigned int _uiTlvGetValueLen(unsigned char *);
int iTlvValueLen(unsigned char *psTlvObj) {
  unsigned int uiRet;
  uiRet = _uiTlvGetValueLen(psTlvObj);
  if (uiRet == 0xFFFF)
    return (-10005);
  return (uiRet);
}


x86 assembly (clang, -O0):
<iTlvValueLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_uiTlvGetValueLen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffff,-0x14(%rbp)
jne    1141 <iTlvValueLen+0x31>
movl   $0xffffd8eb,-0x4(%rbp)
jmp    1147 <iTlvValueLen+0x37>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iTlvValueLen>:
push   %rax
call   1030 <_uiTlvGetValueLen@plt>
cmp    $0xffff,%eax
mov    $0xffffd8eb,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @iTlvValueLen(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @_uiTlvGetValueLen(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 65535
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -10005, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @iTlvValueLen(i8* %0) {
%2 = tail call i32 @_uiTlvGetValueLen(i8* %0)
%3 = icmp eq i32 %2, 65535
%4 = select i1 %3, i32 -10005, i32 %2
ret i32 %4
}
/* Variables and functions */
char *compute_smack_mount_point(char *);
const char *smack_fs_mount_point() {
  static int computed = 0;
  static char *result;
  if (!computed) {
    computed = 1;
    result = compute_smack_mount_point("/proc/self/mounts");
  }
  return result;
}


x86 assembly (clang, -O0):
<smack_fs_mount_point>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f15(%rip)
jne    113e <smack_fs_mount_point+0x2e>
movl   $0x1,0x2f05(%rip)
lea    0xece(%rip),%rdi
call   1030 <compute_smack_mount_point@plt>
mov    %rax,0x2efa(%rip)
mov    0x2ef3(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smack_fs_mount_point>:
push   %rax
cmpb   $0x1,0x2f18(%rip)
jne    1123 <smack_fs_mount_point+0x13>
mov    0x2f17(%rip),%rax
pop    %rcx
ret
movb   $0x1,0x2f06(%rip)
lea    0xecf(%rip),%rdi
call   1030 <compute_smack_mount_point@plt>
mov    %rax,0x2efb(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@smack_fs_mount_point.computed = internal global i32 0
@smack_fs_mount_point.result = internal global i8* null
@.str = [18 x i8] c"/proc/self/mounts\00"
define i8* @smack_fs_mount_point() {
%1 = load i32, i32* @smack_fs_mount_point.computed
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
store i32 1, i32* @smack_fs_mount_point.computed
%4 = call i8* @compute_smack_mount_point(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** @smack_fs_mount_point.result
br label %5
5: ; preds = %3, %0
%6 = load i8*, i8** @smack_fs_mount_point.result
ret i8* %6
}

LLVM IR (-O2):
@smack_fs_mount_point.computed = internal unnamed_addr global i1 false
@smack_fs_mount_point.result = internal unnamed_addr global i8* null
@.str = [18 x i8] c"/proc/self/mounts\00"
define i8* @smack_fs_mount_point() {
%1 = load i1, i1* @smack_fs_mount_point.computed
br i1 %1, label %2, label %4
2: ; preds = %0
%3 = load i8*, i8** @smack_fs_mount_point.result
br label %6
4: ; preds = %0
store i1 true, i1* @smack_fs_mount_point.computed
%5 = tail call i8* @compute_smack_mount_point(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** @smack_fs_mount_point.result
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %3, %2 ], [ %5, %4 ]
ret i8* %7
}
/* Type definitions */
typedef scalar_t__ time_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
char *ctime(scalar_t__ *);
int /*<<< orphan*/ printf(char *, char *);
void ptime(int64_t secs) {
  time_t t;
  t = (time_t)secs;
  printf("%s", ctime(&t));
}


x86 assembly (clang, -O0):
<ptime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptime>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <ctime@plt>
lea    0xecc(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @ptime(i64 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 %0, i64* %2
%4 = call i8* @ctime(i64* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
off_t ret_off_t(off_t arg1) { return arg1; }


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

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

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

LLVM IR (-O2):
define i32 @ret_off_t(i32 returned %0) {
ret i32 %0
}
int security_ioperm(unsigned long from, unsigned long num, int turn_on) {
  return 0;
}


x86 assembly (clang, -O0):
<security_ioperm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @security_ioperm(i64 %0, i64 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store i64 %0, i64* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @security_ioperm(i64 %0, i64 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xa5() {
  Assert_real((isodigit(165) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              830, ("isodigit should be 0 for 0xa5"));
}


x86 assembly (clang, -O0):
<t_isodigit_0xa5>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa5,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x33e,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0xa5>:
push   %rax
mov    $0xa5,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x33e,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xa5\00"
define void @t_isodigit_0xa5() {
%1 = call i64 @isodigit(i32 165)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 830, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xa5\00"
define void @t_isodigit_0xa5() {
%1 = tail call i64 @isodigit(i32 165)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 830, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void arm_mmu_not_initialized_error(void) { panic("MMU not initialized\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"MMU not initialized\0A\00"
define void @arm_mmu_not_initialized_error() {
%1 = call i32 @panic(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"MMU not initialized\0A\00"
define void @arm_mmu_not_initialized_error() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
void X509V3_EXT_d2i(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_EXT_d2i() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _IONBF;
int main_example(int, char **);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  setvbuf(stdout, NULL, _IONBF, 0);
  return main_example(argc, argv);
}


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    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    0x2ea2(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <main_example@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1040 <setvbuf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <main_example@plt>

LLVM IR (-O0):
@stdout = global i32 0
@_IONBF = global i32 0
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 = load i32, i32* @stdout
%7 = load i32, i32* @_IONBF
%8 = call i32 @setvbuf(i32 %6, i32* null, i32 %7, i32 0)
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @main_example(i32 %9, i8** %10)
ret i32 %11
}

LLVM IR (-O2):
@stdout = global i32 0
@_IONBF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = load i32, i32* @stdout
%4 = load i32, i32* @_IONBF
%5 = tail call i32 @setvbuf(i32 %3, i32* null, i32 %4, i32 0)
%6 = tail call i32 @main_example(i32 %0, i8** %1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ print_ids(char *);
void *thread_task(void *arg) {
  print_ids("new thread: ");
  return NULL;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"new thread: \00"
define i8* @thread_task(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @print_ids(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [13 x i8] c"new thread: \00"
define noalias i8* @thread_task(i8* nocapture readnone %0) {
%2 = tail call i32 @print_ids(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
double log(int /*<<< orphan*/);
int /*<<< orphan*/ rand_uniopen();
double rand_exp(void) { return -log(rand_uniopen()); }


x86 assembly (clang, -O0):
<rand_exp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand_uniopen@plt>
mov    %eax,%edi
call   1040 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_exp>:
push   %rax
xor    %eax,%eax
call   1030 <rand_uniopen@plt>
mov    %eax,%edi
call   1040 <log@plt>
xorps  0xeca(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rand_exp() {
%1 = call i32 (...) @rand_uniopen()
%2 = call double @log(i32 %1)
%3 = fneg double %2
ret double %3
}

LLVM IR (-O2):
define double @rand_exp() {
%1 = tail call i32 (...) @rand_uniopen()
%2 = tail call double @log(i32 %1)
%3 = fneg double %2
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ grava_li(int, char *);
void rot23_sem() { grava_li(1, "$GOTO"); }


x86 assembly (clang, -O0):
<rot23_sem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <grava_li@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot23_sem>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <grava_li@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"$GOTO\00"
define void @rot23_sem() {
%1 = call i32 @grava_li(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"$GOTO\00"
define void @rot23_sem() {
%1 = tail call i32 @grava_li(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x23_setup() {
  char cmd[256];
  sprintf(cmd,
          "iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x23_setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x23_setup>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x23_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -A INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x23_setup() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ OpenLRSStatusHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void OpenLRSStatusRequestUpdate() {
  UAVObjRequestUpdate(OpenLRSStatusHandle());
}


x86 assembly (clang, -O0):
<OpenLRSStatusRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OpenLRSStatusHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpenLRSStatusRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <OpenLRSStatusHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @OpenLRSStatusRequestUpdate() {
%1 = call i32 (...) @OpenLRSStatusHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpenLRSStatusRequestUpdate() {
%1 = tail call i32 (...) @OpenLRSStatusHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bubblesort(int *, int);
int /*<<< orphan*/ testswap();
void solve() {
  testswap();
  int A[] = {5, 1, 3, 4, 2};
  bubblesort(A, 5);
}


x86 assembly (clang, -O0):
<solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <testswap@plt>
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <bubblesort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve>:
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <testswap@plt>
mov    0xedf(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xec4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <bubblesort@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.solve.A = [5 x i32] [i32 5, i32 1, i32 3, i32 4, i32 2]
define void @solve() {
%1 = alloca [5 x i32]
%2 = call i32 (...) @testswap()
%3 = bitcast [5 x i32]* %1 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%5 = call i32 @bubblesort(i32* %4, i32 5)
ret void
}

LLVM IR (-O2):
@__const.solve.A = [5 x i32] [i32 5, i32 1, i32 3, i32 4, i32 2]
define void @solve() {
%1 = alloca [5 x i32]
%2 = tail call i32 (...) @testswap()
%3 = bitcast [5 x i32]* %1 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%5 = call i32 @bubblesort(i32* %4, i32 5)
ret void
}
char bioseq_protein_charge(char in) {
  switch (in) {
  case 'R':
  case 'H':
  case 'K':
    return '+';
  case 'D':
  case 'E':
    return '-';
  case 'A':
  case 'C':
  case 'F':
  case 'G':
  case 'I':
  case 'L':
  case 'M':
  case 'P':
  case 'V':
  case 'W':
  case 'Y':
    return '#';
  case 'N':
  case 'S':
  case 'T':
  case 'Q':
    return '*';
  default:
    return '?';
  }
}


x86 assembly (clang, -O0):
<bioseq_protein_charge>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x18,%eax
ja     1158 <bioseq_protein_charge+0x58>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x2b,-0x1(%rbp)
jmp    115c <bioseq_protein_charge+0x5c>
movb   $0x2d,-0x1(%rbp)
jmp    115c <bioseq_protein_charge+0x5c>
movb   $0x23,-0x1(%rbp)
jmp    115c <bioseq_protein_charge+0x5c>
movb   $0x2a,-0x1(%rbp)
jmp    115c <bioseq_protein_charge+0x5c>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bioseq_protein_charge>:
movslq %edi,%rcx
add    $0xffffffffffffffbf,%rcx
mov    $0x3f,%al
cmp    $0x18,%ecx
ja     1118 <bioseq_protein_charge+0x18>
lea    0xeeb(%rip),%rax
mov    (%rcx,%rax,1),%al
ret

LLVM IR (-O0):
define signext i8 @bioseq_protein_charge(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %10 [
i32 82, label %6
i32 72, label %6
i32 75, label %6
i32 68, label %7
i32 69, label %7
i32 65, label %8
i32 67, label %8
i32 70, label %8
i32 71, label %8
i32 73, label %8
i32 76, label %8
i32 77, label %8
i32 80, label %8
i32 86, label %8
i32 87, label %8
i32 89, label %8
i32 78, label %9
i32 83, label %9
i32 84, label %9
i32 81, label %9
]
6: ; preds = %1, %1, %1
store i8 43, i8* %2
br label %11
7: ; preds = %1, %1
store i8 45, i8* %2
br label %11
8: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i8 35, i8* %2
br label %11
9: ; preds = %1, %1, %1, %1
store i8 42, i8* %2
br label %11
10: ; preds = %1
store i8 63, i8* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
@switch.table.bioseq_protein_charge = [25 x i8] c"#?#--##+#?+##*?#*+**?##?#"
define signext i8 @bioseq_protein_charge(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -65
%4 = icmp ult i32 %3, 25
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [25 x i8], [25 x i8]* @switch.table.bioseq_protein_charge, i64 0, i64 %6
%8 = load i8, i8* %7
br label %9
9: ; preds = %1, %5
%10 = phi i8 [ %8, %5 ], [ 63, %1 ]
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ send_command(char *, char *);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  char result[625];
  strcpy(result, send_command("localhost", argv[1]));
  printf("%s", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x290(%rbp),%rax
mov    %rax,-0x298(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe9a(%rip),%rdi
call   1050 <send_command@plt>
mov    -0x298(%rbp),%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
lea    -0x290(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x2a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x280,%rsp
mov    0x8(%rsi),%rsi
lea    0xebd(%rip),%rdi
call   1050 <send_command@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <strcpy@plt>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x280,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [625 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [625 x i8], [625 x i8]* %6, i64 0, i64 0
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @send_command(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @strcpy(i8* %7, i32 %11)
%13 = getelementptr inbounds [625 x i8], [625 x i8]* %6, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [625 x i8]
%4 = getelementptr inbounds [625 x i8], [625 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @send_command(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 @strcpy(i8* %4, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Variables and functions */
unsigned int seamless_send(char *, char *, unsigned long);
unsigned int seamless_send_destroy(unsigned long id) {
  return seamless_send("DESTROY", "0x%08lx", id);
}


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

x86 assembly (clang, -O2):
<seamless_send_destroy>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <seamless_send@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"DESTROY\00"
@.str.1 = [8 x i8] c"0x%08lx\00"
define i32 @seamless_send_destroy(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @seamless_send(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"DESTROY\00"
@.str.1 = [8 x i8] c"0x%08lx\00"
define i32 @seamless_send_destroy(i64 %0) {
%2 = tail call i32 @seamless_send(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i64 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(float **, float **, int);
void lib3ds_matrix_copy(float dest[4][4], float src[4][4]) {
  memcpy(dest, src, 16 * sizeof(float));
}


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

x86 assembly (clang, -O2):
<lib3ds_matrix_copy>:
mov    $0x40,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @lib3ds_matrix_copy([4 x float]* %0, [4 x float]* %1) {
%3 = alloca [4 x float]*
%4 = alloca [4 x float]*
store [4 x float]* %0, [4 x float]** %3
store [4 x float]* %1, [4 x float]** %4
%5 = load [4 x float]*, [4 x float]** %3
%6 = bitcast [4 x float]* %5 to float**
%7 = load [4 x float]*, [4 x float]** %4
%8 = bitcast [4 x float]* %7 to float**
%9 = call i32 @memcpy(float** %6, float** %8, i32 64)
ret void
}

LLVM IR (-O2):
define void @lib3ds_matrix_copy([4 x float]* %0, [4 x float]* %1) {
%3 = bitcast [4 x float]* %0 to float**
%4 = bitcast [4 x float]* %1 to float**
%5 = tail call i32 @memcpy(float** %3, float** %4, i32 64)
ret void
}