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

/* Variables and functions */
float subr(uint32_t *env) {
  float *context = (float *)*(float **)(env + 1);
  float a = (float)*(float *)(context);
  float b = (float)*(float *)(context + 1);
  return a - b;
}


x86 assembly (clang, -O0):
<subr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
subss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<subr>:
mov    0x4(%rdi),%rax
movss  (%rax),%xmm0
subss  0x4(%rax),%xmm0
ret

LLVM IR (-O0):
define float @subr(i32* %0) {
%2 = alloca i32*
%3 = alloca float*
%4 = alloca float
%5 = alloca float
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = bitcast i32* %7 to float**
%9 = load float*, float** %8
store float* %9, float** %3
%10 = load float*, float** %3
%11 = load float, float* %10
store float %11, float* %4
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 1
%14 = load float, float* %13
store float %14, float* %5
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fsub float %15, %16
ret float %17
}

LLVM IR (-O2):
define float @subr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = bitcast i32* %2 to float**
%4 = load float*, float** %3
%5 = load float, float* %4
%6 = getelementptr inbounds float, float* %4, i64 1
%7 = load float, float* %6
%8 = fsub float %5, %7
ret float %8
}
double IBBasicPowReal(double x, int n) {
  double y = x, z = 1.0;
  for (;;) {
    if ((((n) % 2) == 1)) {
      z *= y;
      n >>= 1;
      if (n == 0)
        return (z);
    } else
      n >>= 1;
    y *= y;
  }
}


x86 assembly (clang, -O0):
<IBBasicPowReal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    1165 <IBBasicPowReal+0x65>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1160 <IBBasicPowReal+0x60>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret
jmp    116e <IBBasicPowReal+0x6e>
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1123 <IBBasicPowReal+0x23>

x86 assembly (clang, -O2):
<IBBasicPowReal>:
movapd %xmm0,%xmm1
movsd  0xef4(%rip),%xmm0
jmp    1116 <IBBasicPowReal+0x16>
xchg   %ax,%ax
sar    %edi
mulsd  %xmm1,%xmm1
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
and    $0xfffffffe,%eax
mov    %edi,%ecx
sub    %eax,%ecx
cmp    $0x1,%ecx
jne    1110 <IBBasicPowReal+0x10>
mulsd  %xmm1,%xmm0
cmp    $0x1,%edi
ja     1110 <IBBasicPowReal+0x10>
ret

LLVM IR (-O0):
define double @IBBasicPowReal(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%7 = load double, double* %3
store double %7, double* %5
store double 1.000000e+00, double* %6
br label %8
8: ; preds = %26, %2
%9 = load i32, i32* %4
%10 = srem i32 %9, 2
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fmul double %14, %13
store double %15, double* %6
%16 = load i32, i32* %4
%17 = ashr i32 %16, 1
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %12
%21 = load double, double* %6
ret double %21
22: ; preds = %12
br label %26
23: ; preds = %8
%24 = load i32, i32* %4
%25 = ashr i32 %24, 1
store i32 %25, i32* %4
br label %26
26: ; preds = %23, %22
%27 = load double, double* %5
%28 = load double, double* %5
%29 = fmul double %28, %27
store double %29, double* %5
br label %8
}

