#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 exp(int);
int /*<<< orphan*/ free(double *);
int gcd(int, int);
scalar_t__ malloc(int);
double pow(double, int);
double BlastKarlinLHtoK(double *sfp, int min, int max, double lambda,
                        double H) {
  double *P0 = NULL;
  int low;
  int high;
  double K;
  double ratio;
  int i, j;
  int range, lo, hi, first, last;
  double sum;
  double Sum, av, oldsum, oldsum2;
  int iter;
  double sumlimit;
  double *p, *ptrP, *ptr1, *ptr2, *ptr1e;
  double etolami, etolam;
  if (lambda <= 0. || H <= 0.) {
    return -1.;
  }
  low = min;
  high = max;
  range = high - low;
  av = H / lambda;
  etolam = exp((double)lambda);
  if (low == -1 || high == 1) {
    K = av;
    return K * (1.0 - 1. / etolam);
  }
  sumlimit = 0.01;
  iter = 100;
  if ((iter * range + 1) > (100 * ((1000) - (-10000)) + 1)) {
    return -1.;
  }
  P0 = (double *)malloc((iter * range + 1) * sizeof(*P0));
  if (P0 == NULL)
    return -1.;
  Sum = 0.;
  lo = hi = 0;
  p = &sfp[low];
  P0[0] = sum = oldsum = oldsum2 = 1.;
  for (j = 0; j < iter && sum > sumlimit; Sum += sum /= ++j) {
    first = last = range;
    lo += low;
    hi += high;
    for (ptrP = P0 + (hi - lo); ptrP >= P0; *ptrP-- = sum) {
      ptr1 = ptrP - first;
      ptr1e = ptrP - last;
      ptr2 = p + first;
      for (sum = 0.; ptr1 >= ptr1e;)
        sum += *ptr1-- * *ptr2++;
      if (first)
        --first;
      if (ptrP - P0 <= range)
        --last;
    }
    etolami = pow((double)etolam, lo - 1);
    for (sum = 0., i = lo; i != 0; ++i) {
      etolami *= etolam;
      sum += *++ptrP * etolami;
    }
    for (; i <= hi; ++i)
      sum += *++ptrP;
    oldsum2 = oldsum;
    oldsum = sum;
  }
  ratio = oldsum / oldsum2;
  if (ratio >= (1.0 - sumlimit * 0.001)) {
    K = -1.;
    goto CleanUp;
  }
  sumlimit *= 0.01;
  while (sum > sumlimit) {
    oldsum *= ratio;
    Sum += sum = oldsum / ++j;
  }
  for (i = 1, j = -low; i <= range && j > 1; ++i)
    if (p[i])
      j = gcd(j, i);
  if (j * etolam > 0.05) {
    etolami = pow((double)etolam, -j);
    K = j * exp((double)-2.0 * Sum) / (av * (1.0 - etolami));
  } else
    K = -j * exp((double)-2.0 * Sum) / (av * (exp(-j * (double)lambda) - 1));
CleanUp:
  if (P0 != NULL)
    free(P0);
  return K;
}


