#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 abs(double);
int exp(double);
double lgamma(double);
double log(int);
int pow(int, double);
int sqrt(int);
int PopCSn(int ZTarg, double TT, int ZP, double MP, double E, double QI,
           double CS[]) {
  int Q = 0, ZT = 0, NE = 0;
  double Sum = 0, Q0 = 0, Width = 0, WP = 0, V = 0, E_A = 0, QInf = 0, ZRat = 0,
         VP = 3.6E8, A = 3.8585, T = 0, TMax = 0, NU = 0, S = 0, C = 0,
         IBar = 0, ALam = 0, Arg = 0, Core = 0, N = 0, XSect = 0, B = 0.447;
  TT = TT * 1000;
  E_A = E / MP;
  V = 13.892E8 * sqrt(E_A);
  ZT = ZTarg - 6;
  ZRat = 1.0 - (5.21E-3 * ZT) + (9.56E-5 * ZT * ZT) - (5.96E-7 * ZT * ZT * ZT);
  S = (0.426 - 0.0571 * V / (VP * pow(ZP, 0.45))) * pow(ZP, 0.4);
  IBar = ZP * (1 - 1 / exp(A * sqrt(E_A) / pow(ZP, B))) * ZRat;
  if (ZP > 10)
    IBar += 0.2;
  QInf = IBar;
  if (QI < 0.0)
    QI = QInf;
  NE = (int)(0.5 + ZP - IBar);
  if (NE < 1)
    NE = 1;
  if (NE > 18)
    N = 3 + NE / 36;
  else if (NE > 10)
    N = 2 + NE / 18;
  else if (NE > 2)
    N = 1 + NE / 10;
  else
    N = 1;
  Sum = 0;
  for (Q = 1; Q <= ZP; Q++)
    Sum += Q;
  Core = ZP - 2 * Sum * Sum;
  XSect = N * N * 0.529 / Core;
  XSect = 3.141592654 * XSect * XSect;
  ALam = 50 * TT / (10 / XSect);
  IBar = IBar * (1 - (IBar - QI) * exp(-ALam) / IBar);
  Sum = 0;
  if (V <= 3.6E8 * pow(ZP, 0.45))
    for (Q = 0; Q <= ZP; Q++) {
      Arg = (Q - IBar) * (Q - IBar) / (2 * S * S);
      if (Arg > 40)
        Arg = 40;
      Sum += CS[Q] = 1 / (sqrt(2 * 3.141592654 * S) * exp(Arg));
    }
  else {
    C = 2 * (ZP + 2 - IBar) / S;
    NU = C * C / 2;
    C /= S;
    TMax = 0;
    for (Q = 0; Q <= ZP; Q++)
      if ((T = C * (ZP - Q + 2)) > TMax)
        TMax = T;
    for (Q = 0; Q <= ZP; Q++) {
      T = C * (ZP - Q + 2);
      if (((NU / 2 <= 57.5) && (NU / 2 >= 1E-30)) &&
          (0.5 * NU * abs(log(TMax)) <= 50) && (TMax <= 85))
        CS[Q] = pow(T, NU / 2 - 1) * exp(-T / 2) /
                (pow(2, NU / 2) * exp(lgamma(NU / 2)));
      else
        CS[Q] = exp((NU / 2 - 1) * log(T) - T / 2 - (NU / 2) * log(2) -
                    lgamma(NU / 2));
      CS[Q] *= C;
      Sum += CS[Q];
    }
  }
  ZT = 0;
  A = 0;
  for (Q = 0; Q <= ZP; Q++) {
    if (CS[Q] > A) {
      A = CS[Q];
      ZT = Q;
    }
    CS[Q] = CS[Q] / Sum;
  };
  return ZT;
}


