void vranlc(int n, double *x_seed, double a, double *y) {
  int i;
  double x, t1, t2, t3, t4, a1, a2, x1, x2, z;
  t1 = (0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
        0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5) *
       a;
  a1 = (int)t1;
  a2 = a -
       (2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
        2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0) *
           a1;
  x = *x_seed;
  for (i = 1; i <= n; i++) {
    t1 =
        (0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
         0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5) *
        x;
    x1 = (int)t1;
    x2 = x - (2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
              2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
              2.0) *
                 x1;
    t1 = a1 * x2 + a2 * x1;
    t2 = (int)((0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
                0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
                0.5 * 0.5 * 0.5) *
               t1);
    z = t1 -
        (2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
         2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0) *
            t2;
    t3 =
        (2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
         2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0) *
            z +
        a2 * x2;
    t4 = (int)(((0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
                 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
                 0.5 * 0.5 * 0.5) *
                (0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
                 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
                 0.5 * 0.5 * 0.5)) *
               t3);
    x = t3 - ((2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
               2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
               2.0) *
              (2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
               2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 * 2.0 *
               2.0)) *
                 t4;
    y[i] = ((0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
             0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
             0.5) *
            (0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
             0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 * 0.5 *
             0.5)) *
           x;
  }
  *x_seed = x;
}


