#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 */
double exp(double);
int log(int);
double pow(int, int);
int r;
double small;
int w;
double x;
double rndgamma1(double s) {
  double ran1(), r, x = 0., small = 1e-37, w;
  static double a, p, uf, ss = 10., d;
  if (s != ss) {
    a = 1 - s;
    p = a / (a + s * exp(-a));
    uf = p * pow(small / a, s);
    d = a * log(a);
    ss = s;
  }
  for (;;) {
    while (((r = ran1()) == 0) || (r == 1))
      ;
    if (r > p)
      x = a - log((1. - r) / (1. - p)), w = a * log(x) - d;
    else if (r > uf)
      x = a * pow(r / p, 1. / s), w = x;
    else
      return (0);
    while (((r = ran1()) == 0) || (r == 1))
      ;
    if (1. - r <= w && r > 0)
      if (r * (w + 1.) >= 1 || -log(r) <= w)
        continue;
    break;
  }
  return (x);
}


x86 assembly (clang, -O0):
<rndgamma1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd 0x2ece(%rip),%xmm0
jne    1183 <rndgamma1+0x43>
jp     1183 <rndgamma1+0x43>
jmp    127e <rndgamma1+0x13e>
movsd  0xe7d(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,0x2eb8(%rip)
movsd  0x2eb0(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0x2ea3(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0x2e8c(%rip),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2e52(%rip)
movsd  0x2e4a(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  0x2e30(%rip),%xmm0
cvttsd2si %xmm0,%edi
cvttsd2si -0x10(%rbp),%esi
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x2e1e(%rip)
movsd  0x2e06(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
cvttsd2si 0x2df9(%rip),%edi
call   1050 <log@plt>
movsd  -0x38(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x2df7(%rip)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,0x2dc2(%rip)
jmp    1283 <rndgamma1+0x143>
jmp    1288 <rndgamma1+0x148>
mov    $0x0,%al
call   1040 <ran1@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0x1,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x59(%rbp)
jne    12b1 <rndgamma1+0x171>
jp     12b1 <rndgamma1+0x171>
jmp    12cd <rndgamma1+0x18d>
movsd  -0x18(%rbp),%xmm0
movsd  0xd4a(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    12dd <rndgamma1+0x19d>
jmp    12e2 <rndgamma1+0x1a2>
jmp    1288 <rndgamma1+0x148>
movsd  -0x18(%rbp),%xmm0
ucomisd 0x2d69(%rip),%xmm0
jbe    138f <rndgamma1+0x24f>
movsd  0x2d53(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xcfe(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  0xcf1(%rip),%xmm1
subsd  0x2d39(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <log@plt>
movsd  -0x70(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0x2d0a(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
cvttsd2si -0x20(%rbp),%edi
call   1050 <log@plt>
movsd  -0x68(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
movsd  0x2d02(%rip),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1408 <rndgamma1+0x2c8>
movsd  -0x18(%rbp),%xmm0
ucomisd 0x2cc4(%rip),%xmm0
jbe    13f6 <rndgamma1+0x2b6>
movsd  0x2ca6(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  0x2c9c(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xc40(%rip),%xmm0
divsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%esi
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1403 <rndgamma1+0x2c3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    14f9 <rndgamma1+0x3b9>
jmp    1408 <rndgamma1+0x2c8>
jmp    140d <rndgamma1+0x2cd>
mov    $0x0,%al
call   1040 <ran1@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0x1,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x79(%rbp)
jne    1436 <rndgamma1+0x2f6>
jp     1436 <rndgamma1+0x2f6>
jmp    1452 <rndgamma1+0x312>
movsd  -0x18(%rbp),%xmm0
movsd  0xbc5(%rip),%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    1462 <rndgamma1+0x322>
jmp    1467 <rndgamma1+0x327>
jmp    140d <rndgamma1+0x2cd>
movsd  0xb99(%rip),%xmm1
subsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     14ea <rndgamma1+0x3aa>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    14ea <rndgamma1+0x3aa>
movsd  -0x18(%rbp),%xmm0
movsd  0xb66(%rip),%xmm1
addsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb55(%rip),%xmm1
ucomisd %xmm1,%xmm0
jae    14e0 <rndgamma1+0x3a0>
cvttsd2si -0x18(%rbp),%edi
call   1050 <log@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     14e5 <rndgamma1+0x3a5>
jmp    1283 <rndgamma1+0x143>
jmp    14ea <rndgamma1+0x3aa>
jmp    14ef <rndgamma1+0x3af>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rndgamma1>:
push   %rbx
sub    $0x20,%rsp
movapd %xmm0,%xmm2
movsd  0x2eef(%rip),%xmm0
ucomisd %xmm2,%xmm0
jne    115d <rndgamma1+0x1d>
jnp    1217 <rndgamma1+0xd7>
movsd  0xe9b(%rip),%xmm1
subsd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  %xmm1,0x2ed9(%rip)
movapd 0xea1(%rip),%xmm0
xorpd  %xmm1,%xmm0
movsd  %xmm2,0x8(%rsp)
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movapd 0x10(%rsp),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  %xmm1,0x2ea8(%rip)
movsd  0xe50(%rip),%xmm0
divsd  0x2e90(%rip),%xmm0
cvttsd2si %xmm0,%edi
cvttsd2si 0x8(%rsp),%esi
call   1060 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x2e83(%rip)
movsd  0x2e6b(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
cvttsd2si %xmm0,%edi
call   1050 <log@plt>
movsd  0x8(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x2e59(%rip)
movsd  %xmm2,0x2e29(%rip)
movsd  0xde1(%rip),%xmm0
divsd  %xmm2,%xmm0
cvttsd2si %xmm0,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <ran1@plt>
movsd  0xdc1(%rip),%xmm3
ucomisd 0xdc9(%rip),%xmm0
jne    124b <rndgamma1+0x10b>
jnp    1230 <rndgamma1+0xf0>
ucomisd %xmm3,%xmm0
jne    1253 <rndgamma1+0x113>
jnp    1230 <rndgamma1+0xf0>
movsd  0x2dfd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12e0 <rndgamma1+0x1a0>
movsd  0x2de7(%rip),%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm3,%xmm2
subsd  %xmm0,%xmm2
movapd %xmm3,%xmm0
subsd  %xmm1,%xmm0
divsd  %xmm0,%xmm2
cvttsd2si %xmm2,%edi
call   1050 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0x2dab(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,0x10(%rsp)
cvttsd2si %xmm1,%edi
call   1050 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
subsd  0x2d99(%rip),%xmm0
jmp    1317 <rndgamma1+0x1d7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
ucomisd 0x2d78(%rip),%xmm0
jbe    13a5 <rndgamma1+0x265>
movsd  0x2d5a(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    %ebx,%esi
call   1060 <pow@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
nopl   (%rax)
xor    %eax,%eax
call   1040 <ran1@plt>
ucomisd 0xce1(%rip),%xmm0
jne    1333 <rndgamma1+0x1f3>
jnp    1320 <rndgamma1+0x1e0>
ucomisd 0xcc5(%rip),%xmm0
jne    133f <rndgamma1+0x1ff>
jnp    1320 <rndgamma1+0x1e0>
ucomisd 0xcc9(%rip),%xmm0
jbe    13af <rndgamma1+0x26f>
movsd  0xcaf(%rip),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm3
ucomisd %xmm1,%xmm3
jb     13af <rndgamma1+0x26f>
movapd %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
ucomisd %xmm2,%xmm1
jae    1230 <rndgamma1+0xf0>
cvttsd2si %xmm0,%edi
movsd  %xmm3,0x8(%rsp)
call   1050 <log@plt>
neg    %eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jae    1230 <rndgamma1+0xf0>
jmp    13af <rndgamma1+0x26f>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x10(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@rndgamma1.a = internal global double 0.000000e+00
@rndgamma1.p = internal global double 0.000000e+00
@rndgamma1.uf = internal global double 0.000000e+00
@rndgamma1.ss = internal global double 1.000000e+01
@rndgamma1.d = internal global double 0.000000e+00
@r = global i32 0
@small = global double 0.000000e+00
@w = global i32 0
@x = global double 0.000000e+00
define double @rndgamma1(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double 0.000000e+00, double* %5
store double 1.000000e-37, double* %6
%8 = load double, double* %3
%9 = load double, double* @rndgamma1.ss
%10 = fcmp une double %8, %9
br i1 %10, label %11, label %38
11: ; preds = %1
%12 = load double, double* %3
%13 = fsub double 1.000000e+00, %12
store double %13, double* @rndgamma1.a
%14 = load double, double* @rndgamma1.a
%15 = load double, double* @rndgamma1.a
%16 = load double, double* %3
%17 = load double, double* @rndgamma1.a
%18 = fneg double %17
%19 = call double @exp(double %18)
%20 = call double @llvm.fmuladd.f64(double %16, double %19, double %15)
%21 = fdiv double %14, %20
store double %21, double* @rndgamma1.p
%22 = load double, double* @rndgamma1.p
%23 = load double, double* %6
%24 = load double, double* @rndgamma1.a
%25 = fdiv double %23, %24
%26 = fptosi double %25 to i32
%27 = load double, double* %3
%28 = fptosi double %27 to i32
%29 = call double @pow(i32 %26, i32 %28)
%30 = fmul double %22, %29
store double %30, double* @rndgamma1.uf
%31 = load double, double* @rndgamma1.a
%32 = load double, double* @rndgamma1.a
%33 = fptosi double %32 to i32
%34 = call i32 @log(i32 %33)
%35 = sitofp i32 %34 to double
%36 = fmul double %31, %35
store double %36, double* @rndgamma1.d
%37 = load double, double* %3
store double %37, double* @rndgamma1.ss
br label %38
38: ; preds = %11, %1
br label %39
39: ; preds = %122, %38
br label %40
40: ; preds = %48, %39
%41 = call double (...) @ran1()
store double %41, double* %4
%42 = fcmp oeq double %41, 0.000000e+00
br i1 %42, label %46, label %43
43: ; preds = %40
%44 = load double, double* %4
%45 = fcmp oeq double %44, 1.000000e+00
br label %46
46: ; preds = %43, %40
%47 = phi i1 [ true, %40 ], [ %45, %43 ]
br i1 %47, label %48, label %49
48: ; preds = %46
br label %40
49: ; preds = %46
%50 = load double, double* %4
%51 = load double, double* @rndgamma1.p
%52 = fcmp ogt double %50, %51
br i1 %52, label %53, label %72
53: ; preds = %49
%54 = load double, double* @rndgamma1.a
%55 = load double, double* %4
%56 = fsub double 1.000000e+00, %55
%57 = load double, double* @rndgamma1.p
%58 = fsub double 1.000000e+00, %57
%59 = fdiv double %56, %58
%60 = fptosi double %59 to i32
%61 = call i32 @log(i32 %60)
%62 = sitofp i32 %61 to double
%63 = fsub double %54, %62
store double %63, double* %5
%64 = load double, double* @rndgamma1.a
%65 = load double, double* %5
%66 = fptosi double %65 to i32
%67 = call i32 @log(i32 %66)
%68 = sitofp i32 %67 to double
%69 = load double, double* @rndgamma1.d
%70 = fneg double %69
%71 = call double @llvm.fmuladd.f64(double %64, double %68, double %70)
store double %71, double* %7
br label %90
72: ; preds = %49
%73 = load double, double* %4
%74 = load double, double* @rndgamma1.uf
%75 = fcmp ogt double %73, %74
br i1 %75, label %76, label %88
76: ; preds = %72
%77 = load double, double* @rndgamma1.a
%78 = load double, double* %4
%79 = load double, double* @rndgamma1.p
%80 = fdiv double %78, %79
%81 = fptosi double %80 to i32
%82 = load double, double* %3
%83 = fdiv double 1.000000e+00, %82
%84 = fptosi double %83 to i32
%85 = call double @pow(i32 %81, i32 %84)
%86 = fmul double %77, %85
store double %86, double* %5
%87 = load double, double* %5
store double %87, double* %7
br label %89
88: ; preds = %72
store double 0.000000e+00, double* %2
br label %127
89: ; preds = %76
br label %90
90: ; preds = %89, %53
br label %91
91: ; preds = %99, %90
%92 = call double (...) @ran1()
store double %92, double* %4
%93 = fcmp oeq double %92, 0.000000e+00
br i1 %93, label %97, label %94
94: ; preds = %91
%95 = load double, double* %4
%96 = fcmp oeq double %95, 1.000000e+00
br label %97
97: ; preds = %94, %91
%98 = phi i1 [ true, %91 ], [ %96, %94 ]
br i1 %98, label %99, label %100
99: ; preds = %97
br label %91
100: ; preds = %97
%101 = load double, double* %4
%102 = fsub double 1.000000e+00, %101
%103 = load double, double* %7
%104 = fcmp ole double %102, %103
br i1 %104, label %105, label %124
105: ; preds = %100
%106 = load double, double* %4
%107 = fcmp ogt double %106, 0.000000e+00
br i1 %107, label %108, label %124
108: ; preds = %105
%109 = load double, double* %4
%110 = load double, double* %7
%111 = fadd double %110, 1.000000e+00
%112 = fmul double %109, %111
%113 = fcmp oge double %112, 1.000000e+00
br i1 %113, label %122, label %114
114: ; preds = %108
%115 = load double, double* %4
%116 = fptosi double %115 to i32
%117 = call i32 @log(i32 %116)
%118 = sub nsw i32 0, %117
%119 = sitofp i32 %118 to double
%120 = load double, double* %7
%121 = fcmp ole double %119, %120
br i1 %121, label %122, label %123
122: ; preds = %114, %108
br label %39
123: ; preds = %114
br label %124
124: ; preds = %123, %105, %100
br label %125
125: ; preds = %124
%126 = load double, double* %5
store double %126, double* %2
br label %127
127: ; preds = %125, %88
%128 = load double, double* %2
ret double %128
}

LLVM IR (-O2):
@rndgamma1.a = internal unnamed_addr global double 0.000000e+00
@rndgamma1.p = internal unnamed_addr global double 0.000000e+00
@rndgamma1.uf = internal unnamed_addr global double 0.000000e+00
@rndgamma1.ss = internal unnamed_addr global double 1.000000e+01
@rndgamma1.d = internal unnamed_addr global double 0.000000e+00
@r = global i32 0
@small = global double 0.000000e+00
@w = global i32 0
@x = global double 0.000000e+00
define double @rndgamma1(double %0) {
%2 = load double, double* @rndgamma1.ss
%3 = fcmp une double %2, %0
br i1 %3, label %4, label %21
4: ; preds = %1
%5 = fsub double 1.000000e+00, %0
store double %5, double* @rndgamma1.a
%6 = fneg double %5
%7 = tail call double @exp(double %6)
%8 = tail call double @llvm.fmuladd.f64(double %0, double %7, double %5)
%9 = fdiv double %5, %8
store double %9, double* @rndgamma1.p
%10 = load double, double* @rndgamma1.a
%11 = fdiv double 1.000000e-37, %10
%12 = fptosi double %11 to i32
%13 = fptosi double %0 to i32
%14 = tail call double @pow(i32 %12, i32 %13)
%15 = fmul double %9, %14
store double %15, double* @rndgamma1.uf
%16 = load double, double* @rndgamma1.a
%17 = fptosi double %16 to i32
%18 = tail call i32 @log(i32 %17)
%19 = sitofp i32 %18 to double
%20 = fmul double %16, %19
store double %20, double* @rndgamma1.d
store double %0, double* @rndgamma1.ss
br label %21
21: ; preds = %4, %1
%22 = fdiv double 1.000000e+00, %0
%23 = fptosi double %22 to i32
br label %24
24: ; preds = %29, %21
%25 = tail call double (...) @ran1()
%26 = fcmp oeq double %25, 0.000000e+00
%27 = fcmp oeq double %25, 1.000000e+00
%28 = or i1 %26, %27
br i1 %28, label %29, label %30
29: ; preds = %24, %75, %71
br label %24
30: ; preds = %24
%31 = load double, double* @rndgamma1.p
%32 = fcmp ogt double %25, %31
br i1 %32, label %33, label %49
33: ; preds = %30
%34 = load double, double* @rndgamma1.a
%35 = fsub double 1.000000e+00, %25
%36 = fsub double 1.000000e+00, %31
%37 = fdiv double %35, %36
%38 = fptosi double %37 to i32
%39 = tail call i32 @log(i32 %38)
%40 = sitofp i32 %39 to double
%41 = fsub double %34, %40
%42 = load double, double* @rndgamma1.a
%43 = fptosi double %41 to i32
%44 = tail call i32 @log(i32 %43)
%45 = sitofp i32 %44 to double
%46 = load double, double* @rndgamma1.d
%47 = fneg double %46
%48 = tail call double @llvm.fmuladd.f64(double %42, double %45, double %47)
br label %58
49: ; preds = %30
%50 = load double, double* @rndgamma1.uf
%51 = fcmp ogt double %25, %50
br i1 %51, label %52, label %81
52: ; preds = %49
%53 = load double, double* @rndgamma1.a
%54 = fdiv double %25, %31
%55 = fptosi double %54 to i32
%56 = tail call double @pow(i32 %55, i32 %23)
%57 = fmul double %53, %56
br label %58
58: ; preds = %52, %33
%59 = phi double [ %41, %33 ], [ %57, %52 ]
%60 = phi double [ %48, %33 ], [ %57, %52 ]
br label %61
61: ; preds = %61, %58
%62 = tail call double (...) @ran1()
%63 = fcmp oeq double %62, 0.000000e+00
%64 = fcmp oeq double %62, 1.000000e+00
%65 = or i1 %63, %64
br i1 %65, label %61, label %66
66: ; preds = %61
%67 = fsub double 1.000000e+00, %62
%68 = fcmp ole double %67, %60
%69 = fcmp ogt double %62, 0.000000e+00
%70 = and i1 %69, %68
br i1 %70, label %71, label %81
71: ; preds = %66
%72 = fadd double %60, 1.000000e+00
%73 = fmul double %72, %62
%74 = fcmp ult double %73, 1.000000e+00
br i1 %74, label %75, label %29
75: ; preds = %71
%76 = fptosi double %62 to i32
%77 = tail call i32 @log(i32 %76)
%78 = sub nsw i32 0, %77
%79 = sitofp i32 %78 to double
%80 = fcmp ult double %60, %79
br i1 %80, label %81, label %29
81: ; preds = %75, %66, %49
%82 = phi double [ 0.000000e+00, %49 ], [ %59, %66 ], [ %59, %75 ]
ret double %82
}