#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 M_E;
double M_PI;
double RandomExp(double);
double RandomStandardUniform();
int /*<<< orphan*/ assert(int);
int exp(double);
double log(double);
int pow(double, double);
double sqrt(int);
double tan(double);
double RandomGamma(double shape, double scale) {
  double x, y, v;
  assert(shape >= 0.);
  assert(scale >= 0.);
  if (shape < 1.) {
    do {
      v = RandomStandardUniform();
      x = RandomStandardUniform();
      y = M_E / (shape * M_E);
      if (x < y) {
        x = pow(v, 1. / shape);
        if (M_E * v > y)
          y = y * exp(-x);
      } else {
        x = 1. - log(v);
        y = y + (1. - y) * pow(x, shape - 1.);
      }
    } while (y < v);
    x *= scale;
  } else if (shape > 1.) {
    do {
      do {
        y = tan(M_PI * RandomStandardUniform());
        x = sqrt(2. * shape - 1.) * y + shape - 1.;
      } while (x < 0);
      v = RandomStandardUniform();
      y = (1. + y * y) *
          exp((shape - 1.) * log(x / (shape - 1.)) - sqrt(2. * shape - 1.) * y);
    } while (y < v);
    x *= scale;
  } else {
    x = RandomExp(scale);
  }
  assert(x >= 0.);
  return x;
}


