int fitLine(data, npix, zstart, zslope, krej, ngrow, maxiter)
float *data;
int npix;
float *zstart;
float *zslope;
float krej;
int ngrow;
int maxiter;
{
  int i, ngoodpix, last_ngoodpix, minpix, niter;
  double xscale, z0, dz, o_dz, x, z, mean, sigma, threshold;
  double sumxsqr, sumxz, sumz, sumx, rowrat;
  float *flat, *normx;
  char *badpix;
  if (npix <= 0)
    return (0);
  else if (npix == 1) {
    *zstart = data[1];
    *zslope = 0.0;
    return (1);
  } else
    xscale = 2.0 / (npix - 1);
  flat = (float *)malloc(npix * sizeof(float));
  normx = (float *)malloc(npix * sizeof(float));
  badpix = (char *)calloc(npix, sizeof(char));
  for (i = 0; i < npix; i++)
    normx[i] = i * xscale - 1.0;
  sumxsqr = 0;
  sumxz = 0;
  sumx = 0;
  sumz = 0;
  for (i = 0; i < npix; i++) {
    x = normx[i];
    z = data[i];
    sumxsqr = sumxsqr + (x * x);
    sumxz = sumxz + z * x;
    sumz = sumz + z;
  }
  z0 = sumz / npix;
  dz = o_dz = sumxz / sumxsqr;
  ngoodpix = npix;
  minpix = ((5) > ((int)(npix * 0.5)) ? (5) : ((int)(npix * 0.5)));
  for (niter = 0; niter < maxiter; niter++) {
    last_ngoodpix = ngoodpix;
    flattenData(data, flat, normx, npix, z0, dz);
    ngoodpix = computeSigma(flat, badpix, npix, &mean, &sigma);
    threshold = sigma * krej;
    ngoodpix = rejectPixels(data, flat, normx, badpix, npix, &sumxsqr, &sumxz,
                            &sumx, &sumz, threshold, ngrow);
    if (ngoodpix > 0) {
      rowrat = sumx / sumxsqr;
      z0 = (sumz - rowrat * sumxz) / (ngoodpix - rowrat * sumx);
      dz = (sumxz - z0 * sumx) / sumxsqr;
    }
    if (ngoodpix >= last_ngoodpix || ngoodpix < minpix)
      break;
  }
  *zstart = z0 - dz;
  *zslope = dz * xscale;
  if (((*zslope) >= 0 ? (*zslope) : -(*zslope)) < 0.001)
    *zslope = o_dz * xscale;
  free((float *)flat);
  free((float *)normx);
  free((char *)badpix);
  return (ngoodpix);
}


