xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *muda(char *);
int /*<<< orphan*/ puts(char *);
int main() {
  char c[] = "qjas mxma zzsa";
  char *a = muda(c);
  puts(a);
  free(a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xeb2(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xeaa(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x13(%rbp),%rdi
call   1040 <muda@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <puts@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x61737a7a20616d,%rax
mov    %rax,0x7(%rsp)
movabs $0x6d786d2073616a71,%rax
6d 78 6d
mov    %rax,(%rsp)
mov    %rsp,%rdi
call   1040 <muda@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.c = [15 x i8] c"qjas mxma zzsa\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [15 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [15 x i8]* %2 to i8*
%5 = getelementptr inbounds [15 x i8], [15 x i8]* %2, i64 0, i64 0
%6 = call i8* @muda(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @puts(i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @free(i8* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.c = [15 x i8] c"qjas mxma zzsa\00"
define i32 @main() {
%1 = alloca [15 x i8]
%2 = getelementptr inbounds [15 x i8], [15 x i8]* %1, i64 0, i64 0
%3 = call i8* @muda(i8* %2)
%4 = call i32 @puts(i8* dereferenceable(1) %3)
%5 = call i32 @free(i8* %3)
ret i32 0
}
/* Variables and functions */
double gsw_gibbs(int, int, int, double, double, double);
double gsw_beta_const_t_exact(double sa, double t, double p) {
  int n0, n1;
  n0 = 0;
  n1 = 1;
  return (-gsw_gibbs(n1, n0, n1, sa, t, p) / gsw_gibbs(n0, n0, n1, sa, t, p));
}


x86 assembly (clang, -O0):
<gsw_beta_const_t_exact>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <gsw_gibbs@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
call   1030 <gsw_gibbs@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsw_beta_const_t_exact>:
sub    $0x38,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <gsw_gibbs@plt>
xorps  0xec2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1030 <gsw_gibbs@plt>
movapd 0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @gsw_beta_const_t_exact(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store i32 0, i32* %7
store i32 1, i32* %8
%9 = load i32, i32* %8
%10 = load i32, i32* %7
%11 = load i32, i32* %8
%12 = load double, double* %4
%13 = load double, double* %5
%14 = load double, double* %6
%15 = call double @gsw_gibbs(i32 %9, i32 %10, i32 %11, double %12, double %13, double %14)
%16 = fneg double %15
%17 = load i32, i32* %7
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = load double, double* %4
%21 = load double, double* %5
%22 = load double, double* %6
%23 = call double @gsw_gibbs(i32 %17, i32 %18, i32 %19, double %20, double %21, double %22)
%24 = fdiv double %16, %23
ret double %24
}

LLVM IR (-O2):
define double @gsw_beta_const_t_exact(double %0, double %1, double %2) {
%4 = tail call double @gsw_gibbs(i32 1, i32 0, i32 1, double %0, double %1, double %2)
%5 = fneg double %4
%6 = tail call double @gsw_gibbs(i32 0, i32 0, i32 1, double %0, double %1, double %2)
%7 = fdiv double %5, %6
ret double %7
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
void timespec_from_ms(struct timespec *tp, int ms) {
  tp->tv_sec = ms / 1000;
  tp->tv_nsec = (ms % 1000) * 1000000;
}


x86 assembly (clang, -O0):
<timespec_from_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0xf4240,%edx,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_from_ms>:
movslq %esi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%rdi)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @timespec_from_ms(%struct.timespec* %0, i32 %1) {
%3 = alloca %struct.timespec*
%4 = alloca i32
store %struct.timespec* %0, %struct.timespec** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 1000
%7 = load %struct.timespec*, %struct.timespec** %3
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = srem i32 %9, 1000
%11 = mul nsw i32 %10, 1000000
%12 = load %struct.timespec*, %struct.timespec** %3
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %12, i32 0, i32 1
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @timespec_from_ms(%struct.timespec* nocapture writeonly %0, i32 %1) {
%3 = sdiv i32 %1, 1000
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
store i32 %3, i32* %4
%5 = srem i32 %1, 1000
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
store i32 %6, i32* %7
ret void
}
/* Variables and functions */
double RAND_MAX;
double rand();
double random_double() { return (1.0 * rand() / (RAND_MAX + 1.0)); }


x86 assembly (clang, -O0):
<random_double>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  0xeda(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xece(%rip),%xmm1
mov    0x2eaf(%rip),%rax
addsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_double>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec9(%rip),%rax
movsd  (%rax),%xmm1
addsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @random_double() {
%1 = call double (...) @rand()
%2 = fmul double 1.000000e+00, %1
%3 = load double, double* @RAND_MAX
%4 = fadd double %3, 1.000000e+00
%5 = fdiv double %2, %4
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @random_double() {
%1 = tail call double (...) @rand()
%2 = load double, double* @RAND_MAX
%3 = fadd double %2, 1.000000e+00
%4 = fdiv double %1, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ exit_cleanup(int);
void signal_handler(__attribute__((unused)) int signal) { exit_cleanup(1); }


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

x86 assembly (clang, -O2):
<signal_handler>:
mov    $0x1,%edi
jmp    1030 <exit_cleanup@plt>

LLVM IR (-O0):
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit_cleanup(i32 1)
ret void
}

LLVM IR (-O2):
define void @signal_handler(i32 %0) {
%2 = tail call i32 @exit_cleanup(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void display_usage(char *app_name) {
  fprintf(stderr, "\nUsage: %s {interface}\n", app_name);
}


x86 assembly (clang, -O0):
<display_usage>:
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):
<display_usage>:
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 = [24 x i8] c"\0AUsage: %s {interface}\0A\00"
define void @display_usage(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 ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"\0AUsage: %s {interface}\0A\00"
define void @display_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void pthread_attr_init() {}


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

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

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

LLVM IR (-O2):
define void @pthread_attr_init() {
ret void
}
/* Variables and functions */
int strlen(char const *);
int strspn(char const *, char const *);
int android_profile_check_name(const char *profile_name) {
  static const char *goodchars =
      "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-0123456789.";
  int len = strlen(profile_name);
  int slen = strspn(profile_name, goodchars);
  return (len == slen);
}


x86 assembly (clang, -O0):
<android_profile_check_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eed(%rip),%rsi
call   1040 <strspn@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<android_profile_check_name>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
lea    0xecc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strspn@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@android_profile_check_name.goodchars = internal global i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i32 0, i32 0)
@.str = [66 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-0123456789.\00"
define i32 @android_profile_check_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = load i8*, i8** @android_profile_check_name.goodchars
%9 = call i32 @strspn(i8* %7, i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = icmp eq i32 %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@.str = [66 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-0123456789.\00"
define i32 @android_profile_check_name(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @strspn(i8* %0, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int putchar(int ic) {
  char c = (char)ic;
  return ic;
}


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

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

LLVM IR (-O0):
define i32 @putchar(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @putchar(i32 returned %0) {
ret i32 %0
}
int rand_r(unsigned *seed) {
  (*seed) = (*seed) * 1103515245 + 12345;
  return ((unsigned)((*seed) / 65536));
}


x86 assembly (clang, -O0):
<rand_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x41c64e6d,(%rax),%ecx
add    $0x3039,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shr    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_r>:
imul   $0x41c64e6d,(%rdi),%eax
add    $0x3039,%eax
mov    %eax,(%rdi)
shr    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @rand_r(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul i32 %4, 1103515245
%6 = add i32 %5, 12345
%7 = load i32*, i32** %2
store i32 %6, i32* %7
%8 = load i32*, i32** %2
%9 = load i32, i32* %8
%10 = udiv i32 %9, 65536
ret i32 %10
}

LLVM IR (-O2):
define i32 @rand_r(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul i32 %2, 1103515245
%4 = add i32 %3, 12345
store i32 %4, i32* %0
%5 = lshr i32 %4, 16
ret i32 %5
}
/* Variables and functions */
double asinOpt(double);
double my_acos(double x) {
  if (x < -1.0 || x > 1.0) {
    return 0.0 / 0.0;
  } else {
    return 3.14159265358979323846 / 2 - asinOpt(x);
  }
}


x86 assembly (clang, -O0):
<my_acos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1147 <my_acos+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1159 <my_acos+0x49>
movsd  0xec9(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1177 <my_acos+0x67>
movsd  -0x10(%rbp),%xmm0
call   1030 <asinOpt@plt>
movaps %xmm0,%xmm1
movsd  0xea2(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_acos>:
push   %rax
movapd %xmm0,%xmm1
movsd  0xee3(%rip),%xmm0
ucomisd %xmm1,%xmm0
movsd  0xedf(%rip),%xmm0
ja     114e <my_acos+0x3e>
ucomisd 0xedd(%rip),%xmm1
ja     114e <my_acos+0x3e>
movapd %xmm1,%xmm0
call   1030 <asinOpt@plt>
movapd %xmm0,%xmm1
movsd  0xece(%rip),%xmm0
subsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @my_acos(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, -1.000000e+00
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp ogt double %7, 1.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store double 0x7FF8000000000000, double* %2
br label %14
10: ; preds = %6
%11 = load double, double* %3
%12 = call double @asinOpt(double %11)
%13 = fsub double 0x3FF921FB54442D18, %12
store double %13, double* %2
br label %14
14: ; preds = %10, %9
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @my_acos(double %0) {
%2 = fcmp olt double %0, -1.000000e+00
%3 = fcmp ogt double %0, 1.000000e+00
%4 = or i1 %2, %3
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call double @asinOpt(double %0)
%7 = fsub double 0x3FF921FB54442D18, %6
br label %8
8: ; preds = %1, %5
%9 = phi double [ %7, %5 ], [ 0x7FF8000000000000, %1 ]
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ id;

/* Variables and functions */
uint32_t getidbash(uint16_t id) { return (uint32_t)((id)&8191); }


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

x86 assembly (clang, -O2):
<getidbash>:
mov    %edi,%eax
and    $0x1fff,%eax
ret

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

LLVM IR (-O2):
define i32 @getidbash(i32 %0) {
%2 = and i32 %0, 8191
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strtof(char *, double *);
int /*<<< orphan*/ xfree(char *);
double doston(char *s) {
  double v;
  if (!s)
    return ((double)0.0);
  (void)strtof(s, &v);
  xfree(s);
  return (v);
}


x86 assembly (clang, -O0):
<doston>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <doston+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1164 <doston+0x44>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <strtof@plt>
mov    -0x10(%rbp),%rdi
call   1030 <xfree@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doston>:
test   %rdi,%rdi
je     114b <doston+0x2b>
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <strtof@plt>
mov    %rbx,%rdi
call   1030 <xfree@plt>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @doston(i8* %0) {
%2 = alloca double
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %1
store double 0.000000e+00, double* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @strtof(i8* %9, double* %4)
%11 = load i8*, i8** %3
%12 = call i32 @xfree(i8* %11)
%13 = load double, double* %4
store double %13, double* %2
br label %14
14: ; preds = %8, %7
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @doston(i8* %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = call i32 @strtof(i8* %0, double* %2)
%7 = tail call i32 @xfree(i8* %0)
%8 = load double, double* %2
br label %9
9: ; preds = %1, %5
%10 = phi double [ %8, %5 ], [ 0.000000e+00, %1 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printk(char *);
void *viewos_init(char *args) {
  printk("umsandnet_init\n");
  return NULL;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"umsandnet_init\0A\00"
define i8* @viewos_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printk(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [16 x i8] c"umsandnet_init\0A\00"
define noalias i8* @viewos_init(i8* nocapture readnone %0) {
%2 = tail call i32 @printk(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
scalar_t__ slip_poll();
int slip_recv(char *, int);
int device_read(char *buf, int len) {
  if (slip_poll() == 0)
    return -1;
  return slip_recv(buf, len);
}


x86 assembly (clang, -O0):
<device_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    $0x0,%al
call   1030 <slip_poll@plt>
cmp    $0x0,%rax
jne    114c <device_read+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115b <device_read+0x3b>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <slip_recv@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<device_read>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <slip_poll@plt>
test   %rax,%rax
je     1144 <device_read+0x24>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <slip_recv@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @device_read(i8* %0, i32 %1) {
%3 = tail call i64 (...) @slip_poll()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @slip_recv(i8* %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ DATA_OUTPUT(char *, char);
int /*<<< orphan*/ memcpy_P(char *, char *, int);
void data_get_flash_char(char *val) {
  char tmp;
  memcpy_P(&tmp, val, sizeof tmp);
  DATA_OUTPUT("%"
              "c",
              tmp);
}


x86 assembly (clang, -O0):
<data_get_flash_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0x9(%rbp),%rdi
mov    $0x1,%edx
call   1030 <memcpy_P@plt>
lea    0xebb(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1040 <DATA_OUTPUT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_get_flash_char>:
push   %rax
mov    %rdi,%rsi
lea    0x7(%rsp),%rdi
mov    $0x1,%edx
call   1030 <memcpy_P@plt>
movsbl 0x7(%rsp),%esi
lea    0xec1(%rip),%rdi
call   1040 <DATA_OUTPUT@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @data_get_flash_char(i8* %0) {
%2 = alloca i8
%3 = call i32 @memcpy_P(i8* %2, i8* %0, i32 1)
%4 = load i8, i8* %2
%5 = call i32 @DATA_OUTPUT(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret void
}
int __mp_printinfo(void *p) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__mp_printinfo(i8* nocapture readnone %0) {
ret i32 0
}
int clamp(int n, int a, int b) { return n < a ? a : n > b ? b : n; }


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

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

LLVM IR (-O0):
define i32 @clamp(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 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i32, i32* %5
br label %22
12: ; preds = %3
%13 = load i32, i32* %4
%14 = load i32, i32* %6
%15 = icmp sgt i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i32, i32* %6
br label %20
18: ; preds = %12
%19 = load i32, i32* %4
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i32 [ %11, %10 ], [ %21, %20 ]
ret i32 %23
}

LLVM IR (-O2):
define i32 @clamp(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
/* Variables and functions */
long double log2(long double);
long double log2l(long double a1) { return log2(a1); }


x86 assembly (clang, -O0):
<log2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log2@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2l>:
jmp    1030 <log2@plt>

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

LLVM IR (-O2):
define x86_fp80 @log2l(x86_fp80 %0) {
%2 = tail call x86_fp80 @log2(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void xmp_disc(void *userdata) {
  (void)(userdata);
  fprintf(stderr, "Received a disconnect request.\n");
}


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

x86 assembly (clang, -O2):
<xmp_disc>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Received a disconnect request.\0A\00"
define void @xmp_disc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Received a disconnect request.\0A\00"
define void @xmp_disc(i8* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
void ff_hevc_put_hevc_epel_v16_12_sse4() {}


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

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

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

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

/* Variables and functions */
wchar_t *wcpcpy(wchar_t *__restrict to, const wchar_t *__restrict from) {
  for (; (*to = *from); ++from, ++to)
    ;
  return (to);
}


x86 assembly (clang, -O0):
<wcpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
mov    %eax,(%rcx)
cmp    $0x0,%eax
je     1143 <wcpcpy+0x43>
jmp    1126 <wcpcpy+0x26>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <wcpcpy+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcpcpy>:
mov    %rdi,%rax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
test   %ecx,%ecx
je     1121 <wcpcpy+0x21>
add    $0x4,%rsi
nop
mov    (%rsi),%ecx
mov    %ecx,0x4(%rax)
add    $0x4,%rax
add    $0x4,%rsi
test   %ecx,%ecx
jne    1110 <wcpcpy+0x10>
ret

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

LLVM IR (-O2):
define i32* @wcpcpy(i32* noalias writeonly %0, i32* noalias nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i32* [ %8, %5 ], [ %1, %2 ]
%7 = phi i32* [ %9, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = getelementptr inbounds i32, i32* %7, i64 1
%10 = load i32, i32* %8
store i32 %10, i32* %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32* [ %0, %2 ], [ %9, %5 ]
ret i32* %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
void fun1() {
  float s = 0, h = 100;
  int n = 10;
  for (; n > 0; n--) {
    s = s + h / 2 * 3;
    h = h / 2;
  }
  printf("%f\n%f\n", s - h, h);
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xed8(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    118d <fun1+0x7d>
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  0xeb4(%rip),%xmm2
divss  %xmm2,%xmm0
movss  0xeac(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe8e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <fun1+0x24>
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
lea    0xef1(%rip),%rdi
movss  0xee1(%rip),%xmm0
movss  0xedd(%rip),%xmm1
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%f\0A%f\0A\00"
define void @fun1() {
%1 = alloca float
%2 = alloca float
%3 = alloca i32
store float 0.000000e+00, float* %1
store float 1.000000e+02, float* %2
store i32 10, i32* %3
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load float, float* %1
%9 = load float, float* %2
%10 = fdiv float %9, 2.000000e+00
%11 = call float @llvm.fmuladd.f32(float %10, float 3.000000e+00, float %8)
store float %11, float* %1
%12 = load float, float* %2
%13 = fdiv float %12, 2.000000e+00
store float %13, float* %2
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, -1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = load float, float* %1
%19 = load float, float* %2
%20 = fsub float %18, %19
%21 = load float, float* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %20, float %21)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f\0A%f\0A\00"
define void @fun1() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float 0x4072B9C000000000, float 0x3FB9000000000000)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OAL_DELETE_SEMAPHORE();
int fc8300_ppi_deinit(void *handle) {
  OAL_DELETE_SEMAPHORE();
  return 0;
}


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

x86 assembly (clang, -O2):
push   %rax
xor    %eax,%eax
call   1030 <OAL_DELETE_SEMAPHORE@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fc8300_ppi_deinit(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @OAL_DELETE_SEMAPHORE()
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ nrerror(char *);
unsigned char *cvector(long nl, long nh) {
  unsigned char *v;
  v = (unsigned char *)malloc(
      (size_t)((nh - nl + 1 + 1) * sizeof(unsigned char)));
  if (!v)
    nrerror("allocation failure in cvector()");
  return v - nl + 1;
}


x86 assembly (clang, -O0):
<cvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sub    -0x8(%rbp),%rdi
add    $0x1,%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1164 <cvector+0x44>
lea    0xea1(%rip),%rdi
call   1030 <nrerror@plt>
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
add    %rcx,%rax
add    $0x1,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvector>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
sub    %rdi,%rsi
lea    0x2(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <cvector+0x27>
lea    0xebe(%rip),%rdi
call   1030 <nrerror@plt>
sub    %r14,%rbx
add    $0x1,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = sub nsw i64 %6, %7
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 1
%11 = mul i64 %10, 1
%12 = call i64 @malloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = icmp ne i8* %14, null
br i1 %15, label %18, label %16
16: ; preds = %2
%17 = call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %2
%19 = load i8*, i8** %5
%20 = load i64, i64* %3
%21 = sub i64 0, %20
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = getelementptr inbounds i8, i8* %22, i64 1
ret i8* %23
}

LLVM IR (-O2):
@.str = [32 x i8] c"allocation failure in cvector()\00"
define i8* @cvector(i64 %0, i64 %1) {
%3 = sub i64 2, %0
%4 = add i64 %3, %1
%5 = tail call i64 @malloc(i64 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @nrerror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = sub i64 0, %0
%11 = inttoptr i64 %5 to i8*
%12 = getelementptr inbounds i8, i8* %11, i64 %10
%13 = getelementptr inbounds i8, i8* %12, i64 1
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ sched_yield();
void muggle_thread_yield() { sched_yield(); }


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

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

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

LLVM IR (-O2):
define void @muggle_thread_yield() {
%1 = tail call i32 (...) @sched_yield()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, unsigned int, int, int /*<<< orphan*/ *);
void lzw_writebuf(void *stream, char *buf, unsigned size) {
  fwrite(buf, size, 1, (FILE *)stream);
}


x86 assembly (clang, -O0):
<lzw_writebuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lzw_writebuf>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    %edx,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
define void @lzw_writebuf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i32 @fwrite(i8* %7, i32 %8, i32 1, i32* %10)
ret void
}

LLVM IR (-O2):
define void @lzw_writebuf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @fwrite(i8* %1, i32 %2, i32 1, i32* %4)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ plane_mask;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
unsigned long get_XGCValues_plane_mask(void *_p) {
  return (unsigned long)((XGCValues *)_p)->plane_mask;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XGCValues_plane_mask(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void PrintPNSimpleCompareFunction1(void *theEnv, const char *logicalName,
                                   void *theValue) {}


x86 assembly (clang, -O0):
<PrintPNSimpleCompareFunction1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @PrintPNSimpleCompareFunction1(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __NOP();
void N_delay(int n) {
  while (n-- > 0) {
    __NOP();
  }
}


x86 assembly (clang, -O0):
<N_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    113b <N_delay+0x2b>
mov    $0x0,%al
call   1030 <__NOP@plt>
jmp    111b <N_delay+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<N_delay>:
push   %rbx
test   %edi,%edi
jle    112f <N_delay+0x1f>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__NOP@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <N_delay+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @N_delay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (...) @__NOP()
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @N_delay(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 (...) @__NOP()
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear(unsigned char);
int /*<<< orphan*/ nxtDisplayString(unsigned char, char *, long);
int /*<<< orphan*/ update(unsigned char);
void printf(long number, unsigned char line) {
  if (line >= 8)
    line = 8 - 1;
  clear(line);
  nxtDisplayString(line, "%e", number);
  update(line);
}


x86 assembly (clang, -O0):
<printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x8,%eax
jl     1153 <printf+0x23>
movb   $0x7,-0x9(%rbp)
movzbl -0x9(%rbp),%edi
call   1040 <clear@plt>
mov    -0x9(%rbp),%al
mov    -0x8(%rbp),%rdx
lea    0xe96(%rip),%rsi
movzbl %al,%edi
call   1050 <nxtDisplayString@plt>
movzbl -0x9(%rbp),%edi
call   1030 <update@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
cmp    $0x7,%sil
mov    $0x7,%ebp
cmovb  %esi,%ebp
mov    %ebp,%edi
call   1040 <clear@plt>
lea    0xeb0(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1050 <nxtDisplayString@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <update@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%e\00"
define void @printf(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp sge i32 %6, 8
br i1 %7, label %8, label %9
8: ; preds = %2
store i8 7, i8* %4
br label %9
9: ; preds = %8, %2
%10 = load i8, i8* %4
%11 = call i32 @clear(i8 zeroext %10)
%12 = load i8, i8* %4
%13 = load i64, i64* %3
%14 = call i32 @nxtDisplayString(i8 zeroext %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %13)
%15 = load i8, i8* %4
%16 = call i32 @update(i8 zeroext %15)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%e\00"
define void @printf(i64 %0, i8 zeroext %1) {
%3 = icmp ult i8 %1, 7
%4 = select i1 %3, i8 %1, i8 7
%5 = tail call i32 @clear(i8 zeroext %4)
%6 = tail call i32 @nxtDisplayString(i8 zeroext %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = tail call i32 @update(i8 zeroext %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_ALGOR;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_ALGOR_it;
int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_ALGOR_it);
}


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

x86 assembly (clang, -O2):
<i2d_X509_ALGOR>:
mov    0x2ed1(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

LLVM IR (-O0):
@X509_ALGOR_it = global i32 0
define i32 @i2d_X509_ALGOR(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
store i32* %0, i32** %3
store i8** %1, i8*** %4
%5 = load i32*, i32** %3
%6 = load i8**, i8*** %4
%7 = call i32 @ASN1_item_i2d(i32* %5, i8** %6, i32* @X509_ALGOR_it)
ret i32 %7
}

LLVM IR (-O2):
@X509_ALGOR_it = global i32 0
define i32 @i2d_X509_ALGOR(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @X509_ALGOR_it)
ret i32 %3
}
/* Variables and functions */
bool fspath_relativeTo(const char path[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @fspath_relativeTo(i8* nocapture readnone %0) {
ret i32 0
}
char next(char c) {
  switch (c) {
  case '(':
    return ')';
  case '[':
    return ']';
  case '{':
    return '}';
  default:
    return '\0';
  }
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x28,%eax
je     1141 <next+0x41>
jmp    111f <next+0x1f>
mov    -0x8(%rbp),%eax
sub    $0x5b,%eax
je     114a <next+0x4a>
jmp    1130 <next+0x30>
mov    -0x8(%rbp),%eax
sub    $0x7b,%eax
je     1153 <next+0x53>
jmp    115c <next+0x5c>
movb   $0x29,-0x1(%rbp)
jmp    1160 <next+0x60>
movb   $0x5d,-0x1(%rbp)
jmp    1160 <next+0x60>
movb   $0x7d,-0x1(%rbp)
jmp    1160 <next+0x60>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
cmp    $0x28,%edi
je     1112 <next+0x12>
cmp    $0x7b,%edi
je     1115 <next+0x15>
cmp    $0x5b,%edi
jne    1118 <next+0x18>
mov    $0x5d,%al
ret
mov    $0x29,%al
ret
mov    $0x7d,%al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @next(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 40, label %6
i32 91, label %7
i32 123, label %8
]
6: ; preds = %1
store i8 41, i8* %2
br label %10
7: ; preds = %1
store i8 93, i8* %2
br label %10
8: ; preds = %1
store i8 125, i8* %2
br label %10
9: ; preds = %1
store i8 0, i8* %2
br label %10
10: ; preds = %9, %8, %7, %6
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @next(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %5 [
i32 40, label %6
i32 91, label %3
i32 123, label %4
]
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3
%7 = phi i8 [ 0, %5 ], [ 125, %4 ], [ 93, %3 ], [ 41, %1 ]
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__5__IO__clr();
void CC2420ControlP__VREN__clr(void) { HplAtm128GeneralIOPinP__5__IO__clr(); }


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__VREN__clr() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__5__IO__clr()
ret void
}
void inclass_element2posix_class() {}


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

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

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

LLVM IR (-O2):
define void @inclass_element2posix_class() {
ret void
}
void __stubcall_audio_get_parameters(void) {}


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

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

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

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