#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 *dvector(int, int);
int /*<<< orphan*/ free_dvector(double *, int);
void stub1(float, double *, double *, double *, int);
void mrqcof(float x[], float y[], float sig[], int ndata, double a[], int ia[],
            int ma, double **alpha, double beta[], double *chisq,
            void (*funcs)(float, double[], double *, double[], int)) {
  int i, j, k, l, m, mfit = 0;
  double ymod, wt, sig2i, dy, *dyda;
  dyda = dvector(1, ma);
  for (j = 1; j <= ma; j++)
    if (ia[j])
      mfit++;
  for (j = 1; j <= mfit; j++) {
    for (k = 1; k <= j; k++)
      alpha[j][k] = 0.0;
    beta[j] = 0.0;
  }
  *chisq = 0.0;
  for (i = 1; i <= ndata; i++) {
    (*funcs)(x[i], a, &ymod, dyda, ma);
    sig2i = 1.0 / (sig[i] * sig[i]);
    dy = y[i] - ymod;
    for (j = 0, l = 1; l <= ma; l++) {
      if (ia[l]) {
        wt = dyda[l] * sig2i;
        for (j++, k = 0, m = 1; m <= l; m++)
          if (ia[m])
            alpha[j][++k] += wt * dyda[m];
        beta[j] += dy * wt;
      }
    }
    *chisq += dy * dy * sig2i;
  }
  for (j = 2; j <= mfit; j++)
    for (k = 1; k < j; k++)
      alpha[k][j] = alpha[j][k];
  free_dvector(dyda, 1);
}