x86 assembly (clang, -O0):
<PopCSn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xe77(%rip),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xe5f(%rip),%xmm0
movsd  %xmm0,-0x98(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xdce(%rip),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  0xdb6(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
cvttsd2si -0x78(%rbp),%edi
call   1080 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xd7f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x6,%eax
mov    %eax,-0x40(%rbp)
cvtsi2sdl -0x40(%rbp),%xmm0
movsd  0xd50(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd4c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdl -0x40(%rbp),%xmm2
movsd  0xd2b(%rip),%xmm1
mulsd  %xmm2,%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
cvtsi2sdl -0x40(%rbp),%xmm2
movsd  0xd05(%rip),%xmm0
mulsd  %xmm2,%xmm0
cvtsi2sdl -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
cvtsi2sdl -0x40(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xcbc(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x128(%rbp)
ff
mov    -0x14(%rbp),%edi
movsd  0xc8c(%rip),%xmm0
call   1070 <pow@plt>
movsd  -0x128(%rbp),%xmm0
ff
movsd  -0x120(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movsd  0xc5b(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0x14(%rbp),%edi
movsd  0xc3c(%rip),%xmm0
call   1070 <pow@plt>
movsd  -0x118(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x14(%rbp),%eax
mov    %eax,-0xfc(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
cvttsd2si -0x78(%rbp),%edi
call   1080 <sqrt@plt>
movsd  -0x110(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
mov    -0x14(%rbp),%edi
movsd  -0xf8(%rbp),%xmm0
ff
call   1070 <pow@plt>
movsd  -0x108(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
call   1040 <exp@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,%edx
mov    -0xfc(%rbp),%eax
mov    $0x1,%ecx
sub    %edx,%ecx
imul   %ecx,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
cmpl   $0xa,-0x14(%rbp)
jle    1493 <PopCSn+0x333>
movsd  0xbe5(%rip),%xmm0
addsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    14b8 <PopCSn+0x358>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xbab(%rip),%xmm0
addsd  %xmm1,%xmm0
subsd  -0xc8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x1,-0x44(%rbp)
jge    14e9 <PopCSn+0x389>
movl   $0x1,-0x44(%rbp)
cmpl   $0x12,-0x44(%rbp)
jle    1512 <PopCSn+0x3b2>
mov    -0x44(%rbp),%eax
mov    $0x24,%ecx
cltd
idiv   %ecx
add    $0x3,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    157e <PopCSn+0x41e>
cmpl   $0xa,-0x44(%rbp)
jle    153b <PopCSn+0x3db>
mov    -0x44(%rbp),%eax
mov    $0x12,%ecx
cltd
idiv   %ecx
add    $0x2,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1579 <PopCSn+0x419>
cmpl   $0x2,-0x44(%rbp)
jle    1564 <PopCSn+0x404>
mov    -0x44(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1574 <PopCSn+0x414>
movsd  0xacc(%rip),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
jmp    1579 <PopCSn+0x419>
jmp    157e <PopCSn+0x41e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     15b6 <PopCSn+0x456>
cvtsi2sdl -0x3c(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    158d <PopCSn+0x42d>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  0xad5(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  -0xe8(%rbp),%xmm0
ff
movsd  0xa84(%rip),%xmm1
mulsd  %xmm1,%xmm0
divsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xa60(%rip),%xmm0
mulsd  -0xf0(%rbp),%xmm0
ff
mulsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  0xa38(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xa23(%rip),%xmm1
divsd  -0xf0(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1040 <exp@plt>
movsd  -0x140(%rbp),%xmm2
ff
movsd  -0x138(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm2
divsd  -0xc8(%rbp),%xmm2
ff
movsd  0x95e(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
mov    -0x14(%rbp),%edi
movsd  0x906(%rip),%xmm0
call   1070 <pow@plt>
movsd  -0x130(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
movsd  0x93d(%rip),%xmm0
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     181b <PopCSn+0x6bb>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1816 <PopCSn+0x6b6>
cvtsi2sdl -0x3c(%rbp),%xmm0
subsd  -0xc8(%rbp),%xmm0
ff
cvtsi2sdl -0x3c(%rbp),%xmm1
subsd  -0xc8(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  0x92e(%rip),%xmm1
mulsd  -0xb8(%rbp),%xmm1
ff
mulsd  -0xb8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  0x922(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    17b0 <PopCSn+0x650>
movsd  0x910(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  0x908(%rip),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1080 <sqrt@plt>
mov    %eax,-0x144(%rbp)
movsd  -0xd8(%rbp),%xmm0
ff
call   1040 <exp@plt>
mov    -0x144(%rbp),%ecx
imul   %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1738 <PopCSn+0x5d8>
jmp    1c14 <PopCSn+0xab4>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm1
subsd  -0xc8(%rbp),%xmm1
ff
movsd  0x863(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  0x837(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     18f9 <PopCSn+0x799>
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x14(%rbp),%eax
sub    -0x3c(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
ucomisd -0xa8(%rbp),%xmm0
ff
jbe    18e6 <PopCSn+0x786>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    18eb <PopCSn+0x78b>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    189b <PopCSn+0x73b>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1c0f <PopCSn+0xaaf>
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x14(%rbp),%eax
sub    -0x3c(%rbp),%eax
add    $0x2,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm1
ff
movsd  0x75b(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0x757(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1ab7 <PopCSn+0x957>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x735(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0x739(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1ab7 <PopCSn+0x957>
movsd  0x6ef(%rip),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x150(%rbp)
ff
cvttsd2si -0xa8(%rbp),%edi
ff
call   1060 <log@plt>
call   1030 <abs@plt>
movsd  -0x150(%rbp),%xmm1
ff
mulsd  %xmm0,%xmm1
movsd  0x6c9(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1ab7 <PopCSn+0x957>
movsd  0x6e7(%rip),%xmm0
ucomisd -0xa8(%rbp),%xmm0
ff
jb     1ab7 <PopCSn+0x957>
cvttsd2si -0xa0(%rbp),%edi
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x6a9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0x63d(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1070 <pow@plt>
mov    %eax,-0x15c(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0x667(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <exp@plt>
mov    %eax,%ecx
mov    -0x15c(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x154(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x63d(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    $0x2,%edi
call   1070 <pow@plt>
mov    %eax,-0x158(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x619(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <lgamma@plt>
call   1040 <exp@plt>
mov    -0x158(%rbp),%ecx
mov    %eax,%edx
mov    -0x154(%rbp),%eax
imul   %edx,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1bd0 <PopCSn+0xa70>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x5d1(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0x565(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
cvttsd2si -0xa0(%rbp),%edi
ff
call   1060 <log@plt>
movaps %xmm0,%xmm2
movsd  -0x180(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  0x591(%rip),%xmm3
divsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x556(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
mov    $0x2,%edi
call   1060 <log@plt>
movsd  -0x178(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x170(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  0x4f6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <lgamma@plt>
movaps %xmm0,%xmm1
movsd  -0x168(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
call   1040 <exp@plt>
cvtsi2sd %eax,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xc0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1900 <PopCSn+0x7a0>
jmp    1c14 <PopCSn+0xab4>
movl   $0x0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1c9c <PopCSn+0xb3c>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    1c6f <PopCSn+0xb0f>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1c2d <PopCSn+0xacd>
mov    -0x40(%rbp),%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PopCSn>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rdx,%r13
movaps %xmm3,0x30(%rsp)
mov    %esi,%r14d
movsd  %xmm0,0x10(%rsp)
mov    %edi,%ebp
divsd  %xmm1,%xmm2
cvttsd2si %xmm2,%r12d
mov    %r12d,%edi
call   1080 <sqrt@plt>
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
mulsd  0xe67(%rip),%xmm3
add    $0xfffffffa,%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  0xe5d(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe59(%rip),%xmm1
movsd  0xe59(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movsd  0xe4d(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  %xmm1,0x60(%rsp)
movsd  0xe37(%rip),%xmm0
movsd  %xmm3,(%rsp)
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe28(%rip),%xmm0
mov    %r14d,%edi
call   1070 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe19(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0xe1b(%rip),%xmm0
mov    %r14d,%edi
call   1070 <pow@plt>
mov    %eax,%r15d
mov    %r12d,%edi
call   1080 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe01(%rip),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0xdfb(%rip),%xmm0
mov    %r14d,%edi
call   1070 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x48(%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <exp@plt>
mov    $0x1,%ecx
mov    $0x1,%edx
sub    %eax,%edx
add    $0x1,%eax
cmp    $0x3,%eax
cmovae %ecx,%edx
imul   %r14d,%edx
cvtsi2sd %edx,%xmm10
mulsd  0x60(%rsp),%xmm10
cmp    $0xb,%r14d
jl     12b7 <PopCSn+0x157>
addsd  0xdb1(%rip),%xmm10
movsd  0x8(%rsp),%xmm3
divsd  0x28(%rsp),%xmm3
xorpd  %xmm1,%xmm1
movapd 0x30(%rsp),%xmm0
movapd %xmm0,%xmm9
cmpltsd %xmm1,%xmm9
movapd %xmm9,%xmm1
andpd  %xmm10,%xmm1
andnpd %xmm0,%xmm9
orpd   %xmm1,%xmm9
cvtsi2sd %r14d,%xmm8
movsd  0xd77(%rip),%xmm2
addsd  %xmm8,%xmm2
subsd  %xmm10,%xmm2
cvttsd2si %xmm2,%eax
test   %eax,%eax
cmovg  %eax,%ecx
cmp    $0x13,%ecx
movsd  0x10(%rsp),%xmm0
jb     1330 <PopCSn+0x1d0>
mov    %ecx,%eax
imul   $0x38e38e39,%rax,%rax
shr    $0x23,%rax
add    $0x3,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
jmp    1369 <PopCSn+0x209>
cmp    $0xb,%ecx
jb     1342 <PopCSn+0x1e2>
movzbl %cl,%eax
imul   $0x39,%eax,%eax
shr    $0xa,%eax
add    $0x2,%al
jmp    1355 <PopCSn+0x1f5>
cmp    $0x3,%ecx
jb     1361 <PopCSn+0x201>
movzbl %cl,%eax
imul   $0xcd,%eax,%eax
shr    $0xb,%eax
add    $0x1,%al
movzbl %al,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
jmp    1369 <PopCSn+0x209>
movsd  0xcaf(%rip),%xmm2
addsd  0xcd7(%rip),%xmm3
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
mulsd  0xc7f(%rip),%xmm0
test   %r14d,%r14d
jle    13a3 <PopCSn+0x243>
lea    -0x1(%r14),%ecx
mov    %r14d,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    13ac <PopCSn+0x24c>
xorpd  %xmm4,%xmm4
mov    $0x1,%ecx
jmp    1434 <PopCSn+0x2d4>
xorpd  %xmm4,%xmm4
jmp    1453 <PopCSn+0x2f3>
mov    %r14d,%edx
and    $0xfffffff8,%edx
xorpd  %xmm4,%xmm4
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
xorps  %xmm5,%xmm5
cvtsi2sd %ecx,%xmm5
lea    0x1(%rcx),%esi
xorps  %xmm6,%xmm6
cvtsi2sd %esi,%xmm6
addsd  %xmm4,%xmm5
lea    0x2(%rcx),%esi
xorps  %xmm4,%xmm4
cvtsi2sd %esi,%xmm4
addsd  %xmm5,%xmm6
lea    0x3(%rcx),%esi
xorps  %xmm5,%xmm5
cvtsi2sd %esi,%xmm5
addsd  %xmm6,%xmm4
lea    0x4(%rcx),%esi
xorps  %xmm6,%xmm6
cvtsi2sd %esi,%xmm6
addsd  %xmm4,%xmm5
lea    0x5(%rcx),%esi
xorps  %xmm7,%xmm7
cvtsi2sd %esi,%xmm7
addsd  %xmm5,%xmm6
lea    0x6(%rcx),%esi
xorps  %xmm5,%xmm5
cvtsi2sd %esi,%xmm5
addsd  %xmm6,%xmm7
lea    0x7(%rcx),%esi
xorps  %xmm4,%xmm4
cvtsi2sd %esi,%xmm4
addsd  %xmm7,%xmm5
addsd  %xmm5,%xmm4
add    $0x8,%ecx
cmp    %edx,%esi
jne    13c0 <PopCSn+0x260>
test   %eax,%eax
je     1453 <PopCSn+0x2f3>
nopl   0x0(%rax,%rax,1)
xorps  %xmm5,%xmm5
cvtsi2sd %ecx,%xmm5
addsd  %xmm5,%xmm4
add    $0x1,%ecx
add    $0xffffffff,%eax
jne    1440 <PopCSn+0x2e0>
mulsd  %xmm1,%xmm3
movsd  %xmm3,0x8(%rsp)
movsd  0xc13(%rip),%xmm3
mulsd  %xmm4,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm8,%xmm3
mulsd  %xmm2,%xmm2
mulsd  0xc02(%rip),%xmm2
divsd  %xmm3,%xmm2
movsd  0xbfe(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xbf6(%rip),%xmm2
divsd  %xmm1,%xmm2
movapd %xmm10,%xmm1
subsd  %xmm9,%xmm1
movapd %xmm1,0x10(%rsp)
mulsd  0xbe2(%rip),%xmm0
divsd  %xmm2,%xmm0
movapd %xmm10,0x30(%rsp)
call   1040 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movapd 0x30(%rsp),%xmm2
divsd  %xmm2,%xmm0
movsd  0xb33(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xb3d(%rip),%xmm0
mov    %r14d,%edi
call   1070 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xb2e(%rip),%xmm0
ucomisd (%rsp),%xmm0
jae    156c <PopCSn+0x40c>
test   %r14d,%r14d
js     1927 <PopCSn+0x7c7>
lea    0x2(%r14),%ebx
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
subsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
movapd %xmm1,%xmm3
divsd  %xmm0,%xmm3
lea    0x1(%r14),%r12d
mov    %r12d,%eax
and    $0x3,%eax
cmp    $0x3,%r14d
jae    1626 <PopCSn+0x4c6>
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
jmp    168f <PopCSn+0x52f>
test   %r14d,%r14d
js     1927 <PopCSn+0x7c7>
movsd  0x8(%rsp),%xmm0
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
mulsd  0xb0b(%rip),%xmm0
mov    %r14,%rax
cvttsd2si %xmm0,%r14d
mov    %rax,0x58(%rsp)
lea    0x1(%rax),%r15d
xorpd  %xmm4,%xmm4
xor    %ebp,%ebp
jmp    15d5 <PopCSn+0x475>
xchg   %ax,%ax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x0(%r13,%rbp,8)
movsd  0x8(%rsp),%xmm4
addsd  %xmm0,%xmm4
add    $0x1,%rbp
cmp    %rbp,%r15
je     18aa <PopCSn+0x74a>
movsd  %xmm4,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
subsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
divsd  0x30(%rsp),%xmm0
movsd  0xaae(%rip),%xmm1
minsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
mov    %r14d,%edi
call   1080 <sqrt@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <exp@plt>
imul   %ebx,%eax
lea    0x1(%rax),%ecx
cmp    $0x3,%ecx
jb     15b0 <PopCSn+0x450>
xor    %eax,%eax
jmp    15b0 <PopCSn+0x450>
mov    %r12d,%edx
and    $0xfffffffc,%edx
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
mov    %r14d,%esi
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x2(%rsi),%edi
xorps  %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
mulsd  %xmm3,%xmm1
maxsd  %xmm0,%xmm1
lea    0x1(%rsi),%edi
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd  %xmm3,%xmm0
maxsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %esi,%xmm1
mulsd  %xmm3,%xmm1
maxsd  %xmm0,%xmm1
lea    -0x1(%rsi),%edi
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
mulsd  %xmm3,%xmm0
maxsd  %xmm1,%xmm0
add    $0x4,%ecx
add    $0xfffffffc,%esi
cmp    %ecx,%edx
jne    1640 <PopCSn+0x4e0>
movapd %xmm0,%xmm1
test   %eax,%eax
je     16bb <PopCSn+0x55b>
mov    %r14d,%edx
sub    %ecx,%edx
add    $0x2,%edx
nop
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
mulsd  %xmm3,%xmm1
maxsd  %xmm0,%xmm1
add    $0xffffffff,%edx
movapd %xmm1,%xmm0
add    $0xffffffff,%eax
jne    16a0 <PopCSn+0x540>
test   %r14d,%r14d
js     1927 <PopCSn+0x7c7>
mov    %r14,0x58(%rsp)
mulsd  %xmm2,%xmm2
mulsd  0x99b(%rip),%xmm2
mulsd  0x993(%rip),%xmm2
movsd  0x9cb(%rip),%xmm0
ucomisd %xmm2,%xmm0
setb   %al
ucomisd 0x9c4(%rip),%xmm2
setb   %bpl
or     %al,%bpl
movsd  %xmm1,0x48(%rsp)
cvttsd2si %xmm1,%r14d
movsd  0x9b2(%rip),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x28(%rsp)
movapd 0x9c0(%rip),%xmm0
movapd %xmm2,0x10(%rsp)
xorpd  %xmm2,%xmm0
movapd %xmm0,0x60(%rsp)
xorpd  %xmm4,%xmm4
xor    %r15d,%r15d
movsd  %xmm3,0x30(%rsp)
mov    %r12,0x70(%rsp)
mov    %r14d,0x54(%rsp)
jmp    17df <PopCSn+0x67f>
nopl   0x0(%rax)
cvttsd2si (%rsp),%edi
call   1060 <log@plt>
movsd  (%rsp),%xmm1
mulsd  0x971(%rip),%xmm1
mulsd  0x28(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x2,%edi
call   1060 <log@plt>
mulsd  0x60(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movapd 0x10(%rsp),%xmm0
call   1050 <lgamma@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x30(%rsp),%xmm3
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x0(%r13,%r15,8)
movsd  0x8(%rsp),%xmm4
addsd  %xmm0,%xmm4
add    $0x1,%r15
add    $0xffffffff,%ebx
cmp    %r15,%r12
je     18aa <PopCSn+0x74a>
movsd  %xmm4,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,(%rsp)
test   %bpl,%bpl
jne    1750 <PopCSn+0x5f0>
mov    %r14d,%edi
call   1060 <log@plt>
call   1030 <abs@plt>
mulsd  0x10(%rsp),%xmm0
movsd  0x8af(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1750 <PopCSn+0x5f0>
movsd  0x8a5(%rip),%xmm0
ucomisd 0x48(%rsp),%xmm0
jb     1750 <PopCSn+0x5f0>
cvttsd2si (%rsp),%edi
movsd  0x28(%rsp),%xmm0
call   1070 <pow@plt>
mov    %eax,%r12d
movsd  (%rsp),%xmm0
mulsd  0x881(%rip),%xmm0
call   1040 <exp@plt>
mov    %r13,%r14
mov    %ebp,%r13d
mov    %eax,%ebp
imul   %r12d,%ebp
mov    $0x2,%edi
movaps 0x10(%rsp),%xmm0
call   1070 <pow@plt>
mov    %eax,%r12d
movapd 0x10(%rsp),%xmm0
call   1050 <lgamma@plt>
call   1040 <exp@plt>
mov    %eax,%ecx
imul   %r12d,%ecx
mov    0x70(%rsp),%r12
mov    %ebp,%eax
mov    %r13d,%ebp
mov    %r14,%r13
mov    0x54(%rsp),%r14d
cltd
idiv   %ecx
jmp    17ad <PopCSn+0x64d>
mov    0x58(%rsp),%rax
test   %eax,%eax
js     1927 <PopCSn+0x7c7>
lea    0x1(%rax),%edx
test   %eax,%eax
je     1938 <PopCSn+0x7d8>
mov    %edx,%esi
and    $0xfffffffe,%esi
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
mov    %eax,%edi
cmova  %ecx,%edi
movsd  0x8(%r13,%rcx,8),%xmm2
movapd %xmm1,%xmm3
maxsd  %xmm0,%xmm3
divsd  %xmm4,%xmm1
movsd  %xmm1,0x0(%r13,%rcx,8)
lea    0x1(%rcx),%eax
ucomisd %xmm3,%xmm2
cmovbe %edi,%eax
movapd %xmm2,%xmm0
maxsd  %xmm3,%xmm0
divsd  %xmm4,%xmm2
movsd  %xmm2,0x8(%r13,%rcx,8)
add    $0x2,%rcx
cmp    %rsi,%rcx
jne    18d0 <PopCSn+0x770>
test   $0x1,%dl
jne    1945 <PopCSn+0x7e5>
jmp    1929 <PopCSn+0x7c9>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
xor    %eax,%eax
test   $0x1,%dl
je     1929 <PopCSn+0x7c9>
movsd  0x0(%r13,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
cmova  %ecx,%eax
divsd  %xmm4,%xmm1
movsd  %xmm1,0x0(%r13,%rcx,8)
jmp    1929 <PopCSn+0x7c9>

LLVM IR (-O0):
define i32 @PopCSn(i32 %0, double %1, i32 %2, double %3, double %4, double %5, double* %6) {
%8 = alloca i32
%9 = alloca double
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
%39 = alloca double
store i32 %0, i32* %8
store double %1, double* %9
store i32 %2, i32* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double* %6, double** %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %21
store double 0.000000e+00, double* %22
store double 0.000000e+00, double* %23
store double 0.000000e+00, double* %24
store double 0.000000e+00, double* %25
store double 3.600000e+08, double* %26
store double 3.858500e+00, double* %27
store double 0.000000e+00, double* %28
store double 0.000000e+00, double* %29
store double 0.000000e+00, double* %30
store double 0.000000e+00, double* %31
store double 0.000000e+00, double* %32
store double 0.000000e+00, double* %33
store double 0.000000e+00, double* %34
store double 0.000000e+00, double* %35
store double 0.000000e+00, double* %36
store double 0.000000e+00, double* %37
store double 0.000000e+00, double* %38
store double 4.470000e-01, double* %39
%40 = load double, double* %9
%41 = fmul double %40, 1.000000e+03
store double %41, double* %9
%42 = load double, double* %12
%43 = load double, double* %11
%44 = fdiv double %42, %43
store double %44, double* %23
%45 = load double, double* %23
%46 = fptosi double %45 to i32
%47 = call i32 @sqrt(i32 %46)
%48 = sitofp i32 %47 to double
%49 = fmul double 1.389200e+09, %48
store double %49, double* %22
%50 = load i32, i32* %8
%51 = sub nsw i32 %50, 6
store i32 %51, i32* %16
%52 = load i32, i32* %16
%53 = sitofp i32 %52 to double
%54 = call double @llvm.fmuladd.f64(double -5.210000e-03, double %53, double 1.000000e+00)
%55 = load i32, i32* %16
%56 = sitofp i32 %55 to double
%57 = fmul double 9.560000e-05, %56
%58 = load i32, i32* %16
%59 = sitofp i32 %58 to double
%60 = call double @llvm.fmuladd.f64(double %57, double %59, double %54)
%61 = load i32, i32* %16
%62 = sitofp i32 %61 to double
%63 = fmul double 5.960000e-07, %62
%64 = load i32, i32* %16
%65 = sitofp i32 %64 to double
%66 = fmul double %63, %65
%67 = load i32, i32* %16
%68 = sitofp i32 %67 to double
%69 = fneg double %66
%70 = call double @llvm.fmuladd.f64(double %69, double %68, double %60)
store double %70, double* %25
%71 = load double, double* %22
%72 = fmul double 5.710000e-02, %71
%73 = load double, double* %26
%74 = load i32, i32* %10
%75 = call i32 @pow(i32 %74, double 4.500000e-01)
%76 = sitofp i32 %75 to double
%77 = fmul double %73, %76
%78 = fdiv double %72, %77
%79 = fsub double 4.260000e-01, %78
%80 = load i32, i32* %10
%81 = call i32 @pow(i32 %80, double 4.000000e-01)
%82 = sitofp i32 %81 to double
%83 = fmul double %79, %82
store double %83, double* %31
%84 = load i32, i32* %10
%85 = load double, double* %27
%86 = load double, double* %23
%87 = fptosi double %86 to i32
%88 = call i32 @sqrt(i32 %87)
%89 = sitofp i32 %88 to double
%90 = fmul double %85, %89
%91 = load i32, i32* %10
%92 = load double, double* %39
%93 = call i32 @pow(i32 %91, double %92)
%94 = sitofp i32 %93 to double
%95 = fdiv double %90, %94
%96 = call i32 @exp(double %95)
%97 = sdiv i32 1, %96
%98 = sub nsw i32 1, %97
%99 = mul nsw i32 %84, %98
%100 = sitofp i32 %99 to double
%101 = load double, double* %25
%102 = fmul double %100, %101
store double %102, double* %33
%103 = load i32, i32* %10
%104 = icmp sgt i32 %103, 10
br i1 %104, label %105, label %108
105: ; preds = %7
%106 = load double, double* %33
%107 = fadd double %106, 2.000000e-01
store double %107, double* %33
br label %108
108: ; preds = %105, %7
%109 = load double, double* %33
store double %109, double* %24
%110 = load double, double* %13
%111 = fcmp olt double %110, 0.000000e+00
br i1 %111, label %112, label %114
112: ; preds = %108
%113 = load double, double* %24
store double %113, double* %13
br label %114
114: ; preds = %112, %108
%115 = load i32, i32* %10
%116 = sitofp i32 %115 to double
%117 = fadd double 5.000000e-01, %116
%118 = load double, double* %33
%119 = fsub double %117, %118
%120 = fptosi double %119 to i32
store i32 %120, i32* %17
%121 = load i32, i32* %17
%122 = icmp slt i32 %121, 1
br i1 %122, label %123, label %124
123: ; preds = %114
store i32 1, i32* %17
br label %124
124: ; preds = %123, %114
%125 = load i32, i32* %17
%126 = icmp sgt i32 %125, 18
br i1 %126, label %127, label %132
127: ; preds = %124
%128 = load i32, i32* %17
%129 = sdiv i32 %128, 36
%130 = add nsw i32 3, %129
%131 = sitofp i32 %130 to double
store double %131, double* %37
br label %151
132: ; preds = %124
%133 = load i32, i32* %17
%134 = icmp sgt i32 %133, 10
br i1 %134, label %135, label %140
135: ; preds = %132
%136 = load i32, i32* %17
%137 = sdiv i32 %136, 18
%138 = add nsw i32 2, %137
%139 = sitofp i32 %138 to double
store double %139, double* %37
br label %150
140: ; preds = %132
%141 = load i32, i32* %17
%142 = icmp sgt i32 %141, 2
br i1 %142, label %143, label %148
143: ; preds = %140
%144 = load i32, i32* %17
%145 = sdiv i32 %144, 10
%146 = add nsw i32 1, %145
%147 = sitofp i32 %146 to double
store double %147, double* %37
br label %149
148: ; preds = %140
store double 1.000000e+00, double* %37
br label %149
149: ; preds = %148, %143
br label %150
150: ; preds = %149, %135
br label %151
151: ; preds = %150, %127
store double 0.000000e+00, double* %18
store i32 1, i32* %15
br label %152
152: ; preds = %161, %151
%153 = load i32, i32* %15
%154 = load i32, i32* %10
%155 = icmp sle i32 %153, %154
br i1 %155, label %156, label %164
156: ; preds = %152
%157 = load i32, i32* %15
%158 = sitofp i32 %157 to double
%159 = load double, double* %18
%160 = fadd double %159, %158
store double %160, double* %18
br label %161
161: ; preds = %156
%162 = load i32, i32* %15
%163 = add nsw i32 %162, 1
store i32 %163, i32* %15
br label %152
164: ; preds = %152
%165 = load i32, i32* %10
%166 = sitofp i32 %165 to double
%167 = load double, double* %18
%168 = fmul double 2.000000e+00, %167
%169 = load double, double* %18
%170 = fneg double %168
%171 = call double @llvm.fmuladd.f64(double %170, double %169, double %166)
store double %171, double* %36
%172 = load double, double* %37
%173 = load double, double* %37
%174 = fmul double %172, %173
%175 = fmul double %174, 5.290000e-01
%176 = load double, double* %36
%177 = fdiv double %175, %176
store double %177, double* %38
%178 = load double, double* %38
%179 = fmul double 0x400921FB54524550, %178
%180 = load double, double* %38
%181 = fmul double %179, %180
store double %181, double* %38
%182 = load double, double* %9
%183 = fmul double 5.000000e+01, %182
%184 = load double, double* %38
%185 = fdiv double 1.000000e+01, %184
%186 = fdiv double %183, %185
store double %186, double* %34
%187 = load double, double* %33
%188 = load double, double* %33
%189 = load double, double* %13
%190 = fsub double %188, %189
%191 = load double, double* %34
%192 = fneg double %191
%193 = call i32 @exp(double %192)
%194 = sitofp i32 %193 to double
%195 = fmul double %190, %194
%196 = load double, double* %33
%197 = fdiv double %195, %196
%198 = fsub double 1.000000e+00, %197
%199 = fmul double %187, %198
store double %199, double* %33
store double 0.000000e+00, double* %18
%200 = load double, double* %22
%201 = load i32, i32* %10
%202 = call i32 @pow(i32 %201, double 4.500000e-01)
%203 = sitofp i32 %202 to double
%204 = fmul double 3.600000e+08, %203
%205 = fcmp ole double %200, %204
br i1 %205, label %206, label %249
206: ; preds = %164
store i32 0, i32* %15
br label %207
207: ; preds = %245, %206
%208 = load i32, i32* %15
%209 = load i32, i32* %10
%210 = icmp sle i32 %208, %209
br i1 %210, label %211, label %248
211: ; preds = %207
%212 = load i32, i32* %15
%213 = sitofp i32 %212 to double
%214 = load double, double* %33
%215 = fsub double %213, %214
%216 = load i32, i32* %15
%217 = sitofp i32 %216 to double
%218 = load double, double* %33
%219 = fsub double %217, %218
%220 = fmul double %215, %219
%221 = load double, double* %31
%222 = fmul double 2.000000e+00, %221
%223 = load double, double* %31
%224 = fmul double %222, %223
%225 = fdiv double %220, %224
store double %225, double* %35
%226 = load double, double* %35
%227 = fcmp ogt double %226, 4.000000e+01
br i1 %227, label %228, label %229
228: ; preds = %211
store double 4.000000e+01, double* %35
br label %229
229: ; preds = %228, %211
%230 = load double, double* %31
%231 = fmul double 0x401921FB54524550, %230
%232 = fptosi double %231 to i32
%233 = call i32 @sqrt(i32 %232)
%234 = load double, double* %35
%235 = call i32 @exp(double %234)
%236 = mul nsw i32 %233, %235
%237 = sdiv i32 1, %236
%238 = sitofp i32 %237 to double
%239 = load double*, double** %14
%240 = load i32, i32* %15
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double, double* %239, i64 %241
store double %238, double* %242
%243 = load double, double* %18
%244 = fadd double %243, %238
store double %244, double* %18
br label %245
245: ; preds = %229
%246 = load i32, i32* %15
%247 = add nsw i32 %246, 1
store i32 %247, i32* %15
br label %207
248: ; preds = %207
br label %388
249: ; preds = %164
%250 = load i32, i32* %10
%251 = add nsw i32 %250, 2
%252 = sitofp i32 %251 to double
%253 = load double, double* %33
%254 = fsub double %252, %253
%255 = fmul double 2.000000e+00, %254
%256 = load double, double* %31
%257 = fdiv double %255, %256
store double %257, double* %32
%258 = load double, double* %32
%259 = load double, double* %32
%260 = fmul double %258, %259
%261 = fdiv double %260, 2.000000e+00
store double %261, double* %30
%262 = load double, double* %31
%263 = load double, double* %32
%264 = fdiv double %263, %262
store double %264, double* %32
store double 0.000000e+00, double* %29
store i32 0, i32* %15
br label %265
265: ; preds = %282, %249
%266 = load i32, i32* %15
%267 = load i32, i32* %10
%268 = icmp sle i32 %266, %267
br i1 %268, label %269, label %285
269: ; preds = %265
%270 = load double, double* %32
%271 = load i32, i32* %10
%272 = load i32, i32* %15
%273 = sub nsw i32 %271, %272
%274 = add nsw i32 %273, 2
%275 = sitofp i32 %274 to double
%276 = fmul double %270, %275
store double %276, double* %28
%277 = load double, double* %29
%278 = fcmp ogt double %276, %277
br i1 %278, label %279, label %281
279: ; preds = %269
%280 = load double, double* %28
store double %280, double* %29
br label %281
281: ; preds = %279, %269
br label %282
282: ; preds = %281
%283 = load i32, i32* %15
%284 = add nsw i32 %283, 1
store i32 %284, i32* %15
br label %265
285: ; preds = %265
store i32 0, i32* %15
br label %286
286: ; preds = %384, %285
%287 = load i32, i32* %15
%288 = load i32, i32* %10
%289 = icmp sle i32 %287, %288
br i1 %289, label %290, label %387
290: ; preds = %286
%291 = load double, double* %32
%292 = load i32, i32* %10
%293 = load i32, i32* %15
%294 = sub nsw i32 %292, %293
%295 = add nsw i32 %294, 2
%296 = sitofp i32 %295 to double
%297 = fmul double %291, %296
store double %297, double* %28
%298 = load double, double* %30
%299 = fdiv double %298, 2.000000e+00
%300 = fcmp ole double %299, 5.750000e+01
br i1 %300, label %301, label %343
301: ; preds = %290
%302 = load double, double* %30
%303 = fdiv double %302, 2.000000e+00
%304 = fcmp oge double %303, 1.000000e-30
br i1 %304, label %305, label %343
305: ; preds = %301
%306 = load double, double* %30
%307 = fmul double 5.000000e-01, %306
%308 = load double, double* %29
%309 = fptosi double %308 to i32
%310 = call double @log(i32 %309)
%311 = call double @abs(double %310)
%312 = fmul double %307, %311
%313 = fcmp ole double %312, 5.000000e+01
br i1 %313, label %314, label %343
314: ; preds = %305
%315 = load double, double* %29
%316 = fcmp ole double %315, 8.500000e+01
br i1 %316, label %317, label %343
317: ; preds = %314
%318 = load double, double* %28
%319 = fptosi double %318 to i32
%320 = load double, double* %30
%321 = fdiv double %320, 2.000000e+00
%322 = fsub double %321, 1.000000e+00
%323 = call i32 @pow(i32 %319, double %322)
%324 = load double, double* %28
%325 = fneg double %324
%326 = fdiv double %325, 2.000000e+00
%327 = call i32 @exp(double %326)
%328 = mul nsw i32 %323, %327
%329 = load double, double* %30
%330 = fdiv double %329, 2.000000e+00
%331 = call i32 @pow(i32 2, double %330)
%332 = load double, double* %30
%333 = fdiv double %332, 2.000000e+00
%334 = call double @lgamma(double %333)
%335 = call i32 @exp(double %334)
%336 = mul nsw i32 %331, %335
%337 = sdiv i32 %328, %336
%338 = sitofp i32 %337 to double
%339 = load double*, double** %14
%340 = load i32, i32* %15
%341 = sext i32 %340 to i64
%342 = getelementptr inbounds double, double* %339, i64 %341
store double %338, double* %342
br label %369
343: ; preds = %314, %305, %301, %290
%344 = load double, double* %30
%345 = fdiv double %344, 2.000000e+00
%346 = fsub double %345, 1.000000e+00
%347 = load double, double* %28
%348 = fptosi double %347 to i32
%349 = call double @log(i32 %348)
%350 = load double, double* %28
%351 = fdiv double %350, 2.000000e+00
%352 = fneg double %351
%353 = call double @llvm.fmuladd.f64(double %346, double %349, double %352)
%354 = load double, double* %30
%355 = fdiv double %354, 2.000000e+00
%356 = call double @log(i32 2)
%357 = fneg double %355
%358 = call double @llvm.fmuladd.f64(double %357, double %356, double %353)
%359 = load double, double* %30
%360 = fdiv double %359, 2.000000e+00
%361 = call double @lgamma(double %360)
%362 = fsub double %358, %361
%363 = call i32 @exp(double %362)
%364 = sitofp i32 %363 to double
%365 = load double*, double** %14
%366 = load i32, i32* %15
%367 = sext i32 %366 to i64
%368 = getelementptr inbounds double, double* %365, i64 %367
store double %364, double* %368
br label %369
369: ; preds = %343, %317
%370 = load double, double* %32
%371 = load double*, double** %14
%372 = load i32, i32* %15
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds double, double* %371, i64 %373
%375 = load double, double* %374
%376 = fmul double %375, %370
store double %376, double* %374
%377 = load double*, double** %14
%378 = load i32, i32* %15
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds double, double* %377, i64 %379
%381 = load double, double* %380
%382 = load double, double* %18
%383 = fadd double %382, %381
store double %383, double* %18
br label %384
384: ; preds = %369
%385 = load i32, i32* %15
%386 = add nsw i32 %385, 1
store i32 %386, i32* %15
br label %286
387: ; preds = %286
br label %388
388: ; preds = %387, %248
store i32 0, i32* %16
store double 0.000000e+00, double* %27
store i32 0, i32* %15
br label %389
389: ; preds = %420, %388
%390 = load i32, i32* %15
%391 = load i32, i32* %10
%392 = icmp sle i32 %390, %391
br i1 %392, label %393, label %423
393: ; preds = %389
%394 = load double*, double** %14
%395 = load i32, i32* %15
%396 = sext i32 %395 to i64
%397 = getelementptr inbounds double, double* %394, i64 %396
%398 = load double, double* %397
%399 = load double, double* %27
%400 = fcmp ogt double %398, %399
br i1 %400, label %401, label %408
401: ; preds = %393
%402 = load double*, double** %14
%403 = load i32, i32* %15
%404 = sext i32 %403 to i64
%405 = getelementptr inbounds double, double* %402, i64 %404
%406 = load double, double* %405
store double %406, double* %27
%407 = load i32, i32* %15
store i32 %407, i32* %16
br label %408
408: ; preds = %401, %393
%409 = load double*, double** %14
%410 = load i32, i32* %15
%411 = sext i32 %410 to i64
%412 = getelementptr inbounds double, double* %409, i64 %411
%413 = load double, double* %412
%414 = load double, double* %18
%415 = fdiv double %413, %414
%416 = load double*, double** %14
%417 = load i32, i32* %15
%418 = sext i32 %417 to i64
%419 = getelementptr inbounds double, double* %416, i64 %418
store double %415, double* %419
br label %420
420: ; preds = %408
%421 = load i32, i32* %15
%422 = add nsw i32 %421, 1
store i32 %422, i32* %15
br label %389
423: ; preds = %389
%424 = load i32, i32* %16
ret i32 %424
}

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