#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 */
size_t abs(int);
int /*<<< orphan*/ free(double *);
scalar_t__ log(double);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int, double, int, double);
void nllkar1(int np, double *th, double *fnv) {
  extern int nn, nc, ncl, dmax, *y, *dvec, *dstart;
  extern double **x;
  double rh[20][20], *pa, *pb;
  double pr, nlk, eps, sd;
  double b0, *b, rho, *rr, tem;
  int i, j, k, jk, jc;
  int nsim, ifail, d, start;
  double pnorms(double);
  void mvn1(int, double[], double[], double[][20], int, double, double *,
            double *, int *);
  pa = (double *)malloc((dmax + 1) * sizeof(double));
  pb = (double *)malloc((dmax + 1) * sizeof(double));
  b = (double *)malloc((nc + 1) * sizeof(double));
  rr = (double *)malloc((dmax + 1) * sizeof(double));
  nlk = 0.;
  eps = 1.e-6;
  b0 = th[1];
  for (j = 1; j <= nc; j++)
    b[j] = th[j + 1];
  rho = th[np];
  for (jk = 1, rr[0] = 1.; jk < dmax; jk++)
    rr[jk] = rr[jk - 1] * rho;
  for (j = 1; j <= dmax; j++) {
    for (k = 1; k <= dmax; k++)
      rh[j][k] = rr[abs(k - j)];
  }
  for (i = 1; i <= ncl; i++) {
    d = dvec[i];
    start = dstart[i];
    if (d <= 7)
      nsim = 0;
    else
      nsim = 2000;
    for (j = 1; j <= d; j++) {
      for (jc = 1, tem = b0; jc <= nc; jc++)
        tem += b[jc] * x[start + (j - 1)][jc];
      if (y[start + j - 1] == 1) {
        pa[j] = -6.;
        pb[j] = tem;
      } else {
        pa[j] = tem;
        pb[j] = 6.;
      }
    }
    if (d >= 2) {
      mvn1(d, pa, pb, rh, nsim, eps, &pr, &sd, &ifail);
      if (ifail > 0) {
        *fnv = 1.e9;
        free(b);
        free(pa);
        free(pb);
        free(rr);
        return;
      }
    } else
      pr = pnorms(pb[1]) - pnorms(pa[1]);
    if (pr <= -.1) {
      *fnv = 1.e9;
      for (j = 1; j <= d; j++)
        printf("pa[%d]=%6.3f, pb[%d]=%6.3f\n", j, pa[j], j, pb[j]);
      return;
    }
    if (pr <= 0.)
      pr = 1.e-15;
    nlk -= log(pr);
  }
  *fnv = nlk;
  free(b);
  free(pa);
  free(pb);
  free(rr);
  return;
}


