xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ s2sls(float);
void s2sls_(float *width) { s2sls(*width); }


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

x86 assembly (clang, -O2):
<s2sls_>:
movss  (%rdi),%xmm0
jmp    1030 <s2sls@plt>

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

LLVM IR (-O2):
define void @s2sls_(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i32 @s2sls(float %2)
ret void
}
void cx11646_setquality(struct usb_spca50x *spca50x) {}


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

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

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

LLVM IR (-O2):
%struct.usb_spca50x = type opaque
define void @cx11646_setquality(%struct.usb_spca50x* nocapture %0) {
ret void
}
void INI_String_TYPE() { ; }


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

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

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

LLVM IR (-O2):
define void @INI_String_TYPE() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ map;

/* Variables and functions */
char cigar_int_to_op(uint32_t cigar_int) {
  uint8_t letter_code = cigar_int & 0xfU;
  static const char map[] = {
      'M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X',
  };
  if (letter_code >= (sizeof(map) / sizeof(map[0]))) {
    return 'M';
  }
  return map[letter_code];
}


x86 assembly (clang, -O0):
<cigar_int_to_op>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf,%eax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x9,%rax
jb     1127 <cigar_int_to_op+0x27>
movb   $0x4d,-0x1(%rbp)
jmp    1138 <cigar_int_to_op+0x38>
movslq -0xc(%rbp),%rcx
lea    0xece(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cigar_int_to_op>:
and    $0xf,%edi
mov    $0x4d,%al
cmp    $0x8,%edi
ja     1114 <cigar_int_to_op+0x14>
lea    0xeef(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@cigar_int_to_op.map = internal constant [9 x i8] c"MIDNSHP=X"
define signext i8 @cigar_int_to_op(i32 %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = and i32 %5, 15
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = icmp uge i64 %8, 9
br i1 %9, label %10, label %11
10: ; preds = %1
store i8 77, i8* %2
br label %16
11: ; preds = %1
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [9 x i8], [9 x i8]* @cigar_int_to_op.map, i64 0, i64 %13
%15 = load i8, i8* %14
store i8 %15, i8* %2
br label %16
16: ; preds = %11, %10
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
@cigar_int_to_op.map = internal unnamed_addr constant [9 x i8] c"MIDNSHP=X"
define signext i8 @cigar_int_to_op(i32 %0) {
%2 = and i32 %0, 15
%3 = icmp ugt i32 %2, 8
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = zext i32 %2 to i64
%6 = getelementptr inbounds [9 x i8], [9 x i8]* @cigar_int_to_op.map, i64 0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %4
%9 = phi i8 [ %7, %4 ], [ 77, %1 ]
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int rec(int);
int main(void) {
  int sum;
  printf("lsframe2: start\n");
  sum = rec(64);
  printf("lsframe2: done, result is %d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x40,%edi
call   1040 <rec@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x40,%edi
call   1050 <rec@plt>
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"lsframe2: start\0A\00"
@.str.1 = [30 x i8] c"lsframe2: done, result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @rec(i32 64)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [30 x i8] c"lsframe2: done, result is %d\0A\00"
@str = [16 x i8] c"lsframe2: start\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @rec(i32 64)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i;
  i = 1;
  while (i < 16)
    i *= 2;
  printf("%d", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    113e <main+0x2e>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x8(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 16)
ret i32 0
}
double fy(double A, double B, double C, double y) { return -(B * y + C) / A; }


x86 assembly (clang, -O0):
<fy>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fy>:
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
xorpd  0xef0(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fy(double %0, double %1, double %2, double %3) {
%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 %3, double* %8
%9 = load double, double* %6
%10 = load double, double* %8
%11 = load double, double* %7
%12 = call double @llvm.fmuladd.f64(double %9, double %10, double %11)
%13 = fneg double %12
%14 = load double, double* %5
%15 = fdiv double %13, %14
ret double %15
}

LLVM IR (-O2):
define double @fy(double %0, double %1, double %2, double %3) {
%5 = tail call double @llvm.fmuladd.f64(double %1, double %3, double %2)
%6 = fneg double %5
%7 = fdiv double %6, %0
ret double %7
}
int input_map_a2(char c) {
  if (c == 'b')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<input_map_a2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x62,%eax
jne    1123 <input_map_a2+0x23>
movl   $0x1,-0x4(%rbp)
jmp    112a <input_map_a2+0x2a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<input_map_a2>:
xor    %eax,%eax
cmp    $0x62,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @input_map_a2(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 98
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):
define i32 @input_map_a2(i8 signext %0) {
%2 = icmp eq i8 %0, 98
%3 = zext i1 %2 to i32
ret i32 %3
}
int last_one12(unsigned int u1, unsigned int u2) {
  if (u2) {
    return 80 - __builtin_ctz(u2);
  }
  return 53 - __builtin_ctz(u1);
}


x86 assembly (clang, -O0):
<last_one12>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1129 <last_one12+0x29>
mov    -0xc(%rbp),%eax
bsf    %eax,%ecx
mov    $0x50,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <last_one12+0x39>
mov    -0x8(%rbp),%eax
bsf    %eax,%ecx
mov    $0x35,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_one12>:
test   %esi,%esi
cmovne %esi,%edi
mov    $0x35,%ecx
mov    $0x50,%eax
cmove  %ecx,%eax
bsf    %edi,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @last_one12(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %5
%10 = call i32 @llvm.cttz.i32(i32 %9, i1 true)
%11 = sub nsw i32 80, %10
store i32 %11, i32* %3
br label %16
12: ; preds = %2
%13 = load i32, i32* %4
%14 = call i32 @llvm.cttz.i32(i32 %13, i1 true)
%15 = sub nsw i32 53, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %12, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @last_one12(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i32 %0, i32 %1
%5 = select i1 %3, i32 53, i32 80
%6 = tail call i32 @llvm.cttz.i32(i32 %4, i1 true)
%7 = sub nuw nsw i32 %5, %6
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

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

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


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

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

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

LLVM IR (-O2):
define i8* @get_XPropertyEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Type definitions */
struct jx_table {
  int dummy;
};
struct jx {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ jx_export_html_with_link(struct jx *, int /*<<< orphan*/ *,
                                            struct jx_table *,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/);
void jx_export_html(struct jx *n, FILE *s, struct jx_table *h) {
  jx_export_html_with_link(n, s, h, 0, 0);
}


x86 assembly (clang, -O0):
<jx_export_html>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <jx_export_html_with_link@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jx_export_html>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <jx_export_html_with_link@plt>

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

LLVM IR (-O2):
%struct.jx = type { i32 }
%struct.jx_table = type { i32 }
define void @jx_export_html(%struct.jx* %0, i32* %1, %struct.jx_table* %2) {
%4 = tail call i32 @jx_export_html_with_link(%struct.jx* %0, i32* %1, %struct.jx_table* %2, i32 0, i32 0)
ret void
}
short f1(short x) {
  do {
    if (x <= 0)
      return 100;
  } while (--x);
  return 200;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jg     1123 <f1+0x23>
movw   $0x64,-0x2(%rbp)
jmp    1144 <f1+0x44>
jmp    1128 <f1+0x28>
mov    -0x4(%rbp),%ax
add    $0xffff,%ax
mov    %ax,-0x4(%rbp)
cmp    $0x0,%ax
jne    110b <f1+0xb>
movw   $0xc8,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
xor    %eax,%eax
test   %di,%di
cmovs  %edi,%eax
mov    %edi,%ecx
sub    %eax,%ecx
mov    %edi,%eax
add    $0xffffffff,%eax
cmp    %ax,%cx
cmovb  %ecx,%eax
cmp    $0x20,%ax
jb     1150 <f1+0x50>
movzwl %ax,%eax
lea    0x1(%rax),%ecx
mov    %ecx,%edx
and    $0x1f,%edx
mov    $0x20,%esi
cmovne %edx,%esi
not    %eax
add    %esi,%eax
sub    %ecx,%esi
add    %edi,%esi
mov    %esi,%edi
nopw   0x0(%rax,%rax,1)
add    $0x20,%eax
jne    1140 <f1+0x40>
cs nopw 0x0(%rax,%rax,1)
nop
test   %di,%di
jle    1160 <f1+0x60>
add    $0xffff,%di
jne    1150 <f1+0x50>
mov    $0xc8,%ax
ret
mov    $0x64,%ax
ret

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

LLVM IR (-O2):
define signext i16 @f1(i16 signext %0) {
%2 = call i16 @llvm.smin.i16(i16 %0, i16 0)
%3 = sub i16 %0, %2
%4 = add i16 %0, -1
%5 = call i16 @llvm.umin.i16(i16 %3, i16 %4)
%6 = zext i16 %5 to i32
%7 = add nuw nsw i32 %6, 1
%8 = icmp ult i16 %5, 32
br i1 %8, label %20, label %9
9: ; preds = %1
%10 = and i32 %7, 31
%11 = icmp eq i32 %10, 0
%12 = select i1 %11, i32 32, i32 %10
%13 = sub nsw i32 %7, %12
%14 = trunc i32 %13 to i16
%15 = sub i16 %0, %14
br label %16
16: ; preds = %16, %9
%17 = phi i32 [ 0, %9 ], [ %18, %16 ]
%18 = add nuw i32 %17, 32
%19 = icmp eq i32 %18, %13
br i1 %19, label %20, label %16
20: ; preds = %16, %1
%21 = phi i16 [ %0, %1 ], [ %15, %16 ]
br label %22
22: ; preds = %20, %25
%23 = phi i16 [ %26, %25 ], [ %21, %20 ]
%24 = icmp slt i16 %23, 1
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = add nsw i16 %23, -1
%27 = icmp eq i16 %26, 0
br i1 %27, label %28, label %22
28: ; preds = %25, %22
%29 = phi i16 [ 100, %22 ], [ 200, %25 ]
ret i16 %29
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ strlen(char *);
int write(int, char *, int /*<<< orphan*/);
void do_send(int sd, char *buf) {
  int n;
  n = write(sd, buf, strlen(buf));
  if (n < 0) {
    perror("Error: do_send");
  }
}


x86 assembly (clang, -O0):
<do_send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x24(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    117d <do_send+0x4d>
lea    0xe88(%rip),%rdi
call   1050 <perror@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_send>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
test   %eax,%eax
js     1157 <do_send+0x27>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xea2(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <perror@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"Error: do_send\00"
define void @do_send(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @write(i32 %6, i8* %7, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Error: do_send\00"
define void @do_send(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fpconv_update_locale();
void fpconv_init() { fpconv_update_locale(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned char const,
                            unsigned char const);
const char *ether_sprintf_short(const unsigned char *mac) {
  static char etherbuf[5];
  snprintf(etherbuf, sizeof(etherbuf), "%02x%02x", mac[4], mac[5]);
  return etherbuf;
}


x86 assembly (clang, -O0):
<ether_sprintf_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%cl
mov    -0x8(%rbp),%rax
lea    0x2efb(%rip),%rdi
mov    $0x5,%esi
lea    0xec6(%rip),%rdx
movzbl %cl,%ecx
movzbl 0x5(%rax),%r8d
call   1030 <snprintf@plt>
lea    0x2edb(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ether_sprintf_short>:
push   %rbx
movzbl 0x4(%rdi),%ecx
movzbl 0x5(%rdi),%r8d
lea    0x2f08(%rip),%rbx
lea    0xed8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ether_sprintf_short.etherbuf = internal global [5 x i8] zeroinitializer
@.str = [9 x i8] c"%02x%02x\00"
define i8* @ether_sprintf_short(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 4
%5 = load i8, i8* %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 5
%8 = load i8, i8* %7
%9 = call i32 @snprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @ether_sprintf_short.etherbuf, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 zeroext %5, i8 zeroext %8)
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @ether_sprintf_short.etherbuf, i64 0, i64 0)
}

LLVM IR (-O2):
@ether_sprintf_short.etherbuf = internal global [5 x i8] zeroinitializer
@.str = [9 x i8] c"%02x%02x\00"
define i8* @ether_sprintf_short(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %0, i64 5
%5 = load i8, i8* %4
%6 = tail call i32 @snprintf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @ether_sprintf_short.etherbuf, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 zeroext %3, i8 zeroext %5)
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @ether_sprintf_short.etherbuf, i64 0, i64 0)
}
/* Variables and functions */
unsigned int inl(int);
int /*<<< orphan*/ slow_down_io();
unsigned int inl_p(int port) {
  unsigned int value = inl(port);
  slow_down_io();
  return value;
}


x86 assembly (clang, -O0):
<inl_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <inl@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <slow_down_io@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl_p>:
push   %rbx
call   1030 <inl@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <slow_down_io@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @inl_p(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @inl(i32 %4)
store i32 %5, i32* %3
%6 = call i32 (...) @slow_down_io()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @inl_p(i32 %0) {
%2 = tail call i32 @inl(i32 %0)
%3 = tail call i32 (...) @slow_down_io()
ret i32 %2
}
/* Type definitions */
struct vm_area_struct {
  int dummy;
};

/* Variables and functions */
void radix__flush_hugetlb_page(struct vm_area_struct *, unsigned long);
scalar_t__ radix_enabled();
void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr) {
  if (radix_enabled())
    return radix__flush_hugetlb_page(vma, vmaddr);
}


x86 assembly (clang, -O0):
<flush_hugetlb_page>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <radix_enabled@plt>
cmp    $0x0,%rax
je     114e <flush_hugetlb_page+0x2e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <radix__flush_hugetlb_page@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flush_hugetlb_page>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <radix_enabled@plt>
test   %rax,%rax
je     1148 <flush_hugetlb_page+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <radix__flush_hugetlb_page@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.vm_area_struct = type { i32 }
define void @flush_hugetlb_page(%struct.vm_area_struct* %0, i64 %1) {
%3 = alloca %struct.vm_area_struct*
%4 = alloca i64
store %struct.vm_area_struct* %0, %struct.vm_area_struct** %3
store i64 %1, i64* %4
%5 = call i64 (...) @radix_enabled()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load %struct.vm_area_struct*, %struct.vm_area_struct** %3
%9 = load i64, i64* %4
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
%struct.vm_area_struct = type { i32 }
define void @flush_hugetlb_page(%struct.vm_area_struct* %0, i64 %1) {
%3 = tail call i64 (...) @radix_enabled()
%4 = icmp eq i64 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %2
tail call void @radix__flush_hugetlb_page(%struct.vm_area_struct* %0, i64 %1)
br label %6
6: ; preds = %5, %2
ret void
}
int ft_error(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @ft_error() {
ret i32 1
}

LLVM IR (-O2):
define i32 @ft_error() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ cuts(char *, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ scanf(char *, int *, char *);
scalar_t__ strlen(char *);
void test_case() {
  int n;
  char buffer[2001];
  scanf("%d %s", &n, buffer);
  cuts(buffer, 0, (int)strlen(buffer) - 1, n);
}


x86 assembly (clang, -O0):
<test_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
lea    -0x7e0(%rbp),%rdx
lea    0xeb7(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
lea    -0x7e0(%rbp),%rax
mov    %rax,-0x7e8(%rbp)
lea    -0x7e0(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x7e8(%rbp),%rdi
mov    %eax,%edx
sub    $0x1,%edx
mov    -0x4(%rbp),%ecx
xor    %esi,%esi
call   1030 <cuts@plt>
add    $0x7f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_case>:
push   %rbx
sub    $0x7f0,%rsp
lea    0xec1(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdx
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rax),%edx
mov    0xc(%rsp),%ecx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <cuts@plt>
add    $0x7f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %s\00"
define void @test_case() {
%1 = alloca i32
%2 = alloca [2001 x i8]
%3 = getelementptr inbounds [2001 x i8], [2001 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %3)
%5 = getelementptr inbounds [2001 x i8], [2001 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [2001 x i8], [2001 x i8]* %2, i64 0, i64 0
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %1
%11 = call i32 @cuts(i8* %5, i32 0, i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %s\00"
define void @test_case() {
%1 = alloca i32
%2 = alloca [2001 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [2001 x i8], [2001 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i8* %4)
%6 = call i64 @strlen(i8* %4)
%7 = trunc i64 %6 to i32
%8 = add nsw i32 %7, -1
%9 = load i32, i32* %1
%10 = call i32 @cuts(i8* %4, i32 0, i32 %8, i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fclose(void *);
void file_close(void *data) { fclose(data); }


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

x86 assembly (clang, -O2):
<file_close>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @file_close(i8* nocapture %0) {
%2 = tail call i32 @fclose(i8* %0)
ret void
}
void increase_key(struct max_heap *h, struct heap_entry *e) {}


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

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

LLVM IR (-O0):
%struct.max_heap = type opaque
%struct.heap_entry = type opaque
define void @increase_key(%struct.max_heap* %0, %struct.heap_entry* %1) {
%3 = alloca %struct.max_heap*
%4 = alloca %struct.heap_entry*
store %struct.max_heap* %0, %struct.max_heap** %3
store %struct.heap_entry* %1, %struct.heap_entry** %4
ret void
}

LLVM IR (-O2):
%struct.max_heap = type opaque
%struct.heap_entry = type opaque
define void @increase_key(%struct.max_heap* nocapture %0, %struct.heap_entry* nocapture %1) {
ret void
}
/* Type definitions */
struct Settings {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Settings *);
void settings_free(struct Settings *settings) { free(settings); }


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

x86 assembly (clang, -O2):
<settings_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.Settings = type { i32 }
define void @settings_free(%struct.Settings* nocapture %0) {
%2 = tail call i32 @free(%struct.Settings* %0)
ret void
}
int collatzLength(int nIn) {
  long long n = nIn;
  int l = 0;
  while (n > 1) {
    if (n % 2 == 0)
      n = n / 2;
    else
      n = 3 * n + 1;
    l++;
  }
  return l;
}


x86 assembly (clang, -O0):
<collatzLength>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x1,-0x10(%rbp)
jle    116b <collatzLength+0x6b>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rdx
jne    1150 <collatzLength+0x50>
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
jmp    115d <collatzLength+0x5d>
imul   $0x3,-0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1116 <collatzLength+0x16>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<collatzLength>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     112b <collatzLength+0x2b>
mov    %edi,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
mov    %rcx,%rdx
shr    %rdx
test   $0x1,%cl
lea    0x1(%rcx,%rcx,2),%rcx
cmove  %rdx,%rcx
add    $0x1,%eax
cmp    $0x1,%rcx
jg     1110 <collatzLength+0x10>
ret

LLVM IR (-O0):
define i32 @collatzLength(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
store i64 %6, i64* %3
store i32 0, i32* %4
br label %7
7: ; preds = %21, %1
%8 = load i64, i64* %3
%9 = icmp sgt i64 %8, 1
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = load i64, i64* %3
%12 = srem i64 %11, 2
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i64, i64* %3
%16 = sdiv i64 %15, 2
store i64 %16, i64* %3
br label %21
17: ; preds = %10
%18 = load i64, i64* %3
%19 = mul nsw i64 3, %18
%20 = add nsw i64 %19, 1
store i64 %20, i64* %3
br label %21
21: ; preds = %17, %14
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %7
24: ; preds = %7
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
define i32 @collatzLength(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %16
3: ; preds = %1
%4 = zext i32 %0 to i64
br label %5
5: ; preds = %3, %5
%6 = phi i32 [ %14, %5 ], [ 0, %3 ]
%7 = phi i64 [ %13, %5 ], [ %4, %3 ]
%8 = and i64 %7, 1
%9 = icmp eq i64 %8, 0
%10 = lshr i64 %7, 1
%11 = mul nsw i64 %7, 3
%12 = add nsw i64 %11, 1
%13 = select i1 %9, i64 %10, i64 %12
%14 = add nuw nsw i32 %6, 1
%15 = icmp sgt i64 %13, 1
br i1 %15, label %5, label %16
16: ; preds = %5, %1
%17 = phi i32 [ 0, %1 ], [ %14, %5 ]
ret i32 %17
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRBE_get(void) { return U_WMRCORENONE_get("U_WMRBE"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRBE\00"
define i32 @U_WMRBE_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void arch_xtstore(long xt, long pdict) {
  ((long *)pdict)[0] = 0xe8909090;
  ((long *)pdict)[1] = xt - (pdict + 3 + 5);
}


x86 assembly (clang, -O0):
<arch_xtstore>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xe8909090,%ecx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    $0x3,%rax
add    $0x5,%rax
sub    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_xtstore>:
mov    $0xe8909090,%eax
mov    %rax,(%rsi)
sub    %rsi,%rdi
add    $0xfffffffffffffff8,%rdi
mov    %rdi,0x8(%rsi)
ret

LLVM IR (-O0):
define void @arch_xtstore(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = inttoptr i64 %5 to i64*
%7 = getelementptr inbounds i64, i64* %6, i64 0
store i64 3901788304, i64* %7
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = add nsw i64 %9, 3
%11 = add nsw i64 %10, 5
%12 = sub nsw i64 %8, %11
%13 = load i64, i64* %4
%14 = inttoptr i64 %13 to i64*
%15 = getelementptr inbounds i64, i64* %14, i64 1
store i64 %12, i64* %15
ret void
}

LLVM IR (-O2):
define void @arch_xtstore(i64 %0, i64 %1) {
%3 = inttoptr i64 %1 to i64*
store i64 3901788304, i64* %3
%4 = add i64 %0, -8
%5 = sub i64 %4, %1
%6 = getelementptr inbounds i64, i64* %3, i64 1
store i64 %5, i64* %6
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int exists(const char *fname) {
  struct stat s;
  return (stat(fname, &s) == 0);
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
double xrand();
double random_raw(void) { return xrand(); }


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

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

LLVM IR (-O0):
define double @random_raw() {
%1 = call double (...) @xrand()
ret double %1
}

LLVM IR (-O2):
define double @random_raw() {
%1 = tail call double (...) @xrand()
ret double %1
}
/* Variables and functions */
double exp(double);
double DiffChemkhi(double X, double T) {
  double a = 1.29e-6, b = 0.0725, c = 2044;
  return a * exp(-b / X) * exp(-c / T);
}


x86 assembly (clang, -O0):
<DiffChemkhi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xee6(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x10(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DiffChemkhi>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  0xede(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  0xed1(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xecb(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @DiffChemkhi(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 1.290000e-06, double* %5
store double 0x3FB28F5C28F5C28F, double* %6
store double 2.044000e+03, double* %7
%8 = load double, double* %5
%9 = load double, double* %6
%10 = fneg double %9
%11 = load double, double* %3
%12 = fdiv double %10, %11
%13 = call double @exp(double %12)
%14 = fmul double %8, %13
%15 = load double, double* %7
%16 = fneg double %15
%17 = load double, double* %4
%18 = fdiv double %16, %17
%19 = call double @exp(double %18)
%20 = fmul double %14, %19
ret double %20
}

LLVM IR (-O2):
define double @DiffChemkhi(double %0, double %1) {
%3 = fdiv double 0xBFB28F5C28F5C28F, %0
%4 = tail call double @exp(double %3)
%5 = fmul double %4, 1.290000e-06
%6 = fdiv double -2.044000e+03, %1
%7 = tail call double @exp(double %6)
%8 = fmul double %5, %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *, char *);
void print_progress_headers() {
  printf("%9s %9s %9s %20s %20s \n", "pid", "id a", "length", "good matches",
         "time elapsed (s)");
}


x86 assembly (clang, -O0):
<print_progress_headers>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef6(%rip),%rsi
lea    0xef3(%rip),%rdx
lea    0xef1(%rip),%rcx
lea    0xef1(%rip),%r8
lea    0xef7(%rip),%r9
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_progress_headers>:
lea    0xee9(%rip),%rdi
lea    0xefa(%rip),%rsi
lea    0xef7(%rip),%rdx
lea    0xef5(%rip),%rcx
lea    0xef5(%rip),%r8
lea    0xefb(%rip),%r9
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"%9s %9s %9s %20s %20s \0A\00"
@.str.1 = [4 x i8] c"pid\00"
@.str.2 = [5 x i8] c"id a\00"
@.str.3 = [7 x i8] c"length\00"
@.str.4 = [13 x i8] c"good matches\00"
@.str.5 = [17 x i8] c"time elapsed (s)\00"
define void @print_progress_headers() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"%9s %9s %9s %20s %20s \0A\00"
@.str.1 = [4 x i8] c"pid\00"
@.str.2 = [5 x i8] c"id a\00"
@.str.3 = [7 x i8] c"length\00"
@.str.4 = [13 x i8] c"good matches\00"
@.str.5 = [17 x i8] c"time elapsed (s)\00"
define void @print_progress_headers() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
ret void
}
long computeFibonacciEvenFast(long max) {}


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

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

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

LLVM IR (-O2):
define i64 @computeFibonacciEvenFast(i64 %0) {
ret i64 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int __cpu_count(cpu_set_t *set) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @__cpu_count(i32* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int clock_nanosleep(int /*<<< orphan*/, int /*<<< orphan*/,
                    struct timespec const *, int /*<<< orphan*/ *);
int mono_nanosleep(const struct timespec *ts) {
  return clock_nanosleep(CLOCK_REALTIME, 0, ts, NULL);
}


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

x86 assembly (clang, -O2):
<mono_nanosleep>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <clock_nanosleep@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @mono_nanosleep(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_REALTIME
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i32 @clock_nanosleep(i32 %3, i32 0, %struct.timespec* %4, i32* null)
ret i32 %5
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @mono_nanosleep(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @clock_nanosleep(i32 %2, i32 0, %struct.timespec* %0, i32* null)
ret i32 %3
}
/* Type definitions */
struct evwsconn {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ evwsconn_free(struct evwsconn *);
void done_handler(struct evwsconn *conn, void *user_data) {
  evwsconn_free(conn);
}


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

x86 assembly (clang, -O2):
<done_handler>:
jmp    1030 <evwsconn_free@plt>

LLVM IR (-O0):
%struct.evwsconn = type { i32 }
define void @done_handler(%struct.evwsconn* %0, i8* %1) {
%3 = alloca %struct.evwsconn*
%4 = alloca i8*
store %struct.evwsconn* %0, %struct.evwsconn** %3
store i8* %1, i8** %4
%5 = load %struct.evwsconn*, %struct.evwsconn** %3
%6 = call i32 @evwsconn_free(%struct.evwsconn* %5)
ret void
}

LLVM IR (-O2):
%struct.evwsconn = type { i32 }
define void @done_handler(%struct.evwsconn* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @evwsconn_free(%struct.evwsconn* %0)
ret void
}
int VisibleContents(int contents) {
  int i;
  for (i = 1; i <= 64; i <<= 1)
    if (contents & i)
      return i;
  return 0;
}


x86 assembly (clang, -O0):
<VisibleContents>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jg     1145 <VisibleContents+0x45>
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
cmp    $0x0,%eax
je     1132 <VisibleContents+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <VisibleContents+0x4c>
jmp    1137 <VisibleContents+0x37>
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <VisibleContents+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VisibleContents>:
mov    $0x1,%eax
test   $0x1,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x2,%eax
test   $0x2,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x4,%eax
test   $0x4,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x8,%eax
test   $0x8,%dil
jne    1148 <VisibleContents+0x48>
mov    $0x10,%eax
test   $0x10,%dil
jne    1148 <VisibleContents+0x48>
mov    %edi,%ecx
and    $0x40,%ecx
test   $0x20,%dil
mov    $0x20,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @VisibleContents(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 64
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = and i32 %9, %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %20
15: ; preds = %8
br label %16
16: ; preds = %15
%17 = load i32, i32* %4
%18 = shl i32 %17, 1
store i32 %18, i32* %4
br label %5
19: ; preds = %5
store i32 0, i32* %2
br label %20
20: ; preds = %19, %13
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @VisibleContents(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %21
4: ; preds = %1
%5 = and i32 %0, 2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = and i32 %0, 4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %7
%11 = and i32 %0, 8
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = and i32 %0, 16
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = and i32 %0, 32
%18 = icmp eq i32 %17, 0
%19 = and i32 %0, 64
%20 = select i1 %18, i32 %19, i32 32
br label %21
21: ; preds = %16, %13, %10, %7, %4, %1
%22 = phi i32 [ 1, %1 ], [ 2, %4 ], [ 4, %7 ], [ 8, %10 ], [ 16, %13 ], [ %20, %16 ]
ret i32 %22
}
void ARGBToUVRow_Any_NEON() {}


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

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

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

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