#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 */
int /*<<< orphan*/ assert(int);
long double exp(long double);
long double log(long double);
double mt_genrand_real3();
long double pow(long double, long double);
long double sqrt(double);
long double gammavariate(long double alpha, long double beta) {
  assert(alpha > 0);
  assert(beta > 0);
  if (alpha > 1.0) {
    long double ainv = sqrt(2.0 * alpha - 1.0);
    long double bbb = alpha - log(4.0);
    long double ccc = alpha + ainv;
    while (1) {
      long double u1 = mt_genrand_real3();
      if (u1 > 1e-7 || u1 < 0.9999999) {
        long double u2 = 1.0 - mt_genrand_real3();
        long double v = log(u1 / (1.0 - u1)) / ainv;
        long double x = alpha * exp(v);
        long double z = u1 * u1 * u2;
        long double r = bbb + ccc * v - x;
        if (r + (1.0 + log(4.5)) - 4.5 * z >= 0.0 || r >= log(z))
          return x * beta;
      }
    }
  } else if (alpha == 1.0) {
    long double u = mt_genrand_real3();
    while (u <= 1e-7)
      u = mt_genrand_real3();
    return -log(u) * beta;
  } else {
    while (1) {
      long double u = mt_genrand_real3();
      long double b = (exp(1) + alpha) / exp(1);
      long double p = b * u;
      long double x = (p <= 1.0) ? pow(p, 1.0 / alpha) : -log((b - p) / alpha);
      long double u1 = mt_genrand_real3();
      if (!(((p <= 1.0) && (u1 > exp(-x))) ||
            ((p > 1.0) && (u1 > pow(x, alpha - 1.0)))))
        return x * beta;
    }
  }
}


