xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int android_atomic_cas(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/ volatile *);
int /*<<< orphan*/ android_memory_barrier();
extern __attribute__((always_)) int
android_atomic_release_cas(int32_t old_value, int32_t new_value,
                           volatile int32_t *ptr) {
  android_memory_barrier();
  return android_atomic_cas(old_value, new_value, ptr);
}


x86 assembly (clang, -O0):
<android_atomic_release_cas>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0x0,%al
call   1030 <android_memory_barrier@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <android_atomic_cas@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_atomic_release_cas>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <android_memory_barrier@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <android_atomic_cas@plt>

LLVM IR (-O0):
define i32 @android_atomic_release_cas(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = call i32 (...) @android_memory_barrier()
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = call i32 @android_atomic_cas(i32 %8, i32 %9, i32* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @android_atomic_release_cas(i32 %0, i32 %1, i32* %2) {
%4 = tail call i32 (...) @android_memory_barrier()
%5 = tail call i32 @android_atomic_cas(i32 %0, i32 %1, i32* %2)
ret i32 %5
}
/* Variables and functions */
int strlen(char *s) {
  int n;
  for (n = 0; *s != '\0'; s++)
    n++;
  return n;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1139 <strlen+0x39>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111c <strlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %4
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %12
12: ; preds = %9
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %2
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void print_a_macro(const void *key, const void *val) {
  printf("%-16s--[%s]--\n", (char *)key, (char *)val);
}


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

x86 assembly (clang, -O2):
<print_a_macro>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%-16s--[%s]--\0A\00"
define void @print_a_macro(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 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%-16s--[%s]--\0A\00"
define void @print_a_macro(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ trunc(double const);
void trunc_w_d(const double *source, int32_t *dest) {
  *dest = (int32_t)trunc(*source);
}


x86 assembly (clang, -O0):
<trunc_w_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <trunc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trunc_w_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <trunc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @trunc_w_d(double* nocapture %0, i64* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i64 @trunc(double %3)
store i64 %4, i64* %1
ret void
}
double fmod(double x, const double y) {
  if (x <= y || x <= 0 || y <= 0) {
    return 0;
  }
  while (x >= y) {
    x -= y;
  }
  return x;
}


x86 assembly (clang, -O0):
<fmod>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jae    113e <fmod+0x3e>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jae    113e <fmod+0x3e>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     114b <fmod+0x4b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1182 <fmod+0x82>
jmp    1150 <fmod+0x50>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1178 <fmod+0x78>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1150 <fmod+0x50>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmod>:
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    113a <fmod+0x3a>
xorpd  %xmm3,%xmm3
ucomisd %xmm2,%xmm3
jae    113a <fmod+0x3a>
ucomisd %xmm2,%xmm1
jae    113a <fmod+0x3a>
movapd %xmm2,%xmm0
ucomisd %xmm1,%xmm2
jb     113a <fmod+0x3a>
nopl   0x0(%rax,%rax,1)
subsd  %xmm1,%xmm0
ucomisd %xmm1,%xmm0
jae    1130 <fmod+0x30>
ret

LLVM IR (-O0):
define double @fmod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %4
%7 = load double, double* %5
%8 = fcmp ole double %6, %7
br i1 %8, label %15, label %9
9: ; preds = %2
%10 = load double, double* %4
%11 = fcmp ole double %10, 0.000000e+00
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load double, double* %5
%14 = fcmp ole double %13, 0.000000e+00
br i1 %14, label %15, label %16
15: ; preds = %12, %9, %2
store double 0.000000e+00, double* %3
br label %27
16: ; preds = %12
br label %17
17: ; preds = %21, %16
%18 = load double, double* %4
%19 = load double, double* %5
%20 = fcmp oge double %18, %19
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load double, double* %5
%23 = load double, double* %4
%24 = fsub double %23, %22
store double %24, double* %4
br label %17
25: ; preds = %17
%26 = load double, double* %4
store double %26, double* %3
br label %27
27: ; preds = %25, %15
%28 = load double, double* %3
ret double %28
}

LLVM IR (-O2):
define double @fmod(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = fcmp ole double %0, 0.000000e+00
%5 = or i1 %4, %3
%6 = fcmp ole double %1, 0.000000e+00
%7 = or i1 %6, %5
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = fcmp ult double %0, %1
br i1 %9, label %14, label %10
10: ; preds = %8, %10
%11 = phi double [ %12, %10 ], [ %0, %8 ]
%12 = fsub double %11, %1
%13 = fcmp ult double %12, %1
br i1 %13, label %14, label %10
14: ; preds = %10, %8, %2
%15 = phi double [ 0.000000e+00, %2 ], [ %0, %8 ], [ %12, %10 ]
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int lseek(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main() {
  if (-1 == lseek(STDIN_FILENO, 0, SEEK_CUR)) {
    printf("cannot seek\n");
  } else {
    printf("seek OK\n");
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <lseek@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    1178 <main+0x48>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <main+0x54>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <lseek@plt>
cmp    $0xffffffff,%eax
lea    0xeb4(%rip),%rax
lea    0xea5(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
@SEEK_CUR = global i32 0
@.str = [13 x i8] c"cannot seek\0A\00"
@.str.1 = [9 x i8] c"seek OK\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @STDIN_FILENO
%3 = load i32, i32* @SEEK_CUR
%4 = call i32 @lseek(i32 %2, i32 0, i32 %3)
%5 = icmp eq i32 -1, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
@SEEK_CUR = global i32 0
@str = [8 x i8] c"seek OK\00"
@str.2 = [12 x i8] c"cannot seek\00"
define i32 @main() {
%1 = load i32, i32* @STDIN_FILENO
%2 = load i32, i32* @SEEK_CUR
%3 = tail call i32 @lseek(i32 %1, i32 0, i32 %2)
%4 = icmp eq i32 %3, -1
%5 = select i1 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t funge_extn_unload(int32_t fingerprint) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @funge_extn_unload(i32 %0) {
ret i32 0
}
asrt(b) {
  if (!b) {
    printf("ASSERTION ERROR\n");
    abort();
  }
}


x86 assembly (clang, -O0):
<asrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1148 <asrt+0x28>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asrt>:
test   %edi,%edi
je     1125 <asrt+0x5>
ret
push   %rax
lea    0xed3(%rip),%rdi
call   1040 <puts@plt>
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ASSERTION ERROR\0A\00"
define i32 @asrt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
unreachable
8: ; preds = %1
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@str = [16 x i8] c"ASSERTION ERROR\00"
define i32 @asrt(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
tail call void @abort()
unreachable
5: ; preds = %1
ret i32 undef
}
const char *li_version_string() { return "0.2.0"; }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"0.2.0\00"
define i8* @li_version_string() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double difftime(int /*<<< orphan*/, int /*<<< orphan*/);
double difftime_days(time_t tm_t1, time_t tm_t0) {
  double ndays;
  ndays = difftime(tm_t1, tm_t0);
  ndays /= (24.0 * 60.0 * 60.0);
  return ndays;
}


x86 assembly (clang, -O0):
<difftime_days>:
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 <difftime@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime_days>:
push   %rax
call   1030 <difftime@plt>
divsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @difftime_days(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call double @difftime(i32 %6, i32 %7)
store double %8, double* %5
%9 = load double, double* %5
%10 = fdiv double %9, 8.640000e+04
store double %10, double* %5
%11 = load double, double* %5
ret double %11
}

LLVM IR (-O2):
define double @difftime_days(i32 %0, i32 %1) {
%3 = tail call double @difftime(i32 %0, i32 %1)
%4 = fdiv double %3, 8.640000e+04
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ uc_uart_cycle();
void dbg_cycle() { uc_uart_cycle(); }


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

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

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

LLVM IR (-O2):
define void @dbg_cycle() {
%1 = tail call i32 (...) @uc_uart_cycle()
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ close(int);
int main() {
  int ret;
  int listen_sock, cli_sock;
  ret = EXIT_SUCCESS;
close_cli:
  close(cli_sock);
close_srv:
  close(listen_sock);
error:
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <close@plt>
mov    -0xc(%rbp),%edi
call   1030 <close@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec8(%rip),%rax
mov    (%rax),%ebx
call   1030 <close@plt>
call   1030 <close@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* @EXIT_SUCCESS
store i32 %5, i32* %2
br label %6
6: ; preds = %0
%7 = load i32, i32* %4
%8 = call i32 @close(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %3
%11 = call i32 @close(i32 %10)
br label %12
12: ; preds = %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = load i32, i32* @EXIT_SUCCESS
%2 = tail call i32 @close(i32 undef)
%3 = tail call i32 @close(i32 undef)
ret i32 %1
}
/* Variables and functions */
int algorithm(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  printf("Insira N: ");
  int N;
  scanf("%d", &N);
  printf("algorithm: %d\n", algorithm(N));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1030 <algorithm@plt>
mov    %eax,%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <algorithm@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Insira N: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"algorithm: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @algorithm(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Insira N: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"algorithm: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = bitcast i32* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @algorithm(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ brc(int, char);
void dch(int pn) { brc(pn, 'P'); }


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

x86 assembly (clang, -O2):
<dch>:
mov    $0x50,%esi
jmp    1030 <brc@plt>

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

LLVM IR (-O2):
define void @dch(i32 %0) {
%2 = tail call i32 @brc(i32 %0, i8 signext 80)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nes6502_irq();
void nes_irq(void) { nes6502_irq(); }


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

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

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

LLVM IR (-O2):
define void @nes_irq() {
%1 = tail call i32 (...) @nes6502_irq()
ret void
}
void snd_pcm_timer_resolution_change(struct snd_pcm_substream *substream) {}


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

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

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

LLVM IR (-O2):
%struct.snd_pcm_substream = type opaque
define void @snd_pcm_timer_resolution_change(%struct.snd_pcm_substream* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void ErrPrint(char ErrText[]) { fprintf(stderr, "ELAST: %s\n", ErrText); }


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

x86 assembly (clang, -O2):
<ErrPrint>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ELAST: %s\0A\00"
define void @ErrPrint(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 ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ELAST: %s\0A\00"
define void @ErrPrint(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int main() {
  int a = 0;
  unsigned b = 0;
  return a == b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
double circularArea(double r) {
  const double pi = 3.1415926536;
  return pi * r * r;
}


x86 assembly (clang, -O0):
<circularArea>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<circularArea>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @circularArea(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0x400921FB544486E0, double* %3
%4 = load double, double* %2
%5 = fmul double 0x400921FB544486E0, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @circularArea(double %0) {
%2 = fmul double %0, 0x400921FB544486E0
%3 = fmul double %2, %0
ret double %3
}
/* Variables and functions */
double sqrt(double);
double norm3(double v[3]) {
  return sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
}


x86 assembly (clang, -O0):
<norm3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<norm3>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <norm3+0x31>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @norm3(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
%24 = call double @sqrt(double %23)
ret double %24
}

LLVM IR (-O2):
define double @norm3(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @sqrt(double %9)
ret double %10
}
void _Futex_Destroy(struct _Futex_Control *_futex) { (void)_futex; }


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

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

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

LLVM IR (-O2):
%struct._Futex_Control = type opaque
define void @_Futex_Destroy(%struct._Futex_Control* nocapture %0) {
ret void
}
int tst(int i) { return (i & (1 << 21)) ? 6 : 9; }


x86 assembly (clang, -O0):
<tst>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x200000,%edx
mov    $0x9,%eax
mov    $0x6,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst>:
xor    %eax,%eax
test   $0x200000,%edi
sete   %al
lea    (%rax,%rax,2),%eax
add    $0x6,%eax
ret

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

LLVM IR (-O2):
define i32 @tst(i32 %0) {
%2 = and i32 %0, 2097152
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 9, i32 6
ret i32 %4
}
void BGRAToYRow_C() {}


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

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

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

LLVM IR (-O2):
define void @BGRAToYRow_C() {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int sort(const void *a, const void *b) {
  return strcmp(*(const char **)a, *(const char **)b);
}


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

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

LLVM IR (-O0):
define i32 @sort(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @sort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
void __attribute__((no)) HEX00_lhighliteInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_lhighliteInit() {
ret void
}
/* Variables and functions */
char *gdbCreateMsgPacket(char *);
char *handleException() {
  char *packet = NULL;
  packet = gdbCreateMsgPacket("S05");
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"S05\00"
define i8* @handleException() {
%1 = alloca i8*
%2 = alloca i8*
store i8* null, i8** %2
%3 = call i8* @gdbCreateMsgPacket(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %1
ret i8* %4
}

LLVM IR (-O2):
@.str = [4 x i8] c"S05\00"
define noalias i8* @handleException() {
%1 = tail call i8* @gdbCreateMsgPacket(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
int sigset_get_old_mask(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigset_set_old_mask(int /*<<< orphan*/ *, int);
int sigsetmask(int mask) {
  sigset_t set, oset;
  sigset_set_old_mask(&set, mask);
  sigprocmask(SIG_SETMASK, &set, &oset);
  return sigset_get_old_mask(&oset);
}


x86 assembly (clang, -O0):
<sigsetmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    -0x8(%rbp),%rdi
call   1050 <sigset_set_old_mask@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sigprocmask@plt>
lea    -0xc(%rbp),%rdi
call   1040 <sigset_get_old_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigsetmask>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%esi
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1050 <sigset_set_old_mask@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <sigprocmask@plt>
mov    %rbx,%rdi
call   1040 <sigset_get_old_mask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
define i32 @sigsetmask(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @sigset_set_old_mask(i32* %3, i32 %5)
%7 = load i32, i32* @SIG_SETMASK
%8 = call i32 @sigprocmask(i32 %7, i32* %3, i32* %4)
%9 = call i32 @sigset_get_old_mask(i32* %4)
ret i32 %9
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
define i32 @sigsetmask(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @sigset_set_old_mask(i32* %2, i32 %0)
%7 = load i32, i32* @SIG_SETMASK
%8 = call i32 @sigprocmask(i32 %7, i32* %2, i32* %3)
%9 = call i32 @sigset_get_old_mask(i32* %3)
ret i32 %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void MPUEnable(uint32_t ui32MPUConfig) {
  ASSERT(!(ui32MPUConfig & ~(4 | 2)));
  (*((volatile uint32_t *)(0xE000ED94))) = ui32MPUConfig | 0x00000001;
}


x86 assembly (clang, -O0):
<MPUEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffff9,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%ecx
or     $0x1,%ecx
mov    $0xe000ed94,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPUEnable>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   $0xfffffff9,%ebx
sete   %dil
call   1030 <ASSERT@plt>
or     $0x1,%ebx
mov    $0xe000ed94,%eax
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @MPUEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -7
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %2
%10 = or i32 %9, 1
store volatile i32 %10, i32* inttoptr (i64 3758157204 to i32*)
ret void
}

LLVM IR (-O2):
define void @MPUEnable(i32 %0) {
%2 = and i32 %0, -7
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = or i32 %0, 1
store volatile i32 %6, i32* inttoptr (i64 3758157204 to i32*)
ret void
}
/* Variables and functions */
double sqrt(double);
double vaporPressureIce(double);
double iceSubRateVacuum(double t) {
  double pv;
  pv = vaporPressureIce(t);
  return (pv * 0.01857 * sqrt(1.0 / t));
}


x86 assembly (clang, -O0):
<iceSubRateVacuum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <vaporPressureIce@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xec4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeaa(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iceSubRateVacuum>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <vaporPressureIce@plt>
movapd %xmm0,%xmm2
mulsd  0xec9(%rip),%xmm2
movsd  0xec9(%rip),%xmm0
divsd  (%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1154 <iceSubRateVacuum+0x34>
sqrtsd %xmm0,%xmm0
jmp    1163 <iceSubRateVacuum+0x43>
movsd  %xmm2,(%rsp)
call   1040 <sqrt@plt>
movsd  (%rsp),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @iceSubRateVacuum(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @vaporPressureIce(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fmul double %6, 1.857000e-02
%8 = load double, double* %2
%9 = fdiv double 1.000000e+00, %8
%10 = call double @sqrt(double %9)
%11 = fmul double %7, %10
ret double %11
}

LLVM IR (-O2):
define double @iceSubRateVacuum(double %0) {
%2 = tail call double @vaporPressureIce(double %0)
%3 = fmul double %2, 1.857000e-02
%4 = fdiv double 1.000000e+00, %0
%5 = tail call double @sqrt(double %4)
%6 = fmul double %3, %5
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ initLED();
int /*<<< orphan*/ initPWM();
int main(void) {
  initLED();
  initPWM();
  while (1) {
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initLED@plt>
mov    $0x0,%al
call   1040 <initPWM@plt>
jmp    113d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initLED@plt>
xor    %eax,%eax
call   1040 <initPWM@plt>
nop
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initLED()
%3 = call i32 (...) @initPWM()
br label %4
4: ; preds = %0, %4
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initLED()
%2 = tail call i32 (...) @initPWM()
br label %3
3: ; preds = %0, %3
br label %3
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
char *stringFieldInSubmissionSource(struct sqlConnection *, int, char *);
char *visiGeneSetUrl(struct sqlConnection *conn, int id) {
  return stringFieldInSubmissionSource(conn, id, "setUrl");
}


x86 assembly (clang, -O0):
<visiGeneSetUrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <stringFieldInSubmissionSource@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<visiGeneSetUrl>:
lea    0xee9(%rip),%rdx
jmp    1030 <stringFieldInSubmissionSource@plt>

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"setUrl\00"
define i8* @visiGeneSetUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call i8* @stringFieldInSubmissionSource(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"setUrl\00"
define i8* @visiGeneSetUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @stringFieldInSubmissionSource(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
int reservedSectors(char one, char two) {
  char num[1];
  num[0] = two;
  num[1] = one;
  int b = (num[0] << 8) | num[1];
  return b;
}


x86 assembly (clang, -O0):
<reservedSectors>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
movsbl -0x3(%rbp),%eax
shl    $0x8,%eax
movsbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reservedSectors(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca [1 x i8]
%6 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %4
%8 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i8, i8* %3
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 1
store i8 %9, i8* %10
%11 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 1
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = or i32 %14, %17
store i32 %18, i32* %6
%19 = load i32, i32* %6
ret i32 %19
}

LLVM IR (-O2):
define i32 @reservedSectors(i8 signext %0, i8 signext %1) {
ret i32 poison
}
/* Type definitions */
struct linprm {
  int dummy;
};

/* Variables and functions */
int lininit(int, int, struct linprm *, int);
int linini(int alloc, int naxis, struct linprm *lin) {
  return lininit(alloc, naxis, lin, -1);
}


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

x86 assembly (clang, -O2):
<linini>:
mov    $0xffffffff,%ecx
jmp    1030 <lininit@plt>

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

LLVM IR (-O2):
%struct.linprm = type { i32 }
define i32 @linini(i32 %0, i32 %1, %struct.linprm* %2) {
%4 = tail call i32 @lininit(i32 %0, i32 %1, %struct.linprm* %2, i32 -1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gen_args(char *, int);
int gen_dummy_args(char *dirname) {
  gen_args(dirname, 1);
  return (0);
}


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

x86 assembly (clang, -O2):
<gen_dummy_args>:
push   %rax
mov    $0x1,%esi
call   1030 <gen_args@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gen_dummy_args(i8* %0) {
%2 = tail call i32 @gen_args(i8* %0, i32 1)
ret i32 0
}
char *nobn(char *s) { return s; }


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

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

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

LLVM IR (-O2):
define i8* @nobn(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int getinflight();
int getopenfiles();
void save_sysctls(int *before_inflight, int *before_openfiles) {
  *before_inflight = getinflight();
  *before_openfiles = getopenfiles();
}


x86 assembly (clang, -O0):
<save_sysctls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getinflight@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <getopenfiles@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<save_sysctls>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <getinflight@plt>
mov    %eax,(%rbx)
xor    %eax,%eax
call   1030 <getopenfiles@plt>
mov    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @save_sysctls(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 (...) @getinflight()
%6 = load i32*, i32** %3
store i32 %5, i32* %6
%7 = call i32 (...) @getopenfiles()
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret void
}

LLVM IR (-O2):
define void @save_sysctls(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = tail call i32 (...) @getinflight()
store i32 %3, i32* %0
%4 = tail call i32 (...) @getopenfiles()
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void fnGenRandInput(int X[], int n) {
  int i;
  srand(time(NULL));
  for (i = 0; i < n; i++) {
    X[i] = rand() % 1000;
  }
}


x86 assembly (clang, -O0):
<fnGenRandInput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    118a <fnGenRandInput+0x5a>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1156 <fnGenRandInput+0x26>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnGenRandInput>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
test   %ebp,%ebp
jle    1182 <fnGenRandInput+0x52>
mov    %ebp,%ebp
xor    %ebx,%ebx
nop
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1150 <fnGenRandInput+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @fnGenRandInput(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = call i32 @time(i32* null)
%7 = call i32 @srand(i32 %6)
store i32 0, i32* %5
br label %8
8: ; preds = %19, %2
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = call i32 (...) @rand()
%14 = srem i32 %13, 1000
%15 = load i32*, i32** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
store i32 %14, i32* %18
br label %19
19: ; preds = %12
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @fnGenRandInput(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srand(i32 %3)
%5 = icmp sgt i32 %1, 0
br i1 %5, label %6, label %15
6: ; preds = %2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %13, %8 ]
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 1000
%12 = getelementptr inbounds i32, i32* %0, i64 %9
store i32 %11, i32* %12
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %7
br i1 %14, label %15, label %8
15: ; preds = %8, %2
ret void
}
/* Type definitions */
struct chmcPmgiChunkNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct chmcPmgiChunkNode *);
int /*<<< orphan*/ free(struct chmcPmgiChunkNode *);
void chmc_pmgi_destroy(struct chmcPmgiChunkNode *node) {
  assert(node);
  free(node);
}


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

x86 assembly (clang, -O2):
<chmc_pmgi_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.chmcPmgiChunkNode = type { i32 }
define void @chmc_pmgi_destroy(%struct.chmcPmgiChunkNode* %0) {
%2 = alloca %struct.chmcPmgiChunkNode*
store %struct.chmcPmgiChunkNode* %0, %struct.chmcPmgiChunkNode** %2
%3 = load %struct.chmcPmgiChunkNode*, %struct.chmcPmgiChunkNode** %2
%4 = call i32 @assert(%struct.chmcPmgiChunkNode* %3)
%5 = load %struct.chmcPmgiChunkNode*, %struct.chmcPmgiChunkNode** %2
%6 = call i32 @free(%struct.chmcPmgiChunkNode* %5)
ret void
}

LLVM IR (-O2):
%struct.chmcPmgiChunkNode = type { i32 }
define void @chmc_pmgi_destroy(%struct.chmcPmgiChunkNode* %0) {
%2 = tail call i32 @assert(%struct.chmcPmgiChunkNode* %0)
%3 = tail call i32 @free(%struct.chmcPmgiChunkNode* %0)
ret void
}
/* Variables and functions */
char *nconcat(char *, int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *concat(char *str_a, char *str_b) {
  return nconcat(str_a, strlen(str_a), str_b, strlen(str_b));
}


x86 assembly (clang, -O0):
<concat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    %eax,%ecx
call   1040 <nconcat@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <nconcat@plt>

LLVM IR (-O0):
define i8* @concat(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** %3
%7 = call i32 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i32 @strlen(i8* %9)
%11 = call i8* @nconcat(i8* %5, i32 %7, i8* %8, i32 %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @concat(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i8* @nconcat(i8* %0, i32 %3, i8* %1, i32 %4)
ret i8* %5
}