xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void displayRenderer(char template[]) {
  char start[50];
  system("SET var=%cd%");
  sprintf(start, "start QtWeb.exe %%cd%%\\res\\templates\\%s\\index.html",
          template);
  printf("%s", start);
  system(start);
}


x86 assembly (clang, -O0):
<displayRenderer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <system@plt>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb6(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x40(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1040 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1030 <system@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayRenderer>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
call   1030 <system@plt>
lea    0xec0(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
lea    0xede(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"SET var=%cd%\00"
@.str.1 = [51 x i8] c"start QtWeb.exe %%cd%%\\res\\templates\\%s\\index.html\00"
@.str.2 = [3 x i8] c"%s\00"
define void @displayRenderer(i8* %0) {
%2 = alloca i8*
%3 = alloca [50 x i8]
store i8* %0, i8** %2
%4 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%11 = call i32 @system(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"SET var=%cd%\00"
@.str.1 = [51 x i8] c"start QtWeb.exe %%cd%%\\res\\templates\\%s\\index.html\00"
@.str.2 = [3 x i8] c"%s\00"
define void @displayRenderer(i8* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%7 = call i32 @system(i8* %3)
ret void
}
/* Variables and functions */
double ln_get_neptune_earth_dist(double);
double ln_get_neptune_solar_dist(double);
int log10(double);
double ln_get_neptune_magnitude(double JD) {
  double delta, r;
  r = ln_get_neptune_solar_dist(JD);
  delta = ln_get_neptune_earth_dist(JD);
  return -6.87 + 5 * log10(r * delta);
}


x86 assembly (clang, -O0):
<ln_get_neptune_magnitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_neptune_solar_dist@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <ln_get_neptune_earth_dist@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <log10@plt>
imul   $0x5,%eax,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe87(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_neptune_magnitude>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <ln_get_neptune_solar_dist@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <ln_get_neptune_earth_dist@plt>
mulsd  0x10(%rsp),%xmm0
call   1040 <log10@plt>
lea    (%rax,%rax,4),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xe93(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @ln_get_neptune_magnitude(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call double @ln_get_neptune_solar_dist(double %5)
store double %6, double* %4
%7 = load double, double* %2
%8 = call double @ln_get_neptune_earth_dist(double %7)
store double %8, double* %3
%9 = load double, double* %4
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = call i32 @log10(double %11)
%13 = mul nsw i32 5, %12
%14 = sitofp i32 %13 to double
%15 = fadd double -6.870000e+00, %14
ret double %15
}

LLVM IR (-O2):
define double @ln_get_neptune_magnitude(double %0) {
%2 = tail call double @ln_get_neptune_solar_dist(double %0)
%3 = tail call double @ln_get_neptune_earth_dist(double %0)
%4 = fmul double %2, %3
%5 = tail call i32 @log10(double %4)
%6 = mul nsw i32 %5, 5
%7 = sitofp i32 %6 to double
%8 = fadd double %7, -6.870000e+00
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ cross_prod(double *, double *, double *);
double dot_prod(double *, double *);
double cell_volume(double cell[3][3]) {
  double cross[3];
  cross_prod(cell[0], cell[1], cross);
  return dot_prod(cell[2], cross);
}


x86 assembly (clang, -O0):
<cell_volume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x18,%rsi
lea    -0x20(%rbp),%rdx
call   1030 <cross_prod@plt>
mov    -0x8(%rbp),%rdi
add    $0x30,%rdi
lea    -0x20(%rbp),%rsi
call   1040 <dot_prod@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cell_volume>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
lea    0x18(%rdi),%rsi
mov    %rsp,%r14
mov    %r14,%rdx
call   1030 <cross_prod@plt>
add    $0x30,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <dot_prod@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @cell_volume([3 x double]* %0) {
%2 = alloca [3 x double]*
%3 = alloca [3 x double]
store [3 x double]* %0, [3 x double]** %2
%4 = load [3 x double]*, [3 x double]** %2
%5 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0
%6 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%7 = load [3 x double]*, [3 x double]** %2
%8 = getelementptr inbounds [3 x double], [3 x double]* %7, i64 1
%9 = getelementptr inbounds [3 x double], [3 x double]* %8, i64 0, i64 0
%10 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%11 = call i32 @cross_prod(double* %6, double* %9, double* %10)
%12 = load [3 x double]*, [3 x double]** %2
%13 = getelementptr inbounds [3 x double], [3 x double]* %12, i64 2
%14 = getelementptr inbounds [3 x double], [3 x double]* %13, i64 0, i64 0
%15 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%16 = call double @dot_prod(double* %14, double* %15)
ret double %16
}

LLVM IR (-O2):
define double @cell_volume([3 x double]* %0) {
%2 = alloca [3 x double]
%3 = bitcast [3 x double]* %2 to i8*
%4 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 0, i64 0
%5 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 1, i64 0
%6 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%7 = call i32 @cross_prod(double* %4, double* %5, double* %6)
%8 = getelementptr inbounds [3 x double], [3 x double]* %0, i64 2, i64 0
%9 = call double @dot_prod(double* %8, double* %6)
ret double %9
}
void gtk_submenu_direction_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_submenu_direction_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ norep(int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int num[6];
  srand(time(NULL));
  printf("tabela com os numero sem repeticao de 1 a 6\n");
  printf("a tabela se repetira por 100 vezes\n\n");
  norep(num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <norep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1040 <norep@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [45 x i8] c"tabela com os numero sem repeticao de 1 a 6\0A\00"
@.str.1 = [37 x i8] c"a tabela se repetira por 100 vezes\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%8 = call i32 @norep(i32* %7)
ret i32 0
}

LLVM IR (-O2):
@str = [44 x i8] c"tabela com os numero sem repeticao de 1 a 6\00"
@str.2 = [36 x i8] c"a tabela se repetira por 100 vezes\0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.2, i64 0, i64 0))
%7 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%8 = call i32 @norep(i32* %7)
ret i32 0
}
/* Variables and functions */
int Qmuldiv(unsigned int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ Qval(int);
unsigned RadToDeg(unsigned dg) {
  unsigned qV;
  return (Qmuldiv(dg, Qval(4068), Qval(71)));
}


x86 assembly (clang, -O0):
<RadToDeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0xfe4,%edi
call   1040 <Qval@plt>
mov    %eax,-0xc(%rbp)
mov    $0x47,%edi
call   1040 <Qval@plt>
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    %eax,%edx
call   1030 <Qmuldiv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RadToDeg>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfe4,%edi
call   1040 <Qval@plt>
mov    %eax,%ebp
mov    $0x47,%edi
call   1040 <Qval@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <Qmuldiv@plt>

LLVM IR (-O0):
define i32 @RadToDeg(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @Qval(i32 4068)
%6 = call i32 @Qval(i32 71)
%7 = call i32 @Qmuldiv(i32 %4, i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @RadToDeg(i32 %0) {
%2 = tail call i32 @Qval(i32 4068)
%3 = tail call i32 @Qval(i32 71)
%4 = tail call i32 @Qmuldiv(i32 %0, i32 %2, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int fake_pthread_mutex_unlock(pthread_mutex_t *mutex) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fake_pthread_mutex_unlock(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SYS_exit;
int /*<<< orphan*/ syscall_1(int /*<<< orphan*/, int);
void exit(int status) { (void)syscall_1(SYS_exit, status); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall_1@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
mov    %edi,%esi
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall_1@plt>

LLVM IR (-O0):
@SYS_exit = global i32 0
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SYS_exit
%4 = load i32, i32* %2
%5 = call i32 @syscall_1(i32 %3, i32 %4)
unreachable
}

LLVM IR (-O2):
@SYS_exit = global i32 0
define void @exit(i32 %0) {
%2 = load i32, i32* @SYS_exit
%3 = tail call i32 @syscall_1(i32 %2, i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ RLA();
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_0x17(void) {
  RLA();
  T_WAIT_UNTIL(4);
  return;
}


x86 assembly (clang, -O0):
<op_0x17>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <RLA@plt>
mov    $0x4,%edi
call   1030 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_0x17>:
push   %rax
xor    %eax,%eax
call   1040 <RLA@plt>
mov    $0x4,%edi
pop    %rax
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_0x17() {
%1 = call i32 (...) @RLA()
%2 = call i32 @T_WAIT_UNTIL(i32 4)
ret void
}

LLVM IR (-O2):
define void @op_0x17() {
%1 = tail call i32 (...) @RLA()
%2 = tail call i32 @T_WAIT_UNTIL(i32 4)
ret void
}
int intmin(int a, int b) {
  if (a < b) {
    return a;
  } else {
    return b;
  }
}


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

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

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

LLVM IR (-O2):
define i32 @intmin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int gg1(a, b) { a = b; }


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

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

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

LLVM IR (-O2):
define i32 @gg1(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *scaler_alloc(size_t elem_size, size_t size) {
  return calloc(elem_size, size);
}


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

x86 assembly (clang, -O2):
<scaler_alloc>:
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define noalias i8* @scaler_alloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
char *mktemp(char *);
char *c_mktemp(char *arg0) { return mktemp(arg0); }


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

x86 assembly (clang, -O2):
<c_mktemp>:
jmp    1030 <mktemp@plt>

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

LLVM IR (-O2):
define i8* @c_mktemp(i8* %0) {
%2 = tail call i8* @mktemp(i8* %0)
ret i8* %2
}
void foo_1_1_2_1_1_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_1_1_2_2_2_2() {
ret void
}
void memmgr_print_stats() {}


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

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

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

LLVM IR (-O2):
define void @memmgr_print_stats() {
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_sec;
};
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t time_diff_sec(struct timeval start, struct timeval end) {
  return (end.tv_sec - start.tv_sec);
}


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

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

LLVM IR (-O0):
%struct.timeval = type { i64 }
define i64 @time_diff_sec(i64 %0, i64 %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
store i64 %0, i64* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
store i64 %1, i64* %6
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
%8 = load i64, i64* %7
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%10 = load i64, i64* %9
%11 = sub nsw i64 %8, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @time_diff_sec(i64 %0, i64 %1) {
%3 = sub nsw i64 %1, %0
ret i64 %3
}
void deconstructor(void) {}


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

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

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

LLVM IR (-O2):
define void @deconstructor() {
ret void
}
void I010ToI420() {}


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

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

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

LLVM IR (-O2):
define void @I010ToI420() {
ret void
}
/* Variables and functions */
int private_add(int, int);
int add(int a, int b) { return private_add(a, b); }


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

x86 assembly (clang, -O2):
<add>:
jmp    1030 <private_add@plt>

LLVM IR (-O0):
define i32 @add(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 @private_add(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = tail call i32 @private_add(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello,\vworld\n"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 = [14 x i8] c"hello,\0Bworld\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"hello,\0Bworld\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ strlen(char const *);
size_t osc_strlen(const char *buf) {
  return (((size_t)(strlen(buf) + 1) + 3) & (~3));
}


x86 assembly (clang, -O0):
<osc_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%rax
add    $0x3,%rax
and    $0xfffffffffffffffc,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osc_strlen>:
push   %rax
call   1030 <strlen@plt>
add    $0x4,%rax
and    $0xfffffffffffffffc,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @osc_strlen(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = add i64 %5, 3
%7 = and i64 %6, -4
ret i64 %7
}

LLVM IR (-O2):
define i64 @osc_strlen(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 4
%4 = and i64 %3, -4
ret i64 %4
}
void reprendrePartie(void) { return; }


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

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

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

LLVM IR (-O2):
define void @reprendrePartie() {
ret void
}
int lessOrEqual(int x, int y) { return (x <= y) ? 1 : 0; }


x86 assembly (clang, -O0):
<lessOrEqual>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovle %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lessOrEqual>:
xor    %eax,%eax
cmp    %esi,%edi
setle  %al
ret

LLVM IR (-O0):
define i32 @lessOrEqual(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sle i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @lessOrEqual(i32 %0, i32 %1) {
%3 = icmp sle i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
int read(int, char *, int);
unsigned long strtoul(char *, int /*<<< orphan*/ *, int);
int get16(int fd, uint16_t *dest) {
  char buf[3];
  if (read(fd, buf, 2) != 2)
    return 1;
  buf[2] = '\0';
  unsigned long val = strtoul(buf, NULL, 16);
  *dest = (uint16_t)val;
  return 0;
}


x86 assembly (clang, -O0):
<get16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x13(%rbp),%rsi
mov    $0x2,%edx
call   1030 <read@plt>
cmp    $0x2,%eax
je     1155 <get16+0x35>
movl   $0x1,-0x4(%rbp)
jmp    1181 <get16+0x61>
movb   $0x0,-0x11(%rbp)
lea    -0x13(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1040 <strtoul@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get16>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0x5(%rsp),%rsi
mov    $0x2,%edx
call   1030 <read@plt>
mov    $0x1,%ebx
cmp    $0x2,%eax
jne    115b <get16+0x3b>
movb   $0x0,0x7(%rsp)
xor    %ebx,%ebx
lea    0x5(%rsp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <strtoul@plt>
mov    %rax,(%r14)
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @get16(i32 %0, i64* nocapture writeonly %1) {
%3 = alloca [3 x i8]
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%5 = call i32 @read(i32 %0, i8* %4, i32 2)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 0, i8* %8
%9 = call i64 @strtoul(i8* nocapture %4, i32* null, i32 16)
store i64 %9, i64* %1
br label %10
10: ; preds = %2, %7
%11 = phi i32 [ 0, %7 ], [ 1, %2 ]
ret i32 %11
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_LITTLE_GUY_RESET_PIN() {
  return 0x01 & (inp_emulate(0x71) >> 6);
}


x86 assembly (clang, -O0):
<TOSH_READ_LITTLE_GUY_RESET_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x71,%edi
call   1030 <inp_emulate@plt>
sar    $0x6,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_LITTLE_GUY_RESET_PIN>:
push   %rax
mov    $0x71,%edi
call   1030 <inp_emulate@plt>
shr    $0x6,%al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_LITTLE_GUY_RESET_PIN() {
%1 = call i32 @inp_emulate(i32 113)
%2 = ashr i32 %1, 6
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_LITTLE_GUY_RESET_PIN() {
%1 = tail call i32 @inp_emulate(i32 113)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 6
%4 = and i8 %3, 1
ret i8 %4
}
void RTMsgErrorExitV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMsgErrorExitV() {
ret void
}
char *BitName(l, n)
char **l;
int n;
{ return (l[n] ? l[n] : "{unset}"); }


x86 assembly (clang, -O0):
<BitName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1133 <BitName+0x33>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
jmp    1143 <BitName+0x43>
lea    0xec6(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1143 <BitName+0x43>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BitName>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rcx
test   %rcx,%rcx
lea    0xeef(%rip),%rax
cmovne %rcx,%rax
ret

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

LLVM IR (-O2):
@.str = [8 x i8] c"{unset}\00"
define i8* @BitName(i8** nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8*, i8** %0, i64 %3
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
%7 = select i1 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5
ret i8* %7
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Cyc_asm_string_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_asm_string(struct Cyc_Lexing_lexbuf *lexbuf) {
  return ({ Cyc_asm_string_rec(lexbuf, 8); });
}


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

x86 assembly (clang, -O2):
<Cyc_asm_string>:
mov    $0x8,%esi
jmp    1030 <Cyc_asm_string_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_asm_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_asm_string_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 8)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_asm_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_asm_string_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 8)
ret i32 %2
}
unsigned long long mix_bits(unsigned long long x) {
  x ^= (x >> 29) & 0x5555555555555555ULL;
  x ^= (x << 17) & 0x71D67FFFEDA60000ULL;
  x ^= (x << 37) & 0xFFF7EEE000000000ULL;
  x ^= (x >> 43);
  return x;
}


x86 assembly (clang, -O0):
<mix_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1d,%rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rcx,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x11,%rax
movabs $0x71d67fffeda60000,%rcx
7f d6 71
and    %rcx,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x25,%rax
movabs $0xfff7eee000000000,%rcx
ee f7 ff
and    %rcx,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2b,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mix_bits>:
mov    %rdi,%rax
shr    $0x1d,%rax
movabs $0x555555555,%rcx
and    %rax,%rcx
xor    %rdi,%rcx
mov    %rcx,%rax
shl    $0x11,%rax
movabs $0x71d67fffeda60000,%rdx
7f d6 71
and    %rax,%rdx
xor    %rcx,%rdx
mov    %edx,%ecx
and    $0x7ffbf77,%ecx
shl    $0x25,%rcx
xor    %rdx,%rcx
mov    %rcx,%rax
shr    $0x2b,%rax
xor    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @mix_bits(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 29
%5 = and i64 %4, 6148914691236517205
%6 = load i64, i64* %2
%7 = xor i64 %6, %5
store i64 %7, i64* %2
%8 = load i64, i64* %2
%9 = shl i64 %8, 17
%10 = and i64 %9, 8202884508482404352
%11 = load i64, i64* %2
%12 = xor i64 %11, %10
store i64 %12, i64* %2
%13 = load i64, i64* %2
%14 = shl i64 %13, 37
%15 = and i64 %14, -2270628950310912
%16 = load i64, i64* %2
%17 = xor i64 %16, %15
store i64 %17, i64* %2
%18 = load i64, i64* %2
%19 = lshr i64 %18, 43
%20 = load i64, i64* %2
%21 = xor i64 %20, %19
store i64 %21, i64* %2
%22 = load i64, i64* %2
ret i64 %22
}

LLVM IR (-O2):
define i64 @mix_bits(i64 %0) {
%2 = lshr i64 %0, 29
%3 = and i64 %2, 22906492245
%4 = xor i64 %3, %0
%5 = shl i64 %4, 17
%6 = and i64 %5, 8202884508482404352
%7 = xor i64 %6, %4
%8 = shl i64 %7, 37
%9 = and i64 %8, -2270628950310912
%10 = xor i64 %9, %7
%11 = lshr i64 %10, 43
%12 = xor i64 %11, %10
ret i64 %12
}
int fun1201() { return 1201; }


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

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

LLVM IR (-O0):
define i32 @fun1201() {
ret i32 1201
}

LLVM IR (-O2):
define i32 @fun1201() {
ret i32 1201
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  printf("Hi Swapnil !! \nAre you okay ?  Today is  %s another great day to "
         "start!\n",
         "Mar 19 2022");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [73 x i8] c"Hi Swapnil !! \0AAre you okay ? Today is %s another great day to start!\0A\00"
@.str.1 = [12 x i8] c"Mar 19 2022\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [73 x i8] c"Hi Swapnil !! \0AAre you okay ? Today is %s another great day to start!\0A\00"
@.str.1 = [12 x i8] c"Mar 19 2022\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int ceil(float);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("%g", ceil(0.5f) + 41.0f);
  return ceil(0.5f) - 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xec2(%rip),%xmm0
call   1030 <ceil@plt>
cvtsi2ss %eax,%xmm0
movss  0xeb5(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%esi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
movss  0xe95(%rip),%xmm0
call   1030 <ceil@plt>
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
call   1030 <ceil@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
addss  0xec7(%rip),%xmm0
cvttss2si %xmm0,%esi
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
movss  0xeab(%rip),%xmm0
call   1030 <ceil@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%g\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @ceil(float 5.000000e-01)
%7 = sitofp i32 %6 to float
%8 = fadd float %7, 4.100000e+01
%9 = fptosi float %8 to i32
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = call i32 @ceil(float 5.000000e-01)
%12 = sub nsw i32 %11, 1
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%g\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @ceil(float 5.000000e-01)
%4 = sitofp i32 %3 to float
%5 = fadd float %4, 4.100000e+01
%6 = fptosi float %5 to i32
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 @ceil(float 5.000000e-01)
%9 = add nsw i32 %8, -1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *info) {
  printf("Usage: %s <PORT>\n", info);
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Usage: %s <PORT>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [18 x i8] c"Usage: %s <PORT>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
void av_parser_close() {}


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

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

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

LLVM IR (-O2):
define void @av_parser_close() {
ret void
}
int foo(unsigned int cc) {
  while (cc >> 16) {
    cc = (cc & 0xffff) + (cc >> 16);
  }
  return ((unsigned short)(cc)) == ((unsigned short)(-1));
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
cmp    $0x0,%eax
je     112e <foo+0x2e>
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <foo+0x7>
mov    -0x4(%rbp),%eax
movzwl %ax,%eax
cmp    $0xffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x10000,%edi
jb     1122 <foo+0x22>
nopl   0x0(%rax,%rax,1)
mov    %edi,%eax
shr    $0x10,%eax
movzwl %di,%edi
add    %eax,%edi
cmp    $0xffff,%edi
ja     1110 <foo+0x10>
xor    %eax,%eax
cmp    $0xffff,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = lshr i32 %4, 16
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i32, i32* %2
%9 = and i32 %8, 65535
%10 = load i32, i32* %2
%11 = lshr i32 %10, 16
%12 = add i32 %9, %11
store i32 %12, i32* %2
br label %3
13: ; preds = %3
%14 = load i32, i32* %2
%15 = trunc i32 %14 to i16
%16 = zext i16 %15 to i32
%17 = icmp eq i32 %16, 65535
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ult i32 %0, 65536
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = lshr i32 %4, 16
%6 = and i32 %4, 65535
%7 = add nuw nsw i32 %6, %5
%8 = icmp ult i32 %7, 65536
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %7, %3 ]
%11 = icmp eq i32 %10, 65535
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
void *linked_mem_pool_new_128b(size_t, int);
void *virtual_machine_resource_pool_linked_128b_init(size_t size) {
  return linked_mem_pool_new_128b(size, 1);
}


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

x86 assembly (clang, -O2):
<virtual_machine_resource_pool_linked_128b_init>:
mov    $0x1,%esi
jmp    1030 <linked_mem_pool_new_128b@plt>

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

LLVM IR (-O2):
define i8* @virtual_machine_resource_pool_linked_128b_init(i64 %0) {
%2 = tail call i8* @linked_mem_pool_new_128b(i64 %0, i32 1)
ret i8* %2
}
int min(int a, int b) {
  if (a < b)
    return a;
  return b;
}


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

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

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 7 * 100 + 6); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10706
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10706
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR67_set(void) { return U_WMRCORENONE_set("U_WMR67"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR67\00"
define i8* @U_WMR67_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR67\00"
define i8* @U_WMR67_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
void foo(volatile int *p, int q) {
  *(volatile int *)p = 0;
  *(p + (q - q) + 1) = 0;
  *(p + (q - q) + 2) = 0;
  *(p + (q - q) + 3) = 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movl   $0x0,0x4(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movl   $0x0,0x8(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    -0xc(%rbp),%ecx
movslq %ecx,%rcx
movl   $0x0,0xc(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x0,(%rdi)
movl   $0x0,0x4(%rdi)
movl   $0x0,0x8(%rdi)
movl   $0x0,0xc(%rdi)
ret

LLVM IR (-O0):
define void @foo(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
store volatile i32 0, i32* %5
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = load i32, i32* %4
%9 = sub nsw i32 %7, %8
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %6, i64 %10
%12 = getelementptr inbounds i32, i32* %11, i64 1
store volatile i32 0, i32* %12
%13 = load i32*, i32** %3
%14 = load i32, i32* %4
%15 = load i32, i32* %4
%16 = sub nsw i32 %14, %15
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %13, i64 %17
%19 = getelementptr inbounds i32, i32* %18, i64 2
store volatile i32 0, i32* %19
%20 = load i32*, i32** %3
%21 = load i32, i32* %4
%22 = load i32, i32* %4
%23 = sub nsw i32 %21, %22
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %20, i64 %24
%26 = getelementptr inbounds i32, i32* %25, i64 3
store volatile i32 0, i32* %26
ret void
}

LLVM IR (-O2):
define void @foo(i32* %0, i32 %1) {
store volatile i32 0, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
store volatile i32 0, i32* %3
%4 = getelementptr inbounds i32, i32* %0, i64 2
store volatile i32 0, i32* %4
%5 = getelementptr inbounds i32, i32* %0, i64 3
store volatile i32 0, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void abort(void) {
  fprintf(stderr, "Application aborted!\n");
  exit(-1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Application aborted!\0A\00"
define void @abort() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Application aborted!\0A\00"
define void @abort() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
const char *sgTTyType() { return "NA"; }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"NA\00"
define i8* @sgTTyType() {
ret i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
size_t FlagError(const char flag[]) {
  fprintf(stderr, "PAM header error: flags '%s' already seen.\n", flag);
  return 0;
}


x86 assembly (clang, -O0):
<FlagError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlagError>:
push   %rax
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"PAM header error: flags '%s' already seen.\0A\00"
define i64 @FlagError(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* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i64 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"PAM header error: flags '%s' already seen.\0A\00"
define i64 @FlagError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i64 0
}