#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 algdiv(double *, double *);
double alnrel(double *);
double bcorr(double *, double *);
double fifdmax1(double, double);
double fifdmin1(double, double);
double gamln(double *);
double gsumln(double *, double *);
double log(double);
double betaln(double *a0, double *b0) {
  static double e = .918938533204673e0;
  static double betaln, a, b, c, h, u, v, w, z;
  static int i, n;
  static double T1;
  a = fifdmin1(*a0, *b0);
  b = fifdmax1(*a0, *b0);
  if (a >= 8.0e0)
    goto S100;
  if (a >= 1.0e0)
    goto S20;
  if (b >= 8.0e0)
    goto S10;
  T1 = a + b;
  betaln = gamln(&a) + (gamln(&b) - gamln(&T1));
  return betaln;
S10:
  betaln = gamln(&a) + algdiv(&a, &b);
  return betaln;
S20:
  if (a > 2.0e0)
    goto S40;
  if (b > 2.0e0)
    goto S30;
  betaln = gamln(&a) + gamln(&b) - gsumln(&a, &b);
  return betaln;
S30:
  w = 0.0e0;
  if (b < 8.0e0)
    goto S60;
  betaln = gamln(&a) + algdiv(&a, &b);
  return betaln;
S40:
  if (b > 1000.0e0)
    goto S80;
  n = (long)(a - 1.0e0);
  w = 1.0e0;
  for (i = 1; i <= n; i++) {
    a -= 1.0e0;
    h = a / b;
    w *= (h / (1.0e0 + h));
  }
  w = log(w);
  if (b < 8.0e0)
    goto S60;
  betaln = w + gamln(&a) + algdiv(&a, &b);
  return betaln;
S60:
  n = (long)(b - 1.0e0);
  z = 1.0e0;
  for (i = 1; i <= n; i++) {
    b -= 1.0e0;
    z *= (b / (a + b));
  }
  betaln = w + log(z) + (gamln(&a) + (gamln(&b) - gsumln(&a, &b)));
  return betaln;
S80:
  n = (long)(a - 1.0e0);
  w = 1.0e0;
  for (i = 1; i <= n; i++) {
    a -= 1.0e0;
    w *= (a / (1.0e0 + a / b));
  }
  betaln = log(w) - (double)n * log(b) + (gamln(&a) + algdiv(&a, &b));
  return betaln;
S100:
  w = bcorr(&a, &b);
  h = a / b;
  c = h / (1.0e0 + h);
  u = -((a - 0.5e0) * log(c));
  v = b * alnrel(&h);
  if (u <= v)
    goto S110;
  betaln = -(0.5e0 * log(b)) + e + w - v - u;
  return betaln;
S110:
  betaln = -(0.5e0 * log(b)) + e + w - u - v;
  return betaln;
}