x86 assembly (clang, -O0):
<RandomGamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsd  0xe34(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1346 <RandomGamma+0x1c6>
jmp    11dc <RandomGamma+0x5c>
mov    $0x0,%al
call   1030 <RandomStandardUniform@plt>
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1030 <RandomStandardUniform@plt>
movsd  %xmm0,-0x18(%rbp)
mov    0x2ddd(%rip),%rax
movsd  (%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    0x2dcd(%rip),%rax
mulsd  (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12a9 <RandomGamma+0x129>
movsd  -0x28(%rbp),%xmm0
movsd  0xdc7(%rip),%xmm1
divsd  -0x8(%rbp),%xmm1
call   1090 <pow@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    0x2d85(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x28(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    12a4 <RandomGamma+0x124>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <exp@plt>
movsd  -0x30(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1319 <RandomGamma+0x199>
movsd  -0x28(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
movsd  0xd42(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd27(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xd0b(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1090 <pow@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    131e <RandomGamma+0x19e>
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     11dc <RandomGamma+0x5c>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    14ea <RandomGamma+0x36a>
movsd  -0x8(%rbp),%xmm0
movsd  0xcad(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14d6 <RandomGamma+0x356>
jmp    1362 <RandomGamma+0x1e2>
jmp    1367 <RandomGamma+0x1e7>
mov    0x2c7a(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1030 <RandomStandardUniform@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1070 <tan@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xc63(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <sqrt@plt>
movsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc34(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     1367 <RandomGamma+0x1e7>
mov    $0x0,%al
call   1030 <RandomStandardUniform@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbfb(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xbe5(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xbca(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1080 <log@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xbaf(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   10a0 <sqrt@plt>
movsd  -0x60(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <exp@plt>
movsd  -0x50(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     1362 <RandomGamma+0x1e2>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    14e5 <RandomGamma+0x365>
movsd  -0x10(%rbp),%xmm0
call   1050 <RandomExp@plt>
movsd  %xmm0,-0x18(%rbp)
jmp    14ea <RandomGamma+0x36a>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomGamma>:
push   %r14
push   %rbx
sub    $0x58,%rsp
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x50(%rsp)
xorpd  %xmm1,%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
setae  %dil
call   1040 <assert@plt>
xor    %edi,%edi
movsd  0x18(%rsp),%xmm0
ucomisd 0xe5a(%rip),%xmm0
setae  %dil
call   1040 <assert@plt>
movsd  0x50(%rsp),%xmm1
movsd  0xe33(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    12f4 <RandomGamma+0x174>
movsd  0xe29(%rip),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x40(%rsp)
divsd  %xmm1,%xmm0
movsd  %xmm0,0x38(%rsp)
mov    0x2dde(%rip),%rbx
jmp    1263 <RandomGamma+0xe3>
nopl   0x0(%rax)
movsd  0x8(%rsp),%xmm0
call   1080 <log@plt>
movsd  0xded(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
subsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x48(%rsp)
movapd %xmm2,0x20(%rsp)
movapd %xmm2,%xmm0
movsd  0x40(%rsp),%xmm1
call   1090 <pow@plt>
movsd  0x10(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x48(%rsp),%xmm0
addsd  %xmm0,%xmm2
movsd  0x8(%rsp),%xmm0
ucomisd %xmm2,%xmm0
jbe    140b <RandomGamma+0x28b>
xor    %eax,%eax
call   1030 <RandomStandardUniform@plt>
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <RandomStandardUniform@plt>
movsd  (%rbx),%xmm2
movapd %xmm2,%xmm1
mulsd  0x50(%rsp),%xmm1
divsd  %xmm1,%xmm2
ucomisd %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
jbe    1200 <RandomGamma+0x80>
movsd  0x8(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
call   1090 <pow@plt>
movsd  0x10(%rsp),%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  (%rbx),%xmm0
mulsd  0x8(%rsp),%xmm0
ucomisd %xmm2,%xmm0
movapd %xmm1,0x20(%rsp)
jbe    1253 <RandomGamma+0xd3>
movapd %xmm1,%xmm0
xorpd  0xd47(%rip),%xmm0
call   1060 <exp@plt>
movsd  0x10(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm0,%xmm2
jmp    1253 <RandomGamma+0xd3>
ucomisd 0xd04(%rip),%xmm1
jbe    1419 <RandomGamma+0x299>
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0xcf6(%rip),%xmm2
addsd  %xmm2,%xmm0
cvttsd2si %xmm0,%ebx
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x2cb9(%rip),%r14
nop
movsd  (%r14),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <RandomStandardUniform@plt>
mulsd  0x8(%rsp),%xmm0
call   1070 <tan@plt>
movsd  %xmm0,0x8(%rsp)
mov    %ebx,%edi
call   10a0 <sqrt@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x50(%rsp),%xmm0
addsd  0xc9a(%rip),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1330 <RandomGamma+0x1b0>
xor    %eax,%eax
movapd %xmm0,0x20(%rsp)
call   1030 <RandomStandardUniform@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm0
addsd  0xc63(%rip),%xmm0
movsd  %xmm0,0x40(%rsp)
movapd 0x20(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
call   1080 <log@plt>
movsd  %xmm0,0x38(%rsp)
mov    %ebx,%edi
call   10a0 <sqrt@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1060 <exp@plt>
movapd 0x20(%rsp),%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x40(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
ucomisd %xmm1,%xmm2
ja     1330 <RandomGamma+0x1b0>
mulsd  0x18(%rsp),%xmm0
jmp    1424 <RandomGamma+0x2a4>
movapd 0x20(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
jmp    1424 <RandomGamma+0x2a4>
movsd  0x18(%rsp),%xmm0
call   1050 <RandomExp@plt>
movapd %xmm0,0x20(%rsp)
xorpd  %xmm1,%xmm1
xor    %edi,%edi
ucomisd %xmm1,%xmm0
setae  %dil
call   1040 <assert@plt>
movaps 0x20(%rsp),%xmm0
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@M_E = global double 0.000000e+00
@M_PI = global double 0.000000e+00
define double @RandomGamma(double %0, double %1) {
%3 = fcmp oge double %0, 0.000000e+00
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = fcmp oge double %1, 0.000000e+00
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = fcmp olt double %0, 1.000000e+00
br i1 %9, label %10, label %44
10: ; preds = %2
%11 = fadd double %0, -1.000000e+00
%12 = fdiv double 1.000000e+00, %0
br label %13
13: ; preds = %10, %38
%14 = tail call double (...) @RandomStandardUniform()
%15 = tail call double (...) @RandomStandardUniform()
%16 = load double, double* @M_E
%17 = fmul double %16, %0
%18 = fdiv double %16, %17
%19 = fcmp olt double %15, %18
br i1 %19, label %20, label %31
20: ; preds = %13
%21 = tail call i32 @pow(double %14, double %12)
%22 = sitofp i32 %21 to double
%23 = load double, double* @M_E
%24 = fmul double %14, %23
%25 = fcmp ogt double %24, %18
br i1 %25, label %26, label %38
26: ; preds = %20
%27 = fneg double %22
%28 = tail call i32 @exp(double %27)
%29 = sitofp i32 %28 to double
%30 = fmul double %18, %29
br label %38
31: ; preds = %13
%32 = tail call double @log(double %14)
%33 = fsub double 1.000000e+00, %32
%34 = fsub double 1.000000e+00, %18
%35 = tail call i32 @pow(double %33, double %11)
%36 = sitofp i32 %35 to double
%37 = tail call double @llvm.fmuladd.f64(double %34, double %36, double %18)
br label %38
38: ; preds = %31, %26, %20
%39 = phi double [ %22, %26 ], [ %22, %20 ], [ %33, %31 ]
%40 = phi double [ %30, %26 ], [ %18, %20 ], [ %37, %31 ]
%41 = fcmp olt double %40, %14
br i1 %41, label %13, label %42
42: ; preds = %38
%43 = fmul double %39, %1
br label %77
44: ; preds = %2
%45 = fcmp ogt double %0, 1.000000e+00
br i1 %45, label %46, label %75
46: ; preds = %44
%47 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double -1.000000e+00)
%48 = fptosi double %47 to i32
%49 = fadd double %0, -1.000000e+00
br label %50
50: ; preds = %59, %46
%51 = load double, double* @M_PI
%52 = tail call double (...) @RandomStandardUniform()
%53 = fmul double %51, %52
%54 = tail call double @tan(double %53)
%55 = tail call double @sqrt(i32 %48)
%56 = tail call double @llvm.fmuladd.f64(double %55, double %54, double %0)
%57 = fadd double %56, -1.000000e+00
%58 = fcmp olt double %57, 0.000000e+00
br i1 %58, label %59, label %60
59: ; preds = %50, %60
br label %50
60: ; preds = %50
%61 = tail call double (...) @RandomStandardUniform()
%62 = tail call double @llvm.fmuladd.f64(double %54, double %54, double 1.000000e+00)
%63 = fdiv double %57, %49
%64 = tail call double @log(double %63)
%65 = tail call double @sqrt(i32 %48)
%66 = fneg double %65
%67 = fmul double %54, %66
%68 = tail call double @llvm.fmuladd.f64(double %49, double %64, double %67)
%69 = tail call i32 @exp(double %68)
%70 = sitofp i32 %69 to double
%71 = fmul double %62, %70
%72 = fcmp olt double %71, %61
br i1 %72, label %59, label %73
73: ; preds = %60
%74 = fmul double %57, %1
br label %77
75: ; preds = %44
%76 = tail call double @RandomExp(double %1)
br label %77
77: ; preds = %73, %75, %42
%78 = phi double [ %43, %42 ], [ %74, %73 ], [ %76, %75 ]
%79 = fcmp oge double %78, 0.000000e+00
%80 = zext i1 %79 to i32
%81 = tail call i32 @assert(i32 %80)
ret double %78
}