x86 assembly (clang, -O0):
<nllkar1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2e53(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0xca8(%rbp)
mov    0x2e33(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0xcb0(%rbp)
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0xce0(%rbp)
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0xcf0(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xcc0(%rbp)
ff
movsd  0xde7(%rip),%xmm0
movsd  %xmm0,-0xcc8(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xcd8(%rbp)
ff
movl   $0x1,-0xd00(%rbp)
mov    -0xd00(%rbp),%eax
mov    0x2d77(%rip),%rcx
cmp    (%rcx),%eax
jg     128d <nllkar1+0x11d>
mov    -0x10(%rbp),%rax
mov    -0xd00(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xce0(%rbp),%rax
movslq -0xd00(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd00(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd00(%rbp)
jmp    123c <nllkar1+0xcc>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xce8(%rbp)
ff
movl   $0x1,-0xd08(%rbp)
mov    -0xcf0(%rbp),%rax
movsd  0xd4d(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0xd08(%rbp),%eax
mov    0x2d14(%rip),%rcx
cmp    (%rcx),%eax
jge    131b <nllkar1+0x1ab>
mov    -0xcf0(%rbp),%rax
mov    -0xd08(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0xce8(%rbp),%xmm0
ff
mov    -0xcf0(%rbp),%rax
movslq -0xd08(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd08(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd08(%rbp)
jmp    12bf <nllkar1+0x14f>
movl   $0x1,-0xd00(%rbp)
mov    -0xd00(%rbp),%eax
mov    0x2cae(%rip),%rcx
cmp    (%rcx),%eax
jg     13d8 <nllkar1+0x268>
movl   $0x1,-0xd04(%rbp)
mov    -0xd04(%rbp),%eax
mov    0x2c8f(%rip),%rcx
cmp    (%rcx),%eax
jg     13bf <nllkar1+0x24f>
mov    -0xcf0(%rbp),%rax
mov    %rax,-0xd28(%rbp)
mov    -0xd04(%rbp),%edi
sub    -0xd00(%rbp),%edi
call   1040 <abs@plt>
mov    %rax,%rcx
mov    -0xd28(%rbp),%rax
movsd  (%rax,%rcx,8),%xmm0
movslq -0xd00(%rbp),%rcx
lea    -0xca0(%rbp),%rax
imul   $0xa0,%rcx,%rcx
add    %rcx,%rax
movslq -0xd04(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xd04(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd04(%rbp)
jmp    1344 <nllkar1+0x1d4>
jmp    13c4 <nllkar1+0x254>
mov    -0xd00(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd00(%rbp)
jmp    1325 <nllkar1+0x1b5>
movl   $0x1,-0xcfc(%rbp)
mov    -0xcfc(%rbp),%eax
mov    0x2bf9(%rip),%rcx
cmp    (%rcx),%eax
jg     179f <nllkar1+0x62f>
mov    0x2bd2(%rip),%rax
mov    (%rax),%rax
movslq -0xcfc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xd18(%rbp)
mov    0x2bb0(%rip),%rax
mov    (%rax),%rax
movslq -0xcfc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xd1c(%rbp)
cmpl   $0x7,-0xd18(%rbp)
jg     1447 <nllkar1+0x2d7>
movl   $0x0,-0xd10(%rbp)
jmp    1451 <nllkar1+0x2e1>
movl   $0x7d0,-0xd10(%rbp)
movl   $0x1,-0xd00(%rbp)
mov    -0xd00(%rbp),%eax
cmp    -0xd18(%rbp),%eax
jg     15b9 <nllkar1+0x449>
movl   $0x1,-0xd0c(%rbp)
movsd  -0xcd8(%rbp),%xmm0
ff
movsd  %xmm0,-0xcf8(%rbp)
ff
mov    -0xd0c(%rbp),%eax
mov    0x2b2c(%rip),%rcx
cmp    (%rcx),%eax
jg     1509 <nllkar1+0x399>
mov    -0xce0(%rbp),%rax
movslq -0xd0c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x2afa(%rip),%rax
mov    (%rax),%rax
mov    -0xd1c(%rbp),%ecx
mov    -0xd00(%rbp),%edx
sub    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xd0c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0xcf8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xcf8(%rbp)
ff
mov    -0xd0c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd0c(%rbp)
jmp    1487 <nllkar1+0x317>
mov    0x2ac8(%rip),%rax
mov    (%rax),%rax
mov    -0xd1c(%rbp),%ecx
add    -0xd00(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    156a <nllkar1+0x3fa>
mov    -0xca8(%rbp),%rax
movslq -0xd00(%rbp),%rcx
movsd  0xaeb(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xcf8(%rbp),%xmm0
ff
mov    -0xcb0(%rbp),%rax
movslq -0xd00(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15a0 <nllkar1+0x430>
movsd  -0xcf8(%rbp),%xmm0
ff
mov    -0xca8(%rbp),%rax
movslq -0xd00(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xcb0(%rbp),%rax
movslq -0xd00(%rbp),%rcx
movsd  0xa8d(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    15a5 <nllkar1+0x435>
mov    -0xd00(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd00(%rbp)
jmp    145b <nllkar1+0x2eb>
cmpl   $0x2,-0xd18(%rbp)
jl     166a <nllkar1+0x4fa>
mov    -0xd18(%rbp),%edi
mov    -0xca8(%rbp),%rsi
mov    -0xcb0(%rbp),%rdx
lea    -0xca0(%rbp),%rcx
mov    -0xd10(%rbp),%r8d
movsd  -0xcc8(%rbp),%xmm0
ff
lea    -0xcb8(%rbp),%r9
lea    -0xcd0(%rbp),%r10
lea    -0xd14(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1060 <mvn1@plt>
cmpl   $0x0,-0xd14(%rbp)
jle    1665 <nllkar1+0x4f5>
mov    -0x18(%rbp),%rax
movsd  0x9f4(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0xce0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xca8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xcb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xcf0(%rbp),%rdi
call   1030 <free@plt>
jmp    17df <nllkar1+0x66f>
jmp    16ab <nllkar1+0x53b>
mov    -0xcb0(%rbp),%rax
movsd  0x8(%rax),%xmm0
call   1050 <pnorms@plt>
movsd  %xmm0,-0xd30(%rbp)
ff
mov    -0xca8(%rbp),%rax
movsd  0x8(%rax),%xmm0
call   1050 <pnorms@plt>
movaps %xmm0,%xmm1
movsd  -0xd30(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xcb8(%rbp)
ff
movsd  0x95d(%rip),%xmm0
ucomisd -0xcb8(%rbp),%xmm0
ff
jb     1744 <nllkar1+0x5d4>
mov    -0x18(%rbp),%rax
movsd  0x953(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x1,-0xd00(%rbp)
mov    -0xd00(%rbp),%eax
cmp    -0xd18(%rbp),%eax
jg     173f <nllkar1+0x5cf>
mov    -0xd00(%rbp),%esi
mov    -0xca8(%rbp),%rax
movslq -0xd00(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xd00(%rbp),%edx
mov    -0xcb0(%rbp),%rax
movslq -0xd00(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0x912(%rip),%rdi
call   1070 <printf@plt>
mov    -0xd00(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd00(%rbp)
jmp    16db <nllkar1+0x56b>
jmp    17df <nllkar1+0x66f>
xorps  %xmm0,%xmm0
ucomisd -0xcb8(%rbp),%xmm0
ff
jb     1765 <nllkar1+0x5f5>
movsd  0x8bb(%rip),%xmm0
movsd  %xmm0,-0xcb8(%rbp)
ff
movsd  -0xcb8(%rbp),%xmm0
ff
call   1090 <log@plt>
cvtsi2sd %rax,%xmm1
movsd  -0xcc0(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xcc0(%rbp)
ff
mov    -0xcfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xcfc(%rbp)
jmp    13e2 <nllkar1+0x272>
movsd  -0xcc0(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xce0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xca8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xcb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xcf0(%rbp),%rdi
call   1030 <free@plt>
add    $0xd40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nllkar1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xce8,%rsp
mov    %rdx,0x8(%rsp)
mov    %rsi,%rbp
mov    %edi,%r12d
mov    0x2e4d(%rip),%r15
mov    (%r15),%eax
lea    0x8(,%rax,8),%edi
call   1080 <malloc@plt>
mov    %rax,%r13
mov    (%r15),%eax
lea    0x8(,%rax,8),%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    0x2e00(%rip),%r14
mov    (%r14),%eax
lea    0x8(,%rax,8),%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    (%r15),%eax
lea    0x8(,%rax,8),%edi
call   1080 <malloc@plt>
movsd  0x8(%rbp),%xmm4
mov    (%r14),%edx
test   %edx,%edx
jle    132b <nllkar1+0x1bb>
lea    0x1(%rdx),%r9
mov    $0x1,%ecx
cmp    $0x4,%rdx
jb     12b7 <nllkar1+0x147>
lea    0x8(%rbx),%rsi
lea    0x8(,%r9,8),%rdi
add    %rbp,%rdi
cmp    %rdi,%rsi
jae    1229 <nllkar1+0xb9>
lea    (%rbx,%r9,8),%rsi
lea    0x10(%rbp),%rdi
cmp    %rsi,%rdi
jb     12b7 <nllkar1+0x147>
mov    %edx,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rsi
mov    %rsi,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rsi,%rsi
je     17fd <nllkar1+0x68d>
mov    %r8,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %esi,%esi
nop
movups 0x10(%rbp,%rsi,8),%xmm0
movups 0x20(%rbp,%rsi,8),%xmm1
movups %xmm0,0x8(%rbx,%rsi,8)
movups %xmm1,0x18(%rbx,%rsi,8)
movups 0x30(%rbp,%rsi,8),%xmm0
movupd 0x40(%rbp,%rsi,8),%xmm1
movups %xmm0,0x28(%rbx,%rsi,8)
movupd %xmm1,0x38(%rbx,%rsi,8)
add    $0x8,%rsi
add    $0xfffffffffffffffe,%rdi
jne    1250 <nllkar1+0xe0>
test   $0x1,%r8b
je     12ae <nllkar1+0x13e>
shl    $0x3,%rsi
mov    %rsi,%rdi
or     $0x10,%rdi
movups 0x0(%rbp,%rdi,1),%xmm0
movupd 0x10(%rbp,%rdi,1),%xmm1
or     $0x8,%rsi
movups %xmm0,(%rbx,%rsi,1)
movupd %xmm1,0x10(%rbx,%rsi,1)
cmp    %rcx,%rdx
je     132b <nllkar1+0x1bb>
or     $0x1,%rcx
mov    %r9d,%edi
sub    %ecx,%edi
mov    %rcx,%rsi
not    %rsi
add    %r9,%rsi
and    $0x3,%rdi
je     17d4 <nllkar1+0x664>
nop
lea    0x1(%rcx),%rdx
movsd  0x8(%rbp,%rcx,8),%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
mov    %rdx,%rcx
add    $0xffffffffffffffff,%rdi
jne    12d0 <nllkar1+0x160>
cmp    $0x3,%rsi
jb     132b <nllkar1+0x1bb>
xchg   %ax,%ax
movsd  0x8(%rbp,%rdx,8),%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
movsd  0x10(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rdx,8)
movsd  0x18(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x10(%rbx,%rdx,8)
movsd  0x20(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x18(%rbx,%rdx,8)
lea    0x4(%rdx),%rcx
mov    %rcx,%rdx
cmp    %rcx,%r9
jne    12f0 <nllkar1+0x180>
movslq %r12d,%rcx
movsd  0x0(%rbp,%rcx,8),%xmm0
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rax)
mov    (%r15),%edi
cmp    $0x2,%edi
jl     13e2 <nllkar1+0x272>
lea    -0x1(%rdi),%rsi
lea    -0x2(%rdi),%rdx
mov    %esi,%ecx
and    $0x3,%ecx
cmp    $0x3,%rdx
jae    1374 <nllkar1+0x204>
mov    $0x1,%edx
movsd  0xc93(%rip),%xmm1
test   %rcx,%rcx
jne    13ca <nllkar1+0x25a>
jmp    13e2 <nllkar1+0x272>
and    $0xfffffffffffffffc,%rsi
movsd  0xc80(%rip),%xmm1
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rax,%rdx,8)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rax,%rdx,8)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rax,%rdx,8)
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rax,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    1390 <nllkar1+0x220>
add    $0x1,%rdx
test   %rcx,%rcx
je     13e2 <nllkar1+0x272>
lea    (%rax,%rdx,8),%rdx
xor    %esi,%esi
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%rcx
jne    13d0 <nllkar1+0x260>
test   %edi,%edi
mov    %rax,0x20(%rsp)
movsd  %xmm4,0x38(%rsp)
jle    1474 <nllkar1+0x304>
lea    0x108(%rsp),%rbp
mov    $0x1,%r12d
xor    %r14d,%r14d
mov    %r13,0x48(%rsp)
jmp    142b <nllkar1+0x2bb>
nopl   (%rax)
movslq %edi,%rcx
lea    0x1(%r12),%rdx
add    $0xffffffffffffffff,%r14
add    $0xa0,%rbp
cmp    %rcx,%r12
mov    %rdx,%r12
jge    1474 <nllkar1+0x304>
test   %edi,%edi
jle    1410 <nllkar1+0x2a0>
xor    %r15d,%r15d
mov    0x2ba7(%rip),%r13
nopl   0x0(%rax)
lea    (%r14,%r15,1),%edi
call   1040 <abs@plt>
mov    0x20(%rsp),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%r15,8)
movslq 0x0(%r13),%rdi
add    $0x1,%r15
cmp    %rdi,%r15
jl     1440 <nllkar1+0x2d0>
movsd  0x38(%rsp),%xmm4
mov    0x48(%rsp),%r13
jmp    1410 <nllkar1+0x2a0>
mov    0x2b6d(%rip),%rax
cmpl   $0x0,(%rax)
jle    1743 <nllkar1+0x5d3>
mov    $0x1,%r14d
movsd  0xb76(%rip),%xmm5
movsd  0xb76(%rip),%xmm6
xorpd  %xmm7,%xmm7
mov    0x18(%rsp),%rbp
jmp    14fb <nllkar1+0x38b>
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm1,%xmm0
call   1090 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x50(%rsp),%xmm7
subsd  %xmm0,%xmm7
lea    0x1(%r14),%rax
mov    0x2b12(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%r14
mov    %rax,%r14
movsd  0x38(%rsp),%xmm4
movsd  0xb1b(%rip),%xmm5
movsd  0xb1b(%rip),%xmm6
jge    174c <nllkar1+0x5dc>
mov    0x2ace(%rip),%rax
mov    (%rax),%rax
mov    (%rax,%r14,4),%r12d
cmp    $0x8,%r12d
mov    $0x7d0,%ecx
mov    $0x0,%eax
cmovl  %eax,%ecx
test   %r12d,%r12d
movsd  %xmm7,0x50(%rsp)
jle    16e0 <nllkar1+0x570>
mov    %ecx,0x30(%rsp)
mov    0x2a94(%rip),%rax
mov    (%rax),%rax
mov    %r14,0x10(%rsp)
mov    (%rax,%r14,4),%eax
mov    0x2a79(%rip),%rcx
mov    (%rcx),%r14d
mov    0x2a5f(%rip),%rcx
mov    (%rcx),%r8
add    $0xffffffff,%eax
mov    0x2a7a(%rip),%rcx
mov    (%rcx),%r11
lea    0x1(%r14),%r10d
mov    %r12,0x40(%rsp)
add    $0x1,%r12
lea    -0x1(%r10),%rdi
add    $0xfffffffffffffffe,%r10
mov    %edi,%edx
and    $0x3,%edx
and    $0xfffffffffffffffc,%rdi
mov    $0x1,%esi
jmp    15aa <nllkar1+0x43a>
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm1,0x0(%r13,%rsi,8)
movsd  %xmm0,0x0(%rbp,%rsi,8)
add    $0x1,%rsi
cmp    %r12,%rsi
je     1680 <nllkar1+0x510>
mov    %r13,%r9
lea    (%rax,%rsi,1),%ecx
movslq %ecx,%r15
movapd %xmm4,%xmm0
test   %r14d,%r14d
jle    165a <nllkar1+0x4ea>
mov    (%r8,%r15,8),%rcx
mov    $0x1,%ebp
movapd %xmm4,%xmm0
cmp    $0x3,%r10
jb     162d <nllkar1+0x4bd>
movapd %xmm4,%xmm0
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  0x8(%rbx,%rbp,8),%xmm1
movsd  0x10(%rbx,%rbp,8),%xmm2
mulsd  0x8(%rcx,%rbp,8),%xmm1
mulsd  0x10(%rcx,%rbp,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x18(%rbx,%rbp,8),%xmm3
mulsd  0x18(%rcx,%rbp,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x20(%rbx,%rbp,8),%xmm0
mulsd  0x20(%rcx,%rbp,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rbp
cmp    %rbp,%rdi
jne    15e0 <nllkar1+0x470>
add    $0x1,%rbp
test   %rdx,%rdx
je     165a <nllkar1+0x4ea>
lea    (%rcx,%rbp,8),%rcx
lea    (%rbx,%rbp,8),%rbp
xor    %r13d,%r13d
nopl   (%rax)
movsd  0x0(%rbp,%r13,8),%xmm1
mulsd  (%rcx,%r13,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%r13
cmp    %r13,%rdx
jne    1640 <nllkar1+0x4d0>
cmpl   $0x1,(%r11,%r15,4)
movapd %xmm5,%xmm1
je     1669 <nllkar1+0x4f9>
movapd %xmm0,%xmm1
mov    %r9,%r13
mov    0x18(%rsp),%rbp
je     1590 <nllkar1+0x420>
movapd %xmm6,%xmm0
jmp    1590 <nllkar1+0x420>
mov    0x40(%rsp),%r12
cmp    $0x2,%r12d
mov    0x10(%rsp),%r14
mov    0x30(%rsp),%r8d
jl     16e0 <nllkar1+0x570>
mov    %r12d,%edi
mov    %r13,%rsi
mov    %rbp,%rdx
lea    0x60(%rsp),%rcx
movsd  0x96d(%rip),%xmm0
lea    0x28(%rsp),%r9
lea    0x34(%rsp),%rax
push   %rax
lea    0x60(%rsp),%rax
push   %rax
call   1060 <mvn1@plt>
add    $0x10,%rsp
cmpl   $0x0,0x34(%rsp)
jg     17e6 <nllkar1+0x676>
movsd  0x28(%rsp),%xmm1
jmp    170b <nllkar1+0x59b>
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rbp),%xmm0
call   1050 <pnorms@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%r13),%xmm0
call   1050 <pnorms@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x90d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1789 <nllkar1+0x619>
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     14b0 <nllkar1+0x340>
movabs $0x3cd203af9ee75616,%rax
03 d2 3c
mov    %rax,0x28(%rsp)
movsd  0x8ea(%rip),%xmm1
jmp    14b0 <nllkar1+0x340>
xorpd  %xmm7,%xmm7
mov    0x18(%rsp),%rbp
mov    0x8(%rsp),%rax
movsd  %xmm7,(%rax)
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
add    $0xce8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movabs $0x41cdcd6500000000,%rax
cd cd 41
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx)
test   %r12d,%r12d
jle    1777 <nllkar1+0x607>
add    $0x1,%r12
mov    $0x1,%ebx
lea    0x888(%rip),%r15
movsd  0x0(%r13,%rbx,8),%xmm0
movsd  0x0(%rbp,%rbx,8),%xmm1
mov    %r15,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1070 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    17b0 <nllkar1+0x640>
jmp    1777 <nllkar1+0x607>
mov    %rcx,%rdx
cmp    $0x3,%rsi
jae    12f0 <nllkar1+0x180>
jmp    132b <nllkar1+0x1bb>
movabs $0x41cdcd6500000000,%rax
cd cd 41
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx)
jmp    1755 <nllkar1+0x5e5>
xor    %esi,%esi
test   $0x1,%r8b
jne    128a <nllkar1+0x11a>
jmp    12ae <nllkar1+0x13e>

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

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