#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 = (int)(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 = (int)(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 = (int)(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    1820 <betaln+0x6a0>
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    19f5 <betaln+0x875>
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    19f5 <betaln+0x875>
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    19f5 <betaln+0x875>
xorps  %xmm0,%xmm0
movsd  %xmm0,0x2d0f(%rip)
movsd  0xc5f(%rip),%xmm0
ucomisd 0x2cd7(%rip),%xmm0
jbe    13b4 <betaln+0x234>
jmp    156e <betaln+0x3ee>
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    19f5 <betaln+0x875>
movsd  0x2c7a(%rip),%xmm0
movsd  0xc0a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    141d <betaln+0x29d>
jmp    16ac <betaln+0x52c>
movsd  0x2c53(%rip),%xmm0
movsd  0xbdb(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,0x2c81(%rip)
movsd  0xbc5(%rip),%xmm0
movsd  %xmm0,0x2c5d(%rip)
movl   $0x1,0x2c63(%rip)
mov    0x2c5d(%rip),%eax
cmp    0x2c5b(%rip),%eax
jg     14db <betaln+0x35b>
movsd  0x2c09(%rip),%xmm0
movsd  0xb91(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2bf5(%rip)
movsd  0x2bed(%rip),%xmm0
divsd  0x2bed(%rip),%xmm0
movsd  %xmm0,0x2bf5(%rip)
movsd  0x2bed(%rip),%xmm0
movsd  0xb5d(%rip),%xmm1
addsd  0x2bdd(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x2be9(%rip),%xmm0
movsd  %xmm0,0x2be1(%rip)
mov    0x2beb(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2be2(%rip)
jmp    1455 <betaln+0x2d5>
movsd  0x2bc5(%rip),%xmm0
call   1090 <log@plt>
movsd  %xmm0,0x2bb8(%rip)
movsd  0xb08(%rip),%xmm0
ucomisd 0x2b80(%rip),%xmm0
jbe    150b <betaln+0x38b>
jmp    156e <betaln+0x3ee>
movsd  0x2b95(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
lea    0x2b59(%rip),%rdi
call   1040 <gamln@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
lea    0x2b3c(%rip),%rdi
lea    0x2b3d(%rip),%rsi
call   1080 <algdiv@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2b14(%rip)
movsd  0x2b0c(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f5 <betaln+0x875>
movsd  0x2b0a(%rip),%xmm0
movsd  0xa8a(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,0x2b30(%rip)
movsd  0xa74(%rip),%xmm0
movsd  %xmm0,0x2b14(%rip)
movl   $0x1,0x2b12(%rip)
mov    0x2b0c(%rip),%eax
cmp    0x2b0a(%rip),%eax
jg     1614 <betaln+0x494>
movsd  0x2ac0(%rip),%xmm0
movsd  0xa40(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2aac(%rip)
movsd  0x2aa4(%rip),%xmm0
movsd  0x2a94(%rip),%xmm1
addsd  0x2a94(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  0x2ab8(%rip),%xmm0
movsd  %xmm0,0x2ab0(%rip)
mov    0x2ab2(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2aa9(%rip)
jmp    15a6 <betaln+0x426>
movsd  0x2a8c(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0x2a87(%rip),%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
lea    0x2a32(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x68(%rbp)
lea    0x2a29(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x70(%rbp)
lea    0x2a10(%rip),%rdi
lea    0x2a11(%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,0x29d6(%rip)
movsd  0x29ce(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f5 <betaln+0x875>
movsd  0x29c4(%rip),%xmm0
movsd  0x94c(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,0x29f2(%rip)
movsd  0x936(%rip),%xmm0
movsd  %xmm0,0x29ce(%rip)
movl   $0x1,0x29d4(%rip)
mov    0x29ce(%rip),%eax
cmp    0x29cc(%rip),%eax
jg     175e <betaln+0x5de>
movsd  0x297a(%rip),%xmm0
movsd  0x902(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x2966(%rip)
movsd  0x295e(%rip),%xmm0
movsd  0x2956(%rip),%xmm2
divsd  0x2956(%rip),%xmm2
movsd  0x8d6(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mulsd  0x2966(%rip),%xmm0
movsd  %xmm0,0x295e(%rip)
mov    0x2968(%rip),%eax
add    $0x1,%eax
mov    %eax,0x295f(%rip)
jmp    16e4 <betaln+0x564>
movsd  0x2942(%rip),%xmm0
call   1090 <log@plt>
movsd  %xmm0,-0x98(%rbp)
ff
cvtsi2sdl 0x2941(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0x28f5(%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    0x28aa(%rip),%rdi
call   1040 <gamln@plt>
movsd  %xmm0,-0x88(%rbp)
ff
lea    0x2896(%rip),%rdi
lea    0x2897(%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,0x2862(%rip)
movsd  0x285a(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f5 <betaln+0x875>
lea    0x2851(%rip),%rdi
lea    0x2852(%rip),%rsi
call   10a0 <bcorr@plt>
movsd  %xmm0,0x286d(%rip)
movsd  0x2835(%rip),%xmm0
divsd  0x2835(%rip),%xmm0
movsd  %xmm0,0x283d(%rip)
movsd  0x2835(%rip),%xmm0
movsd  0x7a5(%rip),%xmm1
addsd  0x2825(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x2811(%rip)
movsd  0x27f9(%rip),%xmm0
movsd  0x799(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0x27ed(%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,0x27ca(%rip)
movsd  0x27aa(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
lea    0x27ab(%rip),%rdi
call   1030 <alnrel@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x279f(%rip)
movsd  0x278f(%rip),%xmm1
movsd  0x278f(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1920 <betaln+0x7a0>
jmp    198d <betaln+0x80d>
movsd  0x2758(%rip),%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm1
movsd  0x6e8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  0x2705(%rip),%xmm0
addsd  0x2745(%rip),%xmm0
subsd  0x2735(%rip),%xmm0
subsd  0x2725(%rip),%xmm0
movsd  %xmm0,0x26f5(%rip)
movsd  0x26ed(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    19f5 <betaln+0x875>
movsd  0x26eb(%rip),%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm1
movsd  0x67b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  0x2698(%rip),%xmm0
addsd  0x26d8(%rip),%xmm0
subsd  0x26c0(%rip),%xmm0
subsd  0x26c0(%rip),%xmm0
movsd  %xmm0,0x2688(%rip)
movsd  0x2680(%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    13d5 <betaln+0x255>
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    1394 <betaln+0x214>
subsd  0x2d5e(%rip),%xmm0
subsd  0x2d4e(%rip),%xmm0
jmp    17b1 <betaln+0x631>
ucomisd 0xce1(%rip),%xmm2
jbe    13a9 <betaln+0x229>
ucomisd 0xcdf(%rip),%xmm0
movsd  0xcdf(%rip),%xmm1
addsd  %xmm2,%xmm1
cvttsd2si %xmm1,%eax
mov    %eax,0x2d39(%rip)
jbe    1404 <betaln+0x284>
movabs $0x3ff0000000000000,%rcx
mov    %rcx,0x2d1a(%rip)
test   %eax,%eax
jle    146c <betaln+0x2ec>
cmp    $0x1,%eax
jne    1486 <betaln+0x306>
movsd  0xc79(%rip),%xmm1
jmp    14dd <betaln+0x35d>
subsd  0x2ce4(%rip),%xmm0
subsd  0x2ce4(%rip),%xmm0
jmp    17b1 <betaln+0x631>
ucomisd 0xc6f(%rip),%xmm0
jbe    141e <betaln+0x29e>
movq   $0x0,0x2cd2(%rip)
movsd  0xc3a(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    13d5 <betaln+0x255>
xorpd  %xmm2,%xmm2
jmp    1658 <betaln+0x4d8>
lea    0x2c8c(%rip),%rbx
mov    %rbx,%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x10(%rsp)
lea    0x2c7f(%rip),%rsi
mov    %rbx,%rdi
call   1080 <algdiv@plt>
addsd  0x10(%rsp),%xmm0
jmp    17b1 <betaln+0x631>
test   %eax,%eax
jle    1479 <betaln+0x2f9>
cmp    $0x1,%eax
jne    1590 <betaln+0x410>
movsd  0xbef(%rip),%xmm1
jmp    15f1 <betaln+0x471>
lea    0x2c43(%rip),%r14
mov    %r14,%rdi
call   1040 <gamln@plt>
movsd  %xmm0,0x10(%rsp)
lea    0x2c36(%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  0xb94(%rip),%xmm1
jmp    1515 <betaln+0x395>
movsd  0xb87(%rip),%xmm1
jmp    162d <betaln+0x4ad>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0xb75(%rip),%xmm3
movsd  0xb95(%rip),%xmm4
movapd %xmm3,%xmm1
nop
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    1692 <betaln+0x512>
movsd  0x9d0(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
mov    %eax,0x2a2a(%rip)
test   %eax,%eax
movsd  %xmm2,0x8(%rsp)
jle    16cb <betaln+0x54b>
movsd  0x29e8(%rip),%xmm2
cmp    $0x1,%eax
jne    16d5 <betaln+0x555>
movsd  0x97b(%rip),%xmm1
jmp    1725 <betaln+0x5a5>
lea    0x29cf(%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    0x29b2(%rip),%rsi
mov    %rbx,%rdi
call   1080 <algdiv@plt>
jmp    17ab <betaln+0x62b>
movsd  0x935(%rip),%xmm1
jmp    1749 <betaln+0x5c9>
mov    %eax,%ecx
and    $0xfffffffe,%ecx
movsd  0x926(%rip),%xmm1
movsd  0x946(%rip),%xmm3
nopw   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 %175
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 %225
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 %225
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 %225
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 %106
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 %225
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 %139
70: ; preds = %66
%71 = load double, double* @betaln.a
%72 = fsub double %71, 1.000000e+00
%73 = fptosi double %72 to i32
store i32 %73, i32* @betaln.n
store double 1.000000e+00, double* @betaln.w
store i32 1, i32* @betaln.i
br label %74
74: ; preds = %90, %70
%75 = load i32, i32* @betaln.i
%76 = load i32, i32* @betaln.n
%77 = icmp sle i32 %75, %76
br i1 %77, label %78, label %93
78: ; preds = %74
%79 = load double, double* @betaln.a
%80 = fsub double %79, 1.000000e+00
store double %80, double* @betaln.a
%81 = load double, double* @betaln.a
%82 = load double, double* @betaln.b
%83 = fdiv double %81, %82
store double %83, double* @betaln.h
%84 = load double, double* @betaln.h
%85 = load double, double* @betaln.h
%86 = fadd double 1.000000e+00, %85
%87 = fdiv double %84, %86
%88 = load double, double* @betaln.w
%89 = fmul double %88, %87
store double %89, double* @betaln.w
br label %90
90: ; preds = %78
%91 = load i32, i32* @betaln.i
%92 = add nsw i32 %91, 1
store i32 %92, i32* @betaln.i
br label %74
93: ; preds = %74
%94 = load double, double* @betaln.w
%95 = call double @log(double %94)
store double %95, double* @betaln.w
%96 = load double, double* @betaln.b
%97 = fcmp olt double %96, 8.000000e+00
br i1 %97, label %98, label %99
98: ; preds = %93
br label %106
99: ; preds = %93
%100 = load double, double* @betaln.w
%101 = call double @gamln(double* @betaln.a)
%102 = fadd double %100, %101
%103 = call double @algdiv(double* @betaln.a, double* @betaln.b)
%104 = fadd double %102, %103
store double %104, double* @betaln.betaln
%105 = load double, double* @betaln.betaln
store double %105, double* %3
br label %225
106: ; preds = %98, %60
%107 = load double, double* @betaln.b
%108 = fsub double %107, 1.000000e+00
%109 = fptosi double %108 to i32
store i32 %109, i32* @betaln.n
store double 1.000000e+00, double* @betaln.z
store i32 1, i32* @betaln.i
br label %110
110: ; preds = %124, %106
%111 = load i32, i32* @betaln.i
%112 = load i32, i32* @betaln.n
%113 = icmp sle i32 %111, %112
br i1 %113, label %114, label %127
114: ; preds = %110
%115 = load double, double* @betaln.b
%116 = fsub double %115, 1.000000e+00
store double %116, double* @betaln.b
%117 = load double, double* @betaln.b
%118 = load double, double* @betaln.a
%119 = load double, double* @betaln.b
%120 = fadd double %118, %119
%121 = fdiv double %117, %120
%122 = load double, double* @betaln.z
%123 = fmul double %122, %121
store double %123, double* @betaln.z
br label %124
124: ; preds = %114
%125 = load i32, i32* @betaln.i
%126 = add nsw i32 %125, 1
store i32 %126, i32* @betaln.i
br label %110
127: ; preds = %110
%128 = load double, double* @betaln.w
%129 = load double, double* @betaln.z
%130 = call double @log(double %129)
%131 = fadd double %128, %130
%132 = call double @gamln(double* @betaln.a)
%133 = call double @gamln(double* @betaln.b)
%134 = call double @gsumln(double* @betaln.a, double* @betaln.b)
%135 = fsub double %133, %134
%136 = fadd double %132, %135
%137 = fadd double %131, %136
store double %137, double* @betaln.betaln
%138 = load double, double* @betaln.betaln
store double %138, double* %3
br label %225
139: ; preds = %69
%140 = load double, double* @betaln.a
%141 = fsub double %140, 1.000000e+00
%142 = fptosi double %141 to i32
store i32 %142, i32* @betaln.n
store double 1.000000e+00, double* @betaln.w
store i32 1, i32* @betaln.i
br label %143
143: ; preds = %158, %139
%144 = load i32, i32* @betaln.i
%145 = load i32, i32* @betaln.n
%146 = icmp sle i32 %144, %145
br i1 %146, label %147, label %161
147: ; preds = %143
%148 = load double, double* @betaln.a
%149 = fsub double %148, 1.000000e+00
store double %149, double* @betaln.a
%150 = load double, double* @betaln.a
%151 = load double, double* @betaln.a
%152 = load double, double* @betaln.b
%153 = fdiv double %151, %152
%154 = fadd double 1.000000e+00, %153
%155 = fdiv double %150, %154
%156 = load double, double* @betaln.w
%157 = fmul double %156, %155
store double %157, double* @betaln.w
br label %158
158: ; preds = %147
%159 = load i32, i32* @betaln.i
%160 = add nsw i32 %159, 1
store i32 %160, i32* @betaln.i
br label %143
161: ; preds = %143
%162 = load double, double* @betaln.w
%163 = call double @log(double %162)
%164 = load i32, i32* @betaln.n
%165 = sitofp i32 %164 to double
%166 = load double, double* @betaln.b
%167 = call double @log(double %166)
%168 = fneg double %165
%169 = call double @llvm.fmuladd.f64(double %168, double %167, double %163)
%170 = call double @gamln(double* @betaln.a)
%171 = call double @algdiv(double* @betaln.a, double* @betaln.b)
%172 = fadd double %170, %171
%173 = fadd double %169, %172
store double %173, double* @betaln.betaln
%174 = load double, double* @betaln.betaln
store double %174, double* %3
br label %225
175: ; preds = %18
%176 = call double @bcorr(double* @betaln.a, double* @betaln.b)
store double %176, double* @betaln.w
%177 = load double, double* @betaln.a
%178 = load double, double* @betaln.b
%179 = fdiv double %177, %178
store double %179, double* @betaln.h
%180 = load double, double* @betaln.h
%181 = load double, double* @betaln.h
%182 = fadd double 1.000000e+00, %181
%183 = fdiv double %180, %182
store double %183, double* @betaln.c
%184 = load double, double* @betaln.a
%185 = fsub double %184, 5.000000e-01
%186 = load double, double* @betaln.c
%187 = call double @log(double %186)
%188 = fmul double %185, %187
%189 = fneg double %188
store double %189, double* @betaln.u
%190 = load double, double* @betaln.b
%191 = call double @alnrel(double* @betaln.h)
%192 = fmul double %190, %191
store double %192, double* @betaln.v
%193 = load double, double* @betaln.u
%194 = load double, double* @betaln.v
%195 = fcmp ole double %193, %194
br i1 %195, label %196, label %197
196: ; preds = %175
br label %211
197: ; preds = %175
%198 = load double, double* @betaln.b
%199 = call double @log(double %198)
%200 = fmul double 5.000000e-01, %199
%201 = fneg double %200
%202 = load double, double* @betaln.e
%203 = fadd double %201, %202
%204 = load double, double* @betaln.w
%205 = fadd double %203, %204
%206 = load double, double* @betaln.v
%207 = fsub double %205, %206
%208 = load double, double* @betaln.u
%209 = fsub double %207, %208
store double %209, double* @betaln.betaln
%210 = load double, double* @betaln.betaln
store double %210, double* %3
br label %225
211: ; preds = %196
%212 = load double, double* @betaln.b
%213 = call double @log(double %212)
%214 = fmul double 5.000000e-01, %213
%215 = fneg double %214
%216 = load double, double* @betaln.e
%217 = fadd double %215, %216
%218 = load double, double* @betaln.w
%219 = fadd double %217, %218
%220 = load double, double* @betaln.u
%221 = fsub double %219, %220
%222 = load double, double* @betaln.v
%223 = fsub double %221, %222
store double %223, double* @betaln.betaln
%224 = load double, double* @betaln.betaln
store double %224, double* %3
br label %225
225: ; preds = %211, %197, %161, %127, %99, %61, %50, %37, %27
%226 = load double, double* %3
ret double %226
}

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