x86 assembly (clang, -O0):
<BlastKarlinLHtoK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jae    1193 <BlastKarlinLHtoK+0x43>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jb     11a5 <BlastKarlinLHtoK+0x55>
movsd  0xe8d(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    186d <BlastKarlinLHtoK+0x71d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x54(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
cvttsd2si -0x20(%rbp),%edi
call   1050 <exp@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
cmpl   $0xffffffff,-0x34(%rbp)
je     11f3 <BlastKarlinLHtoK+0xa3>
cmpl   $0x1,-0x38(%rbp)
jne    122c <BlastKarlinLHtoK+0xdc>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdfe(%rip),%xmm2
divsd  -0xd8(%rbp),%xmm2
ff
movsd  0xdee(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    186d <BlastKarlinLHtoK+0x71d>
movsd  0xdcc(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movl   $0x64,-0x94(%rbp)
mov    -0x94(%rbp),%eax
imul   -0x54(%rbp),%eax
add    $0x1,%eax
cmp    $0x10c8e1,%eax
jle    1270 <BlastKarlinLHtoK+0x120>
movsd  0xdc2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    186d <BlastKarlinLHtoK+0x71d>
mov    -0x94(%rbp),%eax
imul   -0x54(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12ab <BlastKarlinLHtoK+0x15b>
movsd  0xd87(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    186d <BlastKarlinLHtoK+0x71d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xa8(%rbp)
movsd  0xd29(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xd19(%rip),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd09(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x30(%rbp),%rax
movsd  0xcf8(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%ecx
xor    %eax,%eax
cmp    -0x94(%rbp),%ecx
mov    %al,-0xd9(%rbp)
jge    1348 <BlastKarlinLHtoK+0x1f8>
movsd  -0x70(%rbp),%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
seta   %al
mov    %al,-0xd9(%rbp)
mov    -0xd9(%rbp),%al
test   $0x1,%al
jne    135b <BlastKarlinLHtoK+0x20b>
jmp    15d6 <BlastKarlinLHtoK+0x486>
mov    -0x54(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    %eax,-0x60(%rbp)
mov    -0x34(%rbp),%eax
add    -0x58(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x38(%rbp),%eax
add    -0x5c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x5c(%rbp),%ecx
sub    -0x58(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
cmp    -0x30(%rbp),%rax
jb     14bf <BlastKarlinLHtoK+0x36f>
mov    -0xb0(%rbp),%rax
movslq -0x60(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb8(%rbp)
mov    -0xb0(%rbp),%rax
movslq -0x64(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc8(%rbp)
mov    -0xa8(%rbp),%rax
movslq -0x60(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xc0(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xb8(%rbp),%rax
cmp    -0xc8(%rbp),%rax
jb     145c <BlastKarlinLHtoK+0x30c>
mov    -0xb8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffff8,%rcx
mov    %rcx,-0xb8(%rbp)
movsd  (%rax),%xmm0
mov    -0xc0(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0xc0(%rbp)
movsd  (%rax),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    13ff <BlastKarlinLHtoK+0x2af>
cmpl   $0x0,-0x60(%rbp)
je     146f <BlastKarlinLHtoK+0x31f>
mov    -0x60(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x60(%rbp)
mov    -0xb0(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
sar    $0x3,%rax
movslq -0x54(%rbp),%rcx
cmp    %rcx,%rax
jg     1497 <BlastKarlinLHtoK+0x347>
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x64(%rbp)
jmp    149c <BlastKarlinLHtoK+0x34c>
movsd  -0x70(%rbp),%xmm0
mov    -0xb0(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffff8,%rcx
mov    %rcx,-0xb0(%rbp)
movsd  %xmm0,(%rax)
jmp    1391 <BlastKarlinLHtoK+0x241>
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x58(%rbp),%edi
sub    $0x1,%edi
call   1060 <pow@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x4c(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     154c <BlastKarlinLHtoK+0x3fc>
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0xb0(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0xb0(%rbp)
movsd  0x8(%rax),%xmm0
movsd  -0xd0(%rbp),%xmm2
ff
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    14e8 <BlastKarlinLHtoK+0x398>
jmp    1551 <BlastKarlinLHtoK+0x401>
mov    -0x4c(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jg     158f <BlastKarlinLHtoK+0x43f>
mov    -0xb0(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0xb0(%rbp)
movsd  0x8(%rax),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1551 <BlastKarlinLHtoK+0x401>
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
cvtsi2sd %eax,%xmm1
movsd  -0x70(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    131b <BlastKarlinLHtoK+0x1cb>
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0x9f9(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x9e5(%rip),%xmm2
addsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     1643 <BlastKarlinLHtoK+0x4f3>
movsd  0x9ef(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    184f <BlastKarlinLHtoK+0x6ff>
movsd  0x9b5(%rip),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
ucomisd -0xa0(%rbp),%xmm0
ff
jbe    16b0 <BlastKarlinLHtoK+0x560>
movsd  -0x48(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    165b <BlastKarlinLHtoK+0x50b>
movl   $0x1,-0x4c(%rbp)
xor    %eax,%eax
sub    -0x34(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%ecx
xor    %eax,%eax
cmp    -0x54(%rbp),%ecx
mov    %al,-0xda(%rbp)
jg     16e0 <BlastKarlinLHtoK+0x590>
cmpl   $0x1,-0x50(%rbp)
setg   %al
mov    %al,-0xda(%rbp)
mov    -0xda(%rbp),%al
test   $0x1,%al
jne    16f3 <BlastKarlinLHtoK+0x5a3>
jmp    173c <BlastKarlinLHtoK+0x5ec>
mov    -0xa8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    171b <BlastKarlinLHtoK+0x5cb>
jp     171b <BlastKarlinLHtoK+0x5cb>
jmp    1729 <BlastKarlinLHtoK+0x5d9>
mov    -0x50(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1070 <gcd@plt>
mov    %eax,-0x50(%rbp)
jmp    172e <BlastKarlinLHtoK+0x5de>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    16bf <BlastKarlinLHtoK+0x56f>
cvtsi2sdl -0x50(%rbp),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
movsd  0x8c7(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    17ca <BlastKarlinLHtoK+0x67a>
movsd  -0xd8(%rbp),%xmm0
ff
xor    %edi,%edi
sub    -0x50(%rbp),%edi
call   1060 <pow@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x50(%rbp),%eax
mov    %eax,-0xe0(%rbp)
movsd  0x89a(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
mov    %eax,%ecx
mov    -0xe0(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  0x858(%rip),%xmm2
subsd  -0xd0(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    184a <BlastKarlinLHtoK+0x6fa>
xor    %eax,%eax
sub    -0x50(%rbp),%eax
mov    %eax,-0xf4(%rbp)
movsd  0x843(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
mov    %eax,%ecx
mov    -0xf4(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
xor    %eax,%eax
sub    -0x50(%rbp),%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm0
ff
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    184f <BlastKarlinLHtoK+0x6ff>
cmpq   $0x0,-0x30(%rbp)
je     1863 <BlastKarlinLHtoK+0x713>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BlastKarlinLHtoK>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rdx,(%rsp)
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
movsd  0xe8e(%rip),%xmm3
jae    16f8 <BlastKarlinLHtoK+0x5a8>
ucomisd %xmm1,%xmm2
jae    16f8 <BlastKarlinLHtoK+0x5a8>
mov    %rdi,%rbp
divsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  %xmm0,0x58(%rsp)
cvttsd2si %xmm0,%edi
mov    %rsi,0x28(%rsp)
call   1050 <exp@plt>
mov    0x28(%rsp),%rcx
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
cmp    $0xffffffff,%ecx
je     11df <BlastKarlinLHtoK+0x8f>
cmpl   $0x1,(%rsp)
je     11df <BlastKarlinLHtoK+0x8f>
mov    (%rsp),%rax
sub    %ecx,%eax
mov    %eax,0xc(%rsp)
imul   $0x64,%eax,%edi
or     $0x1,%edi
cmp    $0x10c8e1,%edi
jle    1202 <BlastKarlinLHtoK+0xb2>
movsd  0xe26(%rip),%xmm3
jmp    16f8 <BlastKarlinLHtoK+0x5a8>
movsd  0xe21(%rip),%xmm0
movapd %xmm0,%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0x30(%rsp),%xmm3
mulsd  %xmm0,%xmm3
jmp    16f8 <BlastKarlinLHtoK+0x5a8>
movsd  %xmm2,0x10(%rsp)
shl    $0x3,%edi
call   1040 <malloc@plt>
test   %rax,%rax
movsd  0xde5(%rip),%xmm3
je     16f8 <BlastKarlinLHtoK+0x5a8>
mov    %rax,%rbx
mov    0x28(%rsp),%rcx
movslq %ecx,%rax
mov    %rax,0x70(%rsp)
lea    0x0(,%rax,8),%r12
add    %rbp,%r12
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rbx)
movslq 0xc(%rsp),%r15
mov    (%rsp),%rax
lea    0x1(%rax),%edi
movslq %eax,%rdx
mov    %rdx,0x68(%rsp)
mov    %ecx,%edx
not    %edx
mov    %edx,0x44(%rsp)
mov    %ecx,%esi
neg    %esi
lea    0x1(%rax),%r14d
xorpd  %xmm6,%xmm6
xor    %r9d,%r9d
movsd  0xd8c(%rip),%xmm1
mov    $0x2,%eax
xor    %r10d,%r10d
xor    %ecx,%ecx
movsd  0x10(%rsp),%xmm5
mov    %r12,0x48(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %esi,0x20(%rsp)
mov    %edi,0x24(%rsp)
movsd  %xmm1,0x60(%rsp)
mov    %eax,%r8d
add    0x68(%rsp),%r10
add    0x70(%rsp),%r9
mov    %r10,%rax
sub    %r9,%rax
lea    (%rbx,%rax,8),%r13
mov    %rcx,0x50(%rsp)
js     1360 <BlastKarlinLHtoK+0x210>
mov    0xc(%rsp),%ecx
mov    %ecx,%eax
jmp    130e <BlastKarlinLHtoK+0x1be>
nopl   0x0(%rax,%rax,1)
lea    -0x1(%rcx),%edx
test   %ecx,%ecx
cmove  %ecx,%edx
mov    %r13,%rcx
sub    %rbx,%rcx
sar    $0x3,%rcx
xor    %esi,%esi
cmp    %r15,%rcx
setle  %sil
sub    %esi,%eax
movsd  %xmm0,0x0(%r13)
add    $0xfffffffffffffff8,%r13
mov    %edx,%ecx
cmp    %rbx,%r13
jb     1360 <BlastKarlinLHtoK+0x210>
xorpd  %xmm0,%xmm0
cmp    %ecx,%eax
jl     12e0 <BlastKarlinLHtoK+0x190>
movslq %ecx,%rbp
movslq %eax,%rsi
shl    $0x3,%rsi
mov    %r13,%rdx
sub    %rsi,%rdx
lea    (%r12,%rbp,8),%rsi
shl    $0x3,%rbp
mov    %r13,%rdi
sub    %rbp,%rdi
xorpd  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
add    $0xfffffffffffffff8,%rdi
add    $0x8,%rsi
addsd  %xmm1,%xmm0
cmp    %rdx,%rdi
jae    1340 <BlastKarlinLHtoK+0x1f0>
jmp    12e0 <BlastKarlinLHtoK+0x190>
nopl   0x0(%rax,%rax,1)
mov    %r10,0x38(%rsp)
mov    %r8,%rbp
movsd  %xmm6,0x18(%rsp)
movzbl %r14b,%r14d
and    $0x7,%r14d
lea    -0x1(%r9),%edi
movapd %xmm5,%xmm0
mov    %r9,%r12
call   1060 <pow@plt>
mov    %r12,%r9
test   %r9d,%r9d
je     1410 <BlastKarlinLHtoK+0x2c0>
mov    0x50(%rsp),%r11
mov    %r11d,%eax
mov    0x28(%rsp),%r8
imul   %r8d,%eax
lea    (%rax,%r8,1),%edx
neg    %edx
mov    0x44(%rsp),%ecx
sub    %eax,%ecx
test   $0x3,%dl
movsd  0x18(%rsp),%xmm6
mov    0x24(%rsp),%edi
mov    0x20(%rsp),%esi
mov    0x48(%rsp),%r12
je     1440 <BlastKarlinLHtoK+0x2f0>
mov    %esi,%edx
and    $0x3,%edx
xor    %eax,%eax
xorpd  %xmm1,%xmm1
movsd  0x10(%rsp),%xmm5
nopl   0x0(%rax,%rax,1)
mulsd  %xmm5,%xmm0
movsd  0x8(%r13),%xmm2
mulsd  %xmm0,%xmm2
add    $0x8,%r13
addsd  %xmm2,%xmm1
add    $0x1,%eax
cmp    %eax,%edx
jne    13e0 <BlastKarlinLHtoK+0x290>
sub    %esi,%eax
jmp    144d <BlastKarlinLHtoK+0x2fd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
movsd  0x10(%rsp),%xmm5
movsd  0x18(%rsp),%xmm6
mov    0x28(%rsp),%r8
mov    0x24(%rsp),%edi
mov    0x20(%rsp),%esi
mov    0x48(%rsp),%r12
mov    0x38(%rsp),%r10
mov    0x50(%rsp),%r11
jmp    14b1 <BlastKarlinLHtoK+0x361>
xchg   %ax,%ax
xorpd  %xmm1,%xmm1
mov    %r9d,%eax
movsd  0x10(%rsp),%xmm5
mov    0x38(%rsp),%r10
cmp    $0x3,%ecx
jb     14b1 <BlastKarlinLHtoK+0x361>
nopw   0x0(%rax,%rax,1)
mulsd  %xmm5,%xmm0
movsd  0x8(%r13),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm5,%xmm0
movsd  0x10(%r13),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm5,%xmm0
movsd  0x18(%r13),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm5,%xmm0
movsd  0x20(%r13),%xmm1
mulsd  %xmm0,%xmm1
add    $0x20,%r13
addsd  %xmm2,%xmm1
add    $0x4,%eax
jne    1460 <BlastKarlinLHtoK+0x310>
test   %r10,%r10
js     1530 <BlastKarlinLHtoK+0x3e0>
mov    %r11d,%eax
mov    (%rsp),%rcx
imul   %ecx,%eax
add    %ecx,%eax
cmp    $0x7,%eax
jb     1509 <BlastKarlinLHtoK+0x3b9>
mov    %edi,%eax
and    $0xfffffff8,%eax
nopl   0x0(%rax)
addsd  0x8(%r13),%xmm1
addsd  0x10(%r13),%xmm1
addsd  0x18(%r13),%xmm1
addsd  0x20(%r13),%xmm1
addsd  0x28(%r13),%xmm1
addsd  0x30(%r13),%xmm1
addsd  0x38(%r13),%xmm1
addsd  0x40(%r13),%xmm1
add    $0x40,%r13
add    $0xfffffff8,%eax
jne    14d0 <BlastKarlinLHtoK+0x380>
test   $0x7,%dil
je     1530 <BlastKarlinLHtoK+0x3e0>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addsd  0x8(%r13,%rax,8),%xmm1
add    $0x1,%rax
cmp    %eax,%r14d
jne    1520 <BlastKarlinLHtoK+0x3d0>
lea    0x1(%r11),%ecx
xorps  %xmm2,%xmm2
cvtsi2sd %ecx,%xmm2
movapd %xmm1,%xmm0
divsd  %xmm2,%xmm0
addsd  %xmm0,%xmm6
cmp    $0x62,%r11d
ja     156a <BlastKarlinLHtoK+0x41a>
mov    (%rsp),%rdx
add    %edx,%edi
lea    0x1(%rbp),%eax
sub    %r8d,%esi
add    %dl,%r14b
ucomisd 0xaac(%rip),%xmm0
ja     12a0 <BlastKarlinLHtoK+0x150>
movapd %xmm1,%xmm2
divsd  0x60(%rsp),%xmm2
ucomisd 0xa9c(%rip),%xmm2
jae    1687 <BlastKarlinLHtoK+0x537>
ucomisd 0xa96(%rip),%xmm0
jbe    15c0 <BlastKarlinLHtoK+0x470>
movsd  0xa8c(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mulsd  %xmm2,%xmm1
xorps  %xmm3,%xmm3
cvtsi2sd %ebp,%xmm3
movapd %xmm1,%xmm4
divsd  %xmm3,%xmm4
addsd  %xmm4,%xmm6
add    $0x1,%ebp
ucomisd %xmm0,%xmm4
ja     15a0 <BlastKarlinLHtoK+0x450>
mov    %r8d,%ebp
neg    %ebp
cmpl   $0x0,0xc(%rsp)
movsd  %xmm6,0x18(%rsp)
jle    1618 <BlastKarlinLHtoK+0x4c8>
cmp    $0xfffffffe,%r8d
jg     1618 <BlastKarlinLHtoK+0x4c8>
mov    $0x1,%r14d
xchg   %ax,%ax
movsd  (%r12,%r14,8),%xmm0
ucomisd 0xa4a(%rip),%xmm0
jne    15f2 <BlastKarlinLHtoK+0x4a2>
jnp    160a <BlastKarlinLHtoK+0x4ba>
mov    %ebp,%edi
mov    %r14d,%esi
call   1070 <gcd@plt>
movsd  0x18(%rsp),%xmm6
movsd  0x10(%rsp),%xmm5
mov    %eax,%ebp
cmp    %r15,%r14
jge    1618 <BlastKarlinLHtoK+0x4c8>
add    $0x1,%r14
cmp    $0x1,%ebp
jg     15e0 <BlastKarlinLHtoK+0x490>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  %xmm5,%xmm0
mov    %ebp,%r14d
neg    %r14d
ucomisd 0x9f7(%rip),%xmm0
jbe    1691 <BlastKarlinLHtoK+0x541>
movapd %xmm5,%xmm0
mov    %r14d,%edi
call   1060 <pow@plt>
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0x9de(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
imul   %ebp,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
movsd  0x99b(%rip),%xmm0
subsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm0,%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
jmp    16eb <BlastKarlinLHtoK+0x59b>
movsd  0x971(%rip),%xmm0
jmp    16e6 <BlastKarlinLHtoK+0x596>
mulsd  0x997(%rip),%xmm6
cvttsd2si %xmm6,%edi
call   1050 <exp@plt>
imul   %r14d,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0x58(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <exp@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
movsd  (%rsp),%xmm3
movapd %xmm3,%xmm0
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define double @BlastKarlinLHtoK(double* %0, i32 %1, i32 %2, double %3, double %4) {
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca i32
%30 = alloca double
%31 = alloca double*
%32 = alloca double*
%33 = alloca double*
%34 = alloca double*
%35 = alloca double*
%36 = alloca double
%37 = alloca double
store double* %0, double** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store double %3, double* %10
store double %4, double* %11
store double* null, double** %12
%38 = load double, double* %10
%39 = fcmp ole double %38, 0.000000e+00
br i1 %39, label %43, label %40
40: ; preds = %5
%41 = load double, double* %11
%42 = fcmp ole double %41, 0.000000e+00
br i1 %42, label %43, label %44
43: ; preds = %40, %5
store double -1.000000e+00, double* %6
br label %331
44: ; preds = %40
%45 = load i32, i32* %8
store i32 %45, i32* %13
%46 = load i32, i32* %9
store i32 %46, i32* %14
%47 = load i32, i32* %14
%48 = load i32, i32* %13
%49 = sub nsw i32 %47, %48
store i32 %49, i32* %19
%50 = load double, double* %11
%51 = load double, double* %10
%52 = fdiv double %50, %51
store double %52, double* %26
%53 = load double, double* %10
%54 = fptosi double %53 to i32
%55 = call i32 @exp(i32 %54)
%56 = sitofp i32 %55 to double
store double %56, double* %37
%57 = load i32, i32* %13
%58 = icmp eq i32 %57, -1
br i1 %58, label %62, label %59
59: ; preds = %44
%60 = load i32, i32* %14
%61 = icmp eq i32 %60, 1
br i1 %61, label %62, label %69
62: ; preds = %59, %44
%63 = load double, double* %26
store double %63, double* %15
%64 = load double, double* %15
%65 = load double, double* %37
%66 = fdiv double 1.000000e+00, %65
%67 = fsub double 1.000000e+00, %66
%68 = fmul double %64, %67
store double %68, double* %6
br label %331
69: ; preds = %59
store double 1.000000e-02, double* %30
store i32 100, i32* %29
%70 = load i32, i32* %29
%71 = load i32, i32* %19
%72 = mul nsw i32 %70, %71
%73 = add nsw i32 %72, 1
%74 = icmp sgt i32 %73, 1100001
br i1 %74, label %75, label %76
75: ; preds = %69
store double -1.000000e+00, double* %6
br label %331
76: ; preds = %69
%77 = load i32, i32* %29
%78 = load i32, i32* %19
%79 = mul nsw i32 %77, %78
%80 = add nsw i32 %79, 1
%81 = sext i32 %80 to i64
%82 = mul i64 %81, 8
%83 = trunc i64 %82 to i32
%84 = call i64 @malloc(i32 %83)
%85 = inttoptr i64 %84 to double*
store double* %85, double** %12
%86 = load double*, double** %12
%87 = icmp eq double* %86, null
br i1 %87, label %88, label %89
88: ; preds = %76
store double -1.000000e+00, double* %6
br label %331
89: ; preds = %76
store double 0.000000e+00, double* %25
store i32 0, i32* %21
store i32 0, i32* %20
%90 = load double*, double** %7
%91 = load i32, i32* %13
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds double, double* %90, i64 %92
store double* %93, double** %31
store double 1.000000e+00, double* %28
store double 1.000000e+00, double* %27
store double 1.000000e+00, double* %24
%94 = load double*, double** %12
%95 = getelementptr inbounds double, double* %94, i64 0
store double 1.000000e+00, double* %95
store i32 0, i32* %18
br label %96
96: ; preds = %215, %89
%97 = load i32, i32* %18
%98 = load i32, i32* %29
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %104
100: ; preds = %96
%101 = load double, double* %24
%102 = load double, double* %30
%103 = fcmp ogt double %101, %102
br label %104
104: ; preds = %100, %96
%105 = phi i1 [ false, %96 ], [ %103, %100 ]
br i1 %105, label %106, label %223
106: ; preds = %104
%107 = load i32, i32* %19
store i32 %107, i32* %23
store i32 %107, i32* %22
%108 = load i32, i32* %13
%109 = load i32, i32* %20
%110 = add nsw i32 %109, %108
store i32 %110, i32* %20
%111 = load i32, i32* %14
%112 = load i32, i32* %21
%113 = add nsw i32 %112, %111
store i32 %113, i32* %21
%114 = load double*, double** %12
%115 = load i32, i32* %21
%116 = load i32, i32* %20
%117 = sub nsw i32 %115, %116
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %114, i64 %118
store double* %119, double** %32
br label %120
120: ; preds = %172, %106
%121 = load double*, double** %32
%122 = load double*, double** %12
%123 = icmp uge double* %121, %122
br i1 %123, label %124, label %176
124: ; preds = %120
%125 = load double*, double** %32
%126 = load i32, i32* %22
%127 = sext i32 %126 to i64
%128 = sub i64 0, %127
%129 = getelementptr inbounds double, double* %125, i64 %128
store double* %129, double** %33
%130 = load double*, double** %32
%131 = load i32, i32* %23
%132 = sext i32 %131 to i64
%133 = sub i64 0, %132
%134 = getelementptr inbounds double, double* %130, i64 %133
store double* %134, double** %35
%135 = load double*, double** %31
%136 = load i32, i32* %22
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %135, i64 %137
store double* %138, double** %34
store double 0.000000e+00, double* %24
br label %139
139: ; preds = %143, %124
%140 = load double*, double** %33
%141 = load double*, double** %35
%142 = icmp uge double* %140, %141
br i1 %142, label %143, label %152
143: ; preds = %139
%144 = load double*, double** %33
%145 = getelementptr inbounds double, double* %144, i32 -1
store double* %145, double** %33
%146 = load double, double* %144
%147 = load double*, double** %34
%148 = getelementptr inbounds double, double* %147, i32 1
store double* %148, double** %34
%149 = load double, double* %147
%150 = load double, double* %24
%151 = call double @llvm.fmuladd.f64(double %146, double %149, double %150)
store double %151, double* %24
br label %139
152: ; preds = %139
%153 = load i32, i32* %22
%154 = icmp ne i32 %153, 0
br i1 %154, label %155, label %158
155: ; preds = %152
%156 = load i32, i32* %22
%157 = add nsw i32 %156, -1
store i32 %157, i32* %22
br label %158
158: ; preds = %155, %152
%159 = load double*, double** %32
%160 = load double*, double** %12
%161 = ptrtoint double* %159 to i64
%162 = ptrtoint double* %160 to i64
%163 = sub i64 %161, %162
%164 = sdiv exact i64 %163, 8
%165 = load i32, i32* %19
%166 = sext i32 %165 to i64
%167 = icmp sle i64 %164, %166
br i1 %167, label %168, label %171
168: ; preds = %158
%169 = load i32, i32* %23
%170 = add nsw i32 %169, -1
store i32 %170, i32* %23
br label %171
171: ; preds = %168, %158
br label %172
172: ; preds = %171
%173 = load double, double* %24
%174 = load double*, double** %32
%175 = getelementptr inbounds double, double* %174, i32 -1
store double* %175, double** %32
store double %173, double* %174
br label %120
176: ; preds = %120
%177 = load double, double* %37
%178 = load i32, i32* %20
%179 = sub nsw i32 %178, 1
%180 = call double @pow(double %177, i32 %179)
store double %180, double* %36
store double 0.000000e+00, double* %24
%181 = load i32, i32* %20
store i32 %181, i32* %17
br label %182
182: ; preds = %195, %176
%183 = load i32, i32* %17
%184 = icmp ne i32 %183, 0
br i1 %184, label %185, label %198
185: ; preds = %182
%186 = load double, double* %37
%187 = load double, double* %36
%188 = fmul double %187, %186
store double %188, double* %36
%189 = load double*, double** %32
%190 = getelementptr inbounds double, double* %189, i32 1
store double* %190, double** %32
%191 = load double, double* %190
%192 = load double, double* %36
%193 = load double, double* %24
%194 = call double @llvm.fmuladd.f64(double %191, double %192, double %193)
store double %194, double* %24
br label %195
195: ; preds = %185
%196 = load i32, i32* %17
%197 = add nsw i32 %196, 1
store i32 %197, i32* %17
br label %182
198: ; preds = %182
br label %199
199: ; preds = %209, %198
%200 = load i32, i32* %17
%201 = load i32, i32* %21
%202 = icmp sle i32 %200, %201
br i1 %202, label %203, label %212
203: ; preds = %199
%204 = load double*, double** %32
%205 = getelementptr inbounds double, double* %204, i32 1
store double* %205, double** %32
%206 = load double, double* %205
%207 = load double, double* %24
%208 = fadd double %207, %206
store double %208, double* %24
br label %209
209: ; preds = %203
%210 = load i32, i32* %17
%211 = add nsw i32 %210, 1
store i32 %211, i32* %17
br label %199
212: ; preds = %199
%213 = load double, double* %27
store double %213, double* %28
%214 = load double, double* %24
store double %214, double* %27
br label %215
215: ; preds = %212
%216 = load i32, i32* %18
%217 = add nsw i32 %216, 1
store i32 %217, i32* %18
%218 = sitofp i32 %217 to double
%219 = load double, double* %24
%220 = fdiv double %219, %218
store double %220, double* %24
%221 = load double, double* %25
%222 = fadd double %221, %220
store double %222, double* %25
br label %96
223: ; preds = %104
%224 = load double, double* %27
%225 = load double, double* %28
%226 = fdiv double %224, %225
store double %226, double* %16
%227 = load double, double* %16
%228 = load double, double* %30
%229 = fneg double %228
%230 = call double @llvm.fmuladd.f64(double %229, double 1.000000e-03, double 1.000000e+00)
%231 = fcmp oge double %227, %230
br i1 %231, label %232, label %233
232: ; preds = %223
store double -1.000000e+00, double* %15
br label %323
233: ; preds = %223
%234 = load double, double* %30
%235 = fmul double %234, 1.000000e-02
store double %235, double* %30
br label %236
236: ; preds = %240, %233
%237 = load double, double* %24
%238 = load double, double* %30
%239 = fcmp ogt double %237, %238
br i1 %239, label %240, label %251
240: ; preds = %236
%241 = load double, double* %16
%242 = load double, double* %27
%243 = fmul double %242, %241
store double %243, double* %27
%244 = load double, double* %27
%245 = load i32, i32* %18
%246 = add nsw i32 %245, 1
store i32 %246, i32* %18
%247 = sitofp i32 %246 to double
%248 = fdiv double %244, %247
store double %248, double* %24
%249 = load double, double* %25
%250 = fadd double %249, %248
store double %250, double* %25
br label %236
251: ; preds = %236
store i32 1, i32* %17
%252 = load i32, i32* %13
%253 = sub nsw i32 0, %252
store i32 %253, i32* %18
br label %254
254: ; preds = %275, %251
%255 = load i32, i32* %17
%256 = load i32, i32* %19
%257 = icmp sle i32 %255, %256
br i1 %257, label %258, label %261
258: ; preds = %254
%259 = load i32, i32* %18
%260 = icmp sgt i32 %259, 1
br label %261
261: ; preds = %258, %254
%262 = phi i1 [ false, %254 ], [ %260, %258 ]
br i1 %262, label %263, label %278
263: ; preds = %261
%264 = load double*, double** %31
%265 = load i32, i32* %17
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds double, double* %264, i64 %266
%268 = load double, double* %267
%269 = fcmp une double %268, 0.000000e+00
br i1 %269, label %270, label %274
270: ; preds = %263
%271 = load i32, i32* %18
%272 = load i32, i32* %17
%273 = call i32 @gcd(i32 %271, i32 %272)
store i32 %273, i32* %18
br label %274
274: ; preds = %270, %263
br label %275
275: ; preds = %274
%276 = load i32, i32* %17
%277 = add nsw i32 %276, 1
store i32 %277, i32* %17
br label %254
278: ; preds = %261
%279 = load i32, i32* %18
%280 = sitofp i32 %279 to double
%281 = load double, double* %37
%282 = fmul double %280, %281
%283 = fcmp ogt double %282, 5.000000e-02
br i1 %283, label %284, label %301
284: ; preds = %278
%285 = load double, double* %37
%286 = load i32, i32* %18
%287 = sub nsw i32 0, %286
%288 = call double @pow(double %285, i32 %287)
store double %288, double* %36
%289 = load i32, i32* %18
%290 = load double, double* %25
%291 = fmul double -2.000000e+00, %290
%292 = fptosi double %291 to i32
%293 = call i32 @exp(i32 %292)
%294 = mul nsw i32 %289, %293
%295 = sitofp i32 %294 to double
%296 = load double, double* %26
%297 = load double, double* %36
%298 = fsub double 1.000000e+00, %297
%299 = fmul double %296, %298
%300 = fdiv double %295, %299
store double %300, double* %15
br label %322
301: ; preds = %278
%302 = load i32, i32* %18
%303 = sub nsw i32 0, %302
%304 = load double, double* %25
%305 = fmul double -2.000000e+00, %304
%306 = fptosi double %305 to i32
%307 = call i32 @exp(i32 %306)
%308 = mul nsw i32 %303, %307
%309 = sitofp i32 %308 to double
%310 = load double, double* %26
%311 = load i32, i32* %18
%312 = sub nsw i32 0, %311
%313 = sitofp i32 %312 to double
%314 = load double, double* %10
%315 = fmul double %313, %314
%316 = fptosi double %315 to i32
%317 = call i32 @exp(i32 %316)
%318 = sub nsw i32 %317, 1
%319 = sitofp i32 %318 to double
%320 = fmul double %310, %319
%321 = fdiv double %309, %320
store double %321, double* %15
br label %322
322: ; preds = %301, %284
br label %323
323: ; preds = %322, %232
%324 = load double*, double** %12
%325 = icmp ne double* %324, null
br i1 %325, label %326, label %329
326: ; preds = %323
%327 = load double*, double** %12
%328 = call i32 @free(double* %327)
br label %329
329: ; preds = %326, %323
%330 = load double, double* %15
store double %330, double* %6
br label %331
331: ; preds = %329, %88, %75, %62, %43
%332 = load double, double* %6
ret double %332
}

LLVM IR (-O2):
define double @BlastKarlinLHtoK(double* nocapture %0, i32 %1, i32 %2, double %3, double %4) {
%6 = fcmp ole double %3, 0.000000e+00
%7 = fcmp ole double %4, 0.000000e+00
%8 = or i1 %6, %7
br i1 %8, label %278, label %9
9: ; preds = %5
%10 = sub nsw i32 %2, %1
%11 = fdiv double %4, %3
%12 = fptosi double %3 to i32
%13 = tail call i32 @exp(i32 %12)
%14 = sitofp i32 %13 to double
%15 = icmp eq i32 %1, -1
%16 = icmp eq i32 %2, 1
%17 = or i1 %15, %16
br i1 %17, label %18, label %22
18: ; preds = %9
%19 = fdiv double 1.000000e+00, %14
%20 = fsub double 1.000000e+00, %19
%21 = fmul double %11, %20
br label %278
22: ; preds = %9
%23 = mul nsw i32 %10, 100
%24 = or i32 %23, 1
%25 = icmp sgt i32 %24, 1100001
br i1 %25, label %278, label %26
26: ; preds = %22
%27 = shl i32 %24, 3
%28 = tail call i64 @malloc(i32 %27)
%29 = inttoptr i64 %28 to double*
%30 = icmp eq i64 %28, 0
br i1 %30, label %278, label %31
31: ; preds = %26
%32 = sext i32 %1 to i64
%33 = getelementptr inbounds double, double* %0, i64 %32
store double 1.000000e+00, double* %29
%34 = sext i32 %10 to i64
%35 = add i32 %2, 1
%36 = sext i32 %2 to i64
%37 = xor i32 %1, -1
br label %38
38: ; preds = %31, %199
%39 = phi i64 [ 0, %31 ], [ %51, %199 ]
%40 = phi i64 [ 0, %31 ], [ %52, %199 ]
%41 = phi i32 [ %35, %31 ], [ %208, %199 ]
%42 = phi double [ 1.000000e+00, %31 ], [ %200, %199 ]
%43 = phi i32 [ 0, %31 ], [ %201, %199 ]
%44 = phi double [ 0.000000e+00, %31 ], [ %204, %199 ]
%45 = mul i32 %43, %2
%46 = add i32 %45, %2
%47 = mul i32 %43, %1
%48 = add i32 %47, %1
%49 = sub i32 0, %48
%50 = sub i32 %37, %47
%51 = add nsw i64 %39, %32
%52 = add nsw i64 %40, %36
%53 = sub nsw i64 %52, %51
%54 = getelementptr inbounds double, double* %29, i64 %53
%55 = icmp slt i64 %53, 0
br i1 %55, label %92, label %56
56: ; preds = %38, %79
%57 = phi double* [ %90, %79 ], [ %54, %38 ]
%58 = phi i32 [ %89, %79 ], [ %10, %38 ]
%59 = phi i32 [ %83, %79 ], [ %10, %38 ]
%60 = sext i32 %59 to i64
%61 = sext i32 %58 to i64
%62 = sub nsw i64 0, %61
%63 = getelementptr inbounds double, double* %57, i64 %62
%64 = icmp slt i32 %58, %59
br i1 %64, label %79, label %65
65: ; preds = %56
%66 = getelementptr inbounds double, double* %33, i64 %60
%67 = sub nsw i64 0, %60
%68 = getelementptr inbounds double, double* %57, i64 %67
br label %69
69: ; preds = %65, %69
%70 = phi double* [ %75, %69 ], [ %66, %65 ]
%71 = phi double* [ %73, %69 ], [ %68, %65 ]
%72 = phi double [ %77, %69 ], [ 0.000000e+00, %65 ]
%73 = getelementptr inbounds double, double* %71, i64 -1
%74 = load double, double* %71
%75 = getelementptr inbounds double, double* %70, i64 1
%76 = load double, double* %70
%77 = tail call double @llvm.fmuladd.f64(double %74, double %76, double %72)
%78 = icmp ult double* %73, %63
br i1 %78, label %79, label %69
79: ; preds = %69, %56
%80 = phi double [ 0.000000e+00, %56 ], [ %77, %69 ]
%81 = icmp eq i32 %59, 0
%82 = add nsw i32 %59, -1
%83 = select i1 %81, i32 0, i32 %82
%84 = ptrtoint double* %57 to i64
%85 = sub i64 %84, %28
%86 = ashr exact i64 %85, 3
%87 = icmp sle i64 %86, %34
%88 = sext i1 %87 to i32
%89 = add nsw i32 %58, %88
%90 = getelementptr inbounds double, double* %57, i64 -1
store double %80, double* %57
%91 = icmp ult double* %90, %29
br i1 %91, label %92, label %56
92: ; preds = %79, %38
%93 = phi double* [ %54, %38 ], [ %90, %79 ]
%94 = trunc i64 %51 to i32
%95 = add i32 %94, -1
%96 = tail call double @pow(double %14, i32 %95)
%97 = trunc i64 %51 to i32
%98 = icmp eq i32 %97, 0
br i1 %98, label %123, label %99
99: ; preds = %92
%100 = and i32 %49, 3
%101 = icmp eq i32 %100, 0
br i1 %101, label %115, label %102
102: ; preds = %99, %102
%103 = phi double [ %108, %102 ], [ %96, %99 ]
%104 = phi double* [ %109, %102 ], [ %93, %99 ]
%105 = phi i32 [ %112, %102 ], [ %97, %99 ]
%106 = phi double [ %111, %102 ], [ 0.000000e+00, %99 ]
%107 = phi i32 [ %113, %102 ], [ 0, %99 ]
%108 = fmul double %103, %14
%109 = getelementptr inbounds double, double* %104, i64 1
%110 = load double, double* %109
%111 = tail call double @llvm.fmuladd.f64(double %110, double %108, double %106)
%112 = add nsw i32 %105, 1
%113 = add i32 %107, 1
%114 = icmp eq i32 %113, %100
br i1 %114, label %115, label %102
115: ; preds = %102, %99
%116 = phi double* [ undef, %99 ], [ %109, %102 ]
%117 = phi double [ undef, %99 ], [ %111, %102 ]
%118 = phi double [ %96, %99 ], [ %108, %102 ]
%119 = phi double* [ %93, %99 ], [ %109, %102 ]
%120 = phi i32 [ %97, %99 ], [ %112, %102 ]
%121 = phi double [ 0.000000e+00, %99 ], [ %111, %102 ]
%122 = icmp ult i32 %50, 3
br i1 %122, label %123, label %132
123: ; preds = %115, %132, %92
%124 = phi double [ 0.000000e+00, %92 ], [ %117, %115 ], [ %152, %132 ]
%125 = phi double* [ %93, %92 ], [ %116, %115 ], [ %150, %132 ]
%126 = icmp slt i64 %52, 0
br i1 %126, label %199, label %127
127: ; preds = %123
%128 = and i32 %41, 7
%129 = icmp ult i32 %46, 7
br i1 %129, label %185, label %130
130: ; preds = %127
%131 = and i32 %41, -8
br label %155
132: ; preds = %115, %132
%133 = phi double [ %149, %132 ], [ %118, %115 ]
%134 = phi double* [ %150, %132 ], [ %119, %115 ]
%135 = phi i32 [ %153, %132 ], [ %120, %115 ]
%136 = phi double [ %152, %132 ], [ %121, %115 ]
%137 = fmul double %133, %14
%138 = getelementptr inbounds double, double* %134, i64 1
%139 = load double, double* %138
%140 = tail call double @llvm.fmuladd.f64(double %139, double %137, double %136)
%141 = fmul double %137, %14
%142 = getelementptr inbounds double, double* %134, i64 2
%143 = load double, double* %142
%144 = tail call double @llvm.fmuladd.f64(double %143, double %141, double %140)
%145 = fmul double %141, %14
%146 = getelementptr inbounds double, double* %134, i64 3
%147 = load double, double* %146
%148 = tail call double @llvm.fmuladd.f64(double %147, double %145, double %144)
%149 = fmul double %145, %14
%150 = getelementptr inbounds double, double* %134, i64 4
%151 = load double, double* %150
%152 = tail call double @llvm.fmuladd.f64(double %151, double %149, double %148)
%153 = add nsw i32 %135, 4
%154 = icmp eq i32 %153, 0
br i1 %154, label %123, label %132
155: ; preds = %155, %130
%156 = phi double* [ %125, %130 ], [ %180, %155 ]
%157 = phi double [ %124, %130 ], [ %182, %155 ]
%158 = phi i32 [ 0, %130 ], [ %183, %155 ]
%159 = getelementptr inbounds double, double* %156, i64 1
%160 = load double, double* %159
%161 = fadd double %157, %160
%162 = getelementptr inbounds double, double* %156, i64 2
%163 = load double, double* %162
%164 = fadd double %161, %163
%165 = getelementptr inbounds double, double* %156, i64 3
%166 = load double, double* %165
%167 = fadd double %164, %166
%168 = getelementptr inbounds double, double* %156, i64 4
%169 = load double, double* %168
%170 = fadd double %167, %169
%171 = getelementptr inbounds double, double* %156, i64 5
%172 = load double, double* %171
%173 = fadd double %170, %172
%174 = getelementptr inbounds double, double* %156, i64 6
%175 = load double, double* %174
%176 = fadd double %173, %175
%177 = getelementptr inbounds double, double* %156, i64 7
%178 = load double, double* %177
%179 = fadd double %176, %178
%180 = getelementptr inbounds double, double* %156, i64 8
%181 = load double, double* %180
%182 = fadd double %179, %181
%183 = add i32 %158, 8
%184 = icmp eq i32 %183, %131
br i1 %184, label %185, label %155
185: ; preds = %155, %127
%186 = phi double [ undef, %127 ], [ %182, %155 ]
%187 = phi double* [ %125, %127 ], [ %180, %155 ]
%188 = phi double [ %124, %127 ], [ %182, %155 ]
%189 = icmp eq i32 %128, 0
br i1 %189, label %199, label %190
190: ; preds = %185, %190
%191 = phi double* [ %194, %190 ], [ %187, %185 ]
%192 = phi double [ %196, %190 ], [ %188, %185 ]
%193 = phi i32 [ %197, %190 ], [ 0, %185 ]
%194 = getelementptr inbounds double, double* %191, i64 1
%195 = load double, double* %194
%196 = fadd double %192, %195
%197 = add i32 %193, 1
%198 = icmp eq i32 %197, %128
br i1 %198, label %199, label %190
199: ; preds = %185, %190, %123
%200 = phi double [ %124, %123 ], [ %186, %185 ], [ %196, %190 ]
%201 = add nuw nsw i32 %43, 1
%202 = sitofp i32 %201 to double
%203 = fdiv double %200, %202
%204 = fadd double %44, %203
%205 = icmp ult i32 %43, 99
%206 = fcmp ogt double %203, 1.000000e-02
%207 = select i1 %205, i1 %206, i1 false
%208 = add i32 %41, %2
br i1 %207, label %38, label %209
209: ; preds = %199
%210 = fdiv double %200, %42
%211 = fcmp ult double %210, 9.999900e-01
br i1 %211, label %212, label %275
212: ; preds = %209
%213 = fcmp ogt double %203, 1.000000e-04
br i1 %213, label %214, label %224
214: ; preds = %212, %214
%215 = phi double [ %218, %214 ], [ %200, %212 ]
%216 = phi i32 [ %219, %214 ], [ %201, %212 ]
%217 = phi double [ %222, %214 ], [ %204, %212 ]
%218 = fmul double %210, %215
%219 = add nuw nsw i32 %216, 1
%220 = sitofp i32 %219 to double
%221 = fdiv double %218, %220
%222 = fadd double %217, %221
%223 = fcmp ogt double %221, 1.000000e-04
br i1 %223, label %214, label %224
224: ; preds = %214, %212
%225 = phi double [ %204, %212 ], [ %222, %214 ]
%226 = sub nsw i32 0, %1
%227 = icmp sgt i32 %10, 0
%228 = icmp slt i32 %1, -1
%229 = and i1 %227, %228
br i1 %229, label %230, label %245
230: ; preds = %224, %239
%231 = phi i64 [ %241, %239 ], [ 1, %224 ]
%232 = phi i32 [ %240, %239 ], [ %226, %224 ]
%233 = getelementptr inbounds double, double* %33, i64 %231
%234 = load double, double* %233
%235 = fcmp une double %234, 0.000000e+00
br i1 %235, label %236, label %239
236: ; preds = %230
%237 = trunc i64 %231 to i32
%238 = tail call i32 @gcd(i32 %232, i32 %237)
br label %239
239: ; preds = %230, %236
%240 = phi i32 [ %238, %236 ], [ %232, %230 ]
%241 = add nuw nsw i64 %231, 1
%242 = icmp slt i64 %231, %34
%243 = icmp sgt i32 %240, 1
%244 = select i1 %242, i1 %243, i1 false
br i1 %244, label %230, label %245
245: ; preds = %239, %224
%246 = phi i32 [ %226, %224 ], [ %240, %239 ]
%247 = sitofp i32 %246 to double
%248 = fmul double %14, %247
%249 = fcmp ogt double %248, 5.000000e-02
%250 = sub nsw i32 0, %246
br i1 %249, label %251, label %261
251: ; preds = %245
%252 = tail call double @pow(double %14, i32 %250)
%253 = fmul double %225, -2.000000e+00
%254 = fptosi double %253 to i32
%255 = tail call i32 @exp(i32 %254)
%256 = mul nsw i32 %255, %246
%257 = sitofp i32 %256 to double
%258 = fsub double 1.000000e+00, %252
%259 = fmul double %11, %258
%260 = fdiv double %257, %259
br label %275
261: ; preds = %245
%262 = fmul double %225, -2.000000e+00
%263 = fptosi double %262 to i32
%264 = tail call i32 @exp(i32 %263)
%265 = mul nsw i32 %264, %250
%266 = sitofp i32 %265 to double
%267 = sitofp i32 %250 to double
%268 = fmul double %267, %3
%269 = fptosi double %268 to i32
%270 = tail call i32 @exp(i32 %269)
%271 = add nsw i32 %270, -1
%272 = sitofp i32 %271 to double
%273 = fmul double %11, %272
%274 = fdiv double %266, %273
br label %275
275: ; preds = %261, %251, %209
%276 = phi double [ %260, %251 ], [ %274, %261 ], [ -1.000000e+00, %209 ]
%277 = tail call i32 @free(double* %29)
br label %278
278: ; preds = %26, %22, %5, %275, %18
%279 = phi double [ %21, %18 ], [ %276, %275 ], [ -1.000000e+00, %5 ], [ -1.000000e+00, %22 ], [ -1.000000e+00, %26 ]
ret double %279
}