LLVM IR (-O2):
define double @IBBasicPowReal(double %0, i32 %1) {
br label %3
3: ; preds = %13, %2
%4 = phi i32 [ %1, %2 ], [ %15, %13 ]
%5 = phi double [ %0, %2 ], [ %16, %13 ]
%6 = phi double [ 1.000000e+00, %2 ], [ %14, %13 ]
%7 = srem i32 %4, 2
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = fmul double %5, %6
%11 = icmp ult i32 %4, 2
br i1 %11, label %12, label %13
12: ; preds = %9
ret double %10
13: ; preds = %3, %9
%14 = phi double [ %10, %9 ], [ %6, %3 ]
%15 = ashr i32 %4, 1
%16 = fmul double %5, %5
br label %3
}
/* Variables and functions */
scalar_t__ wu_check_option_show(int);
int /*<<< orphan*/ wu_show(int, int);
int wu_check_show(int index, int dev_fd) {
  if (wu_check_option_show(index)) {
    wu_show(index, dev_fd);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<wu_check_show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <wu_check_option_show@plt>
cmp    $0x0,%rax
je     1157 <wu_check_show+0x37>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <wu_show@plt>
movl   $0x1,-0x4(%rbp)
jmp    115e <wu_check_show+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wu_check_show>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <wu_check_option_show@plt>
test   %rax,%rax
je     1141 <wu_check_show+0x21>
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <wu_show@plt>
mov    $0x1,%eax
jmp    1143 <wu_check_show+0x23>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @wu_check_show(i32 %0, i32 %1) {
%3 = tail call i64 @wu_check_option_show(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @wu_show(i32 %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ set_bg_matrix(int, int /*<<< orphan*/, int /*<<< orphan*/,
                                 int);
void set_bg_scale(int x, int y) { set_bg_matrix(x, 0, 0, y); }


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

x86 assembly (clang, -O2):
<set_bg_scale>:
mov    %esi,%ecx
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <set_bg_matrix@plt>

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

LLVM IR (-O2):
define void @set_bg_scale(i32 %0, i32 %1) {
%3 = tail call i32 @set_bg_matrix(i32 %0, i32 0, i32 0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ normalize3_c(float *, float *);
void normalize3_neon(float v[3], float d[3]) { normalize3_c(v, d); }


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

x86 assembly (clang, -O2):
<normalize3_neon>:
jmp    1030 <normalize3_c@plt>

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

LLVM IR (-O2):
define void @normalize3_neon(float* %0, float* %1) {
%3 = tail call i32 @normalize3_c(float* %0, float* %1)
ret void
}
void *f(int *p) { return p; }


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

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

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

LLVM IR (-O2):
define i8* @f(i32* readnone %0) {
%2 = bitcast i32* %0 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void BitUpdate(unsigned *bit_array, int size, int i, int delta) {
  assert(i);
  while (i < size) {
    bit_array[i] += delta;
    i += i & -i;
  }
}


x86 assembly (clang, -O0):
<BitUpdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <BitUpdate+0x4f>
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
xor    %ecx,%ecx
sub    -0x10(%rbp),%ecx
and    %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    112d <BitUpdate+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BitUpdate>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r15
mov    %edx,%edi
call   1030 <assert@plt>
cmp    %ebp,%ebx
jge    1143 <BitUpdate+0x33>
nopl   0x0(%rax)
movslq %ebx,%rax
add    %r14d,(%r15,%rax,4)
mov    %eax,%ebx
neg    %ebx
and    %eax,%ebx
add    %eax,%ebx
cmp    %ebp,%ebx
jl     1130 <BitUpdate+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @BitUpdate(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %7
%10 = call i32 @assert(i32 %9)
br label %11
11: ; preds = %15, %4
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %29
15: ; preds = %11
%16 = load i32, i32* %8
%17 = load i32*, i32** %5
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = add i32 %21, %16
store i32 %22, i32* %20
%23 = load i32, i32* %7
%24 = load i32, i32* %7
%25 = sub nsw i32 0, %24
%26 = and i32 %23, %25
%27 = load i32, i32* %7
%28 = add nsw i32 %27, %26
store i32 %28, i32* %7
br label %11
29: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @BitUpdate(i32* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @assert(i32 %2)
%6 = icmp slt i32 %2, %1
br i1 %6, label %7, label %17
7: ; preds = %4, %7
%8 = phi i32 [ %15, %7 ], [ %2, %4 ]
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = add i32 %11, %3
store i32 %12, i32* %10
%13 = sub nsw i32 0, %8
%14 = and i32 %8, %13
%15 = add nsw i32 %14, %8
%16 = icmp slt i32 %15, %1
br i1 %16, label %7, label %17
17: ; preds = %7, %4
ret void
}
/* Variables and functions */
int code_table_4_0(unsigned char **);
scalar_t__ uint2(unsigned char *);
int number_of_mode(unsigned char **sec) {
  int pdt;
  pdt = code_table_4_0(sec);
  if (pdt == 57)
    return (int)uint2(sec[4] + 13);
  return -1;
}


x86 assembly (clang, -O0):
<number_of_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <code_table_4_0@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x39,-0x14(%rbp)
jne    115b <number_of_mode+0x3b>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
add    $0xd,%rdi
call   1030 <uint2@plt>
mov    %eax,-0x4(%rbp)
jmp    1162 <number_of_mode+0x42>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_mode>:
push   %rbx
mov    %rdi,%rbx
call   1040 <code_table_4_0@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x39,%ecx
jne    1142 <number_of_mode+0x22>
mov    0x20(%rbx),%rdi
add    $0xd,%rdi
call   1030 <uint2@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @number_of_mode(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
%5 = load i8**, i8*** %3
%6 = call i32 @code_table_4_0(i8** %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 57
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i64 4
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8, i8* %12, i64 13
%14 = call i64 @uint2(i8* %13)
%15 = trunc i64 %14 to i32
store i32 %15, i32* %2
br label %17
16: ; preds = %1
store i32 -1, i32* %2
br label %17
17: ; preds = %16, %9
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @number_of_mode(i8** %0) {
%2 = tail call i32 @code_table_4_0(i8** %0)
%3 = icmp eq i32 %2, 57
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = getelementptr inbounds i8*, i8** %0, i64 4
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 13
%8 = tail call i64 @uint2(i8* %7)
%9 = trunc i64 %8 to i32
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ -1, %1 ]
ret i32 %11
}
void copy(char to[], char from[]) {
  while ((*to = *from) != '\0') {
    to++;
    from++;
  }
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <copy+0x41>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <copy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
mov    (%rsi),%al
mov    %al,(%rdi)
test   %al,%al
je     111f <copy+0x1f>
mov    $0x1,%eax
nopl   (%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy+0x10>
ret

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

LLVM IR (-O2):
define void @copy(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
store i8 %3, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %1, %2 ]
%7 = phi i8* [ %8, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
store i8 %10, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
void *realloc(void *, int);
void *CRYPTO_realloc(void *ptr, int num, const char *file, int line) {
  if (num <= 0)
    return NULL;
  return realloc(ptr, num);
}


x86 assembly (clang, -O0):
<CRYPTO_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     113d <CRYPTO_realloc+0x2d>
movq   $0x0,-0x8(%rbp)
jmp    114d <CRYPTO_realloc+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CRYPTO_realloc>:
test   %esi,%esi
jle    1119 <CRYPTO_realloc+0x9>
jmp    1030 <realloc@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @CRYPTO_realloc(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%10 = load i32, i32* %7
%11 = icmp sle i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %4
store i8* null, i8** %5
br label %17
13: ; preds = %4
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = call i8* @realloc(i8* %14, i32 %15)
store i8* %16, i8** %5
br label %17
17: ; preds = %13, %12
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @CRYPTO_realloc(i8* %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
%5 = icmp slt i32 %1, 1
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i8* @realloc(i8* %0, i32 %1)
br label %8
8: ; preds = %4, %6
%9 = phi i8* [ %7, %6 ], [ null, %4 ]
ret i8* %9
}
int swf4wrap() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @swf4wrap() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printDashesint(unsigned n) {
  for (unsigned i = 0; i < n; ++i) {
    printf("-");
  }
}


x86 assembly (clang, -O0):
<printDashesint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1148 <printDashesint+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <printDashesint+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printDashesint>:
push   %rbx
test   %edi,%edi
je     112f <printDashesint+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <printDashesint+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @printDashesint(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putchar(i32 45)
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
void *_NULCHAR(void *ponteiro, unsigned int valor, unsigned int TAM) {
  unsigned char *_ponteiro = (unsigned char *)ponteiro;
  while (TAM > 0) {
    *_ponteiro = valor;
    _ponteiro++;
    TAM--;
  }
  return (void *)_ponteiro;
}


x86 assembly (clang, -O0):
<_NULCHAR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x10(%rbp)
jbe    1145 <_NULCHAR+0x45>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <_NULCHAR+0x16>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_NULCHAR>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %edx,%edx
je     1131 <_NULCHAR+0x21>
mov    %edx,%ebx
mov    %edx,%edx
mov    %r14,%rdi
call   1030 <memset@plt>
add    $0xffffffff,%ebx
add    %rbx,%r14
add    $0x1,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @_NULCHAR(i8* writeonly %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %12, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
%7 = zext i32 %2 to i64
%8 = add i32 %2, -1
%9 = zext i32 %8 to i64
%10 = add nuw nsw i64 %9, 1
%11 = getelementptr i8, i8* %0, i64 %10
br label %12
12: ; preds = %5, %3
%13 = phi i8* [ %0, %3 ], [ %11, %5 ]
ret i8* %13
}
double MMtoKM(double MM) { return MM / 1000000; }


x86 assembly (clang, -O0):
<MMtoKM>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMtoKM>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @MMtoKM(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.000000e+06
ret double %4
}

LLVM IR (-O2):
define double @MMtoKM(double %0) {
%2 = fdiv double %0, 1.000000e+06
ret double %2
}
/* Variables and functions */
double astro_range_360(double);
double astro_range_180(double v) {
  double c = astro_range_360(v);
  if (c > 180.0)
    c = c - 360.0;
  return c;
}


x86 assembly (clang, -O0):
<astro_range_180>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <astro_range_360@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1159 <astro_range_180+0x49>
movsd  -0x10(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astro_range_180>:
push   %rax
call   1030 <astro_range_360@plt>
movsd  0xee2(%rip),%xmm2
addsd  %xmm0,%xmm2
movsd  0xede(%rip),%xmm1
cmpltsd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @astro_range_180(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @astro_range_360(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fcmp ogt double %6, 1.800000e+02
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fsub double %9, 3.600000e+02
store double %10, double* %3
br label %11
11: ; preds = %8, %1
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
define double @astro_range_180(double %0) {
%2 = tail call double @astro_range_360(double %0)
%3 = fcmp ogt double %2, 1.800000e+02
%4 = fadd double %2, -3.600000e+02
%5 = select i1 %3, double %4, double %2
ret double %5
}
unsigned int platform_getpid(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @platform_getpid() {
ret i32 0
}
/* Variables and functions */
int numJewelsInStones(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  char *J = "aA";
  char *S = "aAAbbbb";
  int num = numJewelsInStones(J, S);
  printf("%d\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xebb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <numJewelsInStones@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1040 <numJewelsInStones@plt>
lea    0xed0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"aA\00"
@.str.1 = [8 x i8] c"aAAbbbb\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %7
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = call i32 @numJewelsInStones(i8* %9, i8* %10)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"aA\00"
@.str.1 = [8 x i8] c"aAAbbbb\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @numJewelsInStones(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ function_one();
int /*<<< orphan*/ function_three();
int /*<<< orphan*/ function_two();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This program calls three functions\n");
  function_one();
  function_two();
  function_three();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <function_one@plt>
mov    $0x0,%al
call   1030 <function_two@plt>
mov    $0x0,%al
call   1060 <function_three@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <function_one@plt>
xor    %eax,%eax
call   1030 <function_two@plt>
xor    %eax,%eax
call   1060 <function_three@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"This program calls three functions\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @function_one()
%4 = call i32 (...) @function_two()
%5 = call i32 (...) @function_three()
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"This program calls three functions\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @function_one()
%3 = tail call i32 (...) @function_two()
%4 = tail call i32 (...) @function_three()
ret i32 0
}
/* Variables and functions */
char lower(char);
char *strlower(char *str) {
  char *p;
  for (p = str; *p; ++p)
    *p = lower(*p);
  return (str);
}


x86 assembly (clang, -O0):
<strlower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1156 <strlower+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <lower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strlower+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlower>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <strlower+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <lower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strlower+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlower(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call signext i8 @lower(i8 signext %5)
store i8 %7, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void shutdown(void) {
  do {
    if (3 >= 2) {
      fprintf(stderr, "Shutting down curses video driver\n");
    }
  } while (0);
}


x86 assembly (clang, -O0):
<shutdown>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <shutdown+0x9>
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Shutting down curses video driver\0A\00"
define void @shutdown() {
br label %1
1: ; preds = %0
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %1
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Shutting down curses video driver\0A\00"
define void @shutdown() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
void jumpfunc(int copy, void *p) {
  void *l = &&dummy;
  l = &&jumplabel;
  if (copy) {
    memcpy(p, l, 128);
    cacheflush(p);
  }
  goto *p;
dummy:
  printf("unreachable?\n");
jumplabel:
  return;
}


x86 assembly (clang, -O0):
<jumpfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x43(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0x46(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     117c <jumpfunc+0x4c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x80,%edx
call   1050 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <cacheflush@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    119d <jumpfunc+0x6d>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret
mov    -0x20(%rbp),%rax
jmp    *%rax

x86 assembly (clang, -O2):
<jumpfunc>:
test   %edi,%edi
je     1175 <jumpfunc+0x65>
movups 0xca(%rip),%xmm0
movups %xmm0,0x70(%rsi)
movups 0xaf(%rip),%xmm0
movups %xmm0,0x60(%rsi)
movups 0x94(%rip),%xmm0
movups %xmm0,0x50(%rsi)
movups 0x79(%rip),%xmm0
movups %xmm0,0x40(%rsi)
movups 0x5e(%rip),%xmm0
movups %xmm0,0x30(%rsi)
movups 0x43(%rip),%xmm0
movups %xmm0,0x20(%rsi)
movups 0x28(%rip),%xmm0
movups %xmm0,0x10(%rsi)
movups 0xd(%rip),%xmm0
movups %xmm0,(%rsi)
mov    %rsi,%rdi
xor    %eax,%eax
jmp    1030 <cacheflush@plt>
ret

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

LLVM IR (-O2):
define void @jumpfunc(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(128) %1, i8* align 1 dereferenceable(128) blockaddress(@jumpfunc, %6), i64 128, i1 false)
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @cacheflush to i32 (i8*, ...)*)(i8* %1)
br label %6
6: ; preds = %2, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
size_t fsize(FILE *fp) {
  fseek(fp, 0L, SEEK_END);
  size_t size = ftell(fp);
  fseek(fp, 0L, SEEK_SET);
  return size;
}


x86 assembly (clang, -O0):
<fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsize>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2e8f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i64 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* @SEEK_SET
%11 = call i32 @fseek(i32* %9, i64 0, i32 %10)
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @fsize(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i64 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i64 0, i32 %5)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
char *strncpy(char *, char const *, int /*<<< orphan*/);
char *strcpy(char *dest, const char *src) {
  return strncpy(dest, src, strlen(src));
}


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

x86 assembly (clang, -O2):
<strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @strncpy(i8* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @strncpy(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void __attribute__((weak)) usr_mlme_start_conf(uint8_t status) {
  status = status;
}


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

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

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

LLVM IR (-O2):
define weak void @usr_mlme_start_conf(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ result;

/* Variables and functions */
int /*<<< orphan*/ read_exact_bytes(int *, int);
int get_int() {
  int result = -1;
  read_exact_bytes(&result, sizeof(result));
  return result;
}


x86 assembly (clang, -O0):
<get_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
call   1030 <read_exact_bytes@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_int>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <read_exact_bytes@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_int() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
%3 = call i32 @read_exact_bytes(i32* %1, i32 4)
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ write(int, char *, int);
void gl_puts(char *buf) {
  int len;
  if (buf) {
    len = strlen(buf);
    write(1, buf, len);
  }
}


x86 assembly (clang, -O0):
<gl_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1154 <gl_puts+0x34>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_puts>:
test   %rdi,%rdi
je     113e <gl_puts+0x1e>
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1030 <write@plt>
ret

LLVM IR (-O0):
define void @gl_puts(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
store i32 %8, i32* %3
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = call i32 @write(i32 1, i8* %9, i32 %10)
br label %12
12: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @gl_puts(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @write(i32 1, i8* %0, i32 %4)
br label %6
6: ; preds = %3, %1
ret void
}
OP(fd, c1) { op_c1(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_c1()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void sig_alrm(int signo) {
  printf("alarm and exit\n");
  exit(127);
}


x86 assembly (clang, -O0):
<sig_alrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x7f,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_alrm>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7f,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"alarm and exit\0A\00"
define void @sig_alrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 127)
unreachable
}

LLVM IR (-O2):
@str = [15 x i8] c"alarm and exit\00"
define void @sig_alrm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 127)
unreachable
}
void select_features(void) {
  { return; }
}


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

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

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

LLVM IR (-O2):
define void @select_features() {
ret void
}
/* Variables and functions */
double to_MBps(double n, size_t buffer_size, unsigned int buffer_copy) {
  return ((buffer_size * buffer_copy) / n) / (1024 * 1024);
}


x86 assembly (clang, -O0):
<to_MBps>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
imul   %rcx,%rax
movq   %rax,%xmm0
movaps 0xee9(%rip),%xmm1
punpckldq %xmm1,%xmm0
movapd 0xeed(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x8(%rbp),%xmm0
movsd  0xeb1(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_MBps>:
mov    %esi,%eax
imul   %rdi,%rax
movq   %rax,%xmm2
punpckldq 0xeed(%rip),%xmm2
subpd  0xef5(%rip),%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
mulsd  0xeed(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @to_MBps(double %0, i64 %1, i32 %2) {
%4 = alloca double
%5 = alloca i64
%6 = alloca i32
store double %0, double* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i64, i64* %5
%8 = load i32, i32* %6
%9 = zext i32 %8 to i64
%10 = mul i64 %7, %9
%11 = uitofp i64 %10 to double
%12 = load double, double* %4
%13 = fdiv double %11, %12
%14 = fdiv double %13, 0x4130000000000000
ret double %14
}

LLVM IR (-O2):
define double @to_MBps(double %0, i64 %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = mul i64 %4, %1
%6 = uitofp i64 %5 to double
%7 = fdiv double %6, %0
%8 = fmul double %7, 0x3EB0000000000000
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ first(int);
int main() {
  first(0xc0decafe);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc0decafe,%edi
call   1030 <first@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xc0decafe,%edi
call   1030 <first@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @first(i32 -1059140866)
ret i32 0
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ d_name;
};

/* Variables and functions */
scalar_t__ strncmp(char *, int /*<<< orphan*/, int);
int is_event_device(const struct dirent *dir) {
  return strncmp("event", dir->d_name, 5) == 0;
}


x86 assembly (clang, -O0):
<is_event_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_event_device>:
push   %rax
mov    (%rdi),%esi
lea    0xee6(%rip),%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [6 x i8] c"event\00"
define i32 @is_event_device(%struct.dirent* %0) {
%2 = alloca %struct.dirent*
store %struct.dirent* %0, %struct.dirent** %2
%3 = load %struct.dirent*, %struct.dirent** %2
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5, i32 5)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [6 x i8] c"event\00"
define i32 @is_event_device(%struct.dirent* nocapture %0) {
%2 = getelementptr inbounds %struct.dirent, %struct.dirent* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = tail call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3, i32 5)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int security_skb_clone(struct sk_buff *newskb, const struct sk_buff *oldskb) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sk_buff = type opaque
define i32 @security_skb_clone(%struct.sk_buff* %0, %struct.sk_buff* %1) {
%3 = alloca %struct.sk_buff*
%4 = alloca %struct.sk_buff*
store %struct.sk_buff* %0, %struct.sk_buff** %3
store %struct.sk_buff* %1, %struct.sk_buff** %4
ret i32 0
}

LLVM IR (-O2):
%struct.sk_buff = type opaque
define i32 @security_skb_clone(%struct.sk_buff* nocapture readnone %0, %struct.sk_buff* nocapture readnone %1) {
ret i32 0
}