x86 assembly (clang, -O0):
<betaln>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
call   1070 <fifdmin1@plt>
movsd  %xmm0,0x2ec8(%rip)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
call   1060 <fifdmax1@plt>
movsd  %xmm0,0x2eb3(%rip)
movsd  0x2ea3(%rip),%xmm0
movsd  0xe23(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11ec <betaln+0x6c>
jmp    1823 <betaln+0x6a3>
movsd  0x2e84(%rip),%xmm0
movsd  0xe0c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     120b <betaln+0x8b>
jmp    12e9 <betaln+0x169>
movsd  0x2e6d(%rip),%xmm0
movsd  0xde5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     122a <betaln+0xaa>
jmp    129f <betaln+0x11f>
movsd  0x2e46(%rip),%xmm0
addsd  0x2e46(%rip),%xmm0
movsd  %xmm0,0x2e7e(%rip)
lea    0x2e2f(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x20(%rbp)
lea    0x2e26(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x28(%rbp)
lea    0x2e55(%rip),%rdi
call   1040 <gamln@plt>
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
subsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2de3(%rip)
movsd  0x2ddb(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
lea    0x2dd2(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x30(%rbp)
lea    0x2dc1(%rip),%rdi
lea    0x2dc2(%rip),%rsi
call   1080 <algdiv@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2d99(%rip)
movsd  0x2d91(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
movsd  0x2d87(%rip),%xmm0
movsd  0xd17(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1308 <betaln+0x188>
jmp    13fe <betaln+0x27e>
movsd  0x2d70(%rip),%xmm0
movsd  0xcf8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1327 <betaln+0x1a7>
jmp    138e <betaln+0x20e>
lea    0x2d4a(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x40(%rbp)
lea    0x2d41(%rip),%rdi
call   1040 <gamln@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    0x2d1c(%rip),%rdi
lea    0x2d1d(%rip),%rsi
call   1050 <gsumln@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2cf4(%rip)
movsd  0x2cec(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
xorps  %xmm0,%xmm0
movsd  %xmm0,0x2d0f(%rip)
movsd  0xc5f(%rip),%xmm0
ucomisd 0x2cd7(%rip),%xmm0
jbe    13b4 <betaln+0x234>
jmp    156f <betaln+0x3ef>
lea    0x2cbd(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x48(%rbp)
lea    0x2cac(%rip),%rdi
lea    0x2cad(%rip),%rsi
call   1080 <algdiv@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2c84(%rip)
movsd  0x2c7c(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
movsd  0x2c7a(%rip),%xmm0
movsd  0xc0a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    141d <betaln+0x29d>
jmp    16ae <betaln+0x52e>
movsd  0x2c53(%rip),%xmm0
movsd  0xbdb(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,0x2c80(%rip)
movsd  0xbc4(%rip),%xmm0
movsd  %xmm0,0x2c5c(%rip)
movl   $0x1,0x2c62(%rip)
mov    0x2c5c(%rip),%eax
cmp    0x2c5a(%rip),%eax
jg     14dc <betaln+0x35c>
movsd  0x2c08(%rip),%xmm0
movsd  0xb90(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2bf4(%rip)
movsd  0x2bec(%rip),%xmm0
divsd  0x2bec(%rip),%xmm0
movsd  %xmm0,0x2bf4(%rip)
movsd  0x2bec(%rip),%xmm0
movsd  0xb5c(%rip),%xmm1
addsd  0x2bdc(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x2be8(%rip),%xmm0
movsd  %xmm0,0x2be0(%rip)
mov    0x2bea(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2be1(%rip)
jmp    1456 <betaln+0x2d6>
movsd  0x2bc4(%rip),%xmm0
call   1090 <log@plt>
movsd  %xmm0,0x2bb7(%rip)
movsd  0xb07(%rip),%xmm0
ucomisd 0x2b7f(%rip),%xmm0
jbe    150c <betaln+0x38c>
jmp    156f <betaln+0x3ef>
movsd  0x2b94(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
lea    0x2b58(%rip),%rdi
call   1040 <gamln@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
lea    0x2b3b(%rip),%rdi
lea    0x2b3c(%rip),%rsi
call   1080 <algdiv@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2b13(%rip)
movsd  0x2b0b(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
movsd  0x2b09(%rip),%xmm0
movsd  0xa89(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,0x2b2e(%rip)
movsd  0xa72(%rip),%xmm0
movsd  %xmm0,0x2b12(%rip)
movl   $0x1,0x2b10(%rip)
mov    0x2b0a(%rip),%eax
cmp    0x2b08(%rip),%eax
jg     1616 <betaln+0x496>
movsd  0x2abe(%rip),%xmm0
movsd  0xa3e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2aaa(%rip)
movsd  0x2aa2(%rip),%xmm0
movsd  0x2a92(%rip),%xmm1
addsd  0x2a92(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x2ab6(%rip),%xmm0
movsd  %xmm0,0x2aae(%rip)
mov    0x2ab0(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2aa7(%rip)
jmp    15a8 <betaln+0x428>
movsd  0x2a8a(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0x2a85(%rip),%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
lea    0x2a30(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x68(%rbp)
lea    0x2a27(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x70(%rbp)
lea    0x2a0e(%rip),%rdi
lea    0x2a0f(%rip),%rsi
call   1050 <gsumln@plt>
movsd  -0x70(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x60(%rbp),%xmm0
subsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x29d4(%rip)
movsd  0x29cc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
movsd  0x29c2(%rip),%xmm0
movsd  0x94a(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,0x29ef(%rip)
movsd  0x933(%rip),%xmm0
movsd  %xmm0,0x29cb(%rip)
movl   $0x1,0x29d1(%rip)
mov    0x29cb(%rip),%eax
cmp    0x29c9(%rip),%eax
jg     1761 <betaln+0x5e1>
movsd  0x2977(%rip),%xmm0
movsd  0x8ff(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2963(%rip)
movsd  0x295b(%rip),%xmm0
movsd  0x2953(%rip),%xmm2
divsd  0x2953(%rip),%xmm2
movsd  0x8d3(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mulsd  0x2963(%rip),%xmm0
movsd  %xmm0,0x295b(%rip)
mov    0x2965(%rip),%eax
add    $0x1,%eax
mov    %eax,0x295c(%rip)
jmp    16e7 <betaln+0x567>
movsd  0x293f(%rip),%xmm0
call   1090 <log@plt>
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdl 0x293e(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x28f2(%rip),%xmm0
call   1090 <log@plt>
movsd  -0x98(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
lea    0x28a7(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x88(%rbp)
ff
lea    0x2893(%rip),%rdi
lea    0x2894(%rip),%rsi
call   1080 <algdiv@plt>
movsd  -0x88(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x285f(%rip)
movsd  0x2857(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
lea    0x284e(%rip),%rdi
lea    0x284f(%rip),%rsi
call   10a0 <bcorr@plt>
movsd  %xmm0,0x286a(%rip)
movsd  0x2832(%rip),%xmm0
divsd  0x2832(%rip),%xmm0
movsd  %xmm0,0x283a(%rip)
movsd  0x2832(%rip),%xmm0
movsd  0x7a2(%rip),%xmm1
addsd  0x2822(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x280e(%rip)
movsd  0x27f6(%rip),%xmm0
movsd  0x796(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0x27ea(%rip),%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,0x27c7(%rip)
movsd  0x27a7(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
lea    0x27a8(%rip),%rdi
call   1030 <alnrel@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x279c(%rip)
movsd  0x278c(%rip),%xmm1
movsd  0x278c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1923 <betaln+0x7a3>
jmp    1990 <betaln+0x810>
movsd  0x2755(%rip),%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm1
movsd  0x6e5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  0x2702(%rip),%xmm0
addsd  0x2742(%rip),%xmm0
subsd  0x2732(%rip),%xmm0
subsd  0x2722(%rip),%xmm0
movsd  %xmm0,0x26f2(%rip)
movsd  0x26ea(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f8 <betaln+0x878>
movsd  0x26e8(%rip),%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm1
movsd  0x678(%rip),%xmm0
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  0x2695(%rip),%xmm0
addsd  0x26d5(%rip),%xmm0
subsd  0x26bd(%rip),%xmm0
subsd  0x26bd(%rip),%xmm0
movsd  %xmm0,0x2685(%rip)
movsd  0x267d(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<betaln>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
call   1070 <fifdmin1@plt>
movsd  %xmm0,0x2ec6(%rip)
movsd  (%rbx),%xmm0
movsd  (%r14),%xmm1
call   1060 <fifdmax1@plt>
movsd  %xmm0,0x2eb8(%rip)
movsd  0x2ea8(%rip),%xmm2
ucomisd 0xe38(%rip),%xmm2
jae    1238 <betaln+0xb8>
ucomisd 0xe36(%rip),%xmm2
jae    1337 <betaln+0x1b7>
ucomisd 0xe20(%rip),%xmm0
jae    13d6 <betaln+0x256>
addsd  %xmm2,%xmm0
movsd  %xmm0,0x2eae(%rip)
lea    0x2ea7(%rip),%rbx
lea    0x2e68(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x8(%rsp)
lea    0x2e5e(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
call   1040 <gamln@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    17ab <betaln+0x62b>
lea    0x2e29(%rip),%rdi
lea    0x2e2a(%rip),%rsi
call   10a0 <bcorr@plt>
movsd  0x2e15(%rip),%xmm2
movapd %xmm2,%xmm1
divsd  0x2e11(%rip),%xmm1
movsd  %xmm0,0x2e29(%rip)
movsd  %xmm1,0x2e09(%rip)
lea    0x2e02(%rip),%rbx
movsd  0xd8a(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
addsd  0xd82(%rip),%xmm2
movapd %xmm2,0x10(%rsp)
movapd %xmm1,%xmm0
call   1090 <log@plt>
movapd 0x10(%rsp),%xmm1
xorpd  0xd95(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x2dc9(%rip)
movsd  0x2db1(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %rbx,%rdi
call   1030 <alnrel@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm0,0x2da7(%rip)
movsd  0x2d97(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x2d79(%rip),%xmm0
call   1090 <log@plt>
movsd  0x10(%rsp),%xmm1
ucomisd 0x8(%rsp),%xmm1
mulsd  0xd00(%rip),%xmm0
addsd  0xd00(%rip),%xmm0
addsd  0x2d70(%rip),%xmm0
jae    1395 <betaln+0x215>
subsd  0x2d5e(%rip),%xmm0
subsd  0x2d4e(%rip),%xmm0
jmp    17b1 <betaln+0x631>
ucomisd 0xce1(%rip),%xmm2
jbe    13aa <betaln+0x22a>
ucomisd 0xcdf(%rip),%xmm0
movsd  0xcdf(%rip),%xmm1
addsd  %xmm2,%xmm1
cvttsd2si %xmm1,%rax
mov    %eax,0x2d38(%rip)
jbe    1405 <betaln+0x285>
movabs $0x3ff0000000000000,%rcx
mov    %rcx,0x2d19(%rip)
test   %eax,%eax
jle    146d <betaln+0x2ed>
cmp    $0x1,%eax
jne    1487 <betaln+0x307>
movsd  0xc78(%rip),%xmm1
jmp    14dd <betaln+0x35d>
subsd  0x2ce3(%rip),%xmm0
subsd  0x2ce3(%rip),%xmm0
jmp    17b1 <betaln+0x631>
ucomisd 0xc6e(%rip),%xmm0
jbe    141f <betaln+0x29f>
movq   $0x0,0x2cd1(%rip)
movsd  0xc39(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    13d6 <betaln+0x256>
xorpd  %xmm2,%xmm2
jmp    1658 <betaln+0x4d8>
lea    0x2c8b(%rip),%rbx
mov    %rbx,%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x10(%rsp)
lea    0x2c7e(%rip),%rsi
mov    %rbx,%rdi
call   1080 <algdiv@plt>
addsd  0x10(%rsp),%xmm0
jmp    17b1 <betaln+0x631>
test   %eax,%eax
jle    147a <betaln+0x2fa>
cmp    $0x1,%eax
jne    1590 <betaln+0x410>
movsd  0xbee(%rip),%xmm1
jmp    15f1 <betaln+0x471>
lea    0x2c42(%rip),%r14
mov    %r14,%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x10(%rsp)
lea    0x2c35(%rip),%rbx
mov    %rbx,%rdi
call   1040 <gamln@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <gsumln@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
jmp    17b1 <betaln+0x631>
movsd  0xb93(%rip),%xmm1
jmp    1515 <betaln+0x395>
movsd  0xb86(%rip),%xmm1
jmp    162d <betaln+0x4ad>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0xb74(%rip),%xmm3
movsd  0xb94(%rip),%xmm4
movapd %xmm3,%xmm1
addsd  %xmm4,%xmm2
movapd %xmm2,%xmm5
divsd  %xmm0,%xmm5
addsd  %xmm3,%xmm5
movapd %xmm2,%xmm6
divsd  %xmm5,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm4,%xmm2
movapd %xmm2,%xmm5
divsd  %xmm0,%xmm5
addsd  %xmm3,%xmm5
movapd %xmm2,%xmm1
divsd  %xmm5,%xmm1
mulsd  %xmm6,%xmm1
add    $0xfffffffe,%ecx
jne    14a0 <betaln+0x320>
test   $0x1,%al
je     1505 <betaln+0x385>
addsd  0xb47(%rip),%xmm2
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
addsd  0xb0f(%rip),%xmm3
movapd %xmm2,%xmm0
divsd  %xmm3,%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm2,0x2b5b(%rip)
movsd  %xmm1,0x2b7b(%rip)
movapd %xmm1,%xmm0
call   1090 <log@plt>
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x2b69(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x2b34(%rip),%r14
movsd  0x2b2c(%rip),%xmm0
call   1090 <log@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    0x2b02(%rip),%rbx
mov    %rbx,%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <algdiv@plt>
addsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
jmp    17b1 <betaln+0x631>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0xa6b(%rip),%xmm4
movsd  0xa8b(%rip),%xmm5
movapd %xmm4,%xmm1
nopl   0x0(%rax)
addsd  %xmm5,%xmm2
movapd %xmm2,%xmm6
divsd  %xmm0,%xmm6
movapd %xmm6,%xmm3
addsd  %xmm4,%xmm3
divsd  %xmm3,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm5,%xmm2
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
movapd %xmm3,%xmm7
addsd  %xmm4,%xmm7
movapd %xmm3,%xmm1
divsd  %xmm7,%xmm1
mulsd  %xmm6,%xmm1
add    $0xfffffffe,%ecx
jne    15b0 <betaln+0x430>
test   $0x1,%al
je     161d <betaln+0x49d>
addsd  0xa33(%rip),%xmm2
movapd %xmm2,%xmm3
divsd  %xmm0,%xmm3
movsd  0x9fb(%rip),%xmm0
addsd  %xmm3,%xmm0
movapd %xmm3,%xmm4
divsd  %xmm0,%xmm4
mulsd  %xmm4,%xmm1
movsd  %xmm2,0x2a43(%rip)
movsd  %xmm3,0x2a4b(%rip)
movapd %xmm1,%xmm0
call   1090 <log@plt>
movapd %xmm0,%xmm2
movsd  %xmm0,0x2a4e(%rip)
movsd  0x2a26(%rip),%xmm0
movsd  0x9ae(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    1693 <betaln+0x513>
movsd  0x9d0(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %eax,0x2a29(%rip)
test   %eax,%eax
movsd  %xmm2,0x8(%rsp)
jle    16cc <betaln+0x54c>
movsd  0x29e7(%rip),%xmm2
cmp    $0x1,%eax
jne    16d6 <betaln+0x556>
movsd  0x97a(%rip),%xmm1
jmp    1725 <betaln+0x5a5>
lea    0x29ce(%rip),%rbx
mov    %rbx,%rdi
movsd  %xmm2,0x8(%rsp)
call   1040 <gamln@plt>
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0x29b1(%rip),%rsi
mov    %rbx,%rdi
call   1080 <algdiv@plt>
jmp    17ab <betaln+0x62b>
movsd  0x934(%rip),%xmm1
jmp    1749 <betaln+0x5c9>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0x925(%rip),%xmm1
movsd  0x945(%rip),%xmm3
nopl   0x0(%rax,%rax,1)
addsd  %xmm3,%xmm0
movapd %xmm0,%xmm4
addsd  %xmm2,%xmm4
movapd %xmm0,%xmm5
divsd  %xmm4,%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm3,%xmm0
movapd %xmm0,%xmm4
addsd  %xmm2,%xmm4
movapd %xmm0,%xmm1
divsd  %xmm4,%xmm1
mulsd  %xmm5,%xmm1
add    $0xfffffffe,%ecx
jne    16f0 <betaln+0x570>
test   $0x1,%al
je     1741 <betaln+0x5c1>
addsd  0x8ff(%rip),%xmm0
addsd  %xmm0,%xmm2
movapd %xmm0,%xmm3
divsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm1
movsd  %xmm0,0x2927(%rip)
movapd %xmm1,%xmm0
call   1090 <log@plt>
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0x28ff(%rip),%r14
mov    %r14,%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x20(%rsp)
lea    0x28f2(%rip),%rbx
mov    %rbx,%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x10(%rsp)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <gsumln@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addsd  0x20(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@betaln.e = internal global double 0x3FED67F1C864BEB7
@betaln.betaln = internal global double 0.000000e+00
@betaln.a = internal global double 0.000000e+00
@betaln.b = internal global double 0.000000e+00
@betaln.c = internal global double 0.000000e+00
@betaln.h = internal global double 0.000000e+00
@betaln.u = internal global double 0.000000e+00
@betaln.v = internal global double 0.000000e+00
@betaln.w = internal global double 0.000000e+00
@betaln.z = internal global double 0.000000e+00
@betaln.i = internal global i32 0
@betaln.n = internal global i32 0
@betaln.T1 = internal global double 0.000000e+00
define double @betaln(double* %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = load double*, double** %5
%9 = load double, double* %8
%10 = call double @fifdmin1(double %7, double %9)
store double %10, double* @betaln.a
%11 = load double*, double** %4
%12 = load double, double* %11
%13 = load double*, double** %5
%14 = load double, double* %13
%15 = call double @fifdmax1(double %12, double %14)
store double %15, double* @betaln.b
%16 = load double, double* @betaln.a
%17 = fcmp oge double %16, 8.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %2
br label %178
19: ; preds = %2
%20 = load double, double* @betaln.a
%21 = fcmp oge double %20, 1.000000e+00
br i1 %21, label %22, label %23
22: ; preds = %19
br label %42
23: ; preds = %19
%24 = load double, double* @betaln.b
%25 = fcmp oge double %24, 8.000000e+00
br i1 %25, label %26, label %27
26: ; preds = %23
br label %37
27: ; preds = %23
%28 = load double, double* @betaln.a
%29 = load double, double* @betaln.b
%30 = fadd double %28, %29
store double %30, double* @betaln.T1
%31 = call double @gamln(double* @betaln.a)
%32 = call double @gamln(double* @betaln.b)
%33 = call double @gamln(double* @betaln.T1)
%34 = fsub double %32, %33
%35 = fadd double %31, %34
store double %35, double* @betaln.betaln
%36 = load double, double* @betaln.betaln
store double %36, double* %3
br label %228
37: ; preds = %26
%38 = call double @gamln(double* @betaln.a)
%39 = call double @algdiv(double* @betaln.a, double* @betaln.b)
%40 = fadd double %38, %39
store double %40, double* @betaln.betaln
%41 = load double, double* @betaln.betaln
store double %41, double* %3
br label %228
42: ; preds = %22
%43 = load double, double* @betaln.a
%44 = fcmp ogt double %43, 2.000000e+00
br i1 %44, label %45, label %46
45: ; preds = %42
br label %66
46: ; preds = %42
%47 = load double, double* @betaln.b
%48 = fcmp ogt double %47, 2.000000e+00
br i1 %48, label %49, label %50
49: ; preds = %46
br label %57
50: ; preds = %46
%51 = call double @gamln(double* @betaln.a)
%52 = call double @gamln(double* @betaln.b)
%53 = fadd double %51, %52
%54 = call double @gsumln(double* @betaln.a, double* @betaln.b)
%55 = fsub double %53, %54
store double %55, double* @betaln.betaln
%56 = load double, double* @betaln.betaln
store double %56, double* %3
br label %228
57: ; preds = %49
store double 0.000000e+00, double* @betaln.w
%58 = load double, double* @betaln.b
%59 = fcmp olt double %58, 8.000000e+00
br i1 %59, label %60, label %61
60: ; preds = %57
br label %107
61: ; preds = %57
%62 = call double @gamln(double* @betaln.a)
%63 = call double @algdiv(double* @betaln.a, double* @betaln.b)
%64 = fadd double %62, %63
store double %64, double* @betaln.betaln
%65 = load double, double* @betaln.betaln
store double %65, double* %3
br label %228
66: ; preds = %45
%67 = load double, double* @betaln.b
%68 = fcmp ogt double %67, 1.000000e+03
br i1 %68, label %69, label %70
69: ; preds = %66
br label %141
70: ; preds = %66
%71 = load double, double* @betaln.a
%72 = fsub double %71, 1.000000e+00
%73 = fptosi double %72 to i64
%74 = trunc i64 %73 to i32
store i32 %74, i32* @betaln.n
store double 1.000000e+00, double* @betaln.w
store i32 1, i32* @betaln.i
br label %75
75: ; preds = %91, %70
%76 = load i32, i32* @betaln.i
%77 = load i32, i32* @betaln.n
%78 = icmp sle i32 %76, %77
br i1 %78, label %79, label %94
79: ; preds = %75
%80 = load double, double* @betaln.a
%81 = fsub double %80, 1.000000e+00
store double %81, double* @betaln.a
%82 = load double, double* @betaln.a
%83 = load double, double* @betaln.b
%84 = fdiv double %82, %83
store double %84, double* @betaln.h
%85 = load double, double* @betaln.h
%86 = load double, double* @betaln.h
%87 = fadd double 1.000000e+00, %86
%88 = fdiv double %85, %87
%89 = load double, double* @betaln.w
%90 = fmul double %89, %88
store double %90, double* @betaln.w
br label %91
91: ; preds = %79
%92 = load i32, i32* @betaln.i
%93 = add nsw i32 %92, 1
store i32 %93, i32* @betaln.i
br label %75
94: ; preds = %75
%95 = load double, double* @betaln.w
%96 = call double @log(double %95)
store double %96, double* @betaln.w
%97 = load double, double* @betaln.b
%98 = fcmp olt double %97, 8.000000e+00
br i1 %98, label %99, label %100
99: ; preds = %94
br label %107
100: ; preds = %94
%101 = load double, double* @betaln.w
%102 = call double @gamln(double* @betaln.a)
%103 = fadd double %101, %102
%104 = call double @algdiv(double* @betaln.a, double* @betaln.b)
%105 = fadd double %103, %104
store double %105, double* @betaln.betaln
%106 = load double, double* @betaln.betaln
store double %106, double* %3
br label %228
107: ; preds = %99, %60
%108 = load double, double* @betaln.b
%109 = fsub double %108, 1.000000e+00
%110 = fptosi double %109 to i64
%111 = trunc i64 %110 to i32
store i32 %111, i32* @betaln.n
store double 1.000000e+00, double* @betaln.z
store i32 1, i32* @betaln.i
br label %112
112: ; preds = %126, %107
%113 = load i32, i32* @betaln.i
%114 = load i32, i32* @betaln.n
%115 = icmp sle i32 %113, %114
br i1 %115, label %116, label %129
116: ; preds = %112
%117 = load double, double* @betaln.b
%118 = fsub double %117, 1.000000e+00
store double %118, double* @betaln.b
%119 = load double, double* @betaln.b
%120 = load double, double* @betaln.a
%121 = load double, double* @betaln.b
%122 = fadd double %120, %121
%123 = fdiv double %119, %122
%124 = load double, double* @betaln.z
%125 = fmul double %124, %123
store double %125, double* @betaln.z
br label %126
126: ; preds = %116
%127 = load i32, i32* @betaln.i
%128 = add nsw i32 %127, 1
store i32 %128, i32* @betaln.i
br label %112
129: ; preds = %112
%130 = load double, double* @betaln.w
%131 = load double, double* @betaln.z
%132 = call double @log(double %131)
%133 = fadd double %130, %132
%134 = call double @gamln(double* @betaln.a)
%135 = call double @gamln(double* @betaln.b)
%136 = call double @gsumln(double* @betaln.a, double* @betaln.b)
%137 = fsub double %135, %136
%138 = fadd double %134, %137
%139 = fadd double %133, %138
store double %139, double* @betaln.betaln
%140 = load double, double* @betaln.betaln
store double %140, double* %3
br label %228
141: ; preds = %69
%142 = load double, double* @betaln.a
%143 = fsub double %142, 1.000000e+00
%144 = fptosi double %143 to i64
%145 = trunc i64 %144 to i32
store i32 %145, i32* @betaln.n
store double 1.000000e+00, double* @betaln.w
store i32 1, i32* @betaln.i
br label %146
146: ; preds = %161, %141
%147 = load i32, i32* @betaln.i
%148 = load i32, i32* @betaln.n
%149 = icmp sle i32 %147, %148
br i1 %149, label %150, label %164
150: ; preds = %146
%151 = load double, double* @betaln.a
%152 = fsub double %151, 1.000000e+00
store double %152, double* @betaln.a
%153 = load double, double* @betaln.a
%154 = load double, double* @betaln.a
%155 = load double, double* @betaln.b
%156 = fdiv double %154, %155
%157 = fadd double 1.000000e+00, %156
%158 = fdiv double %153, %157
%159 = load double, double* @betaln.w
%160 = fmul double %159, %158
store double %160, double* @betaln.w
br label %161
161: ; preds = %150
%162 = load i32, i32* @betaln.i
%163 = add nsw i32 %162, 1
store i32 %163, i32* @betaln.i
br label %146
164: ; preds = %146
%165 = load double, double* @betaln.w
%166 = call double @log(double %165)
%167 = load i32, i32* @betaln.n
%168 = sitofp i32 %167 to double
%169 = load double, double* @betaln.b
%170 = call double @log(double %169)
%171 = fneg double %168
%172 = call double @llvm.fmuladd.f64(double %171, double %170, double %166)
%173 = call double @gamln(double* @betaln.a)
%174 = call double @algdiv(double* @betaln.a, double* @betaln.b)
%175 = fadd double %173, %174
%176 = fadd double %172, %175
store double %176, double* @betaln.betaln
%177 = load double, double* @betaln.betaln
store double %177, double* %3
br label %228
178: ; preds = %18
%179 = call double @bcorr(double* @betaln.a, double* @betaln.b)
store double %179, double* @betaln.w
%180 = load double, double* @betaln.a
%181 = load double, double* @betaln.b
%182 = fdiv double %180, %181
store double %182, double* @betaln.h
%183 = load double, double* @betaln.h
%184 = load double, double* @betaln.h
%185 = fadd double 1.000000e+00, %184
%186 = fdiv double %183, %185
store double %186, double* @betaln.c
%187 = load double, double* @betaln.a
%188 = fsub double %187, 5.000000e-01
%189 = load double, double* @betaln.c
%190 = call double @log(double %189)
%191 = fmul double %188, %190
%192 = fneg double %191
store double %192, double* @betaln.u
%193 = load double, double* @betaln.b
%194 = call double @alnrel(double* @betaln.h)
%195 = fmul double %193, %194
store double %195, double* @betaln.v
%196 = load double, double* @betaln.u
%197 = load double, double* @betaln.v
%198 = fcmp ole double %196, %197
br i1 %198, label %199, label %200
199: ; preds = %178
br label %214
200: ; preds = %178
%201 = load double, double* @betaln.b
%202 = call double @log(double %201)
%203 = fmul double 5.000000e-01, %202
%204 = fneg double %203
%205 = load double, double* @betaln.e
%206 = fadd double %204, %205
%207 = load double, double* @betaln.w
%208 = fadd double %206, %207
%209 = load double, double* @betaln.v
%210 = fsub double %208, %209
%211 = load double, double* @betaln.u
%212 = fsub double %210, %211
store double %212, double* @betaln.betaln
%213 = load double, double* @betaln.betaln
store double %213, double* %3
br label %228
214: ; preds = %199
%215 = load double, double* @betaln.b
%216 = call double @log(double %215)
%217 = fmul double 5.000000e-01, %216
%218 = fneg double %217
%219 = load double, double* @betaln.e
%220 = fadd double %218, %219
%221 = load double, double* @betaln.w
%222 = fadd double %220, %221
%223 = load double, double* @betaln.u
%224 = fsub double %222, %223
%225 = load double, double* @betaln.v
%226 = fsub double %224, %225
store double %226, double* @betaln.betaln
%227 = load double, double* @betaln.betaln
store double %227, double* %3
br label %228
228: ; preds = %214, %200, %164, %129, %100, %61, %50, %37, %27
%229 = load double, double* %3
ret double %229
}

LLVM IR (-O2):
@betaln.a = internal global double 0.000000e+00
@betaln.b = internal global double 0.000000e+00
@betaln.h = internal global double 0.000000e+00
@betaln.u = internal unnamed_addr global double 0.000000e+00
@betaln.v = internal unnamed_addr global double 0.000000e+00
@betaln.w = internal unnamed_addr global double 0.000000e+00
@betaln.n = internal unnamed_addr global i32 0
@betaln.T1 = internal global double 0.000000e+00
define double @betaln(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call double @fifdmin1(double %3, double %4)
store double %5, double* @betaln.a
%6 = load double, double* %0
%7 = load double, double* %1
%8 = tail call double @fifdmax1(double %6, double %7)
store double %8, double* @betaln.b
%9 = load double, double* @betaln.a
%10 = fcmp ult double %9, 8.000000e+00
br i1 %10, label %11, label %199
11: ; preds = %2
%12 = fcmp ult double %9, 1.000000e+00
br i1 %12, label %13, label %26
13: ; preds = %11
%14 = fcmp ult double %8, 8.000000e+00
br i1 %14, label %15, label %22
15: ; preds = %13
%16 = fadd double %8, %9
store double %16, double* @betaln.T1
%17 = tail call double @gamln(double* @betaln.a)
%18 = tail call double @gamln(double* @betaln.b)
%19 = tail call double @gamln(double* @betaln.T1)
%20 = fsub double %18, %19
%21 = fadd double %17, %20
br label %231
22: ; preds = %13
%23 = tail call double @gamln(double* @betaln.a)
%24 = tail call double @algdiv(double* @betaln.a, double* @betaln.b)
%25 = fadd double %23, %24
br label %231
26: ; preds = %11
%27 = fcmp ogt double %9, 2.000000e+00
br i1 %27, label %42, label %28
28: ; preds = %26
%29 = fcmp ogt double %8, 2.000000e+00
br i1 %29, label %36, label %30
30: ; preds = %28
%31 = tail call double @gamln(double* @betaln.a)
%32 = tail call double @gamln(double* @betaln.b)
%33 = fadd double %31, %32
%34 = tail call double @gsumln(double* @betaln.a, double* @betaln.b)
%35 = fsub double %33, %34
br label %231
36: ; preds = %28
store double 0.000000e+00, double* @betaln.w
%37 = fcmp olt double %8, 8.000000e+00
br i1 %37, label %97, label %38
38: ; preds = %36
%39 = tail call double @gamln(double* @betaln.a)
%40 = tail call double @algdiv(double* @betaln.a, double* @betaln.b)
%41 = fadd double %39, %40
br label %231
42: ; preds = %26
%43 = fcmp ogt double %8, 1.000000e+03
%44 = fadd double %9, -1.000000e+00
%45 = fptosi double %44 to i64
%46 = trunc i64 %45 to i32
store i32 %46, i32* @betaln.n
br i1 %43, label %148, label %47
47: ; preds = %42
%48 = icmp slt i32 %46, 1
br i1 %48, label %87, label %49
49: ; preds = %47
%50 = and i32 %46, 1
%51 = icmp eq i32 %46, 1
br i1 %51, label %70, label %52
52: ; preds = %49
%53 = and i32 %46, -2
br label %54
54: ; preds = %54, %52
%55 = phi double [ %9, %52 ], [ %63, %54 ]
%56 = phi double [ 1.000000e+00, %52 ], [ %67, %54 ]
%57 = phi i32 [ 0, %52 ], [ %68, %54 ]
%58 = fadd double %55, -1.000000e+00
%59 = fdiv double %58, %8
%60 = fadd double %59, 1.000000e+00
%61 = fdiv double %59, %60
%62 = fmul double %56, %61
%63 = fadd double %58, -1.000000e+00
%64 = fdiv double %63, %8
%65 = fadd double %64, 1.000000e+00
%66 = fdiv double %64, %65
%67 = fmul double %62, %66
%68 = add i32 %57, 2
%69 = icmp eq i32 %68, %53
br i1 %69, label %70, label %54
70: ; preds = %54, %49
%71 = phi double [ undef, %49 ], [ %63, %54 ]
%72 = phi double [ undef, %49 ], [ %64, %54 ]
%73 = phi double [ undef, %49 ], [ %67, %54 ]
%74 = phi double [ %9, %49 ], [ %63, %54 ]
%75 = phi double [ 1.000000e+00, %49 ], [ %67, %54 ]
%76 = icmp eq i32 %50, 0
br i1 %76, label %83, label %77
77: ; preds = %70
%78 = fadd double %74, -1.000000e+00
%79 = fdiv double %78, %8
%80 = fadd double %79, 1.000000e+00
%81 = fdiv double %79, %80
%82 = fmul double %75, %81
br label %83
83: ; preds = %70, %77
%84 = phi double [ %71, %70 ], [ %78, %77 ]
%85 = phi double [ %72, %70 ], [ %79, %77 ]
%86 = phi double [ %73, %70 ], [ %82, %77 ]
store double %84, double* @betaln.a
store double %85, double* @betaln.h
br label %87
87: ; preds = %83, %47
%88 = phi double [ %86, %83 ], [ 1.000000e+00, %47 ]
%89 = tail call double @log(double %88)
store double %89, double* @betaln.w
%90 = load double, double* @betaln.b
%91 = fcmp olt double %90, 8.000000e+00
br i1 %91, label %97, label %92
92: ; preds = %87
%93 = tail call double @gamln(double* @betaln.a)
%94 = fadd double %89, %93
%95 = tail call double @algdiv(double* @betaln.a, double* @betaln.b)
%96 = fadd double %94, %95
br label %231
97: ; preds = %87, %36
%98 = phi double [ %89, %87 ], [ 0.000000e+00, %36 ]
%99 = phi double [ %90, %87 ], [ %8, %36 ]
%100 = fadd double %99, -1.000000e+00
%101 = fptosi double %100 to i64
%102 = trunc i64 %101 to i32
store i32 %102, i32* @betaln.n
%103 = icmp slt i32 %102, 1
br i1 %103, label %138, label %104
104: ; preds = %97
%105 = load double, double* @betaln.a
%106 = and i32 %102, 1
%107 = icmp eq i32 %102, 1
br i1 %107, label %124, label %108
108: ; preds = %104
%109 = and i32 %102, -2
br label %110
110: ; preds = %110, %108
%111 = phi double [ %99, %108 ], [ %118, %110 ]
%112 = phi double [ 1.000000e+00, %108 ], [ %121, %110 ]
%113 = phi i32 [ 0, %108 ], [ %122, %110 ]
%114 = fadd double %111, -1.000000e+00
%115 = fadd double %114, %105
%116 = fdiv double %114, %115
%117 = fmul double %112, %116
%118 = fadd double %114, -1.000000e+00
%119 = fadd double %118, %105
%120 = fdiv double %118, %119
%121 = fmul double %117, %120
%122 = add i32 %113, 2
%123 = icmp eq i32 %122, %109
br i1 %123, label %124, label %110
124: ; preds = %110, %104
%125 = phi double [ undef, %104 ], [ %118, %110 ]
%126 = phi double [ undef, %104 ], [ %121, %110 ]
%127 = phi double [ %99, %104 ], [ %118, %110 ]
%128 = phi double [ 1.000000e+00, %104 ], [ %121, %110 ]
%129 = icmp eq i32 %106, 0
br i1 %129, label %135, label %130
130: ; preds = %124
%131 = fadd double %127, -1.000000e+00
%132 = fadd double %131, %105
%133 = fdiv double %131, %132
%134 = fmul double %128, %133
br label %135
135: ; preds = %124, %130
%136 = phi double [ %125, %124 ], [ %131, %130 ]
%137 = phi double [ %126, %124 ], [ %134, %130 ]
store double %136, double* @betaln.b
br label %138
138: ; preds = %135, %97
%139 = phi double [ %137, %135 ], [ 1.000000e+00, %97 ]
%140 = tail call double @log(double %139)
%141 = fadd double %98, %140
%142 = tail call double @gamln(double* @betaln.a)
%143 = tail call double @gamln(double* @betaln.b)
%144 = tail call double @gsumln(double* @betaln.a, double* @betaln.b)
%145 = fsub double %143, %144
%146 = fadd double %142, %145
%147 = fadd double %141, %146
br label %231
148: ; preds = %42
store double 1.000000e+00, double* @betaln.w
%149 = icmp slt i32 %46, 1
br i1 %149, label %186, label %150
150: ; preds = %148
%151 = and i32 %46, 1
%152 = icmp eq i32 %46, 1
br i1 %152, label %171, label %153
153: ; preds = %150
%154 = and i32 %46, -2
br label %155
155: ; preds = %155, %153
%156 = phi double [ %9, %153 ], [ %164, %155 ]
%157 = phi double [ 1.000000e+00, %153 ], [ %168, %155 ]
%158 = phi i32 [ 0, %153 ], [ %169, %155 ]
%159 = fadd double %156, -1.000000e+00
%160 = fdiv double %159, %8
%161 = fadd double %160, 1.000000e+00
%162 = fdiv double %159, %161
%163 = fmul double %157, %162
%164 = fadd double %159, -1.000000e+00
%165 = fdiv double %164, %8
%166 = fadd double %165, 1.000000e+00
%167 = fdiv double %164, %166
%168 = fmul double %163, %167
%169 = add i32 %158, 2
%170 = icmp eq i32 %169, %154
br i1 %170, label %171, label %155
171: ; preds = %155, %150
%172 = phi double [ undef, %150 ], [ %164, %155 ]
%173 = phi double [ undef, %150 ], [ %168, %155 ]
%174 = phi double [ %9, %150 ], [ %164, %155 ]
%175 = phi double [ 1.000000e+00, %150 ], [ %168, %155 ]
%176 = icmp eq i32 %151, 0
br i1 %176, label %183, label %177
177: ; preds = %171
%178 = fadd double %174, -1.000000e+00
%179 = fdiv double %178, %8
%180 = fadd double %179, 1.000000e+00
%181 = fdiv double %178, %180
%182 = fmul double %175, %181
br label %183
183: ; preds = %171, %177
%184 = phi double [ %172, %171 ], [ %178, %177 ]
%185 = phi double [ %173, %171 ], [ %182, %177 ]
store double %184, double* @betaln.a
store double %185, double* @betaln.w
br label %186
186: ; preds = %183, %148
%187 = phi double [ %185, %183 ], [ 1.000000e+00, %148 ]
%188 = tail call double @log(double %187)
%189 = load i32, i32* @betaln.n
%190 = sitofp i32 %189 to double
%191 = load double, double* @betaln.b
%192 = tail call double @log(double %191)
%193 = fneg double %190
%194 = tail call double @llvm.fmuladd.f64(double %193, double %192, double %188)
%195 = tail call double @gamln(double* @betaln.a)
%196 = tail call double @algdiv(double* @betaln.a, double* @betaln.b)
%197 = fadd double %195, %196
%198 = fadd double %194, %197
br label %231
199: ; preds = %2
%200 = tail call double @bcorr(double* @betaln.a, double* @betaln.b)
store double %200, double* @betaln.w
%201 = load double, double* @betaln.a
%202 = load double, double* @betaln.b
%203 = fdiv double %201, %202
store double %203, double* @betaln.h
%204 = fadd double %203, 1.000000e+00
%205 = fdiv double %203, %204
%206 = fadd double %201, -5.000000e-01
%207 = tail call double @log(double %205)
%208 = fneg double %206
%209 = fmul double %207, %208
store double %209, double* @betaln.u
%210 = load double, double* @betaln.b
%211 = tail call double @alnrel(double* @betaln.h)
%212 = fmul double %210, %211
store double %212, double* @betaln.v
%213 = load double, double* @betaln.u
%214 = fcmp ugt double %213, %212
%215 = load double, double* @betaln.b
%216 = tail call double @log(double %215)
%217 = fmul double %216, 5.000000e-01
%218 = fsub double 0x3FED67F1C864BEB7, %217
%219 = load double, double* @betaln.w
%220 = fadd double %219, %218
br i1 %214, label %221, label %226
221: ; preds = %199
%222 = load double, double* @betaln.v
%223 = fsub double %220, %222
%224 = load double, double* @betaln.u
%225 = fsub double %223, %224
br label %231
226: ; preds = %199
%227 = load double, double* @betaln.u
%228 = fsub double %220, %227
%229 = load double, double* @betaln.v
%230 = fsub double %228, %229
br label %231
231: ; preds = %226, %221, %186, %138, %92, %38, %30, %22, %15
%232 = phi double [ %230, %226 ], [ %225, %221 ], [ %198, %186 ], [ %147, %138 ], [ %96, %92 ], [ %41, %38 ], [ %35, %30 ], [ %25, %22 ], [ %21, %15 ]
ret double %232
}