#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 IncompleteGamma(double, double, double);
double LnGamma(double);
double PointNormal(double);
double exp(double);
double fabs(double);
double log(double);
double pow(double, double);
int /*<<< orphan*/ printf(char *);
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 = 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 = IncompleteGamma(p1, xx, g)) < 0.0) {
    printf("IncompleteGamma \n");
    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  0xe73(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe5e(%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  0xe04(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
ja     122c <PointChi2+0xac>
movsd  -0x30(%rbp),%xmm0
movsd  0xe04(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     122c <PointChi2+0xac>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     123e <PointChi2+0xbe>
movsd  0xf54(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1b90 <PointChi2+0xa10>
movsd  -0x18(%rbp),%xmm0
movsd  0xde5(%rip),%xmm1
divsd  %xmm1,%xmm0
call   10a0 <LnGamma@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xdca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdac(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm2
movsd  -0xc0(%rbp),%xmm0
ff
movsd  0xd71(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jb     12c2 <PointChi2+0x142>
jmp    1341 <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   1050 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xd21(%rip),%xmm1
divsd  -0x40(%rbp),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    133c <PointChi2+0x1bc>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1b90 <PointChi2+0xa10>
jmp    1623 <PointChi2+0x4a3>
movsd  -0x18(%rbp),%xmm0
movsd  0xcea(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    135d <PointChi2+0x1dd>
jmp    14eb <PointChi2+0x36b>
movsd  0xcdb(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xcb6(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0xce0(%rip),%xmm1
addsd  -0x50(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc7f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  0xcbc(%rip),%xmm2
addsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc83(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xc85(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  -0x68(%rbp),%xmm1
movsd  0xc6c(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movsd  0xc46(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xc42(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xc22(%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  0xbf1(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <exp@plt>
mulsd  -0x70(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  0xb98(%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  0xb6f(%rip),%xmm0
subsd  %xmm0,%xmm1
movaps 0xccc(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xb78(%rip),%xmm0
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     14e6 <PointChi2+0x366>
jmp    1623 <PointChi2+0x4a3>
jmp    1381 <PointChi2+0x201>
movsd  -0x30(%rbp),%xmm0
call   1080 <PointNormal@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  0xb96(%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   1090 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0xae1(%rip),%xmm1
addsd  %xmm1,%xmm0
subsd  -0x68(%rbp),%xmm0
movsd  0xb08(%rip),%xmm1
call   1070 <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  0xb05(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xb01(%rip),%xmm2
addsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    161e <PointChi2+0x49e>
movsd  0xa83(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  0xa84(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
call   1060 <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  0xa8b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1623 <PointChi2+0x4a3>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xa1b(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1040 <IncompleteGamma@plt>
movaps %xmm0,%xmm1
movsd  %xmm1,-0x78(%rbp)
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1686 <PointChi2+0x506>
lea    0xb31(%rip),%rdi
call   1030 <printf@plt>
movsd  0xb0c(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1b90 <PointChi2+0xa10>
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   1060 <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   1050 <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  0x8e5(%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  0x9df(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0x9db(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0x933(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0x9ab(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0x993(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x93b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x94f(%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  0x93f(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0x93b(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0x91b(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0x903(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8eb(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x867(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  0x8ac(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0x8a8(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0x888(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x870(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x80c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x58(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  0x836(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x832(%rip),%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm1
movsd  0x812(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm3
movsd  0x7e7(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0x7e3(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0x7c3(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x767(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x58(%rbp),%xmm1
movsd  0x786(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0x782(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  0x754(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0x750(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x72c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0x6fe(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x6fa(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0x6da(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0x6c6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  0x655(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
mulsd  %xmm2,%xmm1
movsd  0x614(%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  0x4c1(%rip),%xmm1
subsd  %xmm1,%xmm0
movaps 0x61e(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1b86 <PointChi2+0xa06>
jmp    1623 <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  0xe71(%rip),%xmm2
ucomisd %xmm0,%xmm2
movsd  0xe6d(%rip),%xmm2
ja     182a <PointChi2+0x6aa>
ucomisd 0xe67(%rip),%xmm0
ja     182a <PointChi2+0x6aa>
movsd  %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    182a <PointChi2+0x6aa>
movsd  0xe4d(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  %xmm1,(%rsp)
call   10a0 <LnGamma@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe1b(%rip),%xmm0
addsd  0x28(%rsp),%xmm0
movapd %xmm0,0x50(%rsp)
movsd  0x20(%rsp),%xmm0
call   1060 <log@plt>
movsd  (%rsp),%xmm2
mulsd  0xe0f(%rip),%xmm0
ucomisd %xmm0,%xmm2
jae    127e <PointChi2+0xfe>
movsd  0x28(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe3c(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x18(%rsp),%xmm0
call   1050 <exp@plt>
mulsd  (%rsp),%xmm0
movsd  0xde0(%rip),%xmm1
divsd  0x28(%rsp),%xmm1
call   1070 <pow@plt>
movapd %xmm0,%xmm2
addsd  0xe39(%rip),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm2,%xmm1
movapd %xmm0,%xmm2
jbe    1516 <PointChi2+0x396>
jmp    182a <PointChi2+0x6aa>
ucomisd 0xda2(%rip),%xmm2
movsd  0x20(%rsp),%xmm1
jbe    12c2 <PointChi2+0x142>
movapd %xmm1,%xmm0
call   1080 <PointNormal@plt>
movapd %xmm0,%xmm2
movsd  0xddd(%rip),%xmm1
divsd  (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     1463 <PointChi2+0x2e3>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1484 <PointChi2+0x304>
movsd  0xd66(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1060 <log@plt>
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,0xa0(%rsp)
movsd  0xd4e(%rip),%xmm1
movsd  0xd7e(%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  0xd1f(%rip),%xmm0
movapd %xmm1,%xmm3
movapd 0xe73(%rip),%xmm1
unpcklpd %xmm0,%xmm1
movapd %xmm3,%xmm4
addsd  0xd0b(%rip),%xmm4
mulsd  %xmm3,%xmm4
movsd  0xd07(%rip),%xmm2
addsd  %xmm2,%xmm4
mulsd  %xmm3,%xmm4
movapd %xmm4,0x30(%rsp)
movapd %xmm3,%xmm4
unpcklpd %xmm3,%xmm4
mulpd  %xmm1,%xmm4
addpd  0xe45(%rip),%xmm4
movapd %xmm4,0x40(%rsp)
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
movapd %xmm4,%xmm1
divsd  %xmm0,%xmm1
addsd  0xccf(%rip),%xmm1
movapd 0xe2f(%rip),%xmm0
unpcklpd %xmm1,%xmm0
movapd %xmm0,0x80(%rsp)
movapd %xmm3,%xmm0
movapd %xmm3,0x70(%rsp)
movapd %xmm3,%xmm1
mulsd  0xcac(%rip),%xmm1
addsd  0xcac(%rip),%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm1,0x60(%rsp)
mulsd  0xc46(%rip),%xmm0
addsd  0xa0(%rsp),%xmm0
addsd  0x98(%rsp),%xmm0
call   1050 <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  0xbcc(%rip),%xmm2
andpd  0xd8c(%rip),%xmm2
addsd  0xc2c(%rip),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm2,%xmm1
movapd %xmm0,%xmm1
jb     1310 <PointChi2+0x190>
jmp    1516 <PointChi2+0x396>
movapd %xmm1,%xmm0
movsd  %xmm2,0x30(%rsp)
movsd  %xmm1,0x40(%rsp)
call   1090 <sqrt@plt>
movsd  0x40(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xba0(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  0xbc4(%rip),%xmm1
movapd %xmm2,%xmm0
call   1070 <pow@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  0xbd2(%rip),%xmm1
addsd  0xbd2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1516 <PointChi2+0x396>
movapd %xmm0,(%rsp)
movsd  0xb5f(%rip),%xmm0
subsd  0x20(%rsp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,0x30(%rsp)
movapd (%rsp),%xmm0
mulsd  0xb29(%rip),%xmm0
call   1060 <log@plt>
mulsd  0x50(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  0x18(%rsp),%xmm1
mulsd  0xb86(%rip),%xmm1
movapd %xmm1,%xmm0
movsd  0xb52(%rip),%xmm1
mulsd  0x28(%rsp),%xmm1
addsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x80(%rsp)
movapd 0xca5(%rip),%xmm2
movapd %xmm0,%xmm1
movapd 0x50(%rsp),%xmm0
xorpd  %xmm0,%xmm2
movapd %xmm2,0x70(%rsp)
movsd  0xb51(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xb4d(%rip),%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm1,%xmm0
addsd  0xb45(%rip),%xmm2
divsd  0xb45(%rip),%xmm2
movsd  %xmm2,0x60(%rsp)
movsd  0xa8e(%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   1040 <IncompleteGamma@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     1816 <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   1060 <log@plt>
mulsd  0x70(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
call   1050 <exp@plt>
mulsd  0x40(%rsp),%xmm0
movapd %xmm0,%xmm14
xorpd  0xbcd(%rip),%xmm14
movapd (%rsp),%xmm13
divsd  %xmm13,%xmm14
movapd 0x50(%rsp),%xmm10
movapd %xmm10,%xmm8
mulsd  %xmm14,%xmm8
movapd %xmm0,%xmm9
movsd  0x9db(%rip),%xmm11
mulsd  %xmm11,%xmm9
movapd %xmm9,%xmm6
addsd  %xmm8,%xmm6
movapd %xmm6,%xmm5
mulsd  0xa70(%rip),%xmm5
addsd  0xa70(%rip),%xmm5
mulsd  %xmm6,%xmm5
movsd  0xa6b(%rip),%xmm12
addsd  %xmm12,%xmm5
mulsd  %xmm6,%xmm5
addsd  0xa62(%rip),%xmm5
mulsd  %xmm6,%xmm5
addsd  0xa5e(%rip),%xmm5
mulsd  %xmm6,%xmm5
movapd %xmm6,%xmm7
mulsd  0xa66(%rip),%xmm7
addsd  0xa66(%rip),%xmm7
mulsd  %xmm6,%xmm7
addsd  0xa62(%rip),%xmm7
mulsd  %xmm6,%xmm7
addsd  0xa5e(%rip),%xmm7
mulsd  %xmm6,%xmm7
movapd %xmm6,%xmm3
mulsd  0xa5e(%rip),%xmm3
addsd  0xa5e(%rip),%xmm3
mulsd  %xmm6,%xmm3
addsd  0xa5a(%rip),%xmm3
mulsd  %xmm6,%xmm3
movapd %xmm6,%xmm1
mulsd  0xa52(%rip),%xmm1
addsd  0xa52(%rip),%xmm1
mulsd  %xmm6,%xmm1
addsd  0xa4e(%rip),%xmm1
movapd %xmm6,%xmm4
mulsd  0xa4a(%rip),%xmm4
addsd  0xa4a(%rip),%xmm4
mulsd  %xmm6,%xmm4
addsd  0xa46(%rip),%xmm4
mulsd  %xmm10,%xmm4
addsd  %xmm1,%xmm4
movapd %xmm6,%xmm1
mulsd  0xa39(%rip),%xmm1
addsd  %xmm12,%xmm1
mulsd  0xa34(%rip),%xmm6
addsd  0xa34(%rip),%xmm6
mulsd  %xmm10,%xmm6
addsd  %xmm1,%xmm6
movsd  0x9c2(%rip),%xmm10
divsd  %xmm10,%xmm6
movapd %xmm14,%xmm2
mulsd  0x60(%rsp),%xmm2
addsd  %xmm6,%xmm2
divsd  0x946(%rip),%xmm4
mulsd  %xmm14,%xmm2
addsd  %xmm4,%xmm2
movsd  0x965(%rip),%xmm4
addsd  %xmm4,%xmm3
divsd  %xmm10,%xmm3
mulsd  %xmm14,%xmm2
addsd  %xmm3,%xmm2
movsd  0x953(%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  0x855(%rip),%xmm9
addsd  %xmm9,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm13,%xmm0
addsd  %xmm13,%xmm2
divsd  %xmm2,%xmm0
addsd  0x80e(%rip),%xmm0
andpd  0x9ce(%rip),%xmm0
ucomisd 0x97e(%rip),%xmm0
movapd %xmm2,%xmm0
ja     1590 <PointChi2+0x410>
jmp    182a <PointChi2+0x6aa>
lea    0x9d3(%rip),%rdi
call   1030 <puts@plt>
movsd  0x7de(%rip),%xmm2
movapd %xmm2,%xmm0
add    $0xa8,%rsp
ret

LLVM IR (-O0):
@.str = [18 x i8] c"IncompleteGamma \0A\00"
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 %292
36: ; preds = %32
%37 = load double, double* %5
%38 = fdiv double %37, 2.000000e+00
%39 = call double @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 %292
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 = %289, %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 @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 %172
170: ; preds = %161
%171 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store double -1.000000e+00, double* %3
br label %292
172: ; preds = %161
%173 = load double, double* %8
%174 = load double, double* %17
%175 = fsub double %173, %174
store double %175, double* %16
%176 = load double, double* %16
%177 = load double, double* %10
%178 = load double, double* %7
%179 = load double, double* %9
%180 = call double @llvm.fmuladd.f64(double %177, double %178, double %179)
%181 = load double, double* %15
%182 = fadd double %180, %181
%183 = load double, double* %11
%184 = load double, double* %12
%185 = call double @log(double %184)
%186 = fneg double %183
%187 = call double @llvm.fmuladd.f64(double %186, double %185, double %182)
%188 = call double @exp(double %187)
%189 = fmul double %176, %188
store double %189, double* %17
%190 = load double, double* %17
%191 = load double, double* %12
%192 = fdiv double %190, %191
store double %192, double* %19
%193 = load double, double* %17
%194 = load double, double* %19
%195 = load double, double* %11
%196 = fmul double %194, %195
%197 = fneg double %196
%198 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %193, double %197)
store double %198, double* %13
%199 = load double, double* %13
%200 = load double, double* %13
%201 = load double, double* %13
%202 = load double, double* %13
%203 = load double, double* %13
%204 = call double @llvm.fmuladd.f64(double 6.000000e+01, double %203, double 7.000000e+01)
%205 = call double @llvm.fmuladd.f64(double %202, double %204, double 8.400000e+01)
%206 = call double @llvm.fmuladd.f64(double %201, double %205, double 1.050000e+02)
%207 = call double @llvm.fmuladd.f64(double %200, double %206, double 1.400000e+02)
%208 = call double @llvm.fmuladd.f64(double %199, double %207, double 2.100000e+02)
%209 = fdiv double %208, 4.200000e+02
store double %209, double* %20
%210 = load double, double* %13
%211 = load double, double* %13
%212 = load double, double* %13
%213 = load double, double* %13
%214 = call double @llvm.fmuladd.f64(double 1.278000e+03, double %213, double 1.141000e+03)
%215 = call double @llvm.fmuladd.f64(double %212, double %214, double 9.660000e+02)
%216 = call double @llvm.fmuladd.f64(double %211, double %215, double 7.350000e+02)
%217 = call double @llvm.fmuladd.f64(double %210, double %216, double 4.200000e+02)
%218 = fdiv double %217, 2.520000e+03
store double %218, double* %21
%219 = load double, double* %13
%220 = load double, double* %13
%221 = load double, double* %13
%222 = call double @llvm.fmuladd.f64(double 9.320000e+02, double %221, double 7.070000e+02)
%223 = call double @llvm.fmuladd.f64(double %220, double %222, double 4.620000e+02)
%224 = call double @llvm.fmuladd.f64(double %219, double %223, double 2.100000e+02)
%225 = fdiv double %224, 2.520000e+03
store double %225, double* %22
%226 = load double, double* %13
%227 = load double, double* %13
%228 = call double @llvm.fmuladd.f64(double 1.182000e+03, double %227, double 6.720000e+02)
%229 = call double @llvm.fmuladd.f64(double %226, double %228, double 2.520000e+02)
%230 = load double, double* %11
%231 = load double, double* %13
%232 = load double, double* %13
%233 = call double @llvm.fmuladd.f64(double 1.740000e+03, double %232, double 8.890000e+02)
%234 = call double @llvm.fmuladd.f64(double %231, double %233, double 2.940000e+02)
%235 = call double @llvm.fmuladd.f64(double %230, double %234, double %229)
%236 = fdiv double %235, 5.040000e+03
store double %236, double* %23
%237 = load double, double* %13
%238 = call double @llvm.fmuladd.f64(double 2.640000e+02, double %237, double 8.400000e+01)
%239 = load double, double* %11
%240 = load double, double* %13
%241 = call double @llvm.fmuladd.f64(double 6.060000e+02, double %240, double 1.750000e+02)
%242 = call double @llvm.fmuladd.f64(double %239, double %241, double %238)
%243 = fdiv double %242, 2.520000e+03
store double %243, double* %24
%244 = load double, double* %11
%245 = load double, double* %11
%246 = call double @llvm.fmuladd.f64(double 1.270000e+02, double %245, double 3.460000e+02)
%247 = call double @llvm.fmuladd.f64(double %244, double %246, double 1.200000e+02)
%248 = fdiv double %247, 5.040000e+03
store double %248, double* %25
%249 = load double, double* %17
%250 = load double, double* %17
%251 = fmul double 5.000000e-01, %250
%252 = load double, double* %20
%253 = call double @llvm.fmuladd.f64(double %251, double %252, double 1.000000e+00)
%254 = load double, double* %19
%255 = load double, double* %11
%256 = fmul double %254, %255
%257 = load double, double* %20
%258 = load double, double* %19
%259 = load double, double* %21
%260 = load double, double* %19
%261 = load double, double* %22
%262 = load double, double* %19
%263 = load double, double* %23
%264 = load double, double* %19
%265 = load double, double* %24
%266 = load double, double* %19
%267 = load double, double* %25
%268 = fneg double %266
%269 = call double @llvm.fmuladd.f64(double %268, double %267, double %265)
%270 = fneg double %264
%271 = call double @llvm.fmuladd.f64(double %270, double %269, double %263)
%272 = fneg double %262
%273 = call double @llvm.fmuladd.f64(double %272, double %271, double %261)
%274 = fneg double %260
%275 = call double @llvm.fmuladd.f64(double %274, double %273, double %259)
%276 = fneg double %258
%277 = call double @llvm.fmuladd.f64(double %276, double %275, double %257)
%278 = fneg double %256
%279 = call double @llvm.fmuladd.f64(double %278, double %277, double %253)
%280 = load double, double* %12
%281 = call double @llvm.fmuladd.f64(double %249, double %279, double %280)
store double %281, double* %12
%282 = load double, double* %14
%283 = load double, double* %12
%284 = fdiv double %282, %283
%285 = fsub double %284, 1.000000e+00
%286 = call double @llvm.fabs.f64(double %285)
%287 = load double, double* %6
%288 = fcmp ogt double %286, %287
br i1 %288, label %289, label %290
289: ; preds = %172
br label %161
290: ; preds = %172
%291 = load double, double* %12
store double %291, double* %3
br label %292
292: ; preds = %290, %170, %67, %35
%293 = load double, double* %3
ret double %293
}

LLVM IR (-O2):
@str = [17 x i8] c"IncompleteGamma \00"
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 %148, label %8
8: ; preds = %2
%9 = fmul double %1, 5.000000e-01
%10 = tail call double @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 %148, 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, %99
%93 = phi double [ %143, %99 ], [ %86, %85 ]
%94 = fmul double %93, 5.000000e-01
%95 = tail call double @IncompleteGamma(double %94, double %9, double %10)
%96 = fcmp olt double %95, 0.000000e+00
br i1 %96, label %97, label %99
97: ; preds = %92
%98 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %148
99: ; preds = %92
%100 = fsub double %0, %95
%101 = fadd double %87, %94
%102 = tail call double @log(double %93)
%103 = tail call double @llvm.fmuladd.f64(double %88, double %102, double %101)
%104 = tail call double @exp(double %103)
%105 = fmul double %100, %104
%106 = fneg double %105
%107 = fdiv double %106, %93
%108 = fmul double %11, %107
%109 = tail call double @llvm.fmuladd.f64(double %105, double 5.000000e-01, double %108)
%110 = tail call double @llvm.fmuladd.f64(double %109, double 6.000000e+01, double 7.000000e+01)
%111 = tail call double @llvm.fmuladd.f64(double %109, double %110, double 8.400000e+01)
%112 = tail call double @llvm.fmuladd.f64(double %109, double %111, double 1.050000e+02)
%113 = tail call double @llvm.fmuladd.f64(double %109, double %112, double 1.400000e+02)
%114 = tail call double @llvm.fmuladd.f64(double %109, double %113, double 2.100000e+02)
%115 = fdiv double %114, 4.200000e+02
%116 = tail call double @llvm.fmuladd.f64(double %109, double 1.278000e+03, double 1.141000e+03)
%117 = tail call double @llvm.fmuladd.f64(double %109, double %116, double 9.660000e+02)
%118 = tail call double @llvm.fmuladd.f64(double %109, double %117, double 7.350000e+02)
%119 = tail call double @llvm.fmuladd.f64(double %109, double %118, double 4.200000e+02)
%120 = fdiv double %119, 2.520000e+03
%121 = tail call double @llvm.fmuladd.f64(double %109, double 9.320000e+02, double 7.070000e+02)
%122 = tail call double @llvm.fmuladd.f64(double %109, double %121, double 4.620000e+02)
%123 = tail call double @llvm.fmuladd.f64(double %109, double %122, double 2.100000e+02)
%124 = fdiv double %123, 2.520000e+03
%125 = tail call double @llvm.fmuladd.f64(double %109, double 1.182000e+03, double 6.720000e+02)
%126 = tail call double @llvm.fmuladd.f64(double %109, double %125, double 2.520000e+02)
%127 = tail call double @llvm.fmuladd.f64(double %109, double 1.740000e+03, double 8.890000e+02)
%128 = tail call double @llvm.fmuladd.f64(double %109, double %127, double 2.940000e+02)
%129 = tail call double @llvm.fmuladd.f64(double %11, double %128, double %126)
%130 = fdiv double %129, 5.040000e+03
%131 = tail call double @llvm.fmuladd.f64(double %109, double 2.640000e+02, double 8.400000e+01)
%132 = tail call double @llvm.fmuladd.f64(double %109, double 6.060000e+02, double 1.750000e+02)
%133 = tail call double @llvm.fmuladd.f64(double %11, double %132, double %131)
%134 = fdiv double %133, 2.520000e+03
%135 = fmul double %105, 5.000000e-01
%136 = tail call double @llvm.fmuladd.f64(double %135, double %115, double 1.000000e+00)
%137 = tail call double @llvm.fmuladd.f64(double %107, double %91, double %134)
%138 = tail call double @llvm.fmuladd.f64(double %107, double %137, double %130)
%139 = tail call double @llvm.fmuladd.f64(double %107, double %138, double %124)
%140 = tail call double @llvm.fmuladd.f64(double %107, double %139, double %120)
%141 = tail call double @llvm.fmuladd.f64(double %107, double %140, double %115)
%142 = tail call double @llvm.fmuladd.f64(double %108, double %141, double %136)
%143 = tail call double @llvm.fmuladd.f64(double %105, double %142, double %93)
%144 = fdiv double %93, %143
%145 = fadd double %144, -1.000000e+00
%146 = tail call double @llvm.fabs.f64(double %145)
%147 = fcmp ogt double %146, 5.000000e-07
br i1 %147, label %92, label %148
148: ; preds = %99, %15, %2, %97
%149 = phi double [ -1.000000e+00, %97 ], [ -1.000000e+00, %2 ], [ %21, %15 ], [ %143, %99 ]
ret double %149
}