#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 */
int /*<<< orphan*/ free_vector(double *, int, int);
void stub1(double, double *, double *, double *, int);
double *vector(int, int);
void mrqcof(double x[], double y[], double sig[], int ndata, double a[],
            int ia[], int ma, double **alpha, double beta[], double *chisq,
            void (*funcs)(double, double[], double *, double[], int)) {
  int i, j, k, l, m, mfit = 0;
  double ymod, wt, sig2i, dy, *dyda;
  dyda = vector(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_vector(dyda, 1, ma);
}


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   1040 <vector@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     13c6 <mrqcof+0x2a6>
mov    0x30(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x34(%rbp),%rdx
movsd  (%rcx,%rdx,8),%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
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movsd  0xd89(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%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     1395 <mrqcof+0x275>
mov    -0x30(%rbp),%rax
movslq -0x40(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1382 <mrqcof+0x262>
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     135e <mrqcof+0x23e>
mov    -0x30(%rbp),%rax
movslq -0x44(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     134b <mrqcof+0x22b>
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    1350 <mrqcof+0x230>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12f1 <mrqcof+0x1d1>
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    1387 <mrqcof+0x267>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    12a5 <mrqcof+0x185>
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     1437 <mrqcof+0x317>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1424 <mrqcof+0x304>
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    13e0 <mrqcof+0x2c0>
jmp    1429 <mrqcof+0x309>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13cd <mrqcof+0x2ad>
mov    -0x70(%rbp),%rdi
mov    0x10(%rbp),%edx
mov    $0x1,%esi
call   1030 <free_vector@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,%r13
mov    %r8,0x38(%rsp)
mov    %rcx,0x8(%rsp)
mov    %rdx,0x30(%rsp)
mov    %rsi,0x28(%rsp)
mov    %rdi,0x20(%rsp)
mov    0x88(%rsp),%r14
mov    0x80(%rsp),%ebp
mov    $0x1,%edi
mov    %ebp,%esi
call   1050 <vector@plt>
mov    %rbp,%rcx
mov    %rax,%r15
test   %ecx,%ecx
jle    12c9 <mrqcof+0x199>
mov    %ecx,%ebp
cmp    $0x8,%ecx
jae    1196 <mrqcof+0x66>
xor    %edx,%edx
mov    $0x1,%eax
jmp    128c <mrqcof+0x15c>
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 0x0(%r13,%rsi,4),%xmm6
movdqu 0x10(%r13,%rsi,4),%xmm7
movdqu 0x20(%r13,%rsi,4),%xmm0
movdqu 0x30(%r13,%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     1269 <mrqcof+0x139>
movdqu 0x0(%r13,%rsi,4),%xmm2
movdqu 0x10(%r13,%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     12a2 <mrqcof+0x172>
or     $0x1,%rax
add    $0x1,%rbp
cmpl   $0x1,0x0(%r13,%rax,4)
sbb    $0xffffffff,%edx
add    $0x1,%rax
cmp    %rax,%rbp
jne    1290 <mrqcof+0x160>
test   %edx,%edx
je     12c9 <mrqcof+0x199>
mov    %edx,%eax
cmp    $0x1,%edx
mov    %rdx,0x10(%rsp)
jne    12d5 <mrqcof+0x1a5>
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,%r12d
and    $0xfffffffe,%r12d
neg    %r12
mov    $0x1,%ebx
mov    $0x10,%ebp
xchg   %ax,%ax
lea    -0x8(%rbp),%rdx
mov    (%r14,%rbx,8),%rdi
add    $0x8,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x90(%rsp),%rax
movq   $0x0,(%rax,%rbx,8)
mov    0x8(%r14,%rbx,8),%rdi
add    $0x8,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
call   1040 <memset@plt>
mov    0x90(%rsp),%rax
movq   $0x0,0x8(%rax,%rbx,8)
add    $0x10,%rbp
lea    (%r12,%rbx,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    (%r14,%rbx,8),%rdi
add    $0x8,%rdi
xor    %esi,%esi
mov    %rbp,%rdx
mov    %rcx,%rbp
call   1040 <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    14d4 <mrqcof+0x3a4>
lea    0x1(%rcx),%r12d
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%r10d
jmp    13e7 <mrqcof+0x2b7>
nopl   0x0(%rax)
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mov    0x98(%rsp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
add    $0x1,%r10
cmp    0x8(%rsp),%r10
je     14d4 <mrqcof+0x3a4>
mov    0x20(%rsp),%rax
movsd  (%rax,%r10,8),%xmm0
mov    0x38(%rsp),%rdi
lea    0x40(%rsp),%rsi
mov    %r15,%rdx
mov    %rcx,%rbx
mov    %r10,%rbp
call   *0xa0(%rsp)
mov    %rbp,%r10
mov    0x90(%rsp),%r9
mov    %rbx,%rcx
mov    0x30(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
movsd  0xbe0(%rip),%xmm1
divsd  %xmm0,%xmm1
mov    0x28(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
subsd  0x40(%rsp),%xmm0
test   %ecx,%ecx
jle    13c0 <mrqcof+0x290>
xor    %r8d,%r8d
mov    $0x1,%ebx
jmp    147d <mrqcof+0x34d>
cs nopw 0x0(%rax,%rax,1)
mulsd  %xmm0,%xmm2
addsd  (%r9,%rdx,8),%xmm2
movsd  %xmm2,(%r9,%rdx,8)
add    $0x1,%rbx
cmp    %r12,%rbx
je     13c0 <mrqcof+0x290>
cmpl   $0x0,0x0(%r13,%rbx,4)
je     1470 <mrqcof+0x340>
movsd  (%r15,%rbx,8),%xmm2
mulsd  %xmm1,%xmm2
add    $0x1,%r8d
movslq %r8d,%rdx
xor    %esi,%esi
xor    %edi,%edi
jmp    14a9 <mrqcof+0x379>
nopl   0x0(%rax)
add    $0x1,%rsi
cmp    %rsi,%rbx
je     1460 <mrqcof+0x330>
cmpl   $0x0,0x4(%r13,%rsi,4)
je     14a0 <mrqcof+0x370>
mov    (%r14,%rdx,8),%rbp
movslq %edi,%rax
add    $0x1,%edi
movsd  0x8(%r15,%rsi,8),%xmm3
mulsd  %xmm2,%xmm3
addsd  0x8(%rbp,%rax,8),%xmm3
movsd  %xmm3,0x8(%rbp,%rax,8)
jmp    14a0 <mrqcof+0x370>
mov    0x10(%rsp),%r10
cmp    $0x2,%r10d
jae    14fd <mrqcof+0x3cd>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %ecx,%edx
call   1030 <free_vector@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0x1,%r10d
mov    $0x2,%eax
mov    $0x1,%r9d
xor    %r8d,%r8d
jmp    152d <mrqcof+0x3fd>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rax
add    $0x1,%r9
cmp    %r10,%rax
je     14df <mrqcof+0x3af>
mov    %r8,%rdx
add    $0x1,%r8
mov    (%r14,%rax,8),%rsi
mov    $0x1,%edi
cmp    $0x3,%rdx
jb     159d <mrqcof+0x46d>
mov    %r9,%rdx
and    $0xfffffffffffffffc,%rdx
xor    %edi,%edi
nopl   0x0(%rax)
movsd  0x8(%rsi,%rdi,8),%xmm0
mov    0x8(%r14,%rdi,8),%rbx
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x10(%rsi,%rdi,8),%xmm0
mov    0x10(%r14,%rdi,8),%rbx
movsd  %xmm0,(%rbx,%rax,8)
movsd  0x18(%rsi,%rdi,8),%xmm0
mov    0x18(%r14,%rdi,8),%rbx
movsd  %xmm0,(%rbx,%rax,8)
movq   0x20(%rsi,%rdi,8),%xmm0
mov    0x20(%r14,%rdi,8),%rbx
movq   %xmm0,(%rbx,%rax,8)
add    $0x4,%rdi
cmp    %rdi,%rdx
jne    1550 <mrqcof+0x420>
add    $0x1,%rdi
test   $0x3,%r8b
je     1520 <mrqcof+0x3f0>
mov    %r9d,%ebp
and    $0x3,%ebp
lea    (%r14,%rdi,8),%rbx
lea    (%rsi,%rdi,8),%rsi
xor    %edi,%edi
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,%rbp
jne    15c0 <mrqcof+0x490>
jmp    1520 <mrqcof+0x3f0>
pxor   %xmm0,%xmm0
mov    $0x1,%esi
pxor   %xmm1,%xmm1
test   $0x1,%dl
jne    123b <mrqcof+0x10b>
jmp    1269 <mrqcof+0x139>

LLVM IR (-O0):
define void @mrqcof(double* %0, double* %1, double* %2, i32 %3, double* %4, i32* %5, i32 %6, double** %7, double* %8, double* %9, void (double, double*, double*, double*, i32)* %10) {
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca double*
%17 = alloca i32*
%18 = alloca i32
%19 = alloca double**
%20 = alloca double*
%21 = alloca double*
%22 = alloca void (double, 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 double* %0, double** %12
store double* %1, double** %13
store double* %2, double** %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 (double, double*, double*, double*, i32)* %10, void (double, double*, double*, double*, i32)** %22
store i32 0, i32* %28
%34 = load i32, i32* %18
%35 = call double* @vector(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 = %194, %84
%87 = load i32, i32* %23
%88 = load i32, i32* %15
%89 = icmp sle i32 %87, %88
br i1 %89, label %90, label %197
90: ; preds = %86
%91 = load void (double, double*, double*, double*, i32)*, void (double, double*, double*, double*, i32)** %22
%92 = load double*, double** %12
%93 = load i32, i32* %23
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds double, double* %92, i64 %94
%96 = load double, double* %95
%97 = load double*, double** %16
%98 = load double*, double** %33
%99 = load i32, i32* %18
%100 = load double*, double** %14
%101 = load i32, i32* %23
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %100, i64 %102
%104 = load double, double* %103
%105 = load double*, double** %14
%106 = load i32, i32* %23
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
%109 = load double, double* %108
%110 = fmul double %104, %109
%111 = fdiv double 1.000000e+00, %110
store double %111, double* %31
%112 = load double*, double** %13
%113 = load i32, i32* %23
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = load double, double* %29
%118 = fsub double %116, %117
store double %118, double* %32
store i32 0, i32* %24
store i32 1, i32* %26
br label %119
119: ; preds = %183, %90
%120 = load i32, i32* %26
%121 = load i32, i32* %18
%122 = icmp sle i32 %120, %121
br i1 %122, label %123, label %186
123: ; preds = %119
%124 = load i32*, i32** %17
%125 = load i32, i32* %26
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %124, i64 %126
%128 = load i32, i32* %127
%129 = icmp ne i32 %128, 0
br i1 %129, label %130, label %182
130: ; preds = %123
%131 = load double*, double** %33
%132 = load i32, i32* %26
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %131, i64 %133
%135 = load double, double* %134
%136 = load double, double* %31
%137 = fmul double %135, %136
store double %137, double* %30
%138 = load i32, i32* %24
%139 = add nsw i32 %138, 1
store i32 %139, i32* %24
store i32 0, i32* %25
store i32 1, i32* %27
br label %140
140: ; preds = %170, %130
%141 = load i32, i32* %27
%142 = load i32, i32* %26
%143 = icmp sle i32 %141, %142
br i1 %143, label %144, label %173
144: ; preds = %140
%145 = load i32*, i32** %17
%146 = load i32, i32* %27
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i32, i32* %145, i64 %147
%149 = load i32, i32* %148
%150 = icmp ne i32 %149, 0
br i1 %150, label %151, label %169
151: ; preds = %144
%152 = load double, double* %30
%153 = load double*, double** %33
%154 = load i32, i32* %27
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds double, double* %153, i64 %155
%157 = load double, double* %156
%158 = load double**, double*** %19
%159 = load i32, i32* %24
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double*, double** %158, i64 %160
%162 = load double*, double** %161
%163 = load i32, i32* %25
%164 = add nsw i32 %163, 1
store i32 %164, i32* %25
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double, double* %162, i64 %165
%167 = load double, double* %166
%168 = call double @llvm.fmuladd.f64(double %152, double %157, double %167)
store double %168, double* %166
br label %169
169: ; preds = %151, %144
br label %170
170: ; preds = %169
%171 = load i32, i32* %27
%172 = add nsw i32 %171, 1
store i32 %172, i32* %27
br label %140
173: ; preds = %140
%174 = load double, double* %32
%175 = load double, double* %30
%176 = load double*, double** %20
%177 = load i32, i32* %24
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double, double* %176, i64 %178
%180 = load double, double* %179
%181 = call double @llvm.fmuladd.f64(double %174, double %175, double %180)
store double %181, double* %179
br label %182
182: ; preds = %173, %123
br label %183
183: ; preds = %182
%184 = load i32, i32* %26
%185 = add nsw i32 %184, 1
store i32 %185, i32* %26
br label %119
186: ; preds = %119
%187 = load double, double* %32
%188 = load double, double* %32
%189 = fmul double %187, %188
%190 = load double, double* %31
%191 = load double*, double** %21
%192 = load double, double* %191
%193 = call double @llvm.fmuladd.f64(double %189, double %190, double %192)
store double %193, double* %191
br label %194
194: ; preds = %186
%195 = load i32, i32* %23
%196 = add nsw i32 %195, 1
store i32 %196, i32* %23
br label %86
197: ; preds = %86
store i32 2, i32* %24
br label %198
198: ; preds = %229, %197
%199 = load i32, i32* %24
%200 = load i32, i32* %28
%201 = icmp sle i32 %199, %200
br i1 %201, label %202, label %232
202: ; preds = %198
store i32 1, i32* %25
br label %203
203: ; preds = %225, %202
%204 = load i32, i32* %25
%205 = load i32, i32* %24
%206 = icmp slt i32 %204, %205
br i1 %206, label %207, label %228
207: ; preds = %203
%208 = load double**, double*** %19
%209 = load i32, i32* %24
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds double*, double** %208, i64 %210
%212 = load double*, double** %211
%213 = load i32, i32* %25
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %212, i64 %214
%216 = load double, double* %215
%217 = load double**, double*** %19
%218 = load i32, i32* %25
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds double*, double** %217, i64 %219
%221 = load double*, double** %220
%222 = load i32, i32* %24
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds double, double* %221, i64 %223
store double %216, double* %224
br label %225
225: ; preds = %207
%226 = load i32, i32* %25
%227 = add nsw i32 %226, 1
store i32 %227, i32* %25
br label %203
228: ; preds = %203
br label %229
229: ; preds = %228
%230 = load i32, i32* %24
%231 = add nsw i32 %230, 1
store i32 %231, i32* %24
br label %198
232: ; preds = %198
%233 = load double*, double** %33
%234 = load i32, i32* %18
%235 = call i32 @free_vector(double* %233, i32 1, i32 %234)
ret void
}

LLVM IR (-O2):
define void @mrqcof(double* nocapture %0, double* nocapture %1, double* nocapture %2, i32 %3, double* %4, i32* nocapture %5, i32 %6, double** nocapture %7, double* nocapture %8, double* nocapture %9, void (double, double*, double*, double*, i32)* nocapture %10) {
%12 = alloca double
%13 = bitcast double* %12 to i8*
%14 = tail call double* @vector(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 = %218, %151
%160 = icmp ult i32 %152, 2
br i1 %160, label %281, label %161
161: ; preds = %159
%162 = add nuw i32 %152, 1
%163 = zext i32 %162 to i64
br label %224
164: ; preds = %154, %218
%165 = phi i64 [ 1, %154 ], [ %222, %218 ]
%166 = getelementptr inbounds double, double* %0, i64 %165
%167 = load double, double* %166
%168 = getelementptr inbounds double, double* %2, i64 %165
%169 = load double, double* %168
%170 = fmul double %169, %169
%171 = fdiv double 1.000000e+00, %170
%172 = getelementptr inbounds double, double* %1, i64 %165
%173 = load double, double* %172
%174 = load double, double* %12
%175 = fsub double %173, %174
br i1 %15, label %218, label %176
176: ; preds = %164, %213
%177 = phi i64 [ %215, %213 ], [ 1, %164 ]
%178 = phi i64 [ %216, %213 ], [ 2, %164 ]
%179 = phi i32 [ %214, %213 ], [ 0, %164 ]
%180 = getelementptr inbounds i32, i32* %5, i64 %177
%181 = load i32, i32* %180
%182 = icmp eq i32 %181, 0
br i1 %182, label %213, label %183
183: ; preds = %176
%184 = getelementptr inbounds double, double* %14, i64 %177
%185 = load double, double* %184
%186 = fmul double %171, %185
%187 = add nsw i32 %179, 1
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double*, double** %7, i64 %188
br label %190
190: ; preds = %183, %205
%191 = phi i64 [ 1, %183 ], [ %207, %205 ]
%192 = phi i32 [ 0, %183 ], [ %206, %205 ]
%193 = getelementptr inbounds i32, i32* %5, i64 %191
%194 = load i32, i32* %193
%195 = icmp eq i32 %194, 0
br i1 %195, label %205, label %196
196: ; preds = %190
%197 = getelementptr inbounds double, double* %14, i64 %191
%198 = load double, double* %197
%199 = load double*, double** %189
%200 = add nsw i32 %192, 1
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %199, i64 %201
%203 = load double, double* %202
%204 = call double @llvm.fmuladd.f64(double %186, double %198, double %203)
store double %204, double* %202
br label %205
205: ; preds = %190, %196
%206 = phi i32 [ %200, %196 ], [ %192, %190 ]
%207 = add nuw nsw i64 %191, 1
%208 = icmp eq i64 %207, %178
br i1 %208, label %209, label %190
209: ; preds = %205
%210 = getelementptr inbounds double, double* %8, i64 %188
%211 = load double, double* %210
%212 = call double @llvm.fmuladd.f64(double %175, double %186, double %211)
store double %212, double* %210
br label %213
213: ; preds = %176, %209
%214 = phi i32 [ %187, %209 ], [ %179, %176 ]
%215 = add nuw nsw i64 %177, 1
%216 = add nuw nsw i64 %178, 1
%217 = icmp eq i64 %215, %158
br i1 %217, label %218, label %176
218: ; preds = %213, %164
%219 = fmul double %175, %175
%220 = load double, double* %9
%221 = call double @llvm.fmuladd.f64(double %219, double %171, double %220)
store double %221, double* %9
%222 = add nuw nsw i64 %165, 1
%223 = icmp eq i64 %222, %157
br i1 %223, label %159, label %164
224: ; preds = %161, %277
%225 = phi i64 [ 0, %161 ], [ %280, %277 ]
%226 = phi i64 [ 2, %161 ], [ %278, %277 ]
%227 = add i64 %225, 1
%228 = getelementptr inbounds double*, double** %7, i64 %226
%229 = load double*, double** %228
%230 = and i64 %227, 3
%231 = icmp ult i64 %225, 3
br i1 %231, label %263, label %232
232: ; preds = %224
%233 = and i64 %227, -4
br label %234
234: ; preds = %234, %232
%235 = phi i64 [ 1, %232 ], [ %260, %234 ]
%236 = phi i64 [ 0, %232 ], [ %261, %234 ]
%237 = getelementptr inbounds double, double* %229, i64 %235
%238 = load double, double* %237
%239 = getelementptr inbounds double*, double** %7, i64 %235
%240 = load double*, double** %239
%241 = getelementptr inbounds double, double* %240, i64 %226
store double %238, double* %241
%242 = add nuw nsw i64 %235, 1
%243 = getelementptr inbounds double, double* %229, i64 %242
%244 = load double, double* %243
%245 = getelementptr inbounds double*, double** %7, i64 %242
%246 = load double*, double** %245
%247 = getelementptr inbounds double, double* %246, i64 %226
store double %244, double* %247
%248 = add nuw nsw i64 %235, 2
%249 = getelementptr inbounds double, double* %229, i64 %248
%250 = load double, double* %249
%251 = getelementptr inbounds double*, double** %7, i64 %248
%252 = load double*, double** %251
%253 = getelementptr inbounds double, double* %252, i64 %226
store double %250, double* %253
%254 = add nuw nsw i64 %235, 3
%255 = getelementptr inbounds double, double* %229, i64 %254
%256 = load double, double* %255
%257 = getelementptr inbounds double*, double** %7, i64 %254
%258 = load double*, double** %257
%259 = getelementptr inbounds double, double* %258, i64 %226
store double %256, double* %259
%260 = add nuw nsw i64 %235, 4
%261 = add i64 %236, 4
%262 = icmp eq i64 %261, %233
br i1 %262, label %263, label %234
263: ; preds = %234, %224
%264 = phi i64 [ 1, %224 ], [ %260, %234 ]
%265 = icmp eq i64 %230, 0
br i1 %265, label %277, label %266
266: ; preds = %263, %266
%267 = phi i64 [ %274, %266 ], [ %264, %263 ]
%268 = phi i64 [ %275, %266 ], [ 0, %263 ]
%269 = getelementptr inbounds double, double* %229, i64 %267
%270 = load double, double* %269
%271 = getelementptr inbounds double*, double** %7, i64 %267
%272 = load double*, double** %271
%273 = getelementptr inbounds double, double* %272, i64 %226
store double %270, double* %273
%274 = add nuw nsw i64 %267, 1
%275 = add i64 %268, 1
%276 = icmp eq i64 %275, %230
br i1 %276, label %277, label %266
277: ; preds = %266, %263
%278 = add nuw nsw i64 %226, 1
%279 = icmp eq i64 %278, %163
%280 = add i64 %225, 1
br i1 %279, label %281, label %224
281: ; preds = %277, %159
%282 = call i32 @free_vector(double* %14, i32 1, i32 %6)
ret void
}