x86 assembly (clang, -O0):
<gammavariate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fldt   -0x20(%rbp)
fldz
fld    %st(0)
fstpt  -0x164(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%edi
call   1030 <assert@plt>
fldt   -0x164(%rbp)
fldt   -0x30(%rbp)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
movzbl %al,%edi
call   1030 <assert@plt>
fldt   -0x20(%rbp)
fld1
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    139e <gammavariate+0x23e>
jmp    11c3 <gammavariate+0x63>
fldt   -0x20(%rbp)
fadd   %st,%st(0)
fld1
fchs
faddp  %st,%st(1)
fstpl  -0x148(%rbp)
movsd  -0x148(%rbp),%xmm0
ff
call   1080 <sqrt@plt>
fstpt  -0x40(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x170(%rbp)
mov    %rsp,%rax
flds   0xe22(%rip)
fstpt  (%rax)
call   1060 <log@plt>
fldt   -0x170(%rbp)
fsubp  %st,%st(1)
fstpt  -0x50(%rbp)
fldt   -0x20(%rbp)
fldt   -0x40(%rbp)
faddp  %st,%st(1)
fstpt  -0x60(%rbp)
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,-0x150(%rbp)
ff
fldl   -0x150(%rbp)
fstpt  -0x70(%rbp)
fldt   -0x70(%rbp)
fldl   0xdcc(%rip)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
ja     125d <gammavariate+0xfd>
jmp    1245 <gammavariate+0xe5>
fldt   -0x70(%rbp)
fldl   0xdba(%rip)
fucomip %st(1),%st
fstp   %st(0)
jbe    1399 <gammavariate+0x239>
jmp    125d <gammavariate+0xfd>
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movaps %xmm0,%xmm1
movsd  0xda1(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
fldl   -0x158(%rbp)
fstpt  -0x80(%rbp)
fldt   -0x70(%rbp)
fld1
fld    %st(0)
fstpt  -0x188(%rbp)
fsub   %st(1),%st
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <log@plt>
fldt   -0x40(%rbp)
fdivrp %st,%st(1)
fstpt  -0x90(%rbp)
fldt   -0x20(%rbp)
fstpt  -0x194(%rbp)
fldt   -0x90(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <exp@plt>
fldt   -0x194(%rbp)
fmulp  %st,%st(1)
fstpt  -0xa0(%rbp)
fldt   -0x70(%rbp)
fmul   %st,%st(0)
fldt   -0x80(%rbp)
fmulp  %st,%st(1)
fstpt  -0xb0(%rbp)
fldt   -0x50(%rbp)
fldt   -0x60(%rbp)
fldt   -0x90(%rbp)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fldt   -0xa0(%rbp)
fsubrp %st,%st(1)
fstpt  -0xc0(%rbp)
fldt   -0xc0(%rbp)
fstpt  -0x17c(%rbp)
mov    %rsp,%rax
flds   0xd08(%rip)
fstpt  (%rax)
call   1060 <log@plt>
fldt   -0x188(%rbp)
fldt   -0x17c(%rbp)
fxch   %st(2)
faddp  %st,%st(1)
faddp  %st,%st(1)
fldt   -0xb0(%rbp)
flds   0xce7(%rip)
fmulp  %st,%st(1)
faddp  %st,%st(1)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jae    1381 <gammavariate+0x221>
jmp    1350 <gammavariate+0x1f0>
fldt   -0xc0(%rbp)
fstpt  -0x1a0(%rbp)
fldt   -0xb0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <log@plt>
fldt   -0x1a0(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jb     1394 <gammavariate+0x234>
jmp    1381 <gammavariate+0x221>
fldt   -0xa0(%rbp)
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fstpt  -0x10(%rbp)
jmp    15ec <gammavariate+0x48c>
jmp    1399 <gammavariate+0x239>
jmp    1213 <gammavariate+0xb3>
fldt   -0x20(%rbp)
fld1
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    142f <gammavariate+0x2cf>
jp     142f <gammavariate+0x2cf>
jmp    13ba <gammavariate+0x25a>
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,-0x138(%rbp)
ff
fldl   -0x138(%rbp)
fstpt  -0xd0(%rbp)
fldt   -0xd0(%rbp)
fldl   0xc1f(%rip)
fucomip %st(1),%st
fstp   %st(0)
jb     1410 <gammavariate+0x2b0>
jmp    13f0 <gammavariate+0x290>
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,-0x140(%rbp)
ff
fldl   -0x140(%rbp)
fstpt  -0xd0(%rbp)
jmp    13d5 <gammavariate+0x275>
fldt   -0xd0(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <log@plt>
fchs
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fstpt  -0x10(%rbp)
jmp    15ec <gammavariate+0x48c>
jmp    1434 <gammavariate+0x2d4>
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,-0x128(%rbp)
ff
fldl   -0x128(%rbp)
fstpt  -0xe0(%rbp)
mov    %rsp,%rax
fld1
fld    %st(0)
fstpt  -0x1ac(%rbp)
fstpt  (%rax)
call   1050 <exp@plt>
fldt   -0x1ac(%rbp)
fldt   -0x20(%rbp)
faddp  %st,%st(2)
fxch   %st(1)
fstpt  -0x1b8(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <exp@plt>
fldt   -0x1b8(%rbp)
fldt   -0x1ac(%rbp)
fxch   %st(1)
fdivp  %st,%st(2)
fxch   %st(1)
fstpt  -0xf0(%rbp)
fldt   -0xf0(%rbp)
fldt   -0xe0(%rbp)
fmulp  %st,%st(1)
fstpt  -0x100(%rbp)
fldt   -0x100(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     14e8 <gammavariate+0x388>
jmp    14c3 <gammavariate+0x363>
fldt   -0x100(%rbp)
fldt   -0x20(%rbp)
fld1
fdivp  %st,%st(1)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1070 <pow@plt>
fstpt  -0x1c4(%rbp)
jmp    150d <gammavariate+0x3ad>
fldt   -0xf0(%rbp)
fldt   -0x100(%rbp)
fsubrp %st,%st(1)
fldt   -0x20(%rbp)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1060 <log@plt>
fchs
fstpt  -0x1c4(%rbp)
fldt   -0x1c4(%rbp)
fstpt  -0x110(%rbp)
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,-0x130(%rbp)
ff
fldl   -0x130(%rbp)
fstpt  -0x120(%rbp)
fldt   -0x100(%rbp)
fld1
fucomip %st(1),%st
fstp   %st(0)
jb     157e <gammavariate+0x41e>
jmp    154b <gammavariate+0x3eb>
fldt   -0x120(%rbp)
fstpt  -0x1d0(%rbp)
fldt   -0x110(%rbp)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <exp@plt>
fldt   -0x1d0(%rbp)
fucomip %st(1),%st
fstp   %st(0)
ja     15e7 <gammavariate+0x487>
jmp    157e <gammavariate+0x41e>
fldt   -0x100(%rbp)
fld1
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jbe    15d4 <gammavariate+0x474>
jmp    1597 <gammavariate+0x437>
fldt   -0x120(%rbp)
fstpt  -0x1dc(%rbp)
fldt   -0x110(%rbp)
fldt   -0x20(%rbp)
fld1
fchs
faddp  %st,%st(1)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1070 <pow@plt>
fldt   -0x1dc(%rbp)
fucomip %st(1),%st
fstp   %st(0)
ja     15e7 <gammavariate+0x487>
jmp    15d4 <gammavariate+0x474>
fldt   -0x110(%rbp)
fldt   -0x30(%rbp)
fmulp  %st,%st(1)
fstpt  -0x10(%rbp)
jmp    15ec <gammavariate+0x48c>
jmp    1434 <gammavariate+0x2d4>
fldt   -0x10(%rbp)
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gammavariate>:
sub    $0xe8,%rsp
fldt   0x100(%rsp)
fstpt  0x7c(%rsp)
fldt   0xf0(%rsp)
fld    %st(0)
fstpt  0x4c(%rsp)
fldz
fld    %st(0)
fstpt  0x64(%rsp)
xor    %edi,%edi
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %dil
call   1030 <assert@plt>
xor    %edi,%edi
fldt   0x7c(%rsp)
fldt   0x64(%rsp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
seta   %dil
call   1030 <assert@plt>
fldt   0x4c(%rsp)
fld1
fxch   %st(1)
fucomi %st(1),%st
fld    %st(1)
fstpt  0x40(%rsp)
jbe    1331 <gammavariate+0x1d1>
fadd   %st,%st(0)
fxch   %st(1)
fchs
faddp  %st,%st(1)
fstpl  0x98(%rsp)
movsd  0x98(%rsp),%xmm0
call   1080 <sqrt@plt>
fstpt  0x58(%rsp)
flds   0xe2a(%rip)
fstpt  (%rsp)
call   1060 <log@plt>
fldt   0x4c(%rsp)
fsub   %st,%st(1)
fxch   %st(1)
fstpt  0xdc(%rsp)
fldt   0x58(%rsp)
faddp  %st,%st(1)
fstpt  0xd0(%rsp)
flds   0xe04(%rip)
fstpt  0xc4(%rsp)
fldz
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
fstp   %st(0)
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,0x90(%rsp)
fldl   0x90(%rsp)
ucomisd 0xdaf(%rip),%xmm0
ja     1261 <gammavariate+0x101>
movsd  0xdad(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1230 <gammavariate+0xd0>
xor    %eax,%eax
fstpt  0x28(%rsp)
call   1040 <mt_genrand_real3@plt>
movsd  0xd9c(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x88(%rsp)
fldt   0x40(%rsp)
fldt   0x28(%rsp)
fsubr  %st,%st(1)
fdivp  %st,%st(1)
fstpt  (%rsp)
call   1060 <log@plt>
fldt   0x58(%rsp)
fdivrp %st,%st(1)
fld    %st(0)
fstpt  0x34(%rsp)
fstpt  (%rsp)
call   1050 <exp@plt>
fldt   0x28(%rsp)
fmul   %st,%st(0)
fmull  0x88(%rsp)
fstpt  0x70(%rsp)
fldt   0x4c(%rsp)
fmulp  %st,%st(1)
fldt   0xd0(%rsp)
fldt   0x34(%rsp)
fmulp  %st,%st(1)
fldt   0xdc(%rsp)
faddp  %st,%st(1)
fld    %st(1)
fstpt  0x34(%rsp)
fsubp  %st,%st(1)
fstpt  0x28(%rsp)
fldt   0xc4(%rsp)
fstpt  (%rsp)
call   1060 <log@plt>
fldt   0x70(%rsp)
fldt   0x40(%rsp)
faddp  %st,%st(2)
fldt   0x28(%rsp)
faddp  %st,%st(2)
fld    %st(0)
fmuls  0xd17(%rip)
faddp  %st,%st(2)
fldt   0x64(%rsp)
fxch   %st(2)
fucomip %st(2),%st
fstp   %st(1)
jae    1375 <gammavariate+0x215>
fstpt  (%rsp)
call   1060 <log@plt>
fldt   0x28(%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldz
jb     1230 <gammavariate+0xd0>
jmp    1379 <gammavariate+0x219>
jne    138d <gammavariate+0x22d>
jp     138d <gammavariate+0x22d>
fstp   %st(1)
fstp   %st(0)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  0xcb1(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1340 <gammavariate+0x1e0>
movsd  %xmm0,0xa0(%rsp)
fldl   0xa0(%rsp)
fstpt  (%rsp)
call   1060 <log@plt>
fchs
fstpt  0x34(%rsp)
jmp    1377 <gammavariate+0x217>
fstp   %st(0)
fldz
fstp   %st(0)
fldt   0x7c(%rsp)
fldt   0x34(%rsp)
fmulp  %st,%st(1)
add    $0xe8,%rsp
ret
fld    %st(1)
fxch   %st(2)
fchs
fadd   %st(1),%st
fstpt  0x64(%rsp)
fdivrp %st,%st(1)
fstpt  0x58(%rsp)
fldz
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
fstp   %st(0)
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,0xb8(%rsp)
fldt   0x40(%rsp)
fstpt  (%rsp)
call   1050 <exp@plt>
fldt   0x4c(%rsp)
faddp  %st,%st(1)
fstpt  0x28(%rsp)
fldt   0x40(%rsp)
fstpt  (%rsp)
call   1050 <exp@plt>
fldt   0x28(%rsp)
fdivp  %st,%st(1)
fld    %st(0)
fmull  0xb8(%rsp)
fldt   0x40(%rsp)
fucomip %st(1),%st
fld    %st(0)
fstpt  0x70(%rsp)
jae    1440 <gammavariate+0x2e0>
fsubrp %st,%st(1)
fldt   0x4c(%rsp)
fdivrp %st,%st(1)
fstpt  (%rsp)
call   1060 <log@plt>
fchs
fstpt  0x34(%rsp)
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,0xa8(%rsp)
fldl   0xa8(%rsp)
fstpt  0x28(%rsp)
fldz
jmp    148f <gammavariate+0x32f>
cs nopw 0x0(%rax,%rax,1)
fstp   %st(1)
fldt   0x58(%rsp)
fstpt  0x10(%rsp)
fstpt  (%rsp)
call   1070 <pow@plt>
fstpt  0x34(%rsp)
xor    %eax,%eax
call   1040 <mt_genrand_real3@plt>
movsd  %xmm0,0xb0(%rsp)
fldl   0xb0(%rsp)
fstpt  0x28(%rsp)
fldt   0x34(%rsp)
fchs
fstpt  (%rsp)
call   1050 <exp@plt>
fldt   0x28(%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldz
ja     13b0 <gammavariate+0x250>
fstp   %st(0)
fldt   0x40(%rsp)
fldt   0x70(%rsp)
fucomip %st(1),%st
fstp   %st(0)
jbe    1377 <gammavariate+0x217>
fldt   0x64(%rsp)
fstpt  0x10(%rsp)
fldt   0x34(%rsp)
fstpt  (%rsp)
call   1070 <pow@plt>
fldt   0x28(%rsp)
fucomip %st(1),%st
fstp   %st(0)
fldz
ja     13b0 <gammavariate+0x250>
jmp    1379 <gammavariate+0x219>

LLVM IR (-O0):
define x86_fp80 @gammavariate(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
%8 = alloca x86_fp80
%9 = alloca x86_fp80
%10 = alloca x86_fp80
%11 = alloca x86_fp80
%12 = alloca x86_fp80
%13 = alloca x86_fp80
%14 = alloca x86_fp80
%15 = alloca x86_fp80
%16 = alloca x86_fp80
%17 = alloca x86_fp80
%18 = alloca x86_fp80
%19 = alloca x86_fp80
%20 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%21 = load x86_fp80, x86_fp80* %4
%22 = fcmp ogt x86_fp80 %21, 0xK00000000000000000000
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = load x86_fp80, x86_fp80* %5
%26 = fcmp ogt x86_fp80 %25, 0xK00000000000000000000
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = load x86_fp80, x86_fp80* %4
%30 = fcmp ogt x86_fp80 %29, 0xK3FFF8000000000000000
br i1 %30, label %31, label %94
31: ; preds = %2
%32 = load x86_fp80, x86_fp80* %4
%33 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xK40008000000000000000, x86_fp80 %32, x86_fp80 0xKBFFF8000000000000000)
%34 = fptrunc x86_fp80 %33 to double
%35 = call x86_fp80 @sqrt(double %34)
store x86_fp80 %35, x86_fp80* %6
%36 = load x86_fp80, x86_fp80* %4
%37 = call x86_fp80 @log(x86_fp80 0xK40018000000000000000)
%38 = fsub x86_fp80 %36, %37
store x86_fp80 %38, x86_fp80* %7
%39 = load x86_fp80, x86_fp80* %4
%40 = load x86_fp80, x86_fp80* %6
%41 = fadd x86_fp80 %39, %40
store x86_fp80 %41, x86_fp80* %8
br label %42
42: ; preds = %31, %93
%43 = call double (...) @mt_genrand_real3()
%44 = fpext double %43 to x86_fp80
store x86_fp80 %44, x86_fp80* %9
%45 = load x86_fp80, x86_fp80* %9
%46 = fcmp ogt x86_fp80 %45, 0xK3FE7D6BF94D5E57A4000
br i1 %46, label %50, label %47
47: ; preds = %42
%48 = load x86_fp80, x86_fp80* %9
%49 = fcmp olt x86_fp80 %48, 0xK3FFEFFFFFE5280D65800
br i1 %49, label %50, label %93
50: ; preds = %47, %42
%51 = call double (...) @mt_genrand_real3()
%52 = fsub double 1.000000e+00, %51
%53 = fpext double %52 to x86_fp80
store x86_fp80 %53, x86_fp80* %10
%54 = load x86_fp80, x86_fp80* %9
%55 = load x86_fp80, x86_fp80* %9
%56 = fsub x86_fp80 0xK3FFF8000000000000000, %55
%57 = fdiv x86_fp80 %54, %56
%58 = call x86_fp80 @log(x86_fp80 %57)
%59 = load x86_fp80, x86_fp80* %6
%60 = fdiv x86_fp80 %58, %59
store x86_fp80 %60, x86_fp80* %11
%61 = load x86_fp80, x86_fp80* %4
%62 = load x86_fp80, x86_fp80* %11
%63 = call x86_fp80 @exp(x86_fp80 %62)
%64 = fmul x86_fp80 %61, %63
store x86_fp80 %64, x86_fp80* %12
%65 = load x86_fp80, x86_fp80* %9
%66 = load x86_fp80, x86_fp80* %9
%67 = fmul x86_fp80 %65, %66
%68 = load x86_fp80, x86_fp80* %10
%69 = fmul x86_fp80 %67, %68
store x86_fp80 %69, x86_fp80* %13
%70 = load x86_fp80, x86_fp80* %7
%71 = load x86_fp80, x86_fp80* %8
%72 = load x86_fp80, x86_fp80* %11
%73 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %71, x86_fp80 %72, x86_fp80 %70)
%74 = load x86_fp80, x86_fp80* %12
%75 = fsub x86_fp80 %73, %74
store x86_fp80 %75, x86_fp80* %14
%76 = load x86_fp80, x86_fp80* %14
%77 = call x86_fp80 @log(x86_fp80 0xK40019000000000000000)
%78 = fadd x86_fp80 0xK3FFF8000000000000000, %77
%79 = fadd x86_fp80 %76, %78
%80 = load x86_fp80, x86_fp80* %13
%81 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 0xKC0019000000000000000, x86_fp80 %80, x86_fp80 %79)
%82 = fcmp oge x86_fp80 %81, 0xK00000000000000000000
br i1 %82, label %88, label %83
83: ; preds = %50
%84 = load x86_fp80, x86_fp80* %14
%85 = load x86_fp80, x86_fp80* %13
%86 = call x86_fp80 @log(x86_fp80 %85)
%87 = fcmp oge x86_fp80 %84, %86
br i1 %87, label %88, label %92
88: ; preds = %83, %50
%89 = load x86_fp80, x86_fp80* %12
%90 = load x86_fp80, x86_fp80* %5
%91 = fmul x86_fp80 %89, %90
store x86_fp80 %91, x86_fp80* %3
br label %166
92: ; preds = %83
br label %93
93: ; preds = %92, %47
br label %42
94: ; preds = %2
%95 = load x86_fp80, x86_fp80* %4
%96 = fcmp oeq x86_fp80 %95, 0xK3FFF8000000000000000
br i1 %96, label %97, label %112
97: ; preds = %94
%98 = call double (...) @mt_genrand_real3()
%99 = fpext double %98 to x86_fp80
store x86_fp80 %99, x86_fp80* %15
br label %100
100: ; preds = %103, %97
%101 = load x86_fp80, x86_fp80* %15
%102 = fcmp ole x86_fp80 %101, 0xK3FE7D6BF94D5E57A4000
br i1 %102, label %103, label %106
103: ; preds = %100
%104 = call double (...) @mt_genrand_real3()
%105 = fpext double %104 to x86_fp80
store x86_fp80 %105, x86_fp80* %15
br label %100
106: ; preds = %100
%107 = load x86_fp80, x86_fp80* %15
%108 = call x86_fp80 @log(x86_fp80 %107)
%109 = fneg x86_fp80 %108
%110 = load x86_fp80, x86_fp80* %5
%111 = fmul x86_fp80 %109, %110
store x86_fp80 %111, x86_fp80* %3
br label %166
112: ; preds = %94
br label %113
113: ; preds = %112, %165
%114 = call double (...) @mt_genrand_real3()
%115 = fpext double %114 to x86_fp80
store x86_fp80 %115, x86_fp80* %16
%116 = call x86_fp80 @exp(x86_fp80 0xK3FFF8000000000000000)
%117 = load x86_fp80, x86_fp80* %4
%118 = fadd x86_fp80 %116, %117
%119 = call x86_fp80 @exp(x86_fp80 0xK3FFF8000000000000000)
%120 = fdiv x86_fp80 %118, %119
store x86_fp80 %120, x86_fp80* %17
%121 = load x86_fp80, x86_fp80* %17
%122 = load x86_fp80, x86_fp80* %16
%123 = fmul x86_fp80 %121, %122
store x86_fp80 %123, x86_fp80* %18
%124 = load x86_fp80, x86_fp80* %18
%125 = fcmp ole x86_fp80 %124, 0xK3FFF8000000000000000
br i1 %125, label %126, label %131
126: ; preds = %113
%127 = load x86_fp80, x86_fp80* %18
%128 = load x86_fp80, x86_fp80* %4
%129 = fdiv x86_fp80 0xK3FFF8000000000000000, %128
%130 = call x86_fp80 @pow(x86_fp80 %127, x86_fp80 %129)
br label %139
131: ; preds = %113
%132 = load x86_fp80, x86_fp80* %17
%133 = load x86_fp80, x86_fp80* %18
%134 = fsub x86_fp80 %132, %133
%135 = load x86_fp80, x86_fp80* %4
%136 = fdiv x86_fp80 %134, %135
%137 = call x86_fp80 @log(x86_fp80 %136)
%138 = fneg x86_fp80 %137
br label %139
139: ; preds = %131, %126
%140 = phi x86_fp80 [ %130, %126 ], [ %138, %131 ]
store x86_fp80 %140, x86_fp80* %19
%141 = call double (...) @mt_genrand_real3()
%142 = fpext double %141 to x86_fp80
store x86_fp80 %142, x86_fp80* %20
%143 = load x86_fp80, x86_fp80* %18
%144 = fcmp ole x86_fp80 %143, 0xK3FFF8000000000000000
br i1 %144, label %145, label %151
145: ; preds = %139
%146 = load x86_fp80, x86_fp80* %20
%147 = load x86_fp80, x86_fp80* %19
%148 = fneg x86_fp80 %147
%149 = call x86_fp80 @exp(x86_fp80 %148)
%150 = fcmp ogt x86_fp80 %146, %149
br i1 %150, label %165, label %151
151: ; preds = %145, %139
%152 = load x86_fp80, x86_fp80* %18
%153 = fcmp ogt x86_fp80 %152, 0xK3FFF8000000000000000
br i1 %153, label %154, label %161
154: ; preds = %151
%155 = load x86_fp80, x86_fp80* %20
%156 = load x86_fp80, x86_fp80* %19
%157 = load x86_fp80, x86_fp80* %4
%158 = fsub x86_fp80 %157, 0xK3FFF8000000000000000
%159 = call x86_fp80 @pow(x86_fp80 %156, x86_fp80 %158)
%160 = fcmp ogt x86_fp80 %155, %159
br i1 %160, label %165, label %161
161: ; preds = %154, %151
%162 = load x86_fp80, x86_fp80* %19
%163 = load x86_fp80, x86_fp80* %5
%164 = fmul x86_fp80 %162, %163
store x86_fp80 %164, x86_fp80* %3
br label %166
165: ; preds = %154, %145
br label %113
166: ; preds = %161, %106, %88
%167 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %167
}

LLVM IR (-O2):
define x86_fp80 @gammavariate(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp ogt x86_fp80 %0, 0xK00000000000000000000
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = fcmp ogt x86_fp80 %1, 0xK00000000000000000000
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = fcmp ogt x86_fp80 %0, 0xK3FFF8000000000000000
br i1 %9, label %10, label %46
10: ; preds = %2
%11 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %0, x86_fp80 0xK40008000000000000000, x86_fp80 0xKBFFF8000000000000000)
%12 = fptrunc x86_fp80 %11 to double
%13 = tail call x86_fp80 @sqrt(double %12)
%14 = tail call x86_fp80 @log(x86_fp80 0xK40018000000000000000)
%15 = fsub x86_fp80 %0, %14
%16 = fadd x86_fp80 %13, %0
br label %17
17: ; preds = %45, %10
%18 = tail call double (...) @mt_genrand_real3()
%19 = fpext double %18 to x86_fp80
%20 = fcmp ogt double %18, 0x3E7AD7F29ABCAF48
%21 = fcmp olt double %18, 0x3FEFFFFFCA501ACB
%22 = or i1 %20, %21
br i1 %22, label %23, label %45
23: ; preds = %17
%24 = tail call double (...) @mt_genrand_real3()
%25 = fsub double 1.000000e+00, %24
%26 = fpext double %25 to x86_fp80
%27 = fsub x86_fp80 0xK3FFF8000000000000000, %19
%28 = fdiv x86_fp80 %19, %27
%29 = tail call x86_fp80 @log(x86_fp80 %28)
%30 = fdiv x86_fp80 %29, %13
%31 = tail call x86_fp80 @exp(x86_fp80 %30)
%32 = fmul x86_fp80 %31, %0
%33 = fmul x86_fp80 %19, %19
%34 = fmul x86_fp80 %33, %26
%35 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %16, x86_fp80 %30, x86_fp80 %15)
%36 = fsub x86_fp80 %35, %32
%37 = tail call x86_fp80 @log(x86_fp80 0xK40019000000000000000)
%38 = fadd x86_fp80 %37, 0xK3FFF8000000000000000
%39 = fadd x86_fp80 %36, %38
%40 = tail call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %34, x86_fp80 0xKC0019000000000000000, x86_fp80 %39)
%41 = fcmp ult x86_fp80 %40, 0xK00000000000000000000
br i1 %41, label %42, label %93
42: ; preds = %23
%43 = tail call x86_fp80 @log(x86_fp80 %34)
%44 = fcmp ult x86_fp80 %36, %43
br i1 %44, label %45, label %93
45: ; preds = %42, %17
br label %17
46: ; preds = %2
%47 = fcmp oeq x86_fp80 %0, 0xK3FFF8000000000000000
br i1 %47, label %51, label %48
48: ; preds = %46
%49 = fadd x86_fp80 %0, 0xKBFFF8000000000000000
%50 = fdiv x86_fp80 0xK3FFF8000000000000000, %0
br label %62
51: ; preds = %46
%52 = tail call double (...) @mt_genrand_real3()
%53 = fcmp ugt double %52, 0x3E7AD7F29ABCAF48
br i1 %53, label %57, label %54
54: ; preds = %51, %54
%55 = tail call double (...) @mt_genrand_real3()
%56 = fcmp ugt double %55, 0x3E7AD7F29ABCAF48
br i1 %56, label %57, label %54
57: ; preds = %54, %51
%58 = phi double [ %52, %51 ], [ %55, %54 ]
%59 = fpext double %58 to x86_fp80
%60 = tail call x86_fp80 @log(x86_fp80 %59)
%61 = fneg x86_fp80 %60
br label %93
62: ; preds = %85, %48
%63 = tail call double (...) @mt_genrand_real3()
%64 = fpext double %63 to x86_fp80
%65 = tail call x86_fp80 @exp(x86_fp80 0xK3FFF8000000000000000)
%66 = fadd x86_fp80 %65, %0
%67 = tail call x86_fp80 @exp(x86_fp80 0xK3FFF8000000000000000)
%68 = fdiv x86_fp80 %66, %67
%69 = fmul x86_fp80 %68, %64
%70 = fcmp ugt x86_fp80 %69, 0xK3FFF8000000000000000
br i1 %70, label %71, label %78
71: ; preds = %62
%72 = fsub x86_fp80 %68, %69
%73 = fdiv x86_fp80 %72, %0
%74 = tail call x86_fp80 @log(x86_fp80 %73)
%75 = fneg x86_fp80 %74
%76 = tail call double (...) @mt_genrand_real3()
%77 = fpext double %76 to x86_fp80
br label %86
78: ; preds = %62
%79 = tail call x86_fp80 @pow(x86_fp80 %69, x86_fp80 %50)
%80 = tail call double (...) @mt_genrand_real3()
%81 = fpext double %80 to x86_fp80
%82 = fneg x86_fp80 %79
%83 = tail call x86_fp80 @exp(x86_fp80 %82)
%84 = fcmp olt x86_fp80 %83, %81
br i1 %84, label %85, label %86
85: ; preds = %78, %90
br label %62
86: ; preds = %71, %78
%87 = phi x86_fp80 [ %81, %78 ], [ %77, %71 ]
%88 = phi x86_fp80 [ %79, %78 ], [ %75, %71 ]
%89 = fcmp ogt x86_fp80 %69, 0xK3FFF8000000000000000
br i1 %89, label %90, label %93
90: ; preds = %86
%91 = tail call x86_fp80 @pow(x86_fp80 %88, x86_fp80 %49)
%92 = fcmp olt x86_fp80 %91, %87
br i1 %92, label %85, label %93
93: ; preds = %90, %86, %23, %42, %57
%94 = phi x86_fp80 [ %61, %57 ], [ %32, %42 ], [ %32, %23 ], [ %88, %86 ], [ %88, %90 ]
%95 = fmul x86_fp80 %94, %1
ret x86_fp80 %95
}