xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: whatargs arg [..]\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Usage: whatargs arg [..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [26 x i8] c"Usage: whatargs arg [..]\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
char *String_concat(char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ setClassPath(char *);
void arg_setClassPath(char *s) {
  char *classpath = String_concat(s, "/", NULL);
  setClassPath(classpath);
}


x86 assembly (clang, -O0):
<arg_setClassPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <String_concat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <setClassPath@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_setClassPath>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edx,%edx
call   1040 <String_concat@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <setClassPath@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @arg_setClassPath(i8* %0) {
%2 = tail call i8* @String_concat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32* null)
%3 = tail call i32 @setClassPath(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char const *);
int /*<<< orphan*/ stderr;
void err_quit(const char *msg) {
  fprintf(stderr, msg);
  exit(1);
}


x86 assembly (clang, -O0):
<err_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<err_quit>:
push   %rax
mov    %rdi,%rsi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @err_quit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
define void @err_quit(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
void a_crash() { __asm__ __volatile__(".long 0"); }


x86 assembly (clang, -O0):
<a_crash>:
push   %rbp
mov    %rsp,%rbp
add    %al,(%rax)
add    %al,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_crash>:
add    %al,(%rax)
add    %al,(%rax)
ret

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

LLVM IR (-O2):
define void @a_crash() {
tail call void asm sideeffect ".long 0", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int _XFlush() {
  printf("_XFlush called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"_XFlush called\0A\00"
define i32 @_XFlush() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"_XFlush called\00"
define i32 @_XFlush() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ extern_const(unsigned int);
int __attribute__((no)) foo3(unsigned int n) {
  int ret = 0;
  unsigned int i;
  for (i = 0; extern_const(i + n); n++)
    ret += extern_const(i);
  return ret;
}


x86 assembly (clang, -O0):
<foo3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    -0x4(%rbp),%edi
call   1030 <extern_const@plt>
cmp    $0x0,%rax
je     1161 <foo3+0x51>
mov    -0xc(%rbp),%edi
call   1030 <extern_const@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1129 <foo3+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo3>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <extern_const@plt>
test   %rax,%rax
je     114a <foo3+0x3a>
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
call   1030 <extern_const@plt>
add    %eax,%ebp
mov    %ebx,%edi
call   1030 <extern_const@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1130 <foo3+0x20>
jmp    114c <foo3+0x3c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @foo3(i32 %0) {
%2 = tail call i64 @extern_const(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %10, %4 ], [ %0, %1 ]
%6 = phi i32 [ %9, %4 ], [ 0, %1 ]
%7 = tail call i64 @extern_const(i32 0)
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = add i32 %5, 1
%11 = tail call i64 @extern_const(i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %14
}
/* Type definitions */
struct test {
  int dummy;
};

/* Variables and functions */
void priv_sysctl_write_cleanup(int asroot, int injail, struct test *test) {}


x86 assembly (clang, -O0):
<priv_sysctl_write_cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test = type { i32 }
define void @priv_sysctl_write_cleanup(i32 %0, i32 %1, %struct.test* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.test*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.test* %2, %struct.test** %6
ret void
}

LLVM IR (-O2):
%struct.test = type { i32 }
define void @priv_sysctl_write_cleanup(i32 %0, i32 %1, %struct.test* nocapture %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int open(char const *, unsigned int);
unsigned int support_fmodes2flags(char const *);
int /*<<< orphan*/ *support_retrieve_file(int);
FILE *fopen(const char *filename, const char *mode) {
  int fd;
  unsigned int flags = support_fmodes2flags(mode);
  fd = open(filename, flags);
  if (fd < 0)
    return NULL;
  return support_retrieve_file(fd);
}


x86 assembly (clang, -O0):
<fopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <support_fmodes2flags@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1040 <open@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1172 <fopen+0x42>
movq   $0x0,-0x8(%rbp)
jmp    117e <fopen+0x4e>
mov    -0x1c(%rbp),%edi
call   1030 <support_retrieve_file@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fopen>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1050 <support_fmodes2flags@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <open@plt>
test   %eax,%eax
js     1152 <fopen+0x22>
mov    %eax,%edi
pop    %rbx
jmp    1030 <support_retrieve_file@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @fopen(i8* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %5
%9 = call i32 @support_fmodes2flags(i8* %8)
store i32 %9, i32* %7
%10 = load i8*, i8** %4
%11 = load i32, i32* %7
%12 = call i32 @open(i8* %10, i32 %11)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %2
store i32* null, i32** %3
br label %19
16: ; preds = %2
%17 = load i32, i32* %6
%18 = call i32* @support_retrieve_file(i32 %17)
store i32* %18, i32** %3
br label %19
19: ; preds = %16, %15
%20 = load i32*, i32** %3
ret i32* %20
}

LLVM IR (-O2):
define i32* @fopen(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @support_fmodes2flags(i8* %1)
%4 = tail call i32 @open(i8* %0, i32 %3)
%5 = icmp slt i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32* @support_retrieve_file(i32 %4)
br label %8
8: ; preds = %2, %6
%9 = phi i32* [ %7, %6 ], [ null, %2 ]
ret i32* %9
}
/* Variables and functions */
int /*<<< orphan*/ glColor3f(float, float, float);
void graphic_set_color_3f(float red, float green, float blue) {
  glColor3f(red, green, blue);
}


x86 assembly (clang, -O0):
<graphic_set_color_3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <glColor3f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<graphic_set_color_3f>:
jmp    1030 <glColor3f@plt>

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

LLVM IR (-O2):
define void @graphic_set_color_3f(float %0, float %1, float %2) {
%4 = tail call i32 @glColor3f(float %0, float %1, float %2)
ret void
}
int clampi(int i, int min, int max) {
  if (i < min) {
    return min;
  }
  if (i > max) {
    return max;
  }
  return i;
}


x86 assembly (clang, -O0):
<clampi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <clampi+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <clampi+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <clampi+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <clampi+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampi>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @clampi(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
int do_326() { return 326; }


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

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

LLVM IR (-O0):
define i32 @do_326() {
ret i32 326
}

LLVM IR (-O2):
define i32 @do_326() {
ret i32 326
}
/* Variables and functions */
float sin(float);
float calculate_sod_factor_orig(float U, float C, float I, float S, float F) {
  float result =
      (((U + C + I) * (1.0f - S)) / 2.0f) * 0.7f * (1.0f / (1.0f - sin(F)));
  return result;
}


x86 assembly (clang, -O0):
<calculate_sod_factor_orig>:
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  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  0xeb8(%rip),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeaf(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe9f(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
movss  0xe78(%rip),%xmm2
subss  %xmm1,%xmm2
movss  0xe6c(%rip),%xmm1
divss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_sod_factor_orig>:
push   %rax
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
movss  0xedf(%rip),%xmm1
subss  %xmm3,%xmm1
mulss  %xmm1,%xmm0
mulss  0xed3(%rip),%xmm0
mulss  0xecf(%rip),%xmm0
movss  %xmm0,0x4(%rsp)
movaps %xmm4,%xmm0
call   1030 <sin@plt>
movss  0xeb1(%rip),%xmm2
movaps %xmm2,%xmm1
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
mulss  0x4(%rsp),%xmm2
movaps %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @calculate_sod_factor_orig(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fadd float %12, %13
%15 = load float, float* %8
%16 = fadd float %14, %15
%17 = load float, float* %9
%18 = fsub float 1.000000e+00, %17
%19 = fmul float %16, %18
%20 = fdiv float %19, 2.000000e+00
%21 = fmul float %20, 0x3FE6666660000000
%22 = load float, float* %10
%23 = call float @sin(float %22)
%24 = fsub float 1.000000e+00, %23
%25 = fdiv float 1.000000e+00, %24
%26 = fmul float %21, %25
store float %26, float* %11
%27 = load float, float* %11
ret float %27
}

LLVM IR (-O2):
define float @calculate_sod_factor_orig(float %0, float %1, float %2, float %3, float %4) {
%6 = fadd float %0, %1
%7 = fadd float %6, %2
%8 = fsub float 1.000000e+00, %3
%9 = fmul float %7, %8
%10 = fmul float %9, 5.000000e-01
%11 = fmul float %10, 0x3FE6666660000000
%12 = tail call float @sin(float %4)
%13 = fsub float 1.000000e+00, %12
%14 = fdiv float 1.000000e+00, %13
%15 = fmul float %11, %14
ret float %15
}
/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void *on_create() {
  fprintf(stderr, "Error: on_create called on proxy object\n");
  exit(ENOTSUP);
  return NULL;
}


x86 assembly (clang, -O0):
<on_create>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<on_create>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Error: on_create called on proxy object\0A\00"
@ENOTSUP = global i32 0
define i8* @on_create() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @ENOTSUP
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Error: on_create called on proxy object\0A\00"
@ENOTSUP = global i32 0
define noalias i8* @on_create() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @ENOTSUP
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assume(int);
void __VERIFIER_atomic_release(int *m) {
  __VERIFIER_assume(*m == 1);
  *m = 0;
}


x86 assembly (clang, -O0):
<__VERIFIER_atomic_release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assume@plt>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__VERIFIER_atomic_release>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
cmpl   $0x1,(%rbx)
sete   %dil
call   1030 <__VERIFIER_assume@plt>
movl   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @__VERIFIER_atomic_release(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
%7 = call i32 @__VERIFIER_assume(i32 %6)
%8 = load i32*, i32** %2
store i32 0, i32* %8
ret void
}

LLVM IR (-O2):
define void @__VERIFIER_atomic_release(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
%5 = tail call i32 @__VERIFIER_assume(i32 %4)
store i32 0, i32* %0
ret void
}
/* Variables and functions */
unsigned int ropt_has(char const *, char const, int, char const **);
const char *ropt_get(const char *opt_long, const char opt_short, int argc,
                     const char **argv) {
  unsigned int index;
  return (index = ropt_has(opt_long, opt_short, argc, argv)) ? argv[index]
                                                             : NULL;
}


x86 assembly (clang, -O0):
<ropt_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
movsbl %al,%esi
call   1030 <ropt_has@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     115f <ropt_get+0x4f>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x28(%rbp)
jmp    116a <ropt_get+0x5a>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    116a <ropt_get+0x5a>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ropt_get>:
push   %rbx
mov    %rcx,%rbx
call   1030 <ropt_has@plt>
test   %eax,%eax
je     1125 <ropt_get+0x15>
mov    %eax,%eax
mov    (%rbx,%rax,8),%rax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ropt_get(i8* %0, i8 signext %1, i32 %2, i8** %3) {
%5 = tail call i32 @ropt_has(i8* %0, i8 signext %1, i32 %2, i8** %3)
%6 = icmp eq i32 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %4
%8 = zext i32 %5 to i64
%9 = getelementptr inbounds i8*, i8** %3, i64 %8
%10 = load i8*, i8** %9
br label %11
11: ; preds = %4, %7
%12 = phi i8* [ %10, %7 ], [ null, %4 ]
ret i8* %12
}
int sr_class1p5_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sr_class1p5_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ convertToPostfix(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char const *argv[]) {
  char infix[40] = "(6+2)*5-8/4";
  char postfix[40] = "";
  convertToPostfix(infix, postfix);
  printf("%s\n", postfix);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x28,%edx
call   1060 <memcpy@plt>
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1050 <convertToPostfix@plt>
lea    -0x70(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movq   $0x0,0x50(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
lea    0x30(%rsp),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <convertToPostfix@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.infix = [40 x i8] c"(6+2)*5-8/4\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [40 x i8]
%7 = alloca [40 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [40 x i8]* %6 to i8*
%9 = bitcast [40 x i8]* %7 to i8*
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%12 = call i32 @convertToPostfix(i8* %10, i8* %11)
%13 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
ret i32 0
}

LLVM IR (-O2):
@__const.main.infix = [40 x i8] c"(6+2)*5-8/4\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [40 x i8]
%4 = alloca [40 x i8]
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%7 = call i32 @convertToPostfix(i8* %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}
void skeleton_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @skeleton_cleanup() {
ret void
}
fsubr(f, s1, s2) int (*f)();
char *s1, *s2;
{
  register int pid;
  while ((pid = fork()) == -1)
    sleep((unsigned)1);
  if (pid == 0) {
    (*f)(s1, s2);
    exit(0);
  }
  return pid;
}


x86 assembly (clang, -O0):
<fsubr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0xffffffff,%eax
jne    1168 <fsubr+0x38>
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <sleep@plt>
jmp    1144 <fsubr+0x14>
cmpl   $0x0,-0x1c(%rbp)
jne    1189 <fsubr+0x59>
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   *%rcx
xor    %edi,%edi
call   1030 <exit@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsubr>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
xchg   %ax,%ax
xor    %eax,%eax
call   1050 <fork@plt>
cmp    $0xffffffff,%eax
jne    115a <fsubr+0x2a>
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <sleep@plt>
jmp    1140 <fsubr+0x10>
test   %eax,%eax
je     1164 <fsubr+0x34>
pop    %rbx
pop    %r14
pop    %r15
ret
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   *%r15
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @fsubr(i32 (...)* %0, i8* %1, i8* %2) {
%4 = alloca i32 (...)*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i32 (...)* %0, i32 (...)** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
br label %8
8: ; preds = %11, %3
%9 = call i32 (...) @fork()
store i32 %9, i32* %7
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 1)
br label %8
13: ; preds = %8
%14 = load i32, i32* %7
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %22
16: ; preds = %13
%17 = load i32 (...)*, i32 (...)** %4
%18 = load i8*, i8** %5
%19 = load i8*, i8** %6
%20 = bitcast i32 (...)* %17 to i32 (i8*, i8*, ...)*
%21 = call i32 (i8*, i8*, ...) %20(i8* %18, i8* %19)
unreachable
22: ; preds = %13
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @fsubr(i32 (...)* nocapture %0, i8* %1, i8* %2) {
br label %4
4: ; preds = %6, %3
%5 = tail call i32 (...) @fork()
switch i32 %5, label %11 [
i32 -1, label %6
i32 0, label %8
]
6: ; preds = %4
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 1)
br label %4
8: ; preds = %4
%9 = bitcast i32 (...)* %0 to i32 (i8*, i8*, ...)*
%10 = tail call i32 (i8*, i8*, ...) %9(i8* %1, i8* %2)
tail call void @exit(i32 0)
unreachable
11: ; preds = %4
ret i32 %5
}
const char *I_NoAppServicesLobbyGetTeam(void) { return "Auto"; }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"Auto\00"
define i8* @I_NoAppServicesLobbyGetTeam() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [5 x i8] c"Auto\00"
define i8* @I_NoAppServicesLobbyGetTeam() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_read_dobldobl_random_coefficient_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(461, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_read_dobldobl_random_coefficient_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1cd,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_read_dobldobl_random_coefficient_system>:
mov    $0x1cd,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @celcon_read_dobldobl_random_coefficient_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 461, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_read_dobldobl_random_coefficient_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 461, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int Elf32_Half;

/* Variables and functions */
Elf32_Half rev_32half(Elf32_Half in) {
  return ((in & 0x00FF) << 8) | ((in & 0xFF00) >> 8);
}


x86 assembly (clang, -O0):
<rev_32half>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_32half>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @rev_32half(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 8
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = ashr i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rev_32half(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pia_err_init();
int /*<<< orphan*/ piaarp_init();
int /*<<< orphan*/ piaeth_init();
int /*<<< orphan*/ piaicm_init();
int /*<<< orphan*/ piaip_init();
int pia_init(void) {
  pia_err_init();
  piaeth_init();
  piaip_init();
  piaarp_init();
  piaicm_init();
  return 0;
}


x86 assembly (clang, -O0):
<pia_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <pia_err_init@plt>
mov    $0x0,%al
call   1060 <piaeth_init@plt>
mov    $0x0,%al
call   1030 <piaip_init@plt>
mov    $0x0,%al
call   1050 <piaarp_init@plt>
mov    $0x0,%al
call   1040 <piaicm_init@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pia_init>:
push   %rax
xor    %eax,%eax
call   1070 <pia_err_init@plt>
xor    %eax,%eax
call   1060 <piaeth_init@plt>
xor    %eax,%eax
call   1030 <piaip_init@plt>
xor    %eax,%eax
call   1050 <piaarp_init@plt>
xor    %eax,%eax
call   1040 <piaicm_init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pia_init() {
%1 = call i32 (...) @pia_err_init()
%2 = call i32 (...) @piaeth_init()
%3 = call i32 (...) @piaip_init()
%4 = call i32 (...) @piaarp_init()
%5 = call i32 (...) @piaicm_init()
ret i32 0
}

LLVM IR (-O2):
define i32 @pia_init() {
%1 = tail call i32 (...) @pia_err_init()
%2 = tail call i32 (...) @piaeth_init()
%3 = tail call i32 (...) @piaip_init()
%4 = tail call i32 (...) @piaarp_init()
%5 = tail call i32 (...) @piaicm_init()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
int strlen(char *);
unsigned numberLen(unsigned number) {
  char str_ui[10] = "";
  sprintf(str_ui, "%d", number);
  return strlen(str_ui);
}


x86 assembly (clang, -O0):
<numberLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0xe(%rbp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <memset@plt>
lea    -0xe(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea7(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xe(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numberLen>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%edx
movw   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
lea    0xec3(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @numberLen(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = bitcast [10 x i8]* %3 to i8*
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = load i32, i32* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @numberLen(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @strlen(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ main();
void reset() { exit(main()); }


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<reset>:
push   %rax
xor    %eax,%eax
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @reset() {
%1 = call i32 (...) @main()
%2 = call i32 @exit(i32 %1)
unreachable
}

LLVM IR (-O2):
define void @reset() {
%1 = tail call i32 (...) @main()
%2 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ insertion_sort(int *);
int main(void) {
  int a[5] = {10, 7, 5, 9, 4};
  insertion_sort(a);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <insertion_sort@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [5 x i32] [i32 10, i32 7, i32 5, i32 9, i32 4]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 0, i32* %1
%3 = bitcast [5 x i32]* %2 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%5 = call i32 @insertion_sort(i32* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [5 x i32] [i32 10, i32 7, i32 5, i32 9, i32 4]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @insertion_sort(i32* %3)
ret i32 0
}
int f_compare(const void *a, const void *b) {
  if (*(const float *)a < *(const float *)b)
    return -1;
  return *(const float *)a > *(const float *)b;
}


x86 assembly (clang, -O0):
<f_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1131 <f_compare+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    114b <f_compare+0x4b>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_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 @f_compare(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to float*
%8 = load float, float* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to float*
%11 = load float, float* %10
%12 = fcmp olt float %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %23
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to float*
%17 = load float, float* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to float*
%20 = load float, float* %19
%21 = fcmp ogt float %17, %20
%22 = zext i1 %21 to i32
store i32 %22, i32* %3
br label %23
23: ; preds = %14, %13
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @f_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
}
void pthread_join() {}


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

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

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

LLVM IR (-O2):
define void @pthread_join() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void access_denied(int sig) {
  printf("Odmowa dostępu\n");
  exit(0);
}


x86 assembly (clang, -O0):
<access_denied>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [17 x i8] c"Odmowa dost\C4\99pu\0A\00"
define void @access_denied(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [16 x i8] c"Odmowa dost\C4\99pu\00"
define void @access_denied(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _m_empty();
int /*<<< orphan*/ _mm_empty();
void __attribute__((no)) test_empty() {
  _mm_empty();
  _m_empty();
}


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

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

LLVM IR (-O0):
define void @test_empty() {
%1 = call i32 (...) @_mm_empty()
%2 = call i32 (...) @_m_empty()
ret void
}

LLVM IR (-O2):
define void @test_empty() {
%1 = tail call i32 (...) @_mm_empty()
%2 = tail call i32 (...) @_m_empty()
ret void
}
/* Type definitions */
struct RNApaln_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RNApaln_cmdline_parser_release(struct RNApaln_args_info *);
void RNApaln_cmdline_parser_free(struct RNApaln_args_info *args_info) {
  RNApaln_cmdline_parser_release(args_info);
}


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

x86 assembly (clang, -O2):
<RNApaln_cmdline_parser_free>:
jmp    1030 <RNApaln_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.RNApaln_args_info = type { i32 }
define void @RNApaln_cmdline_parser_free(%struct.RNApaln_args_info* %0) {
%2 = alloca %struct.RNApaln_args_info*
store %struct.RNApaln_args_info* %0, %struct.RNApaln_args_info** %2
%3 = load %struct.RNApaln_args_info*, %struct.RNApaln_args_info** %2
%4 = call i32 @RNApaln_cmdline_parser_release(%struct.RNApaln_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.RNApaln_args_info = type { i32 }
define void @RNApaln_cmdline_parser_free(%struct.RNApaln_args_info* %0) {
%2 = tail call i32 @RNApaln_cmdline_parser_release(%struct.RNApaln_args_info* %0)
ret void
}
char ascii(char s) {
  if (s < 0x20)
    return '.';
  if (s > 0x7E)
    return '.';
  return s;
}


x86 assembly (clang, -O0):
<ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x20,%eax
jge    1120 <ascii+0x20>
movb   $0x2e,-0x1(%rbp)
jmp    113c <ascii+0x3c>
movsbl -0x2(%rbp),%eax
cmp    $0x7e,%eax
jle    1136 <ascii+0x36>
movb   $0x2e,-0x1(%rbp)
jmp    113c <ascii+0x3c>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii>:
lea    -0x7f(%rdi),%eax
cmp    $0xa1,%al
mov    $0x2e,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @ascii(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
%6 = icmp slt i32 %5, 32
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 46, i8* %2
br label %15
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sgt i32 %10, 126
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 46, i8* %2
br label %15
13: ; preds = %8
%14 = load i8, i8* %3
store i8 %14, i8* %2
br label %15
15: ; preds = %13, %12, %7
%16 = load i8, i8* %2
ret i8 %16
}

LLVM IR (-O2):
define signext i8 @ascii(i8 signext %0) {
%2 = add i8 %0, -127
%3 = icmp ult i8 %2, -95
%4 = select i1 %3, i8 46, i8 %0
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ trainer_mul_1(int /*<<< orphan*/);
void trainer_mul_1_launcher(void) { trainer_mul_1(0); }


x86 assembly (clang, -O0):
<trainer_mul_1_launcher>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <trainer_mul_1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trainer_mul_1_launcher>:
xor    %edi,%edi
jmp    1030 <trainer_mul_1@plt>

LLVM IR (-O0):
define void @trainer_mul_1_launcher() {
%1 = call i32 @trainer_mul_1(i32 0)
ret void
}

LLVM IR (-O2):
define void @trainer_mul_1_launcher() {
%1 = tail call i32 @trainer_mul_1(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_exit();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void error(const char *p) {
  display_exit();
  write(2, p, strlen(p));
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1060 <display_exit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <display_exit@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @display_exit()
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = call i32 @write(i32 2, i8* %4, i32 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @error(i8* %0) {
%2 = tail call i32 (...) @display_exit()
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 2, i8* %0, i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ SHA256_NSS_KAT_0();
int /*<<< orphan*/ SHA256_NSS_KAT_1();
int /*<<< orphan*/ SHA256_NSS_KAT_2();
int main() {
  SHA256_NSS_KAT_0();
  SHA256_NSS_KAT_1();
  SHA256_NSS_KAT_2();
  return 1;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <SHA256_NSS_KAT_0@plt>
xor    %eax,%eax
call   1030 <SHA256_NSS_KAT_1@plt>
xor    %eax,%eax
call   1040 <SHA256_NSS_KAT_2@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SHA256_NSS_KAT_0()
%2 = tail call i32 (...) @SHA256_NSS_KAT_1()
%3 = tail call i32 (...) @SHA256_NSS_KAT_2()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void __attribute__((destructor)) so_dtor(void) {
  printf(
      "%s: Destructor\n",
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/frdeso/fun-with-so/refs/heads/master/aaa.c");
}


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

x86 assembly (clang, -O2):
<so_dtor>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%s: Destructor\0A\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/frdeso/fun-with-so/refs/heads/master/aaa.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @so_dtor, i8* null }]
define void @so_dtor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s: Destructor\0A\00"
@.str.1 = [133 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/frdeso/fun-with-so/refs/heads/master/aaa.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @so_dtor, i8* null }]
define void @so_dtor() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([133 x i8], [133 x i8]* @.str.1, i64 0, i64 0))
ret void
}