#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 sqrt(int);
void fit(double x[], double y[], int ndata, double sig[], int mwt, double *a,
         double *b, double *siga, double *sigb, double *r2, double *epsilon,
         double *q) {
  double gammq(double a, double x);
  double erfcc(double x);
  double erffc(double x);
  int i;
  double wt, t, sxoss, syoss, sx = 0.0, sy = 0.0, st2 = 0.0, ss, sigdat, chi2;
  double u, su2 = 0.0;
  *b = 0.0;
  if (mwt) {
    ss = 0.0;
    for (i = 1; i <= ndata; i++) {
      wt = 1.0 / sqrt(sig[i]);
      ss += wt;
      sx += x[i] * wt;
      sy += y[i] * wt;
    }
  } else {
    for (i = 1; i <= ndata; i++) {
      sx += x[i];
      sy += y[i];
    }
    ss = ndata;
  }
  sxoss = sx / ss;
  syoss = sy / ss;
  if (mwt) {
    for (i = 1; i <= ndata; i++) {
      t = (x[i] - sxoss) / sig[i];
      st2 += t * t;
      *a += t * y[i] / sig[i];
    }
  } else {
    for (i = 1; i <= ndata; i++) {
      t = x[i] - sxoss;
      u = y[i] - syoss;
      st2 += t * t;
      su2 += u * u;
      *a += t * y[i];
    }
  }
  *a /= st2;
  *b = (sy - sx * (*a)) / ss;
  *sigb = sqrt((1.0 + sx * sx / (ss * st2)) / ss);
  *siga = sqrt(1.0 / st2);
  chi2 = 0.0;
  *q = 1.0;
  *epsilon = 0.0;
  if (mwt) {
    for (i = 1; i <= ndata; i++)
      chi2 += sqrt((y[i] - (*a) - (*b) * x[i]) / sig[i]);
  } else {
    for (i = 1; i <= ndata; i++) {
      t = (y[i] - (*b) - (*a) * x[i]);
      chi2 += t * t;
    }
    sigdat = sqrt((chi2) / (ndata - 2));
    *siga *= sigdat;
    *sigb *= sigdat;
    *r2 = sqrt(1 - chi2 / su2);
    *epsilon = erffc((*r2) * sqrt(ndata / 2));
  }
  if (ndata > 2)
    *q = gammq(0.5 * (ndata - 2), 0.5 * (chi2));
}


