#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 PointNormal(double);
double exp(double);
double fabs(double);
double log(double);
double pow(double, double);
double seq_gen_IncompleteGamma(double, double, double);
double seq_gen_LnGamma(double);
double sqrt(double);
double PointChi2(double prob, double v) {
  double e = .5e-6, aa = .6931471805, p = prob, g;
  double xx, c, ch, a = 0, q = 0, p1 = 0, p2 = 0, t = 0, x = 0, b = 0, s1, s2,
                    s3, s4, s5, s6;
  if (p < .000002 || p > .999998 || v <= 0)
    return (-1);
  g = seq_gen_LnGamma(v / 2);
  xx = v / 2;
  c = xx - 1;
  if (v >= -1.24 * log(p))
    goto l1;
  ch = pow((p * xx * exp(g + xx * aa)), 1 / xx);
  if (ch - e < 0)
    return (ch);
  goto l4;
l1:
  if (v > .32)
    goto l3;
  ch = 0.4;
  a = log(1 - p);
l2:
  q = ch;
  p1 = 1 + ch * (4.67 + ch);
  p2 = ch * (6.73 + ch * (6.66 + ch));
  t = -0.5 + (4.67 + 2 * ch) / p1 - (6.73 + ch * (13.32 + 3 * ch)) / p2;
  ch -= (1 - exp(a + g + .5 * ch + c * aa) * p2 / p1) / t;
  if (fabs(q / ch - 1) - .01 <= 0)
    goto l4;
  else
    goto l2;
l3:
  x = PointNormal(p);
  p1 = 0.222222 / v;
  ch = v * pow((x * sqrt(p1) + 1 - p1), 3.0);
  if (ch > 2.2 * v + 6)
    ch = -2 * (log(1 - p) - c * log(.5 * ch) + g);
l4:
  q = ch;
  p1 = .5 * ch;
  if ((t = seq_gen_IncompleteGamma(p1, xx, g)) < 0) {
    return (-1);
  }
  p2 = p - t;
  t = p2 * exp(xx * aa + g + p1 - c * log(ch));
  b = t / ch;
  a = 0.5 * t - b * c;
  s1 = (210 + a * (140 + a * (105 + a * (84 + a * (70 + 60 * a))))) / 420;
  s2 = (420 + a * (735 + a * (966 + a * (1141 + 1278 * a)))) / 2520;
  s3 = (210 + a * (462 + a * (707 + 932 * a))) / 2520;
  s4 = (252 + a * (672 + 1182 * a) + c * (294 + a * (889 + 1740 * a))) / 5040;
  s5 = (84 + 264 * a + c * (175 + 606 * a)) / 2520;
  s6 = (120 + c * (346 + 127 * c)) / 5040;
  ch += t * (1 + 0.5 * t * s1 -
             b * c * (s1 - b * (s2 - b * (s3 - b * (s4 - b * (s5 - b * s6))))));
  if (fabs(q / ch - 1) > e)
    goto l4;
  return (ch);
}