x86 assembly (clang, -O0):
<vranlc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  0xeec(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cvttsd2si -0x38(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  0xeba(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1291 <vranlc+0x191>
movsd  0xe8d(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cvttsd2si -0x38(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  0xe5b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe2d(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  0xe01(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
movsd  0xdfd(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xdd8(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  0xdbc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xd9f(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1167 <vranlc+0x67>
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vranlc>:
movsd  (%rsi),%xmm5
test   %edi,%edi
jle    11f0 <vranlc+0xf0>
movsd  0xeec(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvttpd2dq %xmm1,%xmm1
cvtdq2pd %xmm1,%xmm7
movapd %xmm7,%xmm1
mulsd  0xedc(%rip),%xmm1
addsd  %xmm0,%xmm1
add    $0x1,%edi
mov    $0x1,%eax
movsd  0xec0(%rip),%xmm0
movsd  0xec0(%rip),%xmm4
movsd  0xebf(%rip),%xmm8
movsd  0xebf(%rip),%xmm6
movsd  0xebe(%rip),%xmm9
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm5,%xmm3
mulsd  %xmm0,%xmm3
cvttpd2dq %xmm3,%xmm3
cvtdq2pd %xmm3,%xmm3
movapd %xmm1,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm3
addsd  %xmm5,%xmm3
movapd %xmm7,%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm2,%xmm5
movapd %xmm5,%xmm2
mulsd  %xmm0,%xmm2
cvttpd2dq %xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm5,%xmm2
mulsd  %xmm1,%xmm3
mulsd  %xmm8,%xmm2
addsd  %xmm3,%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm6,%xmm3
cvttpd2dq %xmm3,%xmm3
cvtdq2pd %xmm3,%xmm5
mulsd  %xmm9,%xmm5
addsd  %xmm2,%xmm5
movapd %xmm5,%xmm2
mulsd  %xmm6,%xmm2
movsd  %xmm2,(%rdx,%rax,8)
add    $0x1,%rax
cmp    %rax,%rdi
jne    1170 <vranlc+0x70>
movsd  %xmm5,(%rsi)
ret

LLVM IR (-O0):
define void @vranlc(i32 %0, double* %1, double %2, double* %3) {
%5 = alloca i32
%6 = alloca double*
%7 = alloca double
%8 = alloca double*
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store i32 %0, i32* %5
store double* %1, double** %6
store double %2, double* %7
store double* %3, double** %8
%20 = load double, double* %7
%21 = fmul double 0x3E80000000000000, %20
store double %21, double* %11
%22 = load double, double* %11
%23 = fptosi double %22 to i32
%24 = sitofp i32 %23 to double
store double %24, double* %15
%25 = load double, double* %7
%26 = load double, double* %15
%27 = call double @llvm.fmuladd.f64(double 0xC160000000000000, double %26, double %25)
store double %27, double* %16
%28 = load double*, double** %6
%29 = load double, double* %28
store double %29, double* %10
store i32 1, i32* %9
br label %30
30: ; preds = %74, %4
%31 = load i32, i32* %9
%32 = load i32, i32* %5
%33 = icmp sle i32 %31, %32
br i1 %33, label %34, label %77
34: ; preds = %30
%35 = load double, double* %10
%36 = fmul double 0x3E80000000000000, %35
store double %36, double* %11
%37 = load double, double* %11
%38 = fptosi double %37 to i32
%39 = sitofp i32 %38 to double
store double %39, double* %17
%40 = load double, double* %10
%41 = load double, double* %17
%42 = call double @llvm.fmuladd.f64(double 0xC160000000000000, double %41, double %40)
store double %42, double* %18
%43 = load double, double* %15
%44 = load double, double* %18
%45 = load double, double* %16
%46 = load double, double* %17
%47 = fmul double %45, %46
%48 = call double @llvm.fmuladd.f64(double %43, double %44, double %47)
store double %48, double* %11
%49 = load double, double* %11
%50 = fmul double 0x3E80000000000000, %49
%51 = fptosi double %50 to i32
%52 = sitofp i32 %51 to double
store double %52, double* %12
%53 = load double, double* %11
%54 = load double, double* %12
%55 = call double @llvm.fmuladd.f64(double 0xC160000000000000, double %54, double %53)
store double %55, double* %19
%56 = load double, double* %19
%57 = load double, double* %16
%58 = load double, double* %18
%59 = fmul double %57, %58
%60 = call double @llvm.fmuladd.f64(double 0x4160000000000000, double %56, double %59)
store double %60, double* %13
%61 = load double, double* %13
%62 = fmul double 0x3D10000000000000, %61
%63 = fptosi double %62 to i32
%64 = sitofp i32 %63 to double
store double %64, double* %14
%65 = load double, double* %13
%66 = load double, double* %14
%67 = call double @llvm.fmuladd.f64(double 0xC2D0000000000000, double %66, double %65)
store double %67, double* %10
%68 = load double, double* %10
%69 = fmul double 0x3D10000000000000, %68
%70 = load double*, double** %8
%71 = load i32, i32* %9
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
store double %69, double* %73
br label %74
74: ; preds = %34
%75 = load i32, i32* %9
%76 = add nsw i32 %75, 1
store i32 %76, i32* %9
br label %30
77: ; preds = %30
%78 = load double, double* %10
%79 = load double*, double** %6
store double %78, double* %79
ret void
}

LLVM IR (-O2):
define void @vranlc(i32 %0, double* nocapture %1, double %2, double* nocapture writeonly %3) {
%5 = fmul double %2, 0x3E80000000000000
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %7, double 0xC160000000000000, double %2)
%9 = load double, double* %1
%10 = icmp slt i32 %0, 1
br i1 %10, label %37, label %11
11: ; preds = %4
%12 = add nuw i32 %0, 1
%13 = zext i32 %12 to i64
br label %14
14: ; preds = %11, %14
%15 = phi i64 [ 1, %11 ], [ %35, %14 ]
%16 = phi double [ %9, %11 ], [ %32, %14 ]
%17 = fmul double %16, 0x3E80000000000000
%18 = fptosi double %17 to i32
%19 = sitofp i32 %18 to double
%20 = tail call double @llvm.fmuladd.f64(double %19, double 0xC160000000000000, double %16)
%21 = fmul double %8, %19
%22 = tail call double @llvm.fmuladd.f64(double %7, double %20, double %21)
%23 = fmul double %22, 0x3E80000000000000
%24 = fptosi double %23 to i32
%25 = sitofp i32 %24 to double
%26 = tail call double @llvm.fmuladd.f64(double %25, double 0xC160000000000000, double %22)
%27 = fmul double %8, %20
%28 = tail call double @llvm.fmuladd.f64(double %26, double 0x4160000000000000, double %27)
%29 = fmul double %28, 0x3D10000000000000
%30 = fptosi double %29 to i32
%31 = sitofp i32 %30 to double
%32 = tail call double @llvm.fmuladd.f64(double %31, double 0xC2D0000000000000, double %28)
%33 = fmul double %32, 0x3D10000000000000
%34 = getelementptr inbounds double, double* %3, i64 %15
store double %33, double* %34
%35 = add nuw nsw i64 %15, 1
%36 = icmp eq i64 %35, %13
br i1 %36, label %37, label %14
37: ; preds = %14, %4
%38 = phi double [ %9, %4 ], [ %32, %14 ]
store double %38, double* %1
ret void
}