x86 assembly (clang, -O0):
<fitLine>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xf8,%rsp
cvtsd2ss %xmm0,%xmm0
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movss  %xmm0,-0x34(%rbp)
mov    %r8d,-0x38(%rbp)
mov    %r9d,-0x3c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jg     11a2 <fitLine+0x42>
movl   $0x0,-0xc(%rbp)
jmp    169d <fitLine+0x53d>
cmpl   $0x1,-0x1c(%rbp)
jne    11d4 <fitLine+0x74>
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
movl   $0x1,-0xc(%rbp)
jmp    169d <fitLine+0x53d>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe1a(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    11f4 <fitLine+0x94>
movslq -0x1c(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xc8(%rbp)
movslq -0x1c(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xd0(%rbp)
movslq -0x1c(%rbp),%rdi
mov    $0x1,%esi
call   1060 <calloc@plt>
mov    %rax,-0xd8(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1280 <fitLine+0x120>
cvtsi2sdl -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdbe(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0xd0(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1238 <fitLine+0xd8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1355 <fitLine+0x1f5>
mov    -0xd0(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    12b3 <fitLine+0x153>
movsd  -0xb0(%rbp),%xmm0
ff
cvtsi2sdl -0x1c(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
divsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  %xmm0,-0x68(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xc70(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
mov    $0x5,%eax
cmp    %ecx,%eax
jle    13bd <fitLine+0x25d>
mov    $0x5,%eax
mov    %eax,-0xdc(%rbp)
jmp    13d8 <fitLine+0x278>
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  0xc3e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xdc(%rbp)
mov    -0xdc(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    15cd <fitLine+0x46d>
mov    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc8(%rbp),%rsi
mov    -0xd0(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
mov    $0x2,%al
call   1080 <flattenData@plt>
mov    -0xc8(%rbp),%rdi
mov    -0xd8(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    -0x88(%rbp),%rcx
lea    -0x90(%rbp),%r8
mov    $0x0,%al
call   1030 <computeSigma@plt>
mov    %eax,-0x44(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
movss  -0x34(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x18(%rbp),%rdi
mov    -0xc8(%rbp),%rsi
mov    -0xd0(%rbp),%rdx
mov    -0xd8(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
movsd  -0x98(%rbp),%xmm0
ff
mov    -0x38(%rbp),%eax
lea    -0xa0(%rbp),%r9
lea    -0xa8(%rbp),%rbx
lea    -0xb8(%rbp),%r11
lea    -0xb0(%rbp),%r10
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %eax,0x18(%rsp)
mov    $0x1,%al
call   1050 <rejectPixels@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jle    159d <fitLine+0x43d>
movsd  -0xb8(%rbp),%xmm0
ff
divsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsi2sdl -0x44(%rbp),%xmm2
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm3
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0xb8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    15b5 <fitLine+0x455>
mov    -0x44(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    15ba <fitLine+0x45a>
jmp    15cd <fitLine+0x46d>
jmp    15bf <fitLine+0x45f>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    13e8 <fitLine+0x288>
movsd  -0x60(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1622 <fitLine+0x4c2>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xe0(%rbp)
ff
jmp    163f <fitLine+0x4df>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0xe0(%rbp)
ff
movss  -0xe0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
movsd  0x9bd(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1673 <fitLine+0x513>
movsd  -0x70(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0xc8(%rbp),%rdi
call   1040 <free@plt>
mov    -0xd0(%rbp),%rdi
call   1040 <free@plt>
mov    -0xd8(%rbp),%rdi
call   1040 <free@plt>
mov    -0x44(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xf8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<fitLine>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9d,0xc(%rsp)
mov    %r8,0xa0(%rsp)
test   %esi,%esi
jle    11a6 <fitLine+0x46>
mov    %esi,%r12d
mov    %rdi,%rbp
cmp    $0x1,%esi
jne    11ad <fitLine+0x4d>
movss  0x4(%rbp),%xmm0
movss  %xmm0,(%rdx)
movl   $0x0,(%rcx)
mov    $0x1,%ebp
jmp    16b1 <fitLine+0x551>
xor    %ebp,%ebp
jmp    16b1 <fitLine+0x551>
movsd  %xmm0,0x18(%rsp)
mov    %rdx,0x88(%rsp)
mov    %rcx,0x28(%rsp)
lea    -0x1(%r12),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe2c(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,0x60(%rsp)
mov    %r12d,%r14d
lea    0x0(,%r14,4),%rbx
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,0x38(%rsp)
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x1,%esi
mov    %r14,%rdi
call   1060 <calloc@plt>
mov    %rax,0x30(%rsp)
cmp    $0x4,%r12d
jae    1226 <fitLine+0xc6>
xor    %eax,%eax
movapd 0x60(%rsp),%xmm7
jmp    1333 <fitLine+0x1d3>
mov    %r14d,%eax
and    $0xfffffffc,%eax
movapd 0x60(%rsp),%xmm7
movapd %xmm7,%xmm0
unpcklpd %xmm7,%xmm0
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     15ee <fitLine+0x48e>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
movdqa 0xddf(%rip),%xmm1
xor    %ecx,%ecx
movapd 0xde5(%rip),%xmm2
movdqa 0xded(%rip),%xmm3
movdqa 0xdf5(%rip),%xmm4
nopl   0x0(%rax,%rax,1)
cvtdq2pd %xmm1,%xmm5
pshufd $0xee,%xmm1,%xmm6
cvtdq2pd %xmm6,%xmm6
mulpd  %xmm0,%xmm6
mulpd  %xmm0,%xmm5
addpd  %xmm2,%xmm5
cvtpd2ps %xmm5,%xmm5
addpd  %xmm2,%xmm6
cvtpd2ps %xmm6,%xmm6
unpcklpd %xmm6,%xmm5
movupd %xmm5,(%rbx,%rcx,4)
movdqa %xmm1,%xmm5
paddd  %xmm3,%xmm5
cvtdq2pd %xmm5,%xmm6
pshufd $0xee,%xmm5,%xmm5
cvtdq2pd %xmm5,%xmm5
mulpd  %xmm0,%xmm5
mulpd  %xmm0,%xmm6
addpd  %xmm2,%xmm6
cvtpd2ps %xmm6,%xmm6
addpd  %xmm2,%xmm5
cvtpd2ps %xmm5,%xmm5
unpcklpd %xmm5,%xmm6
movupd %xmm6,0x10(%rbx,%rcx,4)
add    $0x8,%rcx
paddd  %xmm4,%xmm1
add    $0xfffffffffffffffe,%rsi
jne    1280 <fitLine+0x120>
cvtdq2pd %xmm1,%xmm2
pshufd $0xee,%xmm1,%xmm1
cvtdq2pd %xmm1,%xmm1
test   $0x1,%dl
je     132e <fitLine+0x1ce>
mulpd  %xmm0,%xmm1
movapd 0xd3f(%rip),%xmm3
addpd  %xmm3,%xmm1
mulpd  %xmm0,%xmm2
addpd  %xmm3,%xmm2
cvtpd2ps %xmm2,%xmm0
cvtpd2ps %xmm1,%xmm1
unpcklpd %xmm1,%xmm0
movupd %xmm0,(%rbx,%rcx,4)
cmp    %r14,%rax
je     1361 <fitLine+0x201>
movsd  0xcd5(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  %xmm7,%xmm1
addsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%rbx,%rax,4)
add    $0x1,%rax
cmp    %rax,%r14
jne    1340 <fitLine+0x1e0>
movq   $0x0,0x40(%rsp)
cmp    $0x1,%r12d
jne    137c <fitLine+0x21c>
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
jmp    13ec <fitLine+0x28c>
mov    %r14d,%ecx
and    $0xfffffffe,%ecx
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
nopl   0x0(%rax)
movss  0x0(%rbp,%rax,4),%xmm2
movss  0x4(%rbp,%rax,4),%xmm3
movss  (%rbx,%rax,4),%xmm4
unpcklps %xmm2,%xmm4
movss  0x4(%rbx,%rax,4),%xmm2
unpcklps %xmm3,%xmm2
cvtps2pd %xmm4,%xmm3
movapd %xmm3,%xmm4
unpcklpd %xmm3,%xmm4
mulpd  %xmm3,%xmm4
unpckhpd %xmm3,%xmm3
addsd  %xmm1,%xmm3
cvtps2pd %xmm2,%xmm1
addpd  %xmm0,%xmm4
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
mulpd  %xmm1,%xmm0
addpd  %xmm4,%xmm0
unpckhpd %xmm1,%xmm1
addsd  %xmm3,%xmm1
add    $0x2,%rax
cmp    %rax,%rcx
jne    1390 <fitLine+0x230>
test   $0x1,%r14b
je     141b <fitLine+0x2bb>
movss  0x0(%rbp,%rax,4),%xmm2
movss  (%rbx,%rax,4),%xmm3
unpcklps %xmm2,%xmm3
cvtps2pd %xmm3,%xmm2
movapd %xmm2,%xmm3
unpcklpd %xmm2,%xmm3
mulpd  %xmm2,%xmm3
addpd  %xmm3,%xmm0
unpckhpd %xmm2,%xmm2
addsd  %xmm2,%xmm1
mov    %rbx,0x10(%rsp)
movlpd %xmm0,0x58(%rsp)
movhpd %xmm0,0x50(%rsp)
movsd  %xmm1,0x48(%rsp)
xorps  %xmm2,%xmm2
cvtsi2sd %r12d,%xmm2
movapd %xmm0,%xmm3
shufpd $0x1,%xmm1,%xmm3
unpcklpd %xmm2,%xmm0
mulsd  0xbc9(%rip),%xmm2
divpd  %xmm0,%xmm3
cvttsd2si %xmm2,%eax
cmp    $0x6,%eax
mov    $0x5,%ecx
cmovge %eax,%ecx
mov    %ecx,0x24(%rsp)
cmpl   $0x0,0xc(%rsp)
movapd %xmm3,0xb0(%rsp)
jle    15e3 <fitLine+0x483>
mov    %rbp,0x98(%rsp)
movsd  0x18(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x90(%rsp)
mov    $0x1,%r15d
mov    %r12d,%ecx
movapd %xmm3,0x70(%rsp)
mov    0x98(%rsp),%rbx
mov    0x10(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,0x18(%rsp)
movapd 0x70(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
mov    %rbx,%rdi
mov    0x38(%rsp),%rbp
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r12d,%ecx
mov    $0x2,%al
call   1080 <flattenData@plt>
mov    %rbp,%rdi
mov    %r12,%r14
mov    0x30(%rsp),%r12
mov    %r12,%rsi
mov    %r14d,%edx
lea    0xc0(%rsp),%rcx
lea    0xa8(%rsp),%r8
xor    %eax,%eax
call   1030 <computeSigma@plt>
movsd  0xa8(%rsp),%xmm0
mulsd  0x90(%rsp),%xmm0
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r14,%r12
mov    %r12d,%r8d
lea    0x58(%rsp),%r9
mov    $0x1,%al
push   0xa0(%rsp)
lea    0x50(%rsp),%rbp
push   %rbp
lea    0x50(%rsp),%rbp
push   %rbp
lea    0x68(%rsp),%rbp
push   %rbp
call   1050 <rejectPixels@plt>
add    $0x20,%rsp
mov    %eax,%ebp
test   %eax,%eax
jle    15bb <fitLine+0x45b>
movsd  0x40(%rsp),%xmm0
movsd  0x58(%rsp),%xmm1
movsd  0x50(%rsp),%xmm5
movapd %xmm0,%xmm2
xorpd  0xafd(%rip),%xmm2
divsd  %xmm1,%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm5,%xmm3
addsd  0x48(%rsp),%xmm3
cvtsi2sd %ebp,%xmm4
mulsd  %xmm0,%xmm2
addsd  %xmm4,%xmm2
divsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm0
subsd  %xmm0,%xmm5
divsd  %xmm1,%xmm5
unpcklpd %xmm3,%xmm5
movapd %xmm5,0x70(%rsp)
cmp    0x18(%rsp),%ebp
jge    1612 <fitLine+0x4b2>
cmp    0x24(%rsp),%ebp
movapd 0x60(%rsp),%xmm7
jl     1617 <fitLine+0x4b7>
lea    0x1(%r15),%eax
mov    %ebp,%ecx
cmp    0xc(%rsp),%r15d
mov    %eax,%r15d
jl     14c0 <fitLine+0x360>
jmp    1617 <fitLine+0x4b7>
mov    %r12d,%ebp
movapd %xmm3,0x70(%rsp)
jmp    1617 <fitLine+0x4b7>
xorpd  %xmm2,%xmm2
movhpd 0xa0e(%rip),%xmm2
movapd 0xa2e(%rip),%xmm1
xor    %ecx,%ecx
test   $0x1,%dl
jne    1305 <fitLine+0x1a5>
jmp    132e <fitLine+0x1ce>
movaps 0x60(%rsp),%xmm7
movapd 0x70(%rsp),%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
subsd  %xmm2,%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
mulsd  %xmm7,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
mov    0x88(%rsp),%rax
movss  %xmm1,(%rax)
movaps 0xa42(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpnless %xmm0,%xmm2
andps  %xmm2,%xmm1
andnps %xmm0,%xmm2
orps   %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtss2sd %xmm2,%xmm1
movsd  0x9af(%rip),%xmm2
ucomisd %xmm1,%xmm2
jbe    1687 <fitLine+0x527>
mulsd  0xb0(%rsp),%xmm7
xorps  %xmm0,%xmm0
cvtsd2ss %xmm7,%xmm0
mov    0x28(%rsp),%rax
mov    0x10(%rsp),%rbx
movss  %xmm0,(%rax)
mov    0x38(%rsp),%rdi
call   1040 <free@plt>
mov    %rbx,%rdi
call   1040 <free@plt>
mov    0x30(%rsp),%rdi
call   1040 <free@plt>
mov    %ebp,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fitLine(float* %0, i32 %1, float* nocapture writeonly %2, float* nocapture writeonly %3, double %4, i32 %5, i32 %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = fptrunc double %4 to float
%15 = bitcast double* %8 to i8*
%16 = bitcast double* %9 to i8*
%17 = bitcast double* %10 to i8*
%18 = bitcast double* %11 to i8*
%19 = bitcast double* %12 to i8*
%20 = bitcast double* %13 to i8*
%21 = icmp slt i32 %1, 1
br i1 %21, label %221, label %22
22: ; preds = %7
%23 = icmp eq i32 %1, 1
br i1 %23, label %24, label %27
24: ; preds = %22
%25 = getelementptr inbounds float, float* %0, i64 1
%26 = load float, float* %25
store float %26, float* %2
store float 0.000000e+00, float* %3
br label %221
27: ; preds = %22
%28 = add nsw i32 %1, -1
%29 = sitofp i32 %28 to double
%30 = fdiv double 2.000000e+00, %29
%31 = zext i32 %1 to i64
%32 = shl nuw nsw i64 %31, 2
%33 = tail call i8* @malloc(i64 %32)
%34 = bitcast i8* %33 to float*
%35 = tail call i8* @malloc(i64 %32)
%36 = bitcast i8* %35 to float*
%37 = tail call i8* @calloc(i64 %31, i64 1)
%38 = icmp ult i32 %1, 4
br i1 %38, label %83, label %39
39: ; preds = %27
%40 = and i64 %31, 4294967292
%41 = insertelement <4 x double> poison, double %30, i64 0
%42 = shufflevector <4 x double> %41, <4 x double> poison, <4 x i32> zeroinitializer
%43 = add nsw i64 %40, -4
%44 = lshr exact i64 %43, 2
%45 = add nuw nsw i64 %44, 1
%46 = and i64 %45, 1
%47 = icmp eq i64 %43, 0
br i1 %47, label %72, label %48
48: ; preds = %39
%49 = and i64 %45, 9223372036854775806
br label %50
50: ; preds = %50, %48
%51 = phi i64 [ 0, %48 ], [ %66, %50 ]
%52 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %48 ], [ %67, %50 ]
%53 = phi i64 [ 0, %48 ], [ %68, %50 ]
%54 = sitofp <4 x i32> %52 to <4 x double>
%55 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %54, <4 x double> %42, <4 x double> <double -1.000000e+00, double -1.000000e+00, double -1.000000e+00, double -1.000000e+00>)
%56 = fptrunc <4 x double> %55 to <4 x float>
%57 = getelementptr inbounds float, float* %36, i64 %51
%58 = bitcast float* %57 to <4 x float>*
store <4 x float> %56, <4 x float>* %58
%59 = or i64 %51, 4
%60 = add <4 x i32> %52, <i32 4, i32 4, i32 4, i32 4>
%61 = sitofp <4 x i32> %60 to <4 x double>
%62 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %61, <4 x double> %42, <4 x double> <double -1.000000e+00, double -1.000000e+00, double -1.000000e+00, double -1.000000e+00>)
%63 = fptrunc <4 x double> %62 to <4 x float>
%64 = getelementptr inbounds float, float* %36, i64 %59
%65 = bitcast float* %64 to <4 x float>*
store <4 x float> %63, <4 x float>* %65
%66 = add nuw i64 %51, 8
%67 = add <4 x i32> %52, <i32 8, i32 8, i32 8, i32 8>
%68 = add i64 %53, 2
%69 = icmp eq i64 %68, %49
br i1 %69, label %70, label %50
70: ; preds = %50
%71 = sitofp <4 x i32> %67 to <4 x double>
br label %72
72: ; preds = %70, %39
%73 = phi i64 [ 0, %39 ], [ %66, %70 ]
%74 = phi <4 x double> [ <double 0.000000e+00, double 1.000000e+00, double 2.000000e+00, double 3.000000e+00>, %39 ], [ %71, %70 ]
%75 = icmp eq i64 %46, 0
br i1 %75, label %81, label %76
76: ; preds = %72
%77 = call <4 x double> @llvm.fmuladd.v4f64(<4 x double> %74, <4 x double> %42, <4 x double> <double -1.000000e+00, double -1.000000e+00, double -1.000000e+00, double -1.000000e+00>)
%78 = fptrunc <4 x double> %77 to <4 x float>
%79 = getelementptr inbounds float, float* %36, i64 %73
%80 = bitcast float* %79 to <4 x float>*
store <4 x float> %78, <4 x float>* %80
br label %81
81: ; preds = %72, %76
%82 = icmp eq i64 %40, %31
br i1 %82, label %94, label %83
83: ; preds = %27, %81
%84 = phi i64 [ 0, %27 ], [ %40, %81 ]
br label %85
85: ; preds = %83, %85
%86 = phi i64 [ %92, %85 ], [ %84, %83 ]
%87 = trunc i64 %86 to i32
%88 = sitofp i32 %87 to double
%89 = tail call double @llvm.fmuladd.f64(double %88, double %30, double -1.000000e+00)
%90 = fptrunc double %89 to float
%91 = getelementptr inbounds float, float* %36, i64 %86
store float %90, float* %91
%92 = add nuw nsw i64 %86, 1
%93 = icmp eq i64 %92, %31
br i1 %93, label %94, label %85
94: ; preds = %85, %81
store double 0.000000e+00, double* %13
%95 = and i64 %31, 1
%96 = icmp eq i32 %1, 1
br i1 %96, label %130, label %97
97: ; preds = %94
%98 = and i64 %31, 4294967294
br label %99
99: ; preds = %99, %97
%100 = phi i64 [ 0, %97 ], [ %127, %99 ]
%101 = phi double [ 0.000000e+00, %97 ], [ %126, %99 ]
%102 = phi <2 x double> [ zeroinitializer, %97 ], [ %124, %99 ]
%103 = phi i64 [ 0, %97 ], [ %128, %99 ]
%104 = getelementptr inbounds float, float* %36, i64 %100
%105 = load float, float* %104
%106 = getelementptr inbounds float, float* %0, i64 %100
%107 = load float, float* %106
%108 = insertelement <2 x float> poison, float %105, i64 0
%109 = insertelement <2 x float> %108, float %107, i64 1
%110 = fpext <2 x float> %109 to <2 x double>
%111 = shufflevector <2 x double> %110, <2 x double> undef, <2 x i32> zeroinitializer
%112 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %110, <2 x double> %111, <2 x double> %102)
%113 = extractelement <2 x double> %110, i64 1
%114 = fadd double %101, %113
%115 = or i64 %100, 1
%116 = getelementptr inbounds float, float* %36, i64 %115
%117 = load float, float* %116
%118 = getelementptr inbounds float, float* %0, i64 %115
%119 = load float, float* %118
%120 = insertelement <2 x float> poison, float %117, i64 0
%121 = insertelement <2 x float> %120, float %119, i64 1
%122 = fpext <2 x float> %121 to <2 x double>
%123 = shufflevector <2 x double> %122, <2 x double> undef, <2 x i32> zeroinitializer
%124 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %122, <2 x double> %123, <2 x double> %112)
%125 = extractelement <2 x double> %122, i64 1
%126 = fadd double %114, %125
%127 = add nuw nsw i64 %100, 2
%128 = add i64 %103, 2
%129 = icmp eq i64 %128, %98
br i1 %129, label %130, label %99
130: ; preds = %99, %94
%131 = phi <2 x double> [ undef, %94 ], [ %124, %99 ]
%132 = phi double [ undef, %94 ], [ %126, %99 ]
%133 = phi i64 [ 0, %94 ], [ %127, %99 ]
%134 = phi double [ 0.000000e+00, %94 ], [ %126, %99 ]
%135 = phi <2 x double> [ zeroinitializer, %94 ], [ %124, %99 ]
%136 = icmp eq i64 %95, 0
br i1 %136, label %149, label %137
137: ; preds = %130
%138 = getelementptr inbounds float, float* %36, i64 %133
%139 = load float, float* %138
%140 = getelementptr inbounds float, float* %0, i64 %133
%141 = load float, float* %140
%142 = insertelement <2 x float> poison, float %139, i64 0
%143 = insertelement <2 x float> %142, float %141, i64 1
%144 = fpext <2 x float> %143 to <2 x double>
%145 = shufflevector <2 x double> %144, <2 x double> undef, <2 x i32> zeroinitializer
%146 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %144, <2 x double> %145, <2 x double> %135)
%147 = extractelement <2 x double> %144, i64 1
%148 = fadd double %134, %147
br label %149
149: ; preds = %130, %137
%150 = phi <2 x double> [ %131, %130 ], [ %146, %137 ]
%151 = phi double [ %132, %130 ], [ %148, %137 ]
%152 = extractelement <2 x double> %150, i64 0
store double %152, double* %10
%153 = extractelement <2 x double> %150, i64 1
store double %153, double* %11
store double %151, double* %12
%154 = sitofp i32 %1 to double
%155 = insertelement <2 x double> poison, double %153, i64 0
%156 = insertelement <2 x double> %155, double %151, i64 1
%157 = insertelement <2 x double> %150, double %154, i64 1
%158 = fdiv <2 x double> %156, %157
%159 = fmul double %154, 5.000000e-01
%160 = fptosi double %159 to i32
%161 = icmp sgt i32 %160, 5
%162 = select i1 %161, i32 %160, i32 5
%163 = icmp sgt i32 %6, 0
br i1 %163, label %164, label %202
164: ; preds = %149
%165 = fpext float %14 to double
br label %166
166: ; preds = %194, %164
%167 = phi i32 [ %1, %164 ], [ %176, %194 ]
%168 = phi i32 [ 0, %164 ], [ %199, %194 ]
%169 = phi <2 x double> [ %158, %164 ], [ %195, %194 ]
%170 = extractelement <2 x double> %169, i64 0
%171 = extractelement <2 x double> %169, i64 1
%172 = call i32 (float*, float*, float*, i32, double, double, ...) bitcast (i32 (...)* @flattenData to i32 (float*, float*, float*, i32, double, double, ...)*)(float* %0, float* %34, float* %36, i32 %1, double %171, double %170)
%173 = call i32 (float*, i8*, i32, double*, double*, ...) bitcast (i32 (...)* @computeSigma to i32 (float*, i8*, i32, double*, double*, ...)*)(float* %34, i8* %37, i32 %1, double* %8, double* %9)
%174 = load double, double* %9
%175 = fmul double %174, %165
%176 = call i32 (float*, float*, float*, i8*, i32, double*, double*, double*, double*, double, i32, ...) bitcast (i32 (...)* @rejectPixels to i32 (float*, float*, float*, i8*, i32, double*, double*, double*, double*, double, i32, ...)*)(float* %0, float* %34, float* %36, i8* %37, i32 %1, double* %10, double* %11, double* %13, double* %12, double %175, i32 %5)
%177 = icmp sgt i32 %176, 0
br i1 %177, label %178, label %194
178: ; preds = %166
%179 = load double, double* %13
%180 = load double, double* %10
%181 = load double, double* %12
%182 = load double, double* %11
%183 = fneg double %179
%184 = fdiv double %183, %180
%185 = call double @llvm.fmuladd.f64(double %184, double %182, double %181)
%186 = sitofp i32 %176 to double
%187 = call double @llvm.fmuladd.f64(double %184, double %179, double %186)
%188 = fdiv double %185, %187
%189 = fneg double %188
%190 = call double @llvm.fmuladd.f64(double %189, double %179, double %182)
%191 = fdiv double %190, %180
%192 = insertelement <2 x double> poison, double %191, i64 0
%193 = insertelement <2 x double> %192, double %188, i64 1
br label %194
194: ; preds = %178, %166
%195 = phi <2 x double> [ %193, %178 ], [ %169, %166 ]
%196 = icmp slt i32 %176, %167
%197 = icmp sge i32 %176, %162
%198 = select i1 %196, i1 %197, i1 false
%199 = add nuw nsw i32 %168, 1
%200 = icmp slt i32 %199, %6
%201 = select i1 %198, i1 %200, i1 false
br i1 %201, label %166, label %202
202: ; preds = %194, %149
%203 = phi i32 [ %1, %149 ], [ %176, %194 ]
%204 = phi <2 x double> [ %158, %149 ], [ %195, %194 ]
%205 = extractelement <2 x double> %204, i64 0
%206 = shufflevector <2 x double> %204, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%207 = fsub <2 x double> %206, %204
%208 = extractelement <2 x double> %207, i64 0
%209 = fptrunc double %208 to float
store float %209, float* %2
%210 = fmul double %30, %205
%211 = fptrunc double %210 to float
%212 = fcmp ult float %211, 0.000000e+00
%213 = fneg float %211
%214 = select i1 %212, float %213, float %211
%215 = fpext float %214 to double
%216 = fcmp olt double %215, 1.000000e-03
%217 = extractelement <2 x double> %158, i64 0
%218 = fmul double %30, %217
%219 = fptrunc double %218 to float
%220 = select i1 %216, float %219, float %211
store float %220, float* %3
br label %221
221: ; preds = %7, %202, %24
%222 = phi i32 [ 1, %24 ], [ %203, %202 ], [ 0, %7 ]
ret i32 %222
}