x86 assembly (clang, -O0):
<PointChi2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  0xe83(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe6e(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%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  0xe14(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
ja     121c <PointChi2+0xac>
movsd  -0x30(%rbp),%xmm0
movsd  0xe14(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     121c <PointChi2+0xac>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     122e <PointChi2+0xbe>
movsd  0xf64(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1b74 <PointChi2+0xa04>
movsd  -0x18(%rbp),%xmm0
movsd  0xdf5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <seq_gen_LnGamma@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdda(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdbc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm2
movsd  -0xc0(%rbp),%xmm0
ff
movsd  0xd81(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     12b2 <PointChi2+0x142>
jmp    1331 <PointChi2+0x1c1>
movsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x38(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xd31(%rip),%xmm1
divsd  -0x40(%rbp),%xmm1
call   1060 <pow@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    132c <PointChi2+0x1bc>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1b74 <PointChi2+0xa04>
jmp    1613 <PointChi2+0x4a3>
movsd  -0x18(%rbp),%xmm0
movsd  0xcfa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    134d <PointChi2+0x1dd>
jmp    14db <PointChi2+0x36b>
movsd  0xceb(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xcc6(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xcf0(%rip),%xmm1
addsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc8f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xccc(%rip),%xmm2
addsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc93(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xc95(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  -0x68(%rbp),%xmm1
movsd  0xc7c(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  0xc56(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc52(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc32(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  -0x70(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xc01(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
mulsd  -0x70(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  0xba8(%rip),%xmm1
subsd  %xmm0,%xmm1
divsd  -0x78(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm1
divsd  -0x50(%rbp),%xmm1
movsd  0xb7f(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xcdc(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xb88(%rip),%xmm0
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     14d6 <PointChi2+0x366>
jmp    1613 <PointChi2+0x4a3>
jmp    1371 <PointChi2+0x201>
movsd  -0x30(%rbp),%xmm0
call   1070 <PointNormal@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  0xba6(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xaf1(%rip),%xmm1
addsd  %xmm1,%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xb18(%rip),%xmm1
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xb15(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb11(%rip),%xmm2
addsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    160e <PointChi2+0x49e>
movsd  0xa93(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xa94(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
call   1050 <log@plt>
movsd  -0xe8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe0(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0xa9b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1613 <PointChi2+0x4a3>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xa2b(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1090 <seq_gen_IncompleteGamma@plt>
movaps %xmm0,%xmm1
movsd  %xmm1,-0x78(%rbp)
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    166a <PointChi2+0x4fa>
movsd  0xb28(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1b74 <PointChi2+0xa04>
movsd  -0x30(%rbp),%xmm0
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1050 <log@plt>
movsd  -0x100(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xf8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0x901(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
movsd  -0x58(%rbp),%xmm4
movsd  0x9fb(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0x9f7(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0x94f(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0x9c7(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0x9af(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x957(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x96b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
movsd  0x95b(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0x957(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0x937(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0x91f(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x907(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x883(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  0x8c8(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0x8c4(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0x8a4(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x88c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x828(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  0x852(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x84e(%rip),%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0x82e(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
movsd  0x803(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0x7ff(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0x7df(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x783(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm1
movsd  0x7a2(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0x79e(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  0x770(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0x76c(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x748(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0x71a(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x716(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x6f6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x6e2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  0x671(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
movsd  0x630(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x88(%rbp),%xmm2
ff
mulsd  -0x48(%rbp),%xmm2
movsd  -0x90(%rbp),%xmm4
ff
movsd  -0x88(%rbp),%xmm3
ff
movsd  -0x98(%rbp),%xmm6
ff
movsd  -0x88(%rbp),%xmm5
ff
movsd  -0xa0(%rbp),%xmm8
ff ff
movsd  -0x88(%rbp),%xmm7
ff
movsd  -0xa8(%rbp),%xmm10
ff ff
movsd  -0x88(%rbp),%xmm9
ff ff
movsd  -0xb0(%rbp),%xmm12
ff ff
movsd  -0x88(%rbp),%xmm11
ff ff
movsd  -0xb8(%rbp),%xmm13
ff ff
movq   %xmm11,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm11
mulsd  %xmm13,%xmm11
addsd  %xmm12,%xmm11
movq   %xmm9,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm9
mulsd  %xmm11,%xmm9
addsd  %xmm10,%xmm9
movq   %xmm7,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm7
mulsd  %xmm9,%xmm7
addsd  %xmm8,%xmm7
movq   %xmm5,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm5
mulsd  %xmm7,%xmm5
addsd  %xmm6,%xmm5
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  0x4dd(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0x63a(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1b6a <PointChi2+0x9fa>
jmp    1613 <PointChi2+0x4a3>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PointChi2>:
sub    $0xa8,%rsp
movsd  0xe81(%rip),%xmm2
ucomisd %xmm0,%xmm2
movsd  0xe7d(%rip),%xmm2
ja     180e <PointChi2+0x69e>
ucomisd 0xe77(%rip),%xmm0
ja     180e <PointChi2+0x69e>
movsd  %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    180e <PointChi2+0x69e>
movsd  0xe5d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  %xmm1,(%rsp)
call   1040 <seq_gen_LnGamma@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe2b(%rip),%xmm0
addsd  0x28(%rsp),%xmm0
movapd %xmm0,0x50(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <log@plt>
movsd  (%rsp),%xmm2
mulsd  0xe1f(%rip),%xmm0
ucomisd %xmm0,%xmm2
jae    126e <PointChi2+0xfe>
movsd  0x28(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe4c(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x18(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  (%rsp),%xmm0
movsd  0xdf0(%rip),%xmm1
divsd  0x28(%rsp),%xmm1
call   1060 <pow@plt>
movapd %xmm0,%xmm2
addsd  0xe49(%rip),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm2,%xmm1
movapd %xmm0,%xmm2
jbe    1506 <PointChi2+0x396>
jmp    180e <PointChi2+0x69e>
ucomisd 0xdb2(%rip),%xmm2
movsd  0x20(%rsp),%xmm1
jbe    12b2 <PointChi2+0x142>
movapd %xmm1,%xmm0
call   1070 <PointNormal@plt>
movapd %xmm0,%xmm2
movsd  0xded(%rip),%xmm1
divsd  (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     1453 <PointChi2+0x2e3>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1474 <PointChi2+0x304>
movsd  0xd76(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1050 <log@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
movsd  0xd5e(%rip),%xmm1
movsd  0xd8e(%rip),%xmm0
mulsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x98(%rsp)
movapd %xmm1,%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm0,(%rsp)
movapd %xmm1,%xmm0
addsd  0xd2f(%rip),%xmm0
movapd %xmm1,%xmm3
movapd 0xe83(%rip),%xmm1
unpcklpd %xmm0,%xmm1
movapd %xmm3,%xmm4
addsd  0xd1b(%rip),%xmm4
mulsd  %xmm3,%xmm4
movsd  0xd17(%rip),%xmm2
addsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm4
movapd %xmm4,0x30(%rsp)
movapd %xmm3,%xmm4
unpcklpd %xmm3,%xmm4
mulpd  %xmm1,%xmm4
addpd  0xe55(%rip),%xmm4
movapd %xmm4,0x40(%rsp)
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
movapd %xmm4,%xmm1
divsd  %xmm0,%xmm1
addsd  0xcdf(%rip),%xmm1
movapd 0xe3f(%rip),%xmm0
unpcklpd %xmm1,%xmm0
movapd %xmm0,0x80(%rsp)
movapd %xmm3,%xmm0
movapd %xmm3,0x70(%rsp)
movapd %xmm3,%xmm1
mulsd  0xcbc(%rip),%xmm1
addsd  0xcbc(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm1,0x60(%rsp)
mulsd  0xc56(%rip),%xmm0
addsd  0xa0(%rsp),%xmm0
addsd  0x98(%rsp),%xmm0
call   1030 <exp@plt>
movapd 0x30(%rsp),%xmm1
mulsd  %xmm1,%xmm0
unpcklpd 0x60(%rsp),%xmm0
movapd 0x40(%rsp),%xmm2
shufpd $0x1,%xmm1,%xmm2
divpd  %xmm2,%xmm0
movapd 0x80(%rsp),%xmm1
subpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd (%rsp),%xmm0
subsd  %xmm1,%xmm0
movapd 0x70(%rsp),%xmm2
divsd  %xmm0,%xmm2
addsd  0xbdc(%rip),%xmm2
andpd  0xd9c(%rip),%xmm2
addsd  0xc3c(%rip),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm2,%xmm1
movapd %xmm0,%xmm1
jb     1300 <PointChi2+0x190>
jmp    1506 <PointChi2+0x396>
movapd %xmm1,%xmm0
movsd  %xmm2,0x30(%rsp)
movsd  %xmm1,0x40(%rsp)
call   1080 <sqrt@plt>
movsd  0x40(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xbb0(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  0xbd4(%rip),%xmm1
movapd %xmm2,%xmm0
call   1060 <pow@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0xbe2(%rip),%xmm1
addsd  0xbe2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1506 <PointChi2+0x396>
movapd %xmm0,(%rsp)
movsd  0xb6f(%rip),%xmm0
subsd  0x20(%rsp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,0x30(%rsp)
movapd (%rsp),%xmm0
mulsd  0xb39(%rip),%xmm0
call   1050 <log@plt>
mulsd  0x50(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  0x18(%rsp),%xmm1
mulsd  0xb96(%rip),%xmm1
movapd %xmm1,%xmm0
movsd  0xb62(%rip),%xmm1
mulsd  0x28(%rsp),%xmm1
addsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x80(%rsp)
movapd 0xcb5(%rip),%xmm2
movapd %xmm0,%xmm1
movapd 0x50(%rsp),%xmm0
xorpd  %xmm0,%xmm2
movapd %xmm2,0x70(%rsp)
movsd  0xb61(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xb5d(%rip),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm1,%xmm0
addsd  0xb55(%rip),%xmm2
divsd  0xb55(%rip),%xmm2
movsd  %xmm2,0x60(%rsp)
movsd  0xa9e(%rip),%xmm11
nopw   0x0(%rax,%rax,1)
movapd %xmm0,(%rsp)
mulsd  %xmm11,%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x28(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1090 <seq_gen_IncompleteGamma@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1806 <PointChi2+0x696>
movsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x40(%rsp)
movsd  0x30(%rsp),%xmm0
addsd  0x80(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movapd (%rsp),%xmm0
call   1050 <log@plt>
mulsd  0x70(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
call   1030 <exp@plt>
mulsd  0x40(%rsp),%xmm0
movapd %xmm0,%xmm14
xorpd  0xbdd(%rip),%xmm14
movapd (%rsp),%xmm13
divsd  %xmm13,%xmm14
movapd 0x50(%rsp),%xmm10
movapd %xmm10,%xmm8
mulsd  %xmm14,%xmm8
movapd %xmm0,%xmm9
movsd  0x9eb(%rip),%xmm11
mulsd  %xmm11,%xmm9
movapd %xmm9,%xmm6
addsd  %xmm8,%xmm6
movapd %xmm6,%xmm5
mulsd  0xa80(%rip),%xmm5
addsd  0xa80(%rip),%xmm5
mulsd  %xmm6,%xmm5
movsd  0xa7b(%rip),%xmm12
addsd  %xmm12,%xmm5
mulsd  %xmm6,%xmm5
addsd  0xa72(%rip),%xmm5
mulsd  %xmm6,%xmm5
addsd  0xa6e(%rip),%xmm5
mulsd  %xmm6,%xmm5
movapd %xmm6,%xmm7
mulsd  0xa76(%rip),%xmm7
addsd  0xa76(%rip),%xmm7
mulsd  %xmm6,%xmm7
addsd  0xa72(%rip),%xmm7
mulsd  %xmm6,%xmm7
addsd  0xa6e(%rip),%xmm7
mulsd  %xmm6,%xmm7
movapd %xmm6,%xmm3
mulsd  0xa6e(%rip),%xmm3
addsd  0xa6e(%rip),%xmm3
mulsd  %xmm6,%xmm3
addsd  0xa6a(%rip),%xmm3
mulsd  %xmm6,%xmm3
movapd %xmm6,%xmm1
mulsd  0xa62(%rip),%xmm1
addsd  0xa62(%rip),%xmm1
mulsd  %xmm6,%xmm1
addsd  0xa5e(%rip),%xmm1
movapd %xmm6,%xmm4
mulsd  0xa5a(%rip),%xmm4
addsd  0xa5a(%rip),%xmm4
mulsd  %xmm6,%xmm4
addsd  0xa56(%rip),%xmm4
mulsd  %xmm10,%xmm4
addsd  %xmm1,%xmm4
movapd %xmm6,%xmm1
mulsd  0xa49(%rip),%xmm1
addsd  %xmm12,%xmm1
mulsd  0xa44(%rip),%xmm6
addsd  0xa44(%rip),%xmm6
mulsd  %xmm10,%xmm6
addsd  %xmm1,%xmm6
movsd  0x9d2(%rip),%xmm10
divsd  %xmm10,%xmm6
movapd %xmm14,%xmm2
mulsd  0x60(%rsp),%xmm2
addsd  %xmm6,%xmm2
divsd  0x956(%rip),%xmm4
mulsd  %xmm14,%xmm2
addsd  %xmm4,%xmm2
movsd  0x975(%rip),%xmm4
addsd  %xmm4,%xmm3
divsd  %xmm10,%xmm3
mulsd  %xmm14,%xmm2
addsd  %xmm3,%xmm2
movsd  0x963(%rip),%xmm3
addsd  %xmm3,%xmm7
divsd  %xmm10,%xmm7
mulsd  %xmm14,%xmm2
addsd  %xmm7,%xmm2
mulsd  %xmm14,%xmm2
addsd  %xmm4,%xmm5
divsd  %xmm3,%xmm5
mulsd  %xmm5,%xmm9
addsd  %xmm5,%xmm2
mulsd  %xmm8,%xmm2
addsd  0x865(%rip),%xmm9
addsd  %xmm9,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm13,%xmm0
addsd  %xmm13,%xmm2
divsd  %xmm2,%xmm0
addsd  0x81e(%rip),%xmm0
andpd  0x9de(%rip),%xmm0
ucomisd 0x98e(%rip),%xmm0
movapd %xmm2,%xmm0
ja     1580 <PointChi2+0x410>
jmp    180e <PointChi2+0x69e>
movsd  0x7fa(%rip),%xmm2
movapd %xmm2,%xmm0
add    $0xa8,%rsp
ret

LLVM IR (-O0):
define double @PointChi2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store double %0, double* %4
store double %1, double* %5
store double 5.000000e-07, double* %6
store double 0x3FE62E42FEF1FCCC, double* %7
%26 = load double, double* %4
store double %26, double* %8
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %16
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
%27 = load double, double* %8
%28 = fcmp olt double %27, 2.000000e-06
br i1 %28, label %35, label %29
29: ; preds = %2
%30 = load double, double* %8
%31 = fcmp ogt double %30, 9.999980e-01
br i1 %31, label %35, label %32
32: ; preds = %29
%33 = load double, double* %5
%34 = fcmp ole double %33, 0.000000e+00
br i1 %34, label %35, label %36
35: ; preds = %32, %29, %2
store double -1.000000e+00, double* %3
br label %291
36: ; preds = %32
%37 = load double, double* %5
%38 = fdiv double %37, 2.000000e+00
%39 = call double @seq_gen_LnGamma(double %38)
store double %39, double* %9
%40 = load double, double* %5
%41 = fdiv double %40, 2.000000e+00
store double %41, double* %10
%42 = load double, double* %10
%43 = fsub double %42, 1.000000e+00
store double %43, double* %11
%44 = load double, double* %5
%45 = load double, double* %8
%46 = call double @log(double %45)
%47 = fmul double -1.240000e+00, %46
%48 = fcmp oge double %44, %47
br i1 %48, label %49, label %50
49: ; preds = %36
br label %70
50: ; preds = %36
%51 = load double, double* %8
%52 = load double, double* %10
%53 = fmul double %51, %52
%54 = load double, double* %9
%55 = load double, double* %10
%56 = load double, double* %7
%57 = call double @llvm.fmuladd.f64(double %55, double %56, double %54)
%58 = call double @exp(double %57)
%59 = fmul double %53, %58
%60 = load double, double* %10
%61 = fdiv double 1.000000e+00, %60
%62 = call double @pow(double %59, double %61)
store double %62, double* %12
%63 = load double, double* %12
%64 = load double, double* %6
%65 = fsub double %63, %64
%66 = fcmp olt double %65, 0.000000e+00
br i1 %66, label %67, label %69
67: ; preds = %50
%68 = load double, double* %12
store double %68, double* %3
br label %291
69: ; preds = %50
br label %161
70: ; preds = %49
%71 = load double, double* %5
%72 = fcmp ogt double %71, 3.200000e-01
br i1 %72, label %73, label %74
73: ; preds = %70
br label %129
74: ; preds = %70
store double 4.000000e-01, double* %12
%75 = load double, double* %8
%76 = fsub double 1.000000e+00, %75
%77 = call double @log(double %76)
store double %77, double* %13
br label %78
78: ; preds = %128, %74
%79 = load double, double* %12
store double %79, double* %14
%80 = load double, double* %12
%81 = load double, double* %12
%82 = fadd double 4.670000e+00, %81
%83 = call double @llvm.fmuladd.f64(double %80, double %82, double 1.000000e+00)
store double %83, double* %15
%84 = load double, double* %12
%85 = load double, double* %12
%86 = load double, double* %12
%87 = fadd double 6.660000e+00, %86
%88 = call double @llvm.fmuladd.f64(double %85, double %87, double 6.730000e+00)
%89 = fmul double %84, %88
store double %89, double* %16
%90 = load double, double* %12
%91 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %90, double 4.670000e+00)
%92 = load double, double* %15
%93 = fdiv double %91, %92
%94 = fadd double -5.000000e-01, %93
%95 = load double, double* %12
%96 = load double, double* %12
%97 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %96, double 1.332000e+01)
%98 = call double @llvm.fmuladd.f64(double %95, double %97, double 6.730000e+00)
%99 = load double, double* %16
%100 = fdiv double %98, %99
%101 = fsub double %94, %100
store double %101, double* %17
%102 = load double, double* %13
%103 = load double, double* %9
%104 = fadd double %102, %103
%105 = load double, double* %12
%106 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %105, double %104)
%107 = load double, double* %11
%108 = load double, double* %7
%109 = call double @llvm.fmuladd.f64(double %107, double %108, double %106)
%110 = call double @exp(double %109)
%111 = load double, double* %16
%112 = fmul double %110, %111
%113 = load double, double* %15
%114 = fdiv double %112, %113
%115 = fsub double 1.000000e+00, %114
%116 = load double, double* %17
%117 = fdiv double %115, %116
%118 = load double, double* %12
%119 = fsub double %118, %117
store double %119, double* %12
%120 = load double, double* %14
%121 = load double, double* %12
%122 = fdiv double %120, %121
%123 = fsub double %122, 1.000000e+00
%124 = call double @llvm.fabs.f64(double %123)
%125 = fsub double %124, 1.000000e-02
%126 = fcmp ole double %125, 0.000000e+00
br i1 %126, label %127, label %128
127: ; preds = %78
br label %161
128: ; preds = %78
br label %78
129: ; preds = %73
%130 = load double, double* %8
%131 = call double @PointNormal(double %130)
store double %131, double* %18
%132 = load double, double* %5
%133 = fdiv double 2.222220e-01, %132
store double %133, double* %15
%134 = load double, double* %5
%135 = load double, double* %18
%136 = load double, double* %15
%137 = call double @sqrt(double %136)
%138 = call double @llvm.fmuladd.f64(double %135, double %137, double 1.000000e+00)
%139 = load double, double* %15
%140 = fsub double %138, %139
%141 = call double @pow(double %140, double 3.000000e+00)
%142 = fmul double %134, %141
store double %142, double* %12
%143 = load double, double* %12
%144 = load double, double* %5
%145 = call double @llvm.fmuladd.f64(double 2.200000e+00, double %144, double 6.000000e+00)
%146 = fcmp ogt double %143, %145
br i1 %146, label %147, label %160
147: ; preds = %129
%148 = load double, double* %8
%149 = fsub double 1.000000e+00, %148
%150 = call double @log(double %149)
%151 = load double, double* %11
%152 = load double, double* %12
%153 = fmul double 5.000000e-01, %152
%154 = call double @log(double %153)
%155 = fneg double %151
%156 = call double @llvm.fmuladd.f64(double %155, double %154, double %150)
%157 = load double, double* %9
%158 = fadd double %156, %157
%159 = fmul double -2.000000e+00, %158
store double %159, double* %12
br label %160
160: ; preds = %147, %129
br label %161
161: ; preds = %288, %160, %127, %69
%162 = load double, double* %12
store double %162, double* %14
%163 = load double, double* %12
%164 = fmul double 5.000000e-01, %163
store double %164, double* %15
%165 = load double, double* %15
%166 = load double, double* %10
%167 = load double, double* %9
%168 = call double @seq_gen_IncompleteGamma(double %165, double %166, double %167)
store double %168, double* %17
%169 = fcmp olt double %168, 0.000000e+00
br i1 %169, label %170, label %171
170: ; preds = %161
store double -1.000000e+00, double* %3
br label %291
171: ; preds = %161
%172 = load double, double* %8
%173 = load double, double* %17
%174 = fsub double %172, %173
store double %174, double* %16
%175 = load double, double* %16
%176 = load double, double* %10
%177 = load double, double* %7
%178 = load double, double* %9
%179 = call double @llvm.fmuladd.f64(double %176, double %177, double %178)
%180 = load double, double* %15
%181 = fadd double %179, %180
%182 = load double, double* %11
%183 = load double, double* %12
%184 = call double @log(double %183)
%185 = fneg double %182
%186 = call double @llvm.fmuladd.f64(double %185, double %184, double %181)
%187 = call double @exp(double %186)
%188 = fmul double %175, %187
store double %188, double* %17
%189 = load double, double* %17
%190 = load double, double* %12
%191 = fdiv double %189, %190
store double %191, double* %19
%192 = load double, double* %17
%193 = load double, double* %19
%194 = load double, double* %11
%195 = fmul double %193, %194
%196 = fneg double %195
%197 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %192, double %196)
store double %197, double* %13
%198 = load double, double* %13
%199 = load double, double* %13
%200 = load double, double* %13
%201 = load double, double* %13
%202 = load double, double* %13
%203 = call double @llvm.fmuladd.f64(double 6.000000e+01, double %202, double 7.000000e+01)
%204 = call double @llvm.fmuladd.f64(double %201, double %203, double 8.400000e+01)
%205 = call double @llvm.fmuladd.f64(double %200, double %204, double 1.050000e+02)
%206 = call double @llvm.fmuladd.f64(double %199, double %205, double 1.400000e+02)
%207 = call double @llvm.fmuladd.f64(double %198, double %206, double 2.100000e+02)
%208 = fdiv double %207, 4.200000e+02
store double %208, double* %20
%209 = load double, double* %13
%210 = load double, double* %13
%211 = load double, double* %13
%212 = load double, double* %13
%213 = call double @llvm.fmuladd.f64(double 1.278000e+03, double %212, double 1.141000e+03)
%214 = call double @llvm.fmuladd.f64(double %211, double %213, double 9.660000e+02)
%215 = call double @llvm.fmuladd.f64(double %210, double %214, double 7.350000e+02)
%216 = call double @llvm.fmuladd.f64(double %209, double %215, double 4.200000e+02)
%217 = fdiv double %216, 2.520000e+03
store double %217, double* %21
%218 = load double, double* %13
%219 = load double, double* %13
%220 = load double, double* %13
%221 = call double @llvm.fmuladd.f64(double 9.320000e+02, double %220, double 7.070000e+02)
%222 = call double @llvm.fmuladd.f64(double %219, double %221, double 4.620000e+02)
%223 = call double @llvm.fmuladd.f64(double %218, double %222, double 2.100000e+02)
%224 = fdiv double %223, 2.520000e+03
store double %224, double* %22
%225 = load double, double* %13
%226 = load double, double* %13
%227 = call double @llvm.fmuladd.f64(double 1.182000e+03, double %226, double 6.720000e+02)
%228 = call double @llvm.fmuladd.f64(double %225, double %227, double 2.520000e+02)
%229 = load double, double* %11
%230 = load double, double* %13
%231 = load double, double* %13
%232 = call double @llvm.fmuladd.f64(double 1.740000e+03, double %231, double 8.890000e+02)
%233 = call double @llvm.fmuladd.f64(double %230, double %232, double 2.940000e+02)
%234 = call double @llvm.fmuladd.f64(double %229, double %233, double %228)
%235 = fdiv double %234, 5.040000e+03
store double %235, double* %23
%236 = load double, double* %13
%237 = call double @llvm.fmuladd.f64(double 2.640000e+02, double %236, double 8.400000e+01)
%238 = load double, double* %11
%239 = load double, double* %13
%240 = call double @llvm.fmuladd.f64(double 6.060000e+02, double %239, double 1.750000e+02)
%241 = call double @llvm.fmuladd.f64(double %238, double %240, double %237)
%242 = fdiv double %241, 2.520000e+03
store double %242, double* %24
%243 = load double, double* %11
%244 = load double, double* %11
%245 = call double @llvm.fmuladd.f64(double 1.270000e+02, double %244, double 3.460000e+02)
%246 = call double @llvm.fmuladd.f64(double %243, double %245, double 1.200000e+02)
%247 = fdiv double %246, 5.040000e+03
store double %247, double* %25
%248 = load double, double* %17
%249 = load double, double* %17
%250 = fmul double 5.000000e-01, %249
%251 = load double, double* %20
%252 = call double @llvm.fmuladd.f64(double %250, double %251, double 1.000000e+00)
%253 = load double, double* %19
%254 = load double, double* %11
%255 = fmul double %253, %254
%256 = load double, double* %20
%257 = load double, double* %19
%258 = load double, double* %21
%259 = load double, double* %19
%260 = load double, double* %22
%261 = load double, double* %19
%262 = load double, double* %23
%263 = load double, double* %19
%264 = load double, double* %24
%265 = load double, double* %19
%266 = load double, double* %25
%267 = fneg double %265
%268 = call double @llvm.fmuladd.f64(double %267, double %266, double %264)
%269 = fneg double %263
%270 = call double @llvm.fmuladd.f64(double %269, double %268, double %262)
%271 = fneg double %261
%272 = call double @llvm.fmuladd.f64(double %271, double %270, double %260)
%273 = fneg double %259
%274 = call double @llvm.fmuladd.f64(double %273, double %272, double %258)
%275 = fneg double %257
%276 = call double @llvm.fmuladd.f64(double %275, double %274, double %256)
%277 = fneg double %255
%278 = call double @llvm.fmuladd.f64(double %277, double %276, double %252)
%279 = load double, double* %12
%280 = call double @llvm.fmuladd.f64(double %248, double %278, double %279)
store double %280, double* %12
%281 = load double, double* %14
%282 = load double, double* %12
%283 = fdiv double %281, %282
%284 = fsub double %283, 1.000000e+00
%285 = call double @llvm.fabs.f64(double %284)
%286 = load double, double* %6
%287 = fcmp ogt double %285, %286
br i1 %287, label %288, label %289
288: ; preds = %171
br label %161
289: ; preds = %171
%290 = load double, double* %12
store double %290, double* %3
br label %291
291: ; preds = %289, %170, %67, %35
%292 = load double, double* %3
ret double %292
}

LLVM IR (-O2):
define double @PointChi2(double %0, double %1) {
%3 = fcmp olt double %0, 2.000000e-06
%4 = fcmp ogt double %0, 9.999980e-01
%5 = or i1 %3, %4
%6 = fcmp ole double %1, 0.000000e+00
%7 = or i1 %5, %6
br i1 %7, label %146, label %8
8: ; preds = %2
%9 = fmul double %1, 5.000000e-01
%10 = tail call double @seq_gen_LnGamma(double %9)
%11 = fadd double %9, -1.000000e+00
%12 = tail call double @log(double %0)
%13 = fmul double %12, -1.240000e+00
%14 = fcmp ugt double %13, %1
br i1 %14, label %15, label %24
15: ; preds = %8
%16 = fmul double %9, %0
%17 = tail call double @llvm.fmuladd.f64(double %9, double 0x3FE62E42FEF1FCCC, double %10)
%18 = tail call double @exp(double %17)
%19 = fmul double %16, %18
%20 = fdiv double 1.000000e+00, %9
%21 = tail call double @pow(double %19, double %20)
%22 = fadd double %21, -5.000000e-07
%23 = fcmp olt double %22, 0.000000e+00
br i1 %23, label %146, label %85
24: ; preds = %8
%25 = fcmp ogt double %1, 3.200000e-01
br i1 %25, label %66, label %26
26: ; preds = %24
%27 = fsub double 1.000000e+00, %0
%28 = tail call double @log(double %27)
%29 = fadd double %10, %28
br label %30
30: ; preds = %30, %26
%31 = phi double [ 4.000000e-01, %26 ], [ %60, %30 ]
%32 = fadd double %31, 4.670000e+00
%33 = fadd double %31, 6.660000e+00
%34 = tail call double @llvm.fmuladd.f64(double %31, double %33, double 6.730000e+00)
%35 = fmul double %31, %34
%36 = insertelement <2 x double> poison, double %31, i64 0
%37 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> zeroinitializer
%38 = insertelement <2 x double> <double 2.000000e+00, double poison>, double %32, i64 1
%39 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %37, <2 x double> %38, <2 x double> <double 4.670000e+00, double 1.000000e+00>)
%40 = extractelement <2 x double> %39, i64 0
%41 = extractelement <2 x double> %39, i64 1
%42 = fdiv double %40, %41
%43 = fadd double %42, -5.000000e-01
%44 = tail call double @llvm.fmuladd.f64(double %31, double 3.000000e+00, double 1.332000e+01)
%45 = tail call double @llvm.fmuladd.f64(double %31, double %44, double 6.730000e+00)
%46 = tail call double @llvm.fmuladd.f64(double %31, double 5.000000e-01, double %29)
%47 = tail call double @llvm.fmuladd.f64(double %11, double 0x3FE62E42FEF1FCCC, double %46)
%48 = tail call double @exp(double %47)
%49 = fmul double %48, %35
%50 = insertelement <2 x double> poison, double %49, i64 0
%51 = insertelement <2 x double> %50, double %45, i64 1
%52 = insertelement <2 x double> poison, double %41, i64 0
%53 = insertelement <2 x double> %52, double %35, i64 1
%54 = fdiv <2 x double> %51, %53
%55 = insertelement <2 x double> <double 1.000000e+00, double poison>, double %43, i64 1
%56 = fsub <2 x double> %55, %54
%57 = extractelement <2 x double> %56, i64 0
%58 = extractelement <2 x double> %56, i64 1
%59 = fdiv double %57, %58
%60 = fsub double %31, %59
%61 = fdiv double %31, %60
%62 = fadd double %61, -1.000000e+00
%63 = tail call double @llvm.fabs.f64(double %62)
%64 = fadd double %63, -1.000000e-02
%65 = fcmp ugt double %64, 0.000000e+00
br i1 %65, label %30, label %85
66: ; preds = %24
%67 = tail call double @PointNormal(double %0)
%68 = fdiv double 2.222220e-01, %1
%69 = tail call double @sqrt(double %68)
%70 = tail call double @llvm.fmuladd.f64(double %67, double %69, double 1.000000e+00)
%71 = fsub double %70, %68
%72 = tail call double @pow(double %71, double 3.000000e+00)
%73 = fmul double %72, %1
%74 = tail call double @llvm.fmuladd.f64(double %1, double 2.200000e+00, double 6.000000e+00)
%75 = fcmp ogt double %73, %74
br i1 %75, label %76, label %85
76: ; preds = %66
%77 = fsub double 1.000000e+00, %0
%78 = tail call double @log(double %77)
%79 = fmul double %73, 5.000000e-01
%80 = tail call double @log(double %79)
%81 = fneg double %11
%82 = tail call double @llvm.fmuladd.f64(double %81, double %80, double %78)
%83 = fadd double %10, %82
%84 = fmul double %83, -2.000000e+00
br label %85
85: ; preds = %30, %66, %76, %15
%86 = phi double [ %21, %15 ], [ %84, %76 ], [ %73, %66 ], [ %60, %30 ]
%87 = tail call double @llvm.fmuladd.f64(double %9, double 0x3FE62E42FEF1FCCC, double %10)
%88 = fneg double %11
%89 = tail call double @llvm.fmuladd.f64(double %11, double 1.270000e+02, double 3.460000e+02)
%90 = tail call double @llvm.fmuladd.f64(double %11, double %89, double 1.200000e+02)
%91 = fdiv double %90, 5.040000e+03
br label %92
92: ; preds = %85, %97
%93 = phi double [ %141, %97 ], [ %86, %85 ]
%94 = fmul double %93, 5.000000e-01
%95 = tail call double @seq_gen_IncompleteGamma(double %94, double %9, double %10)
%96 = fcmp olt double %95, 0.000000e+00
br i1 %96, label %146, label %97
97: ; preds = %92
%98 = fsub double %0, %95
%99 = fadd double %87, %94
%100 = tail call double @log(double %93)
%101 = tail call double @llvm.fmuladd.f64(double %88, double %100, double %99)
%102 = tail call double @exp(double %101)
%103 = fmul double %98, %102
%104 = fneg double %103
%105 = fdiv double %104, %93
%106 = fmul double %11, %105
%107 = tail call double @llvm.fmuladd.f64(double %103, double 5.000000e-01, double %106)
%108 = tail call double @llvm.fmuladd.f64(double %107, double 6.000000e+01, double 7.000000e+01)
%109 = tail call double @llvm.fmuladd.f64(double %107, double %108, double 8.400000e+01)
%110 = tail call double @llvm.fmuladd.f64(double %107, double %109, double 1.050000e+02)
%111 = tail call double @llvm.fmuladd.f64(double %107, double %110, double 1.400000e+02)
%112 = tail call double @llvm.fmuladd.f64(double %107, double %111, double 2.100000e+02)
%113 = fdiv double %112, 4.200000e+02
%114 = tail call double @llvm.fmuladd.f64(double %107, double 1.278000e+03, double 1.141000e+03)
%115 = tail call double @llvm.fmuladd.f64(double %107, double %114, double 9.660000e+02)
%116 = tail call double @llvm.fmuladd.f64(double %107, double %115, double 7.350000e+02)
%117 = tail call double @llvm.fmuladd.f64(double %107, double %116, double 4.200000e+02)
%118 = fdiv double %117, 2.520000e+03
%119 = tail call double @llvm.fmuladd.f64(double %107, double 9.320000e+02, double 7.070000e+02)
%120 = tail call double @llvm.fmuladd.f64(double %107, double %119, double 4.620000e+02)
%121 = tail call double @llvm.fmuladd.f64(double %107, double %120, double 2.100000e+02)
%122 = fdiv double %121, 2.520000e+03
%123 = tail call double @llvm.fmuladd.f64(double %107, double 1.182000e+03, double 6.720000e+02)
%124 = tail call double @llvm.fmuladd.f64(double %107, double %123, double 2.520000e+02)
%125 = tail call double @llvm.fmuladd.f64(double %107, double 1.740000e+03, double 8.890000e+02)
%126 = tail call double @llvm.fmuladd.f64(double %107, double %125, double 2.940000e+02)
%127 = tail call double @llvm.fmuladd.f64(double %11, double %126, double %124)
%128 = fdiv double %127, 5.040000e+03
%129 = tail call double @llvm.fmuladd.f64(double %107, double 2.640000e+02, double 8.400000e+01)
%130 = tail call double @llvm.fmuladd.f64(double %107, double 6.060000e+02, double 1.750000e+02)
%131 = tail call double @llvm.fmuladd.f64(double %11, double %130, double %129)
%132 = fdiv double %131, 2.520000e+03
%133 = fmul double %103, 5.000000e-01
%134 = tail call double @llvm.fmuladd.f64(double %133, double %113, double 1.000000e+00)
%135 = tail call double @llvm.fmuladd.f64(double %105, double %91, double %132)
%136 = tail call double @llvm.fmuladd.f64(double %105, double %135, double %128)
%137 = tail call double @llvm.fmuladd.f64(double %105, double %136, double %122)
%138 = tail call double @llvm.fmuladd.f64(double %105, double %137, double %118)
%139 = tail call double @llvm.fmuladd.f64(double %105, double %138, double %113)
%140 = tail call double @llvm.fmuladd.f64(double %106, double %139, double %134)
%141 = tail call double @llvm.fmuladd.f64(double %103, double %140, double %93)
%142 = fdiv double %93, %141
%143 = fadd double %142, -1.000000e+00
%144 = tail call double @llvm.fabs.f64(double %143)
%145 = fcmp ogt double %144, 5.000000e-07
br i1 %145, label %92, label %146
146: ; preds = %97, %92, %15, %2
%147 = phi double [ -1.000000e+00, %2 ], [ %21, %15 ], [ %141, %97 ], [ -1.000000e+00, %92 ]
ret double %147
}