xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sas7bdat_write_ctx_free(void *);
void sas7bdat_module_ctx_free(void *module_ctx) {
  sas7bdat_write_ctx_free(module_ctx);
}


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

x86 assembly (clang, -O2):
<sas7bdat_module_ctx_free>:
jmp    1030 <sas7bdat_write_ctx_free@plt>

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

LLVM IR (-O2):
define void @sas7bdat_module_ctx_free(i8* %0) {
%2 = tail call i32 @sas7bdat_write_ctx_free(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, scalar_t__);
int tagCompare(char *openingTag, char *closingTag) {
  return !strncmp(openingTag, closingTag + 1, strlen(closingTag) - 1);
}


x86 assembly (clang, -O0):
<tagCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
sub    $0x1,%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tagCompare>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x1(%rsi),%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @tagCompare(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = sub nsw i64 %9, 1
%11 = call i32 @strncmp(i8* %5, i8* %7, i64 %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @tagCompare(i8* nocapture %0, i8* nocapture %1) {
%3 = getelementptr inbounds i8, i8* %1, i64 1
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add nsw i64 %4, -1
%6 = tail call i32 @strncmp(i8* %0, i8* %3, i64 %5)
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
__attribute__((always_)) void cli(void) { asm volatile("cli" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @cli() {
tail call void asm sideeffect "cli", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct tstat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
char *procprt_WCHAN_e(struct tstat *curstat, int avgval, int nsecs) {
  static char buf[32];
  snprintf(buf, sizeof buf, "%-15.15s", " ");
  return buf;
}


x86 assembly (clang, -O0):
<procprt_WCHAN_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0x2f17(%rip),%rdi
mov    $0x20,%esi
lea    0xecb(%rip),%rdx
lea    0xecd(%rip),%rcx
call   1030 <snprintf@plt>
lea    0x2ef8(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<procprt_WCHAN_e>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rdx
lea    0xee3(%rip),%rcx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.tstat = type { i32 }
@procprt_WCHAN_e.buf = internal global [32 x i8] zeroinitializer
@.str = [9 x i8] c"%-15.15s\00"
@.str.1 = [2 x i8] c" \00"
define i8* @procprt_WCHAN_e(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @procprt_WCHAN_e.buf, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @procprt_WCHAN_e.buf, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type { i32 }
@procprt_WCHAN_e.buf = internal global [32 x i8] zeroinitializer
@.str = [9 x i8] c"%-15.15s\00"
@.str.1 = [2 x i8] c" \00"
define i8* @procprt_WCHAN_e(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @procprt_WCHAN_e.buf, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @procprt_WCHAN_e.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void InfixToPrefix() { printf("hey i am InfixToPrefix"); }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"hey i am InfixToPrefix\00"
define void @InfixToPrefix() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"hey i am InfixToPrefix\00"
define void @InfixToPrefix() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
long long int mc_next_particle_id() {
  static long long int next_particle_id = 0;
  return next_particle_id++;
}


x86 assembly (clang, -O0):
<mc_next_particle_id>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1d(%rip),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,0x2f0f(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_next_particle_id>:
mov    0x2f21(%rip),%rax
lea    0x1(%rax),%rcx
mov    %rcx,0x2f16(%rip)
ret

LLVM IR (-O0):
@mc_next_particle_id.next_particle_id = internal global i64 0
define i64 @mc_next_particle_id() {
%1 = load i64, i64* @mc_next_particle_id.next_particle_id
%2 = add nsw i64 %1, 1
store i64 %2, i64* @mc_next_particle_id.next_particle_id
ret i64 %1
}

LLVM IR (-O2):
@mc_next_particle_id.next_particle_id = internal unnamed_addr global i64 0
define i64 @mc_next_particle_id() {
%1 = load i64, i64* @mc_next_particle_id.next_particle_id
%2 = add nsw i64 %1, 1
store i64 %2, i64* @mc_next_particle_id.next_particle_id
ret i64 %1
}
/* Variables and functions */
double pow(double, int);
double sqr(int);
double d2exdn2_(double n) {
  if (n <= 0)
    return 0;
  return -pow(3.1415927 / sqr(3 * 3.1415927 * n), 1. / 3.);
}


x86 assembly (clang, -O0):
<d2exdn2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1148 <d2exdn2_+0x28>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1190 <d2exdn2_+0x70>
movsd  0xeb8(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqr@plt>
movaps %xmm0,%xmm1
movsd  0xe97(%rip),%xmm0
divsd  %xmm1,%xmm0
xor    %edi,%edi
call   1040 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2exdn2_>:
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    1163 <d2exdn2_+0x43>
push   %rax
mulsd  0xec9(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <sqr@plt>
movsd  0xec0(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
xor    %edi,%edi
call   1040 <pow@plt>
xorpd  0xeb1(%rip),%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
define double @d2exdn2_(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %15
7: ; preds = %1
%8 = load double, double* %3
%9 = fmul double 0x4022D97C83DF1D31, %8
%10 = fptosi double %9 to i32
%11 = call double @sqr(i32 %10)
%12 = fdiv double 0x400921FB5A7ED197, %11
%13 = call double @pow(double %12, i32 0)
%14 = fneg double %13
store double %14, double* %2
br label %15
15: ; preds = %7, %6
%16 = load double, double* %2
ret double %16
}

LLVM IR (-O2):
define double @d2exdn2_(double %0) {
%2 = fcmp ugt double %0, 0.000000e+00
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = fmul double %0, 0x4022D97C83DF1D31
%5 = fptosi double %4 to i32
%6 = tail call double @sqr(i32 %5)
%7 = fdiv double 0x400921FB5A7ED197, %6
%8 = tail call double @pow(double %7, i32 0)
%9 = fneg double %8
br label %10
10: ; preds = %1, %3
%11 = phi double [ %9, %3 ], [ 0.000000e+00, %1 ]
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fileno(int /*<<< orphan*/ *);
int c_fileno(void *stream) { return fileno((FILE *)stream); }


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

x86 assembly (clang, -O2):
<c_fileno>:
jmp    1030 <fileno@plt>

LLVM IR (-O0):
define i32 @c_fileno(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @fileno(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @c_fileno(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @fileno(i32* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print_0(char *);
int /*<<< orphan*/ println_4();
void println_0(char *s_6) {
  print_0(s_6);
  println_4();
}


x86 assembly (clang, -O0):
<println_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <print_0@plt>
mov    $0x0,%al
call   1040 <println_4@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @println_0(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @print_0(i8* %3)
%5 = call i32 (...) @println_4()
ret void
}

LLVM IR (-O2):
define void @println_0(i8* %0) {
%2 = tail call i32 @print_0(i8* %0)
%3 = tail call i32 (...) @println_4()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ raz_trzy();
int main() {
  printf("Zaczynamy:\n");
  raz_trzy();
  printf("koniec!\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <raz_trzy@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Zaczynamy:\0A\00"
@.str.1 = [9 x i8] c"koniec!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @raz_trzy()
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"Zaczynamy:\00"
@str.2 = [8 x i8] c"koniec!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @raz_trzy()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
int fun382() { return 382; }


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

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

LLVM IR (-O0):
define i32 @fun382() {
ret i32 382
}

LLVM IR (-O2):
define i32 @fun382() {
ret i32 382
}
/* Type definitions */
struct uevent {
  int dummy;
};

/* Variables and functions */
int uevent_get_env_positive_int(struct uevent const *, char *);
int uevent_get_major(const struct uevent *uev) {
  return uevent_get_env_positive_int(uev, "MAJOR");
}


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

x86 assembly (clang, -O2):
<uevent_get_major>:
lea    0xee9(%rip),%rsi
jmp    1030 <uevent_get_env_positive_int@plt>

LLVM IR (-O0):
%struct.uevent = type { i32 }
@.str = [6 x i8] c"MAJOR\00"
define i32 @uevent_get_major(%struct.uevent* %0) {
%2 = alloca %struct.uevent*
store %struct.uevent* %0, %struct.uevent** %2
%3 = load %struct.uevent*, %struct.uevent** %2
%4 = call i32 @uevent_get_env_positive_int(%struct.uevent* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.uevent = type { i32 }
@.str = [6 x i8] c"MAJOR\00"
define i32 @uevent_get_major(%struct.uevent* %0) {
%2 = tail call i32 @uevent_get_env_positive_int(%struct.uevent* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int fptr_capi20ext_set_flags(unsigned int, unsigned int);
scalar_t__ loadlib();
int capi20ext_set_flags(unsigned ApplID, unsigned flags) {
  if (loadlib() < 0)
    return -1;
  return fptr_capi20ext_set_flags(ApplID, flags);
}


x86 assembly (clang, -O0):
<capi20ext_set_flags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <loadlib@plt>
cmp    $0x0,%rax
jge    114b <capi20ext_set_flags+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <capi20ext_set_flags+0x39>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <fptr_capi20ext_set_flags@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capi20ext_set_flags>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <loadlib@plt>
test   %rax,%rax
js     1142 <capi20ext_set_flags+0x22>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <fptr_capi20ext_set_flags@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @capi20ext_set_flags(i32 %0, i32 %1) {
%3 = tail call i64 (...) @loadlib()
%4 = icmp slt i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @fptr_capi20ext_set_flags(i32 %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ COLOR_PAIR(short);
int attron(int /*<<< orphan*/);
int con_setColor(short n) { return attron(COLOR_PAIR(n)); }


x86 assembly (clang, -O0):
<con_setColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attron@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<con_setColor>:
push   %rax
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <attron@plt>

LLVM IR (-O0):
define i32 @con_setColor(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @COLOR_PAIR(i16 signext %3)
%5 = call i32 @attron(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @con_setColor(i16 signext %0) {
%2 = tail call i32 @COLOR_PAIR(i16 signext %0)
%3 = tail call i32 @attron(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ add_level(int /*<<< orphan*/, int, int, int, int,
                             int /*<<< orphan*/);
int /*<<< orphan*/ makeLevelName();
void buildMaps(int map_count) {
  int i;
  if (map_count > 100)
    map_count = 100;
  for (i = 0; i < map_count; i++) {
    add_level(makeLevelName(), i, 300, 200, 1, 0);
  }
}


x86 assembly (clang, -O0):
<buildMaps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jle    113c <buildMaps+0x1c>
movl   $0x64,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1181 <buildMaps+0x61>
mov    $0x0,%al
call   1040 <makeLevelName@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
mov    $0x12c,%edx
mov    $0xc8,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1030 <add_level@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <buildMaps+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildMaps>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    116a <buildMaps+0x4a>
cmp    $0x64,%edi
mov    $0x64,%ebp
cmovb  %edi,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1040 <makeLevelName@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    $0x12c,%edx
mov    $0xc8,%ecx
mov    $0x1,%r8d
xor    %r9d,%r9d
call   1030 <add_level@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1140 <buildMaps+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @buildMaps(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 100
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 100, i32* %2
br label %7
7: ; preds = %6, %1
store i32 0, i32* %3
br label %8
8: ; preds = %16, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = call i32 (...) @makeLevelName()
%14 = load i32, i32* %3
%15 = call i32 @add_level(i32 %13, i32 %14, i32 300, i32 200, i32 1, i32 0)
br label %16
16: ; preds = %12
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %8
19: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @buildMaps(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = icmp ult i32 %0, 100
%5 = select i1 %4, i32 %0, i32 100
br label %6
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ 0, %3 ]
%8 = tail call i32 (...) @makeLevelName()
%9 = tail call i32 @add_level(i32 %8, i32 %7, i32 300, i32 200, i32 1, i32 0)
%10 = add nuw nsw i32 %7, 1
%11 = icmp eq i32 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int x = 5;
  printf("Hello World\n");
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int do_stuff();
int /*<<< orphan*/ is_finished();
int /*<<< orphan*/ release();
int /*<<< orphan*/ release_element();
int f1() {
  int err = do_stuff();
  if (err) {
    release();
    while (!is_finished()) {
      release_element();
    }
  }
  return err;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <do_stuff@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1190 <f1+0x50>
mov    $0x0,%al
call   1050 <release@plt>
mov    $0x0,%al
call   1030 <is_finished@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    117f <f1+0x3f>
jmp    118b <f1+0x4b>
mov    $0x0,%al
call   1040 <release_element@plt>
jmp    1163 <f1+0x23>
jmp    1190 <f1+0x50>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
xor    %eax,%eax
call   1060 <do_stuff@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1174 <f1+0x34>
xor    %eax,%eax
call   1050 <release@plt>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <is_finished@plt>
test   %eax,%eax
jne    1174 <f1+0x34>
xor    %eax,%eax
call   1040 <release_element@plt>
jmp    1160 <f1+0x20>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f1() {
%1 = alloca i32
%2 = call i32 (...) @do_stuff()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %0
%6 = call i32 (...) @release()
br label %7
7: ; preds = %11, %5
%8 = call i32 (...) @is_finished()
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = call i32 (...) @release_element()
br label %7
13: ; preds = %7
br label %14
14: ; preds = %13, %0
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @f1() {
%1 = tail call i32 (...) @do_stuff()
%2 = icmp eq i32 %1, 0
br i1 %2, label %11, label %3
3: ; preds = %0
%4 = tail call i32 (...) @release()
%5 = tail call i32 (...) @is_finished()
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %3, %7
%8 = tail call i32 (...) @release_element()
%9 = tail call i32 (...) @is_finished()
%10 = icmp eq i32 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7, %3, %0
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XGraphicsExposeEvent;

/* Variables and functions */
void *get_XGraphicsExposeEvent_display(void *_p) {
  return (void *)((XGraphicsExposeEvent *)_p)->display;
}


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

x86 assembly (clang, -O2):
<get_XGraphicsExposeEvent_display>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XGraphicsExposeEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XGraphicsExposeEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
int isdigit(int c) { return (c >= '0') && (c <= '9'); }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
long long zuzu() { return 0x00007fff00007fffLL; }


x86 assembly (clang, -O0):
<zuzu>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fff00007fff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zuzu>:
movabs $0x7fff00007fff,%rax
ret

LLVM IR (-O0):
define i64 @zuzu() {
ret i64 140733193420799
}

LLVM IR (-O2):
define i64 @zuzu() {
ret i64 140733193420799
}
/* Variables and functions */
int /*<<< orphan*/ japi_setsplitpaneright(int, int);
void j_setsplitpaneright(int arg0, int arg1) {
  japi_setsplitpaneright(arg0, arg1);
}


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

x86 assembly (clang, -O2):
<j_setsplitpaneright>:
jmp    1030 <japi_setsplitpaneright@plt>

LLVM IR (-O0):
define void @j_setsplitpaneright(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 = call i32 @japi_setsplitpaneright(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @j_setsplitpaneright(i32 %0, i32 %1) {
%3 = tail call i32 @japi_setsplitpaneright(i32 %0, i32 %1)
ret void
}
unsigned long long nlm_crypto_form_pkt_fmn_entry0(
    unsigned int freeback_vc, unsigned int designer_fblen,
    unsigned int designerdesc_valid, unsigned int cipher_keylen,
    unsigned long long cntldesc_addr) {
  return ((unsigned long long)(freeback_vc) << (48)) |
         (((unsigned long long)(designer_fblen - 1) & ((1ULL << (2)) - 1))
          << (46)) |
         ((unsigned long long)(designerdesc_valid) << (45)) |
         (((unsigned long long)(((cipher_keylen + 7) >> 3)) &
           ((1ULL << (5)) - 1))
          << (40)) |
         ((unsigned long long)(cntldesc_addr >> 6) << (0));
}


x86 assembly (clang, -O0):
<nlm_crypto_form_pkt_fmn_entry0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x30,%rax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    %ecx,%ecx
and    $0x3,%rcx
shl    $0x2e,%rcx
or     %rcx,%rax
mov    -0xc(%rbp),%ecx
shl    $0x2d,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%ecx
add    $0x7,%ecx
shr    $0x3,%ecx
mov    %ecx,%ecx
and    $0x1f,%rcx
shl    $0x28,%rcx
or     %rcx,%rax
mov    -0x18(%rbp),%rcx
shr    $0x6,%rcx
shl    $0x0,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nlm_crypto_form_pkt_fmn_entry0>:
shl    $0x30,%rdi
add    $0xffffffff,%esi
and    $0x3,%esi
shl    $0x2e,%rsi
or     %rdi,%rsi
shl    $0x2d,%rdx
or     %rdx,%rsi
lea    0x7(%rcx),%eax
shr    $0x3,%eax
and    $0x1f,%eax
shl    $0x28,%rax
or     %rsi,%rax
shr    $0x6,%r8
or     %r8,%rax
ret

LLVM IR (-O0):
define i64 @nlm_crypto_form_pkt_fmn_entry0(i32 %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load i32, i32* %6
%12 = zext i32 %11 to i64
%13 = shl i64 %12, 48
%14 = load i32, i32* %7
%15 = sub i32 %14, 1
%16 = zext i32 %15 to i64
%17 = and i64 %16, 3
%18 = shl i64 %17, 46
%19 = or i64 %13, %18
%20 = load i32, i32* %8
%21 = zext i32 %20 to i64
%22 = shl i64 %21, 45
%23 = or i64 %19, %22
%24 = load i32, i32* %9
%25 = add i32 %24, 7
%26 = lshr i32 %25, 3
%27 = zext i32 %26 to i64
%28 = and i64 %27, 31
%29 = shl i64 %28, 40
%30 = or i64 %23, %29
%31 = load i64, i64* %10
%32 = lshr i64 %31, 6
%33 = shl i64 %32, 0
%34 = or i64 %30, %33
ret i64 %34
}

LLVM IR (-O2):
define i64 @nlm_crypto_form_pkt_fmn_entry0(i32 %0, i32 %1, i32 %2, i32 %3, i64 %4) {
%6 = zext i32 %0 to i64
%7 = shl i64 %6, 48
%8 = add i32 %1, 3
%9 = and i32 %8, 3
%10 = zext i32 %9 to i64
%11 = shl nuw nsw i64 %10, 46
%12 = or i64 %11, %7
%13 = zext i32 %2 to i64
%14 = shl i64 %13, 45
%15 = or i64 %14, %12
%16 = add i32 %3, 7
%17 = lshr i32 %16, 3
%18 = and i32 %17, 31
%19 = zext i32 %18 to i64
%20 = shl nuw nsw i64 %19, 40
%21 = or i64 %20, %15
%22 = lshr i64 %4, 6
%23 = or i64 %21, %22
ret i64 %23
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Transpose_init(void) {
  _hmt_register_covercase("HMM_Transpose", "1");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_Transpose_init>:
lea    0xee9(%rip),%rdi
lea    0xef0(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"HMM_Transpose\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Transpose_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"HMM_Transpose\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_Transpose_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int arraySum(int array[], const int n);
  int values[10] = {3, 7, -9, 3, 6, -1, 7, 9, 1, -5};
  printf("The sum is %i\n", arraySum(values, 10));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <arraySum@plt>
mov    %eax,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <arraySum@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.values = [10 x i32] [i32 3, i32 7, i32 -9, i32 3, i32 6, i32 -1, i32 7, i32 9, i32 1, i32 -5]
@.str = [15 x i8] c"The sum is %i\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @arraySum(i32* %4, i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.values = [10 x i32] [i32 3, i32 7, i32 -9, i32 3, i32 6, i32 -1, i32 7, i32 9, i32 1, i32 -5]
@.str = [15 x i8] c"The sum is %i\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @arraySum(i32* %3, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void goDown(int xyzk[]) {
  xyzk[0] <<= 1;
  xyzk[1] <<= 1;
  xyzk[2] <<= 1;
  xyzk[3] += 1;
}


x86 assembly (clang, -O0):
<goDown>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
shl    $0x1,%ecx
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
shl    $0x1,%ecx
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<goDown>:
shll   (%rdi)
shll   0x4(%rdi)
shll   0x8(%rdi)
addl   $0x1,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @goDown(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 1
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 1
store i32 %6, i32* %4
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = shl i32 %8, 1
store i32 %9, i32* %7
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %10
ret void
}
void f1(void) {
#pragma omp ordered asdf
#pragma omp ordered
}


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

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

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

LLVM IR (-O2):
define void @f1() {
ret void
}
/* Type definitions */
struct skin_element {
  int dummy;
};

/* Variables and functions */
struct skin_element *skin_parse_line_optional(char const **,
                                              int /*<<< orphan*/);
struct skin_element *skin_parse_line(const char **document) {
  return skin_parse_line_optional(document, 0);
}


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

x86 assembly (clang, -O2):
<skin_parse_line>:
xor    %esi,%esi
jmp    1030 <skin_parse_line_optional@plt>

LLVM IR (-O0):
%struct.skin_element = type { i32 }
define %struct.skin_element* @skin_parse_line(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call %struct.skin_element* @skin_parse_line_optional(i8** %3, i32 0)
ret %struct.skin_element* %4
}

LLVM IR (-O2):
%struct.skin_element = type { i32 }
define %struct.skin_element* @skin_parse_line(i8** %0) {
%2 = tail call %struct.skin_element* @skin_parse_line_optional(i8** %0, i32 0)
ret %struct.skin_element* %2
}
void gendmtc1() {}


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

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

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

LLVM IR (-O2):
define void @gendmtc1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
void handler(int signo) {
  printf("Alarm received\n");
  alarm(5);
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
pop    %rax
jmp    1040 <alarm@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Alarm received\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @alarm(i32 5)
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"Alarm received\00"
define void @handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @alarm(i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MRSetTrackDurationInfo(int, int);
void RSL_SetTrackDuration(void *rslObj, int duration) {
  ;
  MRSetTrackDurationInfo(duration, 2147483647);
}


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

x86 assembly (clang, -O2):
<RSL_SetTrackDuration>:
mov    %esi,%edi
mov    $0x7fffffff,%esi
jmp    1030 <MRSetTrackDurationInfo@plt>

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

LLVM IR (-O2):
define void @RSL_SetTrackDuration(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @MRSetTrackDurationInfo(i32 %1, i32 2147483647)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command_loop(int, int /*<<< orphan*/);
void xio_command_loop(int i) { command_loop(i, 0); }


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

x86 assembly (clang, -O2):
<xio_command_loop>:
xor    %esi,%esi
jmp    1030 <command_loop@plt>

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

LLVM IR (-O2):
define void @xio_command_loop(i32 %0) {
%2 = tail call i32 @command_loop(i32 %0, i32 0)
ret void
}
/* Variables and functions */
char *date_get_now_date_yyyy_mm_dd(int);
char *date_get_today_yyyy_mm_dd(int utc_offset) {
  return date_get_now_date_yyyy_mm_dd(utc_offset);
}


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

x86 assembly (clang, -O2):
<date_get_today_yyyy_mm_dd>:
jmp    1030 <date_get_now_date_yyyy_mm_dd@plt>

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

LLVM IR (-O2):
define i8* @date_get_today_yyyy_mm_dd(i32 %0) {
%2 = tail call i8* @date_get_now_date_yyyy_mm_dd(i32 %0)
ret i8* %2
}
void hal_radio_ram_prio_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @hal_radio_ram_prio_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GetCurrentColumn();
int /*<<< orphan*/ WriteIndicator(int /*<<< orphan*/);
int /*<<< orphan*/ WriteMessage(char *);
yyerror(char *s) {
  WriteIndicator(GetCurrentColumn());
  WriteMessage("Illegal Character in YACC");
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <GetCurrentColumn@plt>
mov    %eax,%edi
call   1030 <WriteIndicator@plt>
lea    0xeaf(%rip),%rdi
call   1050 <WriteMessage@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
xor    %eax,%eax
call   1040 <GetCurrentColumn@plt>
mov    %eax,%edi
call   1030 <WriteIndicator@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1050 <WriteMessage@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Illegal Character in YACC\00"
define i32 @yyerror(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @GetCurrentColumn()
%5 = call i32 @WriteIndicator(i32 %4)
%6 = call i32 @WriteMessage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [26 x i8] c"Illegal Character in YACC\00"
define i32 @yyerror(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @GetCurrentColumn()
%3 = tail call i32 @WriteIndicator(i32 %2)
%4 = tail call i32 @WriteMessage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_longlong_xor_to_all(long long *target, long long *source,
                                      int nreduce, int PE_start,
                                      int logPE_stride, int PE_size,
                                      long long *pWrk, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_longlong_xor_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_longlong_xor_to_all(i64* %0, i64* %1, i32 %2, i32 %3, i32 %4, i32 %5, i64* %6, i64* %7) {
%9 = alloca i64*
%10 = alloca i64*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i64*
%16 = alloca i64*
store i64* %0, i64** %9
store i64* %1, i64** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i64* %6, i64** %15
store i64* %7, i64** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_longlong_xor_to_all(i64* nocapture readnone %0, i64* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, i64* nocapture readnone %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myGroovyHandler(int i) { printf("yay signals!!!\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"yay signals!!!\0A\00"
define void @myGroovyHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"yay signals!!!\00"
define void @myGroovyHandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned long get_cr3_base(void) {
  unsigned long cr3;
  __asm__ volatile("mov %%cr3, %0" : "=r"(cr3));
  return (cr3 & ~(0xFFFULL));
}


x86 assembly (clang, -O0):
<get_cr3_base>:
push   %rbp
mov    %rsp,%rbp
mov    %cr3,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffff000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cr3_base>:
mov    %cr3,%rax
and    $0xfffffffffffff000,%rax
ret

LLVM IR (-O0):
define i64 @get_cr3_base() {
%1 = alloca i64
%2 = call i64 asm sideeffect "mov %cr3, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = and i64 %3, -4096
ret i64 %4
}

LLVM IR (-O2):
define i64 @get_cr3_base() {
%1 = tail call i64 asm sideeffect "mov %cr3, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
%2 = and i64 %1, -4096
ret i64 %2
}
int test_imm_EDint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xED << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EDint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xed,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_EDint64_highword_mem>:
testb  $0xed,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_EDint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1017907249152
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
long labs(long __x) { return (__x < 0) ? -__x : __x; }


x86 assembly (clang, -O0):
<labs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1122 <labs+0x22>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    112a <labs+0x2a>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<labs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @labs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
br label %10
8: ; preds = %1
%9 = load i64, i64* %2
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
ret i64 %11
}

LLVM IR (-O2):
define i64 @labs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
/* Variables and functions */
int __infer_nondet_int();
int raise(int sig) { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @raise(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}