#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
unsigned long __WORDSIZE;
double rule30_rng(unsigned long int seed) {
  register unsigned long int rule = 0x0000001E;
  register unsigned long int in_reg1 = 0, in_reg2 = 0, in_reg3 = 0;
  register unsigned long int out_reg1 = 0, out_reg2 = 0, out_reg3 = 0;
  register unsigned long int mp = 0;
  static unsigned long int last_reg1, last_reg2, last_reg3;
  double random_result = 0;
  unsigned long long int random_result_int = 0;
  if (seed) {
    in_reg1 = in_reg2 = in_reg3 = seed;
  } else {
    in_reg1 = last_reg1;
    in_reg2 = last_reg2;
    in_reg3 = last_reg3;
  }
  for ((mp &= 0xFF0000FF);
       ((mp & 0x00FFFF00) >> 0x00000008) < 0x0000000000000034;
       mp += 0x00000100) {
    for ((mp &= 0xFFFFFF00); (mp & 0x000000FF) < __WORDSIZE; mp += 0x00000001) {
      out_reg1 |= ((rule >> (in_reg1 & 0x00000007)) & 0x00000001)
                  << (mp & 0x000000FF);
      out_reg2 |= ((rule >> (in_reg2 & 0x00000007)) & 0x00000001)
                  << (mp & 0x000000FF);
      out_reg3 |= ((rule >> (in_reg3 & 0x00000007)) & 0x00000001)
                  << (mp & 0x000000FF);
      mp &= 0x7FFFFFFF;
      mp |= ((in_reg3 & 0x00000001) << (__WORDSIZE - 1));
      in_reg3 >>= 0x00000001;
      in_reg3 |= ((in_reg2 & 0x00000001) << (__WORDSIZE - 1));
      in_reg2 >>= 0x00000001;
      in_reg2 |= ((in_reg1 & 0x00000001) << (__WORDSIZE - 1));
      in_reg1 >>= 0x00000001;
      in_reg1 |= mp & 0x80000000;
    }
    mp &= 0x7FFFFFFF;
    mp |= out_reg1 & 0x80000000;
    out_reg1 <<= 0x00000001;
    out_reg1 |= ((out_reg2 & 0x80000000) >> (__WORDSIZE - 1));
    out_reg2 <<= 0x00000001;
    out_reg2 |= ((out_reg3 & 0x80000000) >> (__WORDSIZE - 1));
    out_reg3 <<= 0x00000001;
    out_reg3 |= ((mp & 0x80000000) >> (__WORDSIZE - 1));
    random_result_int |=
        ((out_reg2 & 0x00010000) >> 0x00000010)
        << ((0x0000000000000034 - 1) - ((mp & 0x00FFFF00) >> 0x00000008));
    in_reg1 = out_reg1;
    in_reg2 = out_reg2;
    in_reg3 = out_reg3;
    out_reg1 = out_reg2 = out_reg3 = 0;
  }
  last_reg1 = in_reg1;
  last_reg2 = in_reg2;
  last_reg3 = in_reg3;
  random_result = (double)random_result_int;
  random_result /= (double)0x00000000FFFFFFFF;
  return (random_result);
}