x86 assembly (clang, -O0):
<mrqcof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x48(%rbp)
mov    0x10(%rbp),%esi
mov    $0x1,%edi
call   1030 <dvector@plt>
mov    %rax,-0x70(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     11ab <mrqcof+0x8b>
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1198 <mrqcof+0x78>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    119d <mrqcof+0x7d>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1171 <mrqcof+0x51>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     1215 <mrqcof+0xf5>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jg     11f7 <mrqcof+0xd7>
mov    0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11c5 <mrqcof+0xa5>
mov    0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11b2 <mrqcof+0x92>
mov    0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     13ce <mrqcof+0x2ae>
mov    0x30(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x34(%rbp),%rdx
movss  (%rcx,%rdx,4),%xmm0
mov    -0x28(%rbp),%rdi
mov    -0x70(%rbp),%rdx
mov    0x10(%rbp),%ecx
lea    -0x50(%rbp),%rsi
call   *%rax
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd85(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x1,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x10(%rbp),%eax
jg     139d <mrqcof+0x27d>
mov    -0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     138a <mrqcof+0x26a>
mov    -0x70(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x1,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     1366 <mrqcof+0x246>
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1353 <mrqcof+0x233>
movsd  -0x58(%rbp),%xmm0
mov    -0x70(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x3c(%rbp)
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1358 <mrqcof+0x238>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12f9 <mrqcof+0x1d9>
movsd  -0x68(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
mov    0x20(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    138f <mrqcof+0x26f>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    12ad <mrqcof+0x18d>
movsd  -0x68(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mov    0x28(%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    1227 <mrqcof+0x107>
movl   $0x2,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x48(%rbp),%eax
jg     143f <mrqcof+0x31f>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    142c <mrqcof+0x30c>
mov    0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13e8 <mrqcof+0x2c8>
jmp    1431 <mrqcof+0x311>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13d5 <mrqcof+0x2b5>
mov    -0x70(%rbp),%rdi
mov    $0x1,%esi
call   1040 <free_dvector@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mrqcof>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,%r12
mov    %r8,0x38(%rsp)
mov    %rcx,0x8(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rsi,0x28(%rsp)
mov    %rdi,0x20(%rsp)
mov    0x88(%rsp),%r15
mov    0x80(%rsp),%ebp
mov    $0x1,%edi
mov    %ebp,%esi
call   1040 <dvector@plt>
mov    %rbp,%rcx
mov    %rax,%r14
test   %ecx,%ecx
jle    12c8 <mrqcof+0x198>
mov    %ecx,%ebp
cmp    $0x8,%ecx
jae    1196 <mrqcof+0x66>
xor    %edx,%edx
mov    $0x1,%eax
jmp    128a <mrqcof+0x15a>
mov    %ebp,%eax
and    $0xfffffff8,%eax
lea    -0x8(%rax),%rsi
mov    %rsi,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     15dc <mrqcof+0x4ac>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
pxor   %xmm2,%xmm2
mov    $0x1,%esi
movdqa 0xe35(%rip),%xmm3
pxor   %xmm5,%xmm5
pxor   %xmm4,%xmm4
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movdqu (%r12,%rsi,4),%xmm6
movdqu 0x10(%r12,%rsi,4),%xmm7
movdqu 0x20(%r12,%rsi,4),%xmm0
movdqu 0x30(%r12,%rsi,4),%xmm1
pcmpeqd %xmm2,%xmm6
paddd  %xmm5,%xmm6
pcmpeqd %xmm2,%xmm7
paddd  %xmm4,%xmm7
pcmpeqd %xmm2,%xmm0
pcmpeqd %xmm2,%xmm1
paddd  %xmm3,%xmm0
paddd  %xmm6,%xmm0
paddd  %xmm3,%xmm1
paddd  %xmm7,%xmm1
add    $0x10,%rsi
movdqa %xmm0,%xmm5
movdqa %xmm1,%xmm4
add    $0xfffffffffffffffe,%rdi
jne    11e0 <mrqcof+0xb0>
test   $0x1,%dl
je     1267 <mrqcof+0x137>
movdqu (%r12,%rsi,4),%xmm2
movdqu 0x10(%r12,%rsi,4),%xmm3
pxor   %xmm4,%xmm4
pcmpeqd %xmm4,%xmm2
paddd  %xmm2,%xmm0
pcmpeqd %xmm4,%xmm3
paddd  %xmm3,%xmm1
pcmpeqd %xmm2,%xmm2
psubd  %xmm2,%xmm0
psubd  %xmm2,%xmm1
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%edx
cmp    %rax,%rbp
je     12a1 <mrqcof+0x171>
or     $0x1,%rax
add    $0x1,%rbp
xchg   %ax,%ax
cmpl   $0x1,(%r12,%rax,4)
sbb    $0xffffffff,%edx
add    $0x1,%rax
cmp    %rax,%rbp
jne    1290 <mrqcof+0x160>
test   %edx,%edx
je     12c8 <mrqcof+0x198>
mov    %edx,%eax
cmp    $0x1,%edx
mov    %rdx,0x10(%rsp)
jne    12d4 <mrqcof+0x1a4>
mov    $0x8,%ebp
mov    $0x1,%ebx
test   $0x1,%al
jne    1361 <mrqcof+0x231>
jmp    1389 <mrqcof+0x259>
xor    %eax,%eax
mov    %rax,0x10(%rsp)
jmp    1389 <mrqcof+0x259>
mov    %rax,0x18(%rsp)
mov    %eax,%r13d
and    $0xfffffffe,%r13d
neg    %r13
mov    $0x1,%ebx
mov    $0x10,%ebp
nopl   (%rax)
lea    -0x8(%rbp),%rdx
mov    (%r15,%rbx,8),%rdi
add    $0x8,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x90(%rsp),%rax
movq   $0x0,(%rax,%rbx,8)
mov    0x8(%r15,%rbx,8),%rdi
add    $0x8,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1030 <memset@plt>
mov    0x90(%rsp),%rax
movq   $0x0,0x8(%rax,%rbx,8)
add    $0x10,%rbp
lea    (%rbx,%r13,1),%rax
add    $0x2,%rax
add    $0x2,%rbx
cmp    $0x1,%rax
jne    12f0 <mrqcof+0x1c0>
add    $0xfffffffffffffff8,%rbp
mov    0x80(%rsp),%ecx
mov    0x18(%rsp),%rax
test   $0x1,%al
je     1389 <mrqcof+0x259>
mov    (%r15,%rbx,8),%rdi
add    $0x8,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
mov    %rcx,%rbp
call   1030 <memset@plt>
mov    %rbp,%rcx
mov    0x90(%rsp),%rax
movq   $0x0,(%rax,%rbx,8)
mov    0x98(%rsp),%rax
movq   $0x0,(%rax)
cmpl   $0x0,0x8(%rsp)
jle    14e4 <mrqcof+0x3b4>
lea    0x1(%rcx),%r13d
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%r10d
jmp    13e7 <mrqcof+0x2b7>
nopl   0x0(%rax)
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
mov    0x98(%rsp),%rax
addsd  (%rax),%xmm1
movsd  %xmm1,(%rax)
add    $0x1,%r10
cmp    0x8(%rsp),%r10
je     14e4 <mrqcof+0x3b4>
mov    0x20(%rsp),%rax
movss  (%rax,%r10,4),%xmm0
mov    0x38(%rsp),%rdi
lea    0x40(%rsp),%rsi
mov    %r14,%rdx
mov    %rcx,%rbx
mov    %r10,%rbp
call   *0xa0(%rsp)
mov    %rbp,%r10
mov    %rbx,%rcx
mov    0x90(%rsp),%r9
mov    0x30(%rsp),%rax
movss  (%rax,%rbp,4),%xmm0
mulss  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xbd9(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    0x28(%rsp),%rax
movss  (%rax,%rbp,4),%xmm1
cvtss2sd %xmm1,%xmm1
subsd  0x40(%rsp),%xmm1
test   %ecx,%ecx
jle    13c0 <mrqcof+0x290>
xor    %r8d,%r8d
mov    $0x1,%ebx
jmp    148d <mrqcof+0x35d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mulsd  %xmm1,%xmm2
addsd  (%r9,%rdx,8),%xmm2
movsd  %xmm2,(%r9,%rdx,8)
add    $0x1,%rbx
cmp    %r13,%rbx
je     13c0 <mrqcof+0x290>
cmpl   $0x0,(%r12,%rbx,4)
je     1480 <mrqcof+0x350>
movsd  (%r14,%rbx,8),%xmm2
mulsd  %xmm0,%xmm2
add    $0x1,%r8d
movslq %r8d,%rdx
xor    %esi,%esi
xor    %edi,%edi
jmp    14b9 <mrqcof+0x389>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    %rsi,%rbx
je     1470 <mrqcof+0x340>
cmpl   $0x0,0x4(%r12,%rsi,4)
je     14b0 <mrqcof+0x380>
mov    (%r15,%rdx,8),%rbp
movslq %edi,%rax
add    $0x1,%edi
movsd  0x8(%r14,%rsi,8),%xmm3
mulsd  %xmm2,%xmm3
addsd  0x8(%rbp,%rax,8),%xmm3
movsd  %xmm3,0x8(%rbp,%rax,8)
jmp    14b0 <mrqcof+0x380>
mov    0x10(%rsp),%r9
cmp    $0x2,%r9d
jae    150b <mrqcof+0x3db>
mov    %r14,%rdi
mov    $0x1,%esi
call   1050 <free_dvector@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0x1,%r9d
mov    $0x2,%eax
mov    $0x1,%ebp
xor    %r8d,%r8d
jmp    152d <mrqcof+0x3fd>
xchg   %ax,%ax
add    $0x1,%rax
add    $0x1,%rbp
cmp    %r9,%rax
je     14ef <mrqcof+0x3bf>
mov    %r8,%rcx
add    $0x1,%r8
mov    (%r15,%rax,8),%rsi
mov    $0x1,%edi
cmp    $0x3,%rcx
jb     159d <mrqcof+0x46d>
mov    %rbp,%rcx
and    $0xfffffffffffffffc,%rcx
xor    %edi,%edi
nopl   0x0(%rax)
movsd  0x8(%rsi,%rdi,8),%xmm0
mov    0x8(%r15,%rdi,8),%rbx
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x10(%rsi,%rdi,8),%xmm0
mov    0x10(%r15,%rdi,8),%rbx
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x18(%rsi,%rdi,8),%xmm0
mov    0x18(%r15,%rdi,8),%rbx
movsd  %xmm0,(%rbx,%rax,8)
movq   0x20(%rsi,%rdi,8),%xmm0
mov    0x20(%r15,%rdi,8),%rbx
movq   %xmm0,(%rbx,%rax,8)
add    $0x4,%rdi
cmp    %rdi,%rcx
jne    1550 <mrqcof+0x420>
add    $0x1,%rdi
test   $0x3,%r8b
je     1520 <mrqcof+0x3f0>
mov    %ebp,%ecx
and    $0x3,%ecx
lea    (%r15,%rdi,8),%rbx
lea    (%rsi,%rdi,8),%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
movq   (%rsi,%rdi,8),%xmm0
mov    (%rbx,%rdi,8),%rdx
movq   %xmm0,(%rdx,%rax,8)
add    $0x1,%rdi
cmp    %rdi,%rcx
jne    15c0 <mrqcof+0x490>
jmp    1520 <mrqcof+0x3f0>
pxor   %xmm0,%xmm0
mov    $0x1,%esi
pxor   %xmm1,%xmm1
test   $0x1,%dl
jne    123a <mrqcof+0x10a>
jmp    1267 <mrqcof+0x137>

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

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