xunge/DecIR huggingface dataset:
void print_omp_info(void) {}


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

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

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

LLVM IR (-O2):
define void @print_omp_info() {
ret void
}
int eb_pthread_enabled(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @eb_pthread_enabled() {
ret i32 0
}
double MulOp(double a, double b) { return a * b; }


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

x86 assembly (clang, -O2):
<MulOp>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @MulOp(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
int xisupper(int c) { return (c >= 'A' && c <= 'Z'); }


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

x86 assembly (clang, -O2):
<xisupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @xisupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
void mumps_elapse(double *val) {
  struct timeval time;
  gettimeofday(&time, (struct timezone *)0);
  *val = time.tv_sec + time.tv_usec * 1.e-6;
}


x86 assembly (clang, -O0):
<mumps_elapse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xec5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mumps_elapse>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xed0(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
%struct.timezone = type { i32 }
define void @mumps_elapse(double* %0) {
%2 = alloca double*
%3 = alloca %struct.timeval
store double* %0, double** %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, %struct.timezone* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%8 = load double, double* %7
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %6)
%10 = load double*, double** %2
store double %9, double* %10
ret void
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
%struct.timezone = type { i32 }
define void @mumps_elapse(double* nocapture writeonly %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, %struct.timezone* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %6)
store double %9, double* %0
ret void
}
/* Type definitions */
struct timeb {
  int time;
  int millitm;
};

/* Variables and functions */
int /*<<< orphan*/ ftime(struct timeb *);
int getms(void) {
  struct timeb timebuffer;
  ftime(&timebuffer);
  return (timebuffer.time * 1000) + timebuffer.millitm;
}


x86 assembly (clang, -O0):
<getms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <ftime@plt>
imul   $0x3e8,-0x8(%rbp),%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getms>:
push   %rax
mov    %rsp,%rdi
call   1030 <ftime@plt>
imul   $0x3e8,(%rsp),%eax
add    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeb = type { i32, i32 }
define i32 @getms() {
%1 = alloca %struct.timeb
%2 = call i32 @ftime(%struct.timeb* %1)
%3 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = add nsw i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
%struct.timeb = type { i32, i32 }
define i32 @getms() {
%1 = alloca %struct.timeb
%2 = bitcast %struct.timeb* %1 to i8*
%3 = call i32 @ftime(%struct.timeb* %1)
%4 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeb, %struct.timeb* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ wprintf(char *);
void foo() {
  wprintf(L"hello from foo\n");
  bar();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <wprintf@plt>
mov    $0x0,%al
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <wprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bar@plt>

LLVM IR (-O0):
@.str = [16 x i32] [i32 104, i32 101, i32 108, i32 108, i32 111, i32 32, i32 102, i32 114, i32 111, i32 109, i32 32, i32 102, i32 111, i32 111, i32 10, i32 0]
define void @foo() {
%1 = call i32 @wprintf(i8* bitcast ([16 x i32]* @.str to i8*))
%2 = call i32 (...) @bar()
ret void
}

LLVM IR (-O2):
@.str = [16 x i32] [i32 104, i32 101, i32 108, i32 108, i32 111, i32 32, i32 102, i32 114, i32 111, i32 109, i32 32, i32 102, i32 111, i32 111, i32 10, i32 0]
define void @foo() {
%1 = tail call i32 @wprintf(i8* bitcast ([16 x i32]* @.str to i8*))
%2 = tail call i32 (...) @bar()
ret void
}
int create_read_IR() {}


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

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

LLVM IR (-O0):
define i32 @create_read_IR() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @create_read_IR() {
ret i32 undef
}
/* Variables and functions */
scalar_t__ EINTR;
scalar_t__ errno;
int read(int, void *, size_t);
int lxc_read_nointr(int fd, void *buf, size_t count) {
  int ret;
again:
  ret = read(fd, buf, count);
  if (ret < 0 && errno == EINTR)
    goto again;
  return ret;
}


x86 assembly (clang, -O0):
<lxc_read_nointr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    115f <lxc_read_nointr+0x4f>
mov    0x2e99(%rip),%rax
mov    (%rax),%rax
mov    0x2e87(%rip),%rcx
cmp    (%rcx),%rax
jne    115f <lxc_read_nointr+0x4f>
jmp    1123 <lxc_read_nointr+0x13>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lxc_read_nointr>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2eb9(%rip),%r15
mov    0x2eaa(%rip),%r12
xchg   %ax,%ax
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <read@plt>
test   %eax,%eax
jns    114a <lxc_read_nointr+0x3a>
mov    (%r15),%rcx
cmp    (%r12),%rcx
je     1130 <lxc_read_nointr+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@errno = global i64 0
@EINTR = global i64 0
define i32 @lxc_read_nointr(i32 %0, i8* nocapture %1, i64 %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = load i64, i64* @errno
%9 = load i64, i64* @EINTR
%10 = icmp eq i64 %8, %9
br i1 %10, label %4, label %11
11: ; preds = %7, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ xbee_putch(char);
void xbee_disp_1(const unsigned int x) {
  if (x < 10)
    xbee_putch((char)(x + 0x30));
  else if (x < 16)
    xbee_putch((char)(x - 10 + 'A'));
  else
    xbee_putch('X');
}


x86 assembly (clang, -O0):
<xbee_disp_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jae    1138 <xbee_disp_1+0x28>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
movsbl %al,%edi
call   1030 <xbee_putch@plt>
jmp    1167 <xbee_disp_1+0x57>
cmpl   $0x10,-0x4(%rbp)
jae    1158 <xbee_disp_1+0x48>
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
movsbl %al,%edi
call   1030 <xbee_putch@plt>
jmp    1162 <xbee_disp_1+0x52>
mov    $0x58,%edi
call   1030 <xbee_putch@plt>
jmp    1167 <xbee_disp_1+0x57>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xbee_disp_1>:
cmp    $0x9,%edi
ja     111b <xbee_disp_1+0xb>
add    $0x30,%dil
jmp    1126 <xbee_disp_1+0x16>
mov    $0x58,%al
cmp    $0xf,%edi
ja     1128 <xbee_disp_1+0x18>
add    $0x37,%dil
mov    %edi,%eax
movsbl %al,%edi
jmp    1030 <xbee_putch@plt>

LLVM IR (-O0):
define void @xbee_disp_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 10
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add i32 %6, 48
%8 = trunc i32 %7 to i8
%9 = call i32 @xbee_putch(i8 signext %8)
br label %22
10: ; preds = %1
%11 = load i32, i32* %2
%12 = icmp ult i32 %11, 16
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = load i32, i32* %2
%15 = sub i32 %14, 10
%16 = add i32 %15, 65
%17 = trunc i32 %16 to i8
%18 = call i32 @xbee_putch(i8 signext %17)
br label %21
19: ; preds = %10
%20 = call i32 @xbee_putch(i8 signext 88)
br label %21
21: ; preds = %19, %13
br label %22
22: ; preds = %21, %5
ret void
}

LLVM IR (-O2):
define void @xbee_disp_1(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = trunc i32 %0 to i8
%5 = add nuw nsw i8 %4, 48
br label %11
6: ; preds = %1
%7 = icmp ult i32 %0, 16
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = trunc i32 %0 to i8
%10 = add nuw nsw i8 %9, 55
br label %11
11: ; preds = %6, %8, %3
%12 = phi i8 [ %10, %8 ], [ %5, %3 ], [ 88, %6 ]
%13 = tail call i32 @xbee_putch(i8 signext %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  printf("PI 1 =%f\n", 3.1415926);
  printf("PI 1 =%lf\n", 3.1415926);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
movsd  0xecc(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"PI 1 =%f\0A\00"
@.str.1 = [11 x i8] c"PI 1 =%lf\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 0x400921FB4D12D84A)
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double 0x400921FB4D12D84A)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"PI 1 =%f\0A\00"
@.str.1 = [11 x i8] c"PI 1 =%lf\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double 0x400921FB4D12D84A)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double 0x400921FB4D12D84A)
ret i32 0
}
int invert(int x, int p, int n) { return x ^ ~(~0 << n) << (p + 1 - n); }


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shl    %cl,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @invert(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* %6
%9 = shl i32 -1, %8
%10 = xor i32 %9, -1
%11 = load i32, i32* %5
%12 = add nsw i32 %11, 1
%13 = load i32, i32* %6
%14 = sub nsw i32 %12, %13
%15 = shl i32 %10, %14
%16 = xor i32 %7, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = add nsw i32 %1, 1
%7 = sub i32 %6, %2
%8 = shl i32 %5, %7
%9 = xor i32 %8, %0
ret i32 %9
}
/* Variables and functions */
char *ellipsize_mem(char const *, int /*<<< orphan*/, size_t, unsigned int);
int /*<<< orphan*/ strlen(char const *);
char *ellipsize(const char *s, size_t length, unsigned percent) {
  return ellipsize_mem(s, strlen(s), length, percent);
}


x86 assembly (clang, -O0):
<ellipsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <ellipsize_mem@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @ellipsize(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = load i64, i64* %5
%11 = load i32, i32* %6
%12 = call i8* @ellipsize_mem(i8* %7, i32 %9, i64 %10, i32 %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @ellipsize(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i8* @ellipsize_mem(i8* %0, i32 %4, i64 %1, i32 %2)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void ser2net_cleanup(void *arg) {
  printf("cleaning up ressources allocated by ser2net thread: %s\n",
         (char *)arg);
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"cleaning up ressources allocated by ser2net thread: %s\0A\00"
define void @ser2net_cleanup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"cleaning up ressources allocated by ser2net thread: %s\0A\00"
define void @ser2net_cleanup(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *const);
int /*<<< orphan*/ stderr;
void usage(const char *const argv0) {
  fprintf(stderr, "Usage: %s library [count]\n", argv0);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: %s library [count]\0A\00"
define void @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 ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Usage: %s library [count]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int test_imm_26int64_lowword_reg(long long val) {
  return ((val) & (0x26 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_26int64_lowword_reg>:
test   $0x26,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_26int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 38
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_putstr(char *str) {
  int index;
  index = 0;
  while (str[index] != '\0') {
    ft_putchar(str[index]);
    index++;
  }
}


x86 assembly (clang, -O0):
<ft_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <ft_putstr+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putstr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <ft_putstr+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <ft_putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <ft_putstr+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @ft_putstr(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 i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = call i32 @ft_putchar(i8 signext %17)
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ft_putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *bc_str_lstrip(int /*<<< orphan*/);
int /*<<< orphan*/ bc_str_rstrip(char *);
char *bc_str_strip(char *str) { return bc_str_lstrip(bc_str_rstrip(str)); }


x86 assembly (clang, -O0):
<bc_str_strip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bc_str_rstrip@plt>
mov    %eax,%edi
call   1040 <bc_str_lstrip@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @bc_str_strip(i8* %0) {
%2 = tail call i32 @bc_str_rstrip(i8* %0)
%3 = tail call i8* @bc_str_lstrip(i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ z_streamp;

/* Variables and functions */
void testinflate(z_streamp strm) { return; }


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

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

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

LLVM IR (-O2):
define void @testinflate(i32 %0) {
ret void
}
void flash_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @flash_unlock() {
ret void
}
/* Variables and functions */
double sqrt(int);
double distance(int A[2], int B[2]) {
  int d1 = A[0] - B[0];
  int d2 = A[1] - B[1];
  return sqrt(d1 * d1 + d2 * d2);
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    -0x10(%rbp),%rcx
sub    0x4(%rcx),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
imul   -0x14(%rbp),%edi
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
add    %eax,%edi
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
mov    (%rdi),%eax
mov    0x4(%rdi),%edi
sub    (%rsi),%eax
sub    0x4(%rsi),%edi
imul   %eax,%eax
imul   %edi,%edi
add    %eax,%edi
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @distance(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = sub nsw i32 %9, %12
store i32 %13, i32* %5
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = load i32, i32* %15
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 1
%19 = load i32, i32* %18
%20 = sub nsw i32 %16, %19
store i32 %20, i32* %6
%21 = load i32, i32* %5
%22 = load i32, i32* %5
%23 = mul nsw i32 %21, %22
%24 = load i32, i32* %6
%25 = load i32, i32* %6
%26 = mul nsw i32 %24, %25
%27 = add nsw i32 %23, %26
%28 = call double @sqrt(i32 %27)
ret double %28
}

LLVM IR (-O2):
define double @distance(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sub nsw i32 %3, %4
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %1, i64 1
%9 = load i32, i32* %8
%10 = sub nsw i32 %7, %9
%11 = mul nsw i32 %5, %5
%12 = mul nsw i32 %10, %10
%13 = add nuw nsw i32 %12, %11
%14 = tail call double @sqrt(i32 %13)
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ testing(int, char *);
int main() {
  printf("Testing decompose\n");
  {
    testing(50, "[1,3,5,8,49]");
    testing(44, "[2,3,5,7,43]");
    testing(625, "[2,5,8,34,624]");
    testing(2, "[]");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x32,%edi
lea    0xed7(%rip),%rsi
call   1030 <testing@plt>
mov    $0x2c,%edi
lea    0xed3(%rip),%rsi
call   1030 <testing@plt>
mov    $0x271,%edi
lea    0xecf(%rip),%rsi
call   1030 <testing@plt>
mov    $0x2,%edi
lea    0xecd(%rip),%rsi
call   1030 <testing@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf04(%rip),%rdi
call   1040 <puts@plt>
lea    0xecc(%rip),%rsi
mov    $0x32,%edi
call   1030 <testing@plt>
lea    0xec8(%rip),%rsi
mov    $0x2c,%edi
call   1030 <testing@plt>
lea    0xec4(%rip),%rsi
mov    $0x271,%edi
call   1030 <testing@plt>
lea    0xec2(%rip),%rsi
mov    $0x2,%edi
call   1030 <testing@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Testing decompose\0A\00"
@.str.1 = [13 x i8] c"[1,3,5,8,49]\00"
@.str.2 = [13 x i8] c"[2,3,5,7,43]\00"
@.str.3 = [15 x i8] c"[2,5,8,34,624]\00"
@.str.4 = [3 x i8] c"[]\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @testing(i32 50, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @testing(i32 44, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @testing(i32 625, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @testing(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"[1,3,5,8,49]\00"
@.str.2 = [13 x i8] c"[2,3,5,7,43]\00"
@.str.3 = [15 x i8] c"[2,5,8,34,624]\00"
@.str.4 = [3 x i8] c"[]\00"
@str = [18 x i8] c"Testing decompose\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @testing(i32 50, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @testing(i32 44, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @testing(i32 625, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @testing(i32 2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}
int function1(int *n) { return *n; }


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

x86 assembly (clang, -O2):
<function1>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @function1(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char *, int);
int ov_check(const char *r_code) {
  if (strncmp(r_code, "1", 1) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ov_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1147 <ov_check+0x37>
movl   $0x1,-0x4(%rbp)
jmp    114e <ov_check+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ov_check>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
define i32 @ov_check(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ X509;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int PEM_ASN1_write_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_X509;
scalar_t__ i2d_X509;
int PEM_write_bio_X509(BIO *bp, X509 *x) {
  return PEM_ASN1_write_bio((i2d_of_void *)i2d_X509, PEM_STRING_X509, bp, x,
                            NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_bio_X509>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_bio_X509>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb7(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_X509 = global i64 0
@PEM_STRING_X509 = global i32 0
define i32 @PEM_write_bio_X509(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_X509
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_X509
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write_bio(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_X509 = global i64 0
@PEM_STRING_X509 = global i32 0
define i32 @PEM_write_bio_X509(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_X509
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_X509
%6 = tail call i32 @PEM_ASN1_write_bio(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
/* Variables and functions */
void *aligned_alloc(int, size_t);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ die(char *);
void *alloc_simd(size_t n) {
  void *p = aligned_alloc(16, n);
  if (!p) {
    die("allocation error");
  }
  assert((((uintptr_t)p) & 15) == 0);
  return p;
}


x86 assembly (clang, -O0):
<alloc_simd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x10,%edi
call   1050 <aligned_alloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <alloc_simd+0x35>
lea    0xea0(%rip),%rdi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
and    $0xf,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_simd>:
push   %rbx
mov    %rdi,%rsi
mov    $0x10,%edi
call   1050 <aligned_alloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1152 <alloc_simd+0x22>
lea    0xeb3(%rip),%rdi
call   1040 <die@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"allocation error\00"
define i8* @alloc_simd(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @aligned_alloc(i32 16, i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %11 to i64
%13 = and i64 %12, 15
%14 = icmp eq i64 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@.str = [17 x i8] c"allocation error\00"
define noalias i8* @alloc_simd(i64 %0) {
%2 = tail call align 16 i8* @aligned_alloc(i32 16, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @assert(i32 1)
ret i8* %2
}
/* Variables and functions */
double dmax(double, double);
double dmin(double, double);
double dClip3(double low, double high, double x) {
  x = dmax(x, low);
  x = dmin(x, high);
  return x;
}


x86 assembly (clang, -O0):
<dClip3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
call   1040 <dmax@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <dmin@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dClip3>:
push   %rax
movsd  %xmm1,(%rsp)
movaps %xmm0,%xmm1
movaps %xmm2,%xmm0
call   1040 <dmax@plt>
movsd  (%rsp),%xmm1
pop    %rax
jmp    1030 <dmin@plt>

LLVM IR (-O0):
define double @dClip3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %4
%9 = call double @dmax(double %7, double %8)
store double %9, double* %6
%10 = load double, double* %6
%11 = load double, double* %5
%12 = call double @dmin(double %10, double %11)
store double %12, double* %6
%13 = load double, double* %6
ret double %13
}

LLVM IR (-O2):
define double @dClip3(double %0, double %1, double %2) {
%4 = tail call double @dmax(double %2, double %0)
%5 = tail call double @dmin(double %4, double %1)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void EraseLnFromCur() { WRITETEST("\033[K"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[K\00"
define void @EraseLnFromCur() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[K\00"
define void @EraseLnFromCur() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ide_board_close(int);
void ide_qua_close(void *priv) { ide_board_close(3); }


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

x86 assembly (clang, -O2):
<ide_qua_close>:
mov    $0x3,%edi
jmp    1030 <ide_board_close@plt>

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

LLVM IR (-O2):
define void @ide_qua_close(i8* nocapture readnone %0) {
%2 = tail call i32 @ide_board_close(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ noecho();
void ncui_init(void) {
  initscr();
  noecho();
  curs_set(0);
}


x86 assembly (clang, -O0):
<ncui_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1040 <noecho@plt>
xor    %edi,%edi
call   1050 <curs_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ncui_init>:
push   %rax
xor    %eax,%eax
call   1030 <initscr@plt>
xor    %eax,%eax
call   1040 <noecho@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <curs_set@plt>

LLVM IR (-O0):
define void @ncui_init() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @noecho()
%3 = call i32 @curs_set(i32 0)
ret void
}

LLVM IR (-O2):
define void @ncui_init() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @noecho()
%3 = tail call i32 @curs_set(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ has_extension(char *, char *);
int is_seq_filename(char *filename) {
  return (has_extension(filename, "fa") || has_extension(filename, "seq")) ? 1
                                                                           : 0;
}


x86 assembly (clang, -O0):
<is_seq_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <has_extension@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    1158 <is_seq_filename+0x48>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <has_extension@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_seq_filename>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <has_extension@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112f <is_seq_filename+0x1f>
pop    %rbx
ret
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <has_extension@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"fa\00"
@.str.1 = [4 x i8] c"seq\00"
define i32 @is_seq_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @has_extension(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @has_extension(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
@.str = [3 x i8] c"fa\00"
@.str.1 = [4 x i8] c"seq\00"
define i32 @is_seq_filename(i8* %0) {
%2 = tail call i64 @has_extension(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @has_extension(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ core4_print(char *, char const *);
void U_EMRRECTANGLE_print(const char *contents) {
  core4_print("U_EMRRECTANGLE", contents);
}


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

x86 assembly (clang, -O2):
<U_EMRRECTANGLE_print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <core4_print@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"U_EMRRECTANGLE\00"
define void @U_EMRRECTANGLE_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core4_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"U_EMRRECTANGLE\00"
define void @U_EMRRECTANGLE_print(i8* %0) {
%2 = tail call i32 @core4_print(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_input();
int /*<<< orphan*/ set_coeff();
int main(int argc, char *argv[]) {
  read_input();
  set_coeff();
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <read_input@plt>
mov    $0x0,%al
call   1030 <set_coeff@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @read_input()
%7 = call i32 (...) @set_coeff()
ret i32 1
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @read_input()
%4 = tail call i32 (...) @set_coeff()
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ load_alloc_functions();
int /*<<< orphan*/ mm_free(int *);
scalar_t__ mm_malloc(int);
int /*<<< orphan*/ printf(char *);
int main() {
  load_alloc_functions();
  int *data = (int *)mm_malloc(sizeof(int));
  assert(data != NULL);
  data[0] = 0x162;
  mm_free(data);
  printf("malloc test successful!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <load_alloc_functions@plt>
mov    $0x4,%edi
call   1030 <mm_malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rax
movl   $0x162,(%rax)
mov    -0x10(%rbp),%rdi
call   1060 <mm_free@plt>
lea    0xe60(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1070 <load_alloc_functions@plt>
mov    $0x4,%edi
call   1030 <mm_malloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1050 <assert@plt>
movl   $0x162,(%rbx)
mov    %rbx,%rdi
call   1060 <mm_free@plt>
lea    0xe78(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"malloc test successful!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32 (...) @load_alloc_functions()
%4 = call i64 @mm_malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = icmp ne i32* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i32*, i32** %2
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 354, i32* %11
%12 = load i32*, i32** %2
%13 = call i32 @mm_free(i32* %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"malloc test successful!\00"
define i32 @main() {
%1 = tail call i32 (...) @load_alloc_functions()
%2 = tail call i64 @mm_malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
%4 = icmp ne i64 %2, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
store i32 354, i32* %3
%7 = tail call i32 @mm_free(i32* %3)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double cbrt(double);
int inCollisionRange(double mass1, double mass2, double distance) {
  double sphereradc;
  sphereradc = (4 / 3 * 3.14159265358979323846) * 5000000000;
  if (cbrt(mass1 / sphereradc) + cbrt(mass2 / sphereradc) >= distance) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<inCollisionRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <cbrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1030 <cbrt@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
addsd  %xmm1,%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     117a <inCollisionRange+0x6a>
movl   $0x1,-0x4(%rbp)
jmp    1181 <inCollisionRange+0x71>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inCollisionRange>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
divsd  0xed8(%rip),%xmm0
call   1030 <cbrt@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xec0(%rip),%xmm0
call   1030 <cbrt@plt>
addsd  (%rsp),%xmm0
xor    %eax,%eax
ucomisd 0x10(%rsp),%xmm0
setae  %al
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @inCollisionRange(double %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double 0x420D4223FC1F977B, double* %8
%9 = load double, double* %5
%10 = load double, double* %8
%11 = fdiv double %9, %10
%12 = call double @cbrt(double %11)
%13 = load double, double* %6
%14 = load double, double* %8
%15 = fdiv double %13, %14
%16 = call double @cbrt(double %15)
%17 = fadd double %12, %16
%18 = load double, double* %7
%19 = fcmp oge double %17, %18
br i1 %19, label %20, label %21
20: ; preds = %3
store i32 1, i32* %4
br label %22
21: ; preds = %3
store i32 0, i32* %4
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @inCollisionRange(double %0, double %1, double %2) {
%4 = fdiv double %0, 0x420D4223FC1F977B
%5 = tail call double @cbrt(double %4)
%6 = fdiv double %1, 0x420D4223FC1F977B
%7 = tail call double @cbrt(double %6)
%8 = fadd double %5, %7
%9 = fcmp oge double %8, %2
%10 = zext i1 %9 to i32
ret i32 %10
}