x86 assembly (clang, -O0):
<rule30_rng>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1e,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movq   $0x0,-0x58(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1178 <rule30_rng+0x78>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    %rax,-0x20(%rbp)
mov    %rax,-0x18(%rbp)
jmp    1199 <rule30_rng+0x99>
mov    0x2ea9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ea6(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2ea3(%rip),%rax
mov    %rax,-0x28(%rbp)
movabs $0xff0000ff,%rax
and    -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
and    $0xffff00,%rax
shr    $0x8,%rax
cmp    $0x34,%rax
jae    1456 <rule30_rng+0x356>
movabs $0xffffff00,%rax
and    -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
and    $0xff,%rax
mov    0x2e02(%rip),%rcx
cmp    (%rcx),%rax
jae    1326 <rule30_rng+0x226>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
and    $0x7,%rcx
shr    %cl,%rax
and    $0x1,%rax
mov    -0x48(%rbp),%rcx
and    $0xff,%rcx
shl    %cl,%rax
or     -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
and    $0x7,%rcx
shr    %cl,%rax
and    $0x1,%rax
mov    -0x48(%rbp),%rcx
and    $0xff,%rcx
shl    %cl,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%rcx
and    $0x7,%rcx
shr    %cl,%rax
and    $0x1,%rax
mov    -0x48(%rbp),%rcx
and    $0xff,%rcx
shl    %cl,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x48(%rbp),%rax
and    $0x7fffffff,%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
and    $0x1,%rax
mov    0x2d61(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
shl    %cl,%rax
or     -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
and    $0x1,%rax
mov    0x2d34(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
shl    %cl,%rax
or     -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
and    $0x1,%rax
mov    0x2d07(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
shl    %cl,%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x18(%rbp)
movabs $0x80000000,%rax
and    -0x48(%rbp),%rax
or     -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    11d5 <rule30_rng+0xd5>
mov    -0x48(%rbp),%rax
and    $0x7fffffff,%rax
mov    %rax,-0x48(%rbp)
movabs $0x80000000,%rax
and    -0x30(%rbp),%rax
or     -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x30(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x30(%rbp)
movabs $0x80000000,%rax
and    -0x38(%rbp),%rax
mov    0x2c7d(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
shr    %cl,%rax
or     -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x38(%rbp)
movabs $0x80000000,%rax
and    -0x40(%rbp),%rax
mov    0x2c4a(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
shr    %cl,%rax
or     -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x40(%rbp)
movabs $0x80000000,%rax
and    -0x48(%rbp),%rax
mov    0x2c17(%rip),%rcx
mov    (%rcx),%rcx
sub    $0x1,%rcx
shr    %cl,%rax
or     -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
and    $0x10000,%rax
shr    $0x10,%rax
mov    -0x48(%rbp),%rdx
and    $0xffff00,%rdx
shr    $0x8,%rdx
mov    $0x33,%ecx
sub    %rdx,%rcx
shl    %cl,%rax
or     -0x58(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x40(%rbp)
movq   $0x0,-0x38(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x48(%rbp),%rax
add    $0x100,%rax
mov    %rax,-0x48(%rbp)
jmp    11ab <rule30_rng+0xab>
mov    -0x18(%rbp),%rax
mov    %rax,0x2bc7(%rip)
mov    -0x20(%rbp),%rax
mov    %rax,0x2bc4(%rip)
mov    -0x28(%rbp),%rax
mov    %rax,0x2bc1(%rip)
movaps 0xb92(%rip),%xmm1
movq   -0x58(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xb91(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xb50(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rule30_rng>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdi,%r11
mov    %rdi,%r13
test   %rdi,%rdi
jne    1129 <rule30_rng+0x29>
mov    0x2f0d(%rip),%rdi
mov    0x2f0e(%rip),%r11
mov    0x2f0f(%rip),%r13
mov    0x2eb8(%rip),%rcx
mov    (%rcx),%r9
lea    -0x1(%r9),%r10
xor    %r8d,%r8d
xor    %esi,%esi
jmp    11d1 <rule30_rng+0xd1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %r12d,%r12d
xor    %r15d,%r15d
xor    %r14d,%r14d
mov    %r12d,%edx
mov    %r15d,%edi
and    $0x80000000,%edi
mov    %r10d,%ecx
shr    %cl,%rdi
mov    %r14d,%r11d
and    $0x80000000,%r11d
shr    %cl,%r11
and    $0x80000000,%edx
mov    %rdx,%r13
shr    %cl,%r13
mov    %esi,%eax
shr    $0x8,%esi
mov    $0x33,%cl
sub    %sil,%cl
and    $0x7fffffff,%eax
lea    (%rax,%rdx,1),%rsi
add    $0x100,%rsi
add    %r12,%r12
or     %r12,%rdi
add    %r15,%r15
or     %r15,%r11
add    %r14,%r14
mov    %r11d,%eax
shr    $0x10,%eax
and    $0x1,%eax
shl    %cl,%rax
or     %r14,%r13
or     %rax,%r8
mov    %esi,%eax
and    $0xfffc00,%eax
cmp    $0x3400,%eax
jae    1291 <rule30_rng+0x191>
and    $0xffffff00,%esi
test   %r9,%r9
je     1150 <rule30_rng+0x50>
xor    %edx,%edx
xor    %r14d,%r14d
xor    %r15d,%r15d
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
mov    %edi,%ecx
and    $0x7,%cl
mov    $0x1e,%ebx
shr    %cl,%rbx
and    $0x1,%ebx
mov    %edx,%ecx
shl    %cl,%rbx
mov    %r11d,%ecx
and    $0x7,%cl
mov    $0x1e,%eax
shr    %cl,%rax
and    $0x1,%eax
mov    %edx,%ecx
shl    %cl,%rax
or     %rbx,%r12
or     %rax,%r15
mov    %r13d,%ecx
and    $0x7,%cl
mov    $0x1e,%eax
shr    %cl,%rax
and    $0x1,%eax
mov    %edx,%ecx
shl    %cl,%rax
or     %rax,%r14
mov    %r13d,%edx
and    $0x1,%edx
mov    %r10d,%ecx
shl    %cl,%rdx
and    $0x7fffffff,%esi
or     %rdx,%rsi
shr    %r13
mov    %r11d,%eax
and    $0x1,%eax
mov    %r10d,%ecx
shl    %cl,%rax
or     %rax,%r13
mov    %edi,%eax
and    $0x1,%eax
shl    %cl,%rax
shr    %r11
or     %rax,%r11
shr    %rdi
and    $0x80000000,%edx
or     %rdx,%rdi
add    $0x1,%rsi
movzbl %sil,%edx
cmp    %r9,%rdx
jb     11f0 <rule30_rng+0xf0>
jmp    1159 <rule30_rng+0x59>
mov    %rdi,0x2d90(%rip)
mov    %r11,0x2d91(%rip)
mov    %r13,0x2d92(%rip)
movq   %r8,%xmm1
punpckldq 0xd4d(%rip),%xmm1
subpd  0xd55(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
divsd  0xd51(%rip),%xmm0
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@rule30_rng.last_reg1 = internal global i64 0
@rule30_rng.last_reg2 = internal global i64 0
@rule30_rng.last_reg3 = internal global i64 0
@__WORDSIZE = global i64 0
define double @rule30_rng(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca double
%12 = alloca i64
store i64 %0, i64* %2
store i64 30, i64* %3
store i64 0, i64* %4
store i64 0, i64* %5
store i64 0, i64* %6
store i64 0, i64* %7
store i64 0, i64* %8
store i64 0, i64* %9
store i64 0, i64* %10
store double 0.000000e+00, double* %11
store i64 0, i64* %12
%13 = load i64, i64* %2
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = load i64, i64* %2
store i64 %16, i64* %6
store i64 %16, i64* %5
store i64 %16, i64* %4
br label %21
17: ; preds = %1
%18 = load i64, i64* @rule30_rng.last_reg1
store i64 %18, i64* %4
%19 = load i64, i64* @rule30_rng.last_reg2
store i64 %19, i64* %5
%20 = load i64, i64* @rule30_rng.last_reg3
store i64 %20, i64* %6
br label %21
21: ; preds = %17, %15
%22 = load i64, i64* %10
%23 = and i64 %22, 4278190335
store i64 %23, i64* %10
br label %24
24: ; preds = %151, %21
%25 = load i64, i64* %10
%26 = and i64 %25, 16776960
%27 = lshr i64 %26, 8
%28 = icmp ult i64 %27, 52
br i1 %28, label %29, label %154
29: ; preds = %24
%30 = load i64, i64* %10
%31 = and i64 %30, 4294967040
store i64 %31, i64* %10
br label %32
32: ; preds = %101, %29
%33 = load i64, i64* %10
%34 = and i64 %33, 255
%35 = load i64, i64* @__WORDSIZE
%36 = icmp ult i64 %34, %35
br i1 %36, label %37, label %104
37: ; preds = %32
%38 = load i64, i64* %3
%39 = load i64, i64* %4
%40 = and i64 %39, 7
%41 = lshr i64 %38, %40
%42 = and i64 %41, 1
%43 = load i64, i64* %10
%44 = and i64 %43, 255
%45 = shl i64 %42, %44
%46 = load i64, i64* %7
%47 = or i64 %46, %45
store i64 %47, i64* %7
%48 = load i64, i64* %3
%49 = load i64, i64* %5
%50 = and i64 %49, 7
%51 = lshr i64 %48, %50
%52 = and i64 %51, 1
%53 = load i64, i64* %10
%54 = and i64 %53, 255
%55 = shl i64 %52, %54
%56 = load i64, i64* %8
%57 = or i64 %56, %55
store i64 %57, i64* %8
%58 = load i64, i64* %3
%59 = load i64, i64* %6
%60 = and i64 %59, 7
%61 = lshr i64 %58, %60
%62 = and i64 %61, 1
%63 = load i64, i64* %10
%64 = and i64 %63, 255
%65 = shl i64 %62, %64
%66 = load i64, i64* %9
%67 = or i64 %66, %65
store i64 %67, i64* %9
%68 = load i64, i64* %10
%69 = and i64 %68, 2147483647
store i64 %69, i64* %10
%70 = load i64, i64* %6
%71 = and i64 %70, 1
%72 = load i64, i64* @__WORDSIZE
%73 = sub i64 %72, 1
%74 = shl i64 %71, %73
%75 = load i64, i64* %10
%76 = or i64 %75, %74
store i64 %76, i64* %10
%77 = load i64, i64* %6
%78 = lshr i64 %77, 1
store i64 %78, i64* %6
%79 = load i64, i64* %5
%80 = and i64 %79, 1
%81 = load i64, i64* @__WORDSIZE
%82 = sub i64 %81, 1
%83 = shl i64 %80, %82
%84 = load i64, i64* %6
%85 = or i64 %84, %83
store i64 %85, i64* %6
%86 = load i64, i64* %5
%87 = lshr i64 %86, 1
store i64 %87, i64* %5
%88 = load i64, i64* %4
%89 = and i64 %88, 1
%90 = load i64, i64* @__WORDSIZE
%91 = sub i64 %90, 1
%92 = shl i64 %89, %91
%93 = load i64, i64* %5
%94 = or i64 %93, %92
store i64 %94, i64* %5
%95 = load i64, i64* %4
%96 = lshr i64 %95, 1
store i64 %96, i64* %4
%97 = load i64, i64* %10
%98 = and i64 %97, 2147483648
%99 = load i64, i64* %4
%100 = or i64 %99, %98
store i64 %100, i64* %4
br label %101
101: ; preds = %37
%102 = load i64, i64* %10
%103 = add i64 %102, 1
store i64 %103, i64* %10
br label %32
104: ; preds = %32
%105 = load i64, i64* %10
%106 = and i64 %105, 2147483647
store i64 %106, i64* %10
%107 = load i64, i64* %7
%108 = and i64 %107, 2147483648
%109 = load i64, i64* %10
%110 = or i64 %109, %108
store i64 %110, i64* %10
%111 = load i64, i64* %7
%112 = shl i64 %111, 1
store i64 %112, i64* %7
%113 = load i64, i64* %8
%114 = and i64 %113, 2147483648
%115 = load i64, i64* @__WORDSIZE
%116 = sub i64 %115, 1
%117 = lshr i64 %114, %116
%118 = load i64, i64* %7
%119 = or i64 %118, %117
store i64 %119, i64* %7
%120 = load i64, i64* %8
%121 = shl i64 %120, 1
store i64 %121, i64* %8
%122 = load i64, i64* %9
%123 = and i64 %122, 2147483648
%124 = load i64, i64* @__WORDSIZE
%125 = sub i64 %124, 1
%126 = lshr i64 %123, %125
%127 = load i64, i64* %8
%128 = or i64 %127, %126
store i64 %128, i64* %8
%129 = load i64, i64* %9
%130 = shl i64 %129, 1
store i64 %130, i64* %9
%131 = load i64, i64* %10
%132 = and i64 %131, 2147483648
%133 = load i64, i64* @__WORDSIZE
%134 = sub i64 %133, 1
%135 = lshr i64 %132, %134
%136 = load i64, i64* %9
%137 = or i64 %136, %135
store i64 %137, i64* %9
%138 = load i64, i64* %8
%139 = and i64 %138, 65536
%140 = lshr i64 %139, 16
%141 = load i64, i64* %10
%142 = and i64 %141, 16776960
%143 = lshr i64 %142, 8
%144 = sub i64 51, %143
%145 = shl i64 %140, %144
%146 = load i64, i64* %12
%147 = or i64 %146, %145
store i64 %147, i64* %12
%148 = load i64, i64* %7
store i64 %148, i64* %4
%149 = load i64, i64* %8
store i64 %149, i64* %5
%150 = load i64, i64* %9
store i64 %150, i64* %6
store i64 0, i64* %9
store i64 0, i64* %8
store i64 0, i64* %7
br label %151
151: ; preds = %104
%152 = load i64, i64* %10
%153 = add i64 %152, 256
store i64 %153, i64* %10
br label %24
154: ; preds = %24
%155 = load i64, i64* %4
store i64 %155, i64* @rule30_rng.last_reg1
%156 = load i64, i64* %5
store i64 %156, i64* @rule30_rng.last_reg2
%157 = load i64, i64* %6
store i64 %157, i64* @rule30_rng.last_reg3
%158 = load i64, i64* %12
%159 = uitofp i64 %158 to double
store double %159, double* %11
%160 = load double, double* %11
%161 = fdiv double %160, 0x41EFFFFFFFE00000
store double %161, double* %11
%162 = load double, double* %11
ret double %162
}

LLVM IR (-O2):
@rule30_rng.last_reg1 = internal unnamed_addr global i64 0
@rule30_rng.last_reg2 = internal unnamed_addr global i64 0
@rule30_rng.last_reg3 = internal unnamed_addr global i64 0
@__WORDSIZE = global i64 0
define double @rule30_rng(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = load i64, i64* @rule30_rng.last_reg1
%4 = load i64, i64* @rule30_rng.last_reg2
%5 = load i64, i64* @rule30_rng.last_reg3
%6 = select i1 %2, i64 %3, i64 %0
%7 = select i1 %2, i64 %4, i64 %0
%8 = select i1 %2, i64 %5, i64 %0
%9 = load i64, i64* @__WORDSIZE
%10 = icmp eq i64 %9, 0
%11 = add i64 %9, -1
br label %12
12: ; preds = %1, %61
%13 = phi i64 [ 0, %1 ], [ %85, %61 ]
%14 = phi i64 [ 0, %1 ], [ %87, %61 ]
%15 = phi i64 [ %8, %1 ], [ %78, %61 ]
%16 = phi i64 [ %7, %1 ], [ %75, %61 ]
%17 = phi i64 [ %6, %1 ], [ %71, %61 ]
%18 = and i64 %14, 4294967040
br i1 %10, label %61, label %19
19: ; preds = %12, %19
%20 = phi i64 [ %59, %19 ], [ 0, %12 ]
%21 = phi i64 [ %58, %19 ], [ %18, %12 ]
%22 = phi i64 [ %42, %19 ], [ 0, %12 ]
%23 = phi i64 [ %37, %19 ], [ 0, %12 ]
%24 = phi i64 [ %32, %19 ], [ 0, %12 ]
%25 = phi i64 [ %50, %19 ], [ %15, %12 ]
%26 = phi i64 [ %54, %19 ], [ %16, %12 ]
%27 = phi i64 [ %57, %19 ], [ %17, %12 ]
%28 = and i64 %27, 7
%29 = lshr i64 30, %28
%30 = and i64 %29, 1
%31 = shl nuw i64 %30, %20
%32 = or i64 %31, %24
%33 = and i64 %26, 7
%34 = lshr i64 30, %33
%35 = and i64 %34, 1
%36 = shl nuw i64 %35, %20
%37 = or i64 %36, %23
%38 = and i64 %25, 7
%39 = lshr i64 30, %38
%40 = and i64 %39, 1
%41 = shl nuw i64 %40, %20
%42 = or i64 %41, %22
%43 = and i64 %21, 2147483647
%44 = and i64 %25, 1
%45 = shl nuw i64 %44, %11
%46 = or i64 %45, %43
%47 = lshr i64 %25, 1
%48 = and i64 %26, 1
%49 = shl nuw i64 %48, %11
%50 = or i64 %49, %47
%51 = lshr i64 %26, 1
%52 = and i64 %27, 1
%53 = shl nuw i64 %52, %11
%54 = or i64 %53, %51
%55 = lshr i64 %27, 1
%56 = and i64 %45, 2147483648
%57 = or i64 %56, %55
%58 = add i64 %46, 1
%59 = and i64 %58, 255
%60 = icmp ult i64 %59, %9
br i1 %60, label %19, label %61
61: ; preds = %19, %12
%62 = phi i64 [ 0, %12 ], [ %32, %19 ]
%63 = phi i64 [ 0, %12 ], [ %37, %19 ]
%64 = phi i64 [ 0, %12 ], [ %42, %19 ]
%65 = phi i64 [ %18, %12 ], [ %58, %19 ]
%66 = and i64 %65, 2147483647
%67 = and i64 %62, 2147483648
%68 = shl i64 %62, 1
%69 = and i64 %63, 2147483648
%70 = lshr i64 %69, %11
%71 = or i64 %70, %68
%72 = shl i64 %63, 1
%73 = and i64 %64, 2147483648
%74 = lshr i64 %73, %11
%75 = or i64 %74, %72
%76 = shl i64 %64, 1
%77 = lshr i64 %67, %11
%78 = or i64 %77, %76
%79 = lshr i64 %75, 16
%80 = and i64 %79, 1
%81 = lshr i64 %65, 8
%82 = and i64 %81, 65535
%83 = sub nsw i64 51, %82
%84 = shl nuw nsw i64 %80, %83
%85 = or i64 %84, %13
%86 = or i64 %67, 256
%87 = add nuw nsw i64 %86, %66
%88 = and i64 %87, 16776192
%89 = icmp ult i64 %88, 13312
br i1 %89, label %12, label %90
90: ; preds = %61
store i64 %71, i64* @rule30_rng.last_reg1
store i64 %75, i64* @rule30_rng.last_reg2
store i64 %78, i64* @rule30_rng.last_reg3
%91 = uitofp i64 %85 to double
%92 = fdiv double %91, 0x41EFFFFFFFE00000
ret double %92
}