x86 assembly (clang, -O0):
<fit>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%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,-0x98(%rbp)
ff
mov    0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
cmpl   $0x0,-0x24(%rbp)
je     124d <fit+0x11d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1248 <fit+0x118>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
cvttsd2si (%rax,%rcx,8),%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xe26(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b1 <fit+0x81>
jmp    12a6 <fit+0x176>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     129c <fit+0x16c>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1254 <fit+0x124>
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x68(%rbp),%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     135f <fit+0x22f>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     135a <fit+0x22a>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12d5 <fit+0x1a5>
jmp    1420 <fit+0x2f0>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     141b <fit+0x2eb>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1366 <fit+0x236>
jmp    1420 <fit+0x2f0>
movsd  -0x70(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x78(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm1
mulsd  -0x60(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  0xb6d(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  -0x78(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
mov    0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xb4b(%rip),%xmm0
divsd  -0x70(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
mov    0x18(%rbp),%rax
movsd  %xmm0,(%rax)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x38(%rbp),%rax
movsd  0xb1e(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
cmpl   $0x0,-0x24(%rbp)
je     1590 <fit+0x460>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     158b <fit+0x45b>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
subsd  (%rax),%xmm1
mov    0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1502 <fit+0x3d2>
jmp    16d2 <fit+0x5a2>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1621 <fit+0x4f1>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x10(%rbp),%rax
subsd  (%rax),%xmm1
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1597 <fit+0x467>
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    0x18(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    0x20(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm1
ff
divsd  -0x98(%rbp),%xmm1
ff
movsd  0x981(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
mov    0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1050 <erffc@plt>
mov    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
cmpl   $0x2,-0x14(%rbp)
jle    170f <fit+0x5df>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
cvtsi2sd %eax,%xmm1
movsd  0x91a(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0x90e(%rip),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
call   1030 <gammq@plt>
mov    0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fit>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r13
mov    %edx,%ebp
mov    %rsi,%r12
mov    %rdi,%r15
mov    0x90(%rsp),%rbx
mov    0x70(%rsp),%rdi
movq   $0x0,(%rdi)
test   %r8d,%r8d
mov    %r8d,0x8(%rsp)
je     120c <fit+0xdc>
test   %ebp,%ebp
jle    1238 <fit+0x108>
mov    %r9,0x30(%rsp)
mov    %rbp,%rbx
lea    0x1(%rbp),%r14d
xorpd  %xmm0,%xmm0
xorpd  %xmm7,%xmm7
mov    $0x1,%ebp
nopl   0x0(%rax)
movapd %xmm7,0x10(%rsp)
movapd %xmm0,0x20(%rsp)
cvttsd2si 0x0(%r13,%rbp,8),%edi
call   1040 <sqrt@plt>
movapd 0x20(%rsp),%xmm2
movapd 0x10(%rsp),%xmm7
movsd  0xe44(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm7
movsd  (%r12,%rbp,8),%xmm0
movhpd (%r15,%rbp,8),%xmm0
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addpd  %xmm2,%xmm0
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1190 <fit+0x60>
addpd  %xmm2,%xmm1
mov    %rbx,%rbp
mov    0x90(%rsp),%rbx
mov    0x30(%rsp),%r9
mov    0x70(%rsp),%rdi
mov    0x8(%rsp),%r8d
jmp    12eb <fit+0x1bb>
test   %ebp,%ebp
jle    1249 <fit+0x119>
mov    %ebp,%edx
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    1252 <fit+0x122>
xorpd  %xmm1,%xmm1
mov    $0x1,%ecx
test   %rax,%rax
jne    12ba <fit+0x18a>
jmp    12e7 <fit+0x1b7>
xorpd  %xmm1,%xmm1
xorpd  %xmm7,%xmm7
xorpd  %xmm5,%xmm5
jmp    1466 <fit+0x336>
xorpd  %xmm1,%xmm1
jmp    12e7 <fit+0x1b7>
and    $0xfffffffc,%edx
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movsd  0x8(%r12,%rcx,8),%xmm0
movsd  0x10(%r12,%rcx,8),%xmm2
movsd  0x18(%r12,%rcx,8),%xmm3
movhpd 0x8(%r15,%rcx,8),%xmm0
addpd  %xmm1,%xmm0
movsd  0x20(%r12,%rcx,8),%xmm1
movhpd 0x10(%r15,%rcx,8),%xmm2
addpd  %xmm0,%xmm2
movhpd 0x18(%r15,%rcx,8),%xmm3
movhpd 0x20(%r15,%rcx,8),%xmm1
addpd  %xmm2,%xmm3
addpd  %xmm3,%xmm1
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    1260 <fit+0x130>
add    $0x1,%rcx
test   %rax,%rax
je     12e7 <fit+0x1b7>
lea    (%r12,%rcx,8),%rdx
lea    (%r15,%rcx,8),%rcx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rdx,%rsi,8),%xmm0
movhpd (%rcx,%rsi,8),%xmm0
addpd  %xmm0,%xmm1
add    $0x1,%rsi
cmp    %rsi,%rax
jne    12d0 <fit+0x1a0>
cvtsi2sd %ebp,%xmm7
movapd %xmm7,%xmm2
unpcklpd %xmm7,%xmm2
movapd %xmm1,%xmm8
divpd  %xmm2,%xmm8
test   %r8d,%r8d
je     136b <fit+0x23b>
test   %ebp,%ebp
jle    1391 <fit+0x261>
lea    0x1(%rbp),%eax
movsd  (%r9),%xmm2
unpckhpd %xmm8,%xmm8
xorpd  %xmm3,%xmm3
mov    $0x1,%ecx
movsd  (%r15,%rcx,8),%xmm4
subsd  %xmm8,%xmm4
movsd  0x0(%r13,%rcx,8),%xmm5
divsd  %xmm5,%xmm4
movapd %xmm4,%xmm6
mulsd  %xmm4,%xmm6
addsd  %xmm6,%xmm3
mulsd  (%r12,%rcx,8),%xmm4
divsd  %xmm5,%xmm4
addsd  %xmm4,%xmm2
movsd  %xmm2,(%r9)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1320 <fit+0x1f0>
xorpd  %xmm5,%xmm5
unpcklpd %xmm3,%xmm5
jmp    1466 <fit+0x336>
test   %ebp,%ebp
jle    1391 <fit+0x261>
movsd  (%r9),%xmm2
mov    %ebp,%eax
cmp    $0x1,%ebp
jne    139a <fit+0x26a>
xorpd  %xmm3,%xmm3
mov    $0x1,%ecx
test   $0x1,%al
jne    1434 <fit+0x304>
jmp    1466 <fit+0x336>
xorpd  %xmm5,%xmm5
jmp    1466 <fit+0x336>
mov    %eax,%edx
and    $0xfffffffe,%edx
neg    %rdx
xorpd  %xmm3,%xmm3
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rcx,8),%xmm5
movapd %xmm5,%xmm6
movhpd (%r15,%rcx,8),%xmm6
subpd  %xmm8,%xmm6
movapd %xmm6,%xmm4
mulpd  %xmm6,%xmm4
addpd  %xmm3,%xmm4
unpckhpd %xmm6,%xmm6
mulsd  %xmm5,%xmm6
addsd  %xmm2,%xmm6
movsd  %xmm6,(%r9)
movsd  0x8(%r12,%rcx,8),%xmm0
movapd %xmm0,%xmm2
movhpd 0x8(%r15,%rcx,8),%xmm2
subpd  %xmm8,%xmm2
movapd %xmm2,%xmm5
mulpd  %xmm2,%xmm5
movapd %xmm5,%xmm3
addpd  %xmm4,%xmm3
unpckhpd %xmm2,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm6,%xmm2
movsd  %xmm2,(%r9)
lea    (%rdx,%rcx,1),%rsi
add    $0x2,%rsi
add    $0x2,%rcx
cmp    $0x1,%rsi
jne    13b0 <fit+0x280>
addpd  %xmm4,%xmm5
test   $0x1,%al
je     1466 <fit+0x336>
movsd  (%r12,%rcx,8),%xmm4
movapd %xmm4,%xmm0
movhpd (%r15,%rcx,8),%xmm0
subpd  %xmm8,%xmm0
movapd %xmm0,%xmm5
mulpd  %xmm0,%xmm5
addpd  %xmm3,%xmm5
unpckhpd %xmm0,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,(%r9)
movapd %xmm5,0x20(%rsp)
movsd  (%r9),%xmm0
movapd %xmm5,%xmm2
unpckhpd %xmm5,%xmm2
divsd  %xmm2,%xmm0
movapd %xmm2,%xmm3
movapd %xmm2,0x10(%rsp)
mov    %r9,%r14
movsd  %xmm0,(%r9)
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
mulsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
divsd  %xmm7,%xmm1
movsd  %xmm1,(%rdi)
mulsd  %xmm2,%xmm2
movapd %xmm7,%xmm0
mulsd  %xmm3,%xmm0
divsd  %xmm0,%xmm2
addsd  0xb41(%rip),%xmm2
divsd  %xmm7,%xmm2
cvttsd2si %xmm2,%edi
call   1040 <sqrt@plt>
mov    0x80(%rsp),%rax
movsd  %xmm0,(%rax)
movsd  0xb20(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
mov    0x78(%rsp),%rax
movsd  %xmm0,(%rax)
movabs $0x3ff0000000000000,%rax
mov    0x98(%rsp),%rcx
mov    %rax,(%rcx)
movq   $0x0,(%rbx)
cmpl   $0x0,0x8(%rsp)
je     159a <fit+0x46a>
test   %ebp,%ebp
jle    1733 <fit+0x603>
mov    %rbp,0x8(%rsp)
lea    0x1(%rbp),%eax
mov    %rax,0x20(%rsp)
xorpd  %xmm1,%xmm1
mov    $0x1,%ebx
mov    %r12,%rbp
mov    %r15,%r12
mov    %r13,%r15
mov    0x70(%rsp),%r13
nopw   0x0(%rax,%rax,1)
movapd %xmm1,0x10(%rsp)
movsd  0x0(%rbp,%rbx,8),%xmm0
subsd  (%r14),%xmm0
movsd  0x0(%r13),%xmm1
mulsd  (%r12,%rbx,8),%xmm1
subsd  %xmm1,%xmm0
divsd  (%r15,%rbx,8),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
movapd 0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
add    $0x1,%rbx
cmp    %rbx,0x20(%rsp)
jne    1550 <fit+0x420>
jmp    16fb <fit+0x5cb>
mov    0x88(%rsp),%r13
test   %ebp,%ebp
jle    15ce <fit+0x49e>
mov    0x70(%rsp),%rax
movsd  (%rax),%xmm1
movsd  (%r14),%xmm0
xorpd  0xa54(%rip),%xmm0
mov    %ebp,%eax
cmp    $0x1,%ebp
jne    15d7 <fit+0x4a7>
xorpd  %xmm5,%xmm5
mov    $0x1,%ecx
jmp    1644 <fit+0x514>
xorpd  %xmm5,%xmm5
jmp    1664 <fit+0x534>
mov    %eax,%edx
and    $0xfffffffe,%edx
neg    %rdx
xorpd  %xmm5,%xmm5
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rcx,8),%xmm2
movsd  0x8(%r12,%rcx,8),%xmm3
subsd  %xmm1,%xmm2
movsd  (%r15,%rcx,8),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm2,%xmm4
mulsd  %xmm4,%xmm4
addsd  %xmm5,%xmm4
subsd  %xmm1,%xmm3
movsd  0x8(%r15,%rcx,8),%xmm5
mulsd  %xmm0,%xmm5
addsd  %xmm3,%xmm5
mulsd  %xmm5,%xmm5
addsd  %xmm4,%xmm5
lea    (%rdx,%rcx,1),%rsi
add    $0x2,%rsi
add    $0x2,%rcx
cmp    $0x1,%rsi
jne    15f0 <fit+0x4c0>
test   $0x1,%al
je     1664 <fit+0x534>
movsd  (%r12,%rcx,8),%xmm2
mulsd  (%r15,%rcx,8),%xmm0
subsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm0,%xmm5
movapd %xmm5,0x10(%rsp)
lea    -0x2(%rbp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm5,%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <sqrt@plt>
mov    0x78(%rsp),%rax
movsd  (%rax),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax)
mov    0x80(%rsp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movapd 0x10(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
movsd  0x946(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,0x20(%rsp)
movsd  %xmm0,0x0(%r13)
mov    %ebp,%edi
shr    $0x1f,%edi
mov    %rbp,0x8(%rsp)
add    %ebp,%edi
sar    %edi
call   1040 <sqrt@plt>
mulsd  0x20(%rsp),%xmm0
call   1050 <erffc@plt>
movapd 0x10(%rsp),%xmm1
movsd  %xmm0,(%rbx)
mov    0x8(%rsp),%r14
cmp    $0x3,%r14d
jl     1733 <fit+0x603>
add    $0xfffffffe,%r14d
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
movsd  0x8ee(%rip),%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm1
call   1030 <gammq@plt>
mov    0x98(%rsp),%rax
movsd  %xmm0,(%rax)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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