void mi2(double **x, int N, int K, double *psi, double *scal, double *mic,
         double *mir) {
  int i, k, *n1, *n2;
  double *xc, dx;
  double *eps, Eps;
  int maxdim;
  double dxy1, dxy2;
  int *nn;
  int d;
  int BOX, BOX1;
  int **box, *lis;
  int **box1;
  int **lis1;
  int **mxi;
  double epsilon;
  int inveps;
  int dim = 2;
  double *phi;
  phi = (double *)malloc((K + 1) * sizeof(double));
  for (i = 1; i <= K; i++)
    phi[i] = psi[i] - (dim - 1) / ((double)i);
  nn = (int *)malloc((K + 1) * sizeof(int));
  xc = (double *)malloc((dim + 1) * sizeof(double));
  BOX = 1;
  while (0.5 * BOX * BOX * K < N)
    BOX *= 2;
  epsilon = 4.0 / BOX;
  inveps = BOX / 4;
  BOX1 = N - 5;
  box1 = (int **)malloc(dim * sizeof(int *));
  lis1 = (int **)malloc(dim * sizeof(int *));
  mxi = (int **)malloc(dim * sizeof(int *));
  for (d = 0; d < dim; d++) {
    box1[d] = (int *)malloc((BOX1 + 1) * sizeof(int));
    lis1[d] = (int *)malloc(N * sizeof(int));
    mxi[d] = (int *)malloc((BOX1 + 1) * sizeof(int));
  }
  box = (int **)malloc(BOX * sizeof(int *));
  for (i = 0; i < BOX; i++)
    box[i] = (int *)malloc(BOX * sizeof(int));
  lis = (int *)malloc(N * sizeof(int));
  eps = (double *)malloc(dim * sizeof(double));
  n1 = (int *)malloc(dim * sizeof(int));
  n2 = (int *)malloc(dim * sizeof(int));
  make_box2(x, dim, N, 0, 1, BOX, inveps, box, lis);
  for (d = 0; d < dim; d++)
    make_box1(x[d], N, scal[d], BOX1, box1[d], lis1[d], mxi[d]);
  dxy1 = dxy2 = 0.0;
  for (i = 0; i < N; i++) {
    for (d = 0; d < dim; d++)
      xc[d] = x[d][i];
    neiK(x, dim, 0, dim - 1, i, BOX, epsilon, K, box, lis, nn);
    Eps = 0;
    maxdim = -1;
    for (d = 0; d < dim; d++) {
      eps[d] = 0;
      for (k = 1; k <= K; k++) {
        if ((dx = fabs(xc[d] - x[d][nn[k]])) > eps[d])
          eps[d] = dx;
      }
      if (eps[d] > Eps) {
        Eps = eps[d];
        maxdim = d;
      }
    }
    for (d = 0; d < dim; d++) {
      n2[d] = neiE1(x[d], i, scal[d], BOX1, eps[d], box1[d], lis1[d], mxi[d]);
      if (d == maxdim) {
        n1[d] = n2[d];
        dxy1 += psi[n1[d]];
      } else {
        n1[d] = neiE1(x[d], i, scal[d], BOX1, Eps, box1[d], lis1[d], mxi[d]);
        dxy1 += psi[n1[d] + 1];
      }
      dxy2 += psi[n2[d]];
    }
  }
  dxy1 /= N;
  *mic = psi[N] + psi[K] - dxy1;
  dxy2 /= N;
  *mir = psi[N] + phi[K] - dxy2;
  free(xc);
  free(nn);
  for (i = 0; i < BOX; i++)
    free(box[i]);
  free(box);
  free(lis);
  for (d = 0; d < dim; d++) {
    free(box1[d]);
    free(lis1[d]);
    free(mxi[d]);
  }
  free(box1);
  free(lis1);
  free(mxi);
  free(eps);
  free(n1);
  free(n2);
  free(phi);
}


x86 assembly (clang, -O0):
<mi2>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xf8,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x2,-0xd0(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xd8(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1201 <mi2+0xa1>
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xd0(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
cvtsi2sdl -0x34(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0xd8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11b0 <mi2+0x50>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x88(%rbp)
mov    -0xd0(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x1,-0x90(%rbp)
cvtsi2sdl -0x90(%rbp),%xmm0
ff
movsd  0xdb3(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvtsi2sdl -0x90(%rbp),%xmm0
ff
mulsd  %xmm0,%xmm1
cvtsi2sdl -0x18(%rbp),%xmm0
mulsd  %xmm0,%xmm1
cvtsi2sdl -0x14(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1289 <mi2+0x129>
mov    -0x90(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    123d <mi2+0xdd>
cvtsi2sdl -0x90(%rbp),%xmm1
ff
movsd  0xd6f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x90(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xcc(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x94(%rbp)
movslq -0xd0(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movslq -0xd0(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xb8(%rbp)
movslq -0xd0(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xc0(%rbp)
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    13b0 <mi2+0x250>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0xb0(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movslq -0x14(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0xb8(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x94(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0xc0(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1314 <mi2+0x1b4>
movslq -0x90(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xa0(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x90(%rbp),%eax
jge    140d <mi2+0x2ad>
movslq -0x90(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0xa0(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ce <mi2+0x26e>
movslq -0x14(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movslq -0xd0(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x60(%rbp)
movslq -0xd0(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0xd0(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0xd0(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x90(%rbp),%r9d
mov    -0xcc(%rbp),%r11d
mov    -0xa0(%rbp),%r10
mov    -0xa8(%rbp),%rax
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1080 <make_box2@plt>
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    1538 <mi2+0x3d8>
mov    -0x10(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x14(%rbp),%esi
mov    -0x28(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x94(%rbp),%edx
mov    -0xb0(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0xb8(%rbp),%rax
movslq -0x8c(%rbp),%r8
mov    (%rax,%r8,8),%r8
mov    -0xc0(%rbp),%rax
movslq -0x8c(%rbp),%r9
mov    (%rax,%r9,8),%r9
mov    $0x1,%al
call   1040 <make_box1@plt>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    14ad <mi2+0x34d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    190d <mi2+0x7ad>
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    15b3 <mi2+0x453>
mov    -0x10(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1565 <mi2+0x405>
mov    -0x10(%rbp),%rdi
mov    -0xd0(%rbp),%esi
mov    -0xd0(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x34(%rbp),%r8d
mov    -0x90(%rbp),%r9d
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x18(%rbp),%ebx
mov    -0xa0(%rbp),%r11
mov    -0xa8(%rbp),%r10
mov    -0x88(%rbp),%rax
xor    %edx,%edx
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x1,%al
call   1050 <neiK@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0xffffffff,-0x6c(%rbp)
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    1730 <mi2+0x5d0>
mov    -0x60(%rbp),%rax
movslq -0x8c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     16de <mi2+0x57e>
mov    -0x50(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x88(%rbp),%rcx
movslq -0x38(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
subsd  (%rax,%rcx,8),%xmm0
movaps 0x979(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x8c(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    16cb <mi2+0x56b>
movsd  -0x58(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    16d0 <mi2+0x570>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1651 <mi2+0x4f1>
mov    -0x60(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x68(%rbp),%xmm0
jbe    1717 <mi2+0x5b7>
mov    -0x60(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
jmp    171c <mi2+0x5bc>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1625 <mi2+0x4c5>
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    18fa <mi2+0x79a>
mov    -0x10(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x34(%rbp),%esi
mov    -0x28(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x94(%rbp),%edx
mov    -0x60(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0xb0(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0xb8(%rbp),%rax
movslq -0x8c(%rbp),%r8
mov    (%rax,%r8,8),%r8
mov    -0xc0(%rbp),%rax
movslq -0x8c(%rbp),%r9
mov    (%rax,%r9,8),%r9
mov    $0x2,%al
call   1060 <neiE1@plt>
mov    %eax,%edx
mov    -0x48(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jne    1823 <mi2+0x6c3>
mov    -0x48(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x40(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq -0x8c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    18c4 <mi2+0x764>
mov    -0x10(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x34(%rbp),%esi
mov    -0x28(%rbp),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x94(%rbp),%edx
movsd  -0x68(%rbp),%xmm1
mov    -0xb0(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0xb8(%rbp),%rax
movslq -0x8c(%rbp),%r8
mov    (%rax,%r8,8),%r8
mov    -0xc0(%rbp),%rax
movslq -0x8c(%rbp),%r9
mov    (%rax,%r9,8),%r9
mov    $0x2,%al
call   1060 <neiE1@plt>
mov    %eax,%edx
mov    -0x40(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq -0x8c(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0x8c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    173a <mi2+0x5da>
jmp    18ff <mi2+0x79f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    154f <mi2+0x3ef>
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x18(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
subsd  -0x78(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x80(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xd8(%rbp),%rax
movslq -0x18(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x90(%rbp),%eax
jge    19d1 <mi2+0x871>
mov    -0xa0(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    19a0 <mi2+0x840>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0xd0(%rbp),%eax
jge    1a5e <mi2+0x8fe>
mov    -0xb0(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xb8(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc0(%rbp),%rax
movslq -0x8c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    19f3 <mi2+0x893>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0xd8(%rbp),%rdi
call   1030 <free@plt>
add    $0xf8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<mi2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %r9,0xf0(%rsp)
mov    %r8,0x8(%rsp)
mov    %rcx,%rbp
mov    %edx,%ebx
mov    %esi,%r12d
mov    %rdi,0x10(%rsp)
mov    0x150(%rsp),%rax
mov    %rax,0xf8(%rsp)
lea    0x1(%rbx),%r15d
movslq %r15d,%r14
lea    0x0(,%r14,8),%rdi
call   1070 <malloc@plt>
mov    %rbx,0x58(%rsp)
test   %ebx,%ebx
mov    %rbp,0x20(%rsp)
jle    12f3 <mi2+0x193>
mov    %r15d,%ebx
lea    -0x1(%rbx),%rcx
mov    $0x1,%edx
cmp    $0x2,%rcx
jb     12c1 <mi2+0x161>
mov    %rcx,%r8
and    $0xfffffffffffffffe,%r8
lea    -0x2(%r8),%rsi
mov    %rsi,%rbp
shr    %rbp
add    $0x1,%rbp
test   %rsi,%rsi
je     1282 <mi2+0x122>
mov    %rbp,%rsi
and    $0xfffffffffffffffe,%rsi
movdqa 0xe0c(%rip),%xmm0
mov    $0x1,%edi
movapd 0xe0f(%rip),%xmm1
movdqa 0xe17(%rip),%xmm2
movdqa 0xe1f(%rip),%xmm3
mov    0x20(%rsp),%rdx
cs nopw 0x0(%rax,%rax,1)
movupd (%rdx,%rdi,8),%xmm4
cvtdq2pd %xmm0,%xmm5
movapd %xmm1,%xmm6
divpd  %xmm5,%xmm6
subpd  %xmm6,%xmm4
movupd %xmm4,(%rax,%rdi,8)
movdqa %xmm0,%xmm4
paddd  %xmm2,%xmm4
movupd 0x10(%rdx,%rdi,8),%xmm5
cvtdq2pd %xmm4,%xmm4
movapd %xmm1,%xmm6
divpd  %xmm4,%xmm6
subpd  %xmm6,%xmm5
movupd %xmm5,0x10(%rax,%rdi,8)
paddd  %xmm3,%xmm0
add    $0x4,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1230 <mi2+0xd0>
cvtdq2pd %xmm0,%xmm0
jmp    128f <mi2+0x12f>
movapd 0xd76(%rip),%xmm0
mov    $0x1,%edi
test   $0x1,%bpl
mov    0x20(%rsp),%rbp
je     12b5 <mi2+0x155>
movupd 0x0(%rbp,%rdi,8),%xmm1
movapd 0xda8(%rip),%xmm2
divpd  %xmm0,%xmm2
addpd  %xmm1,%xmm2
movupd %xmm2,(%rax,%rdi,8)
cmp    %r8,%rcx
je     12f3 <mi2+0x193>
or     $0x1,%rcx
mov    %rcx,%rdx
movsd  0xda7(%rip),%xmm0
nopl   0x0(%rax)
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
addsd  0x0(%rbp,%rdx,8),%xmm2
movsd  %xmm2,(%rax,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rbx
jne    12d0 <mi2+0x170>
mov    %r15d,0x60(%rsp)
mov    %rax,0x100(%rsp)
shl    $0x2,%r14
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,%r15
xorps  %xmm0,%xmm0
cvtsi2sdl 0x58(%rsp),%xmm0
xorps  %xmm3,%xmm3
cvtsi2sd %r12d,%xmm3
mov    $0x1,%eax
movsd  0xd4b(%rip),%xmm1
nopl   (%rax)
mov    %eax,%ebp
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm2
lea    0x0(%rbp,%rbp,1),%eax
ucomisd %xmm2,%xmm3
ja     1330 <mi2+0x1d0>
movsd  %xmm3,0xe8(%rsp)
mov    %ebp,%eax
shr    $0x2,%eax
mov    %rax,0x68(%rsp)
mov    %r12,0x70(%rsp)
movslq %r12d,%rax
lea    -0x10(,%rax,4),%rbx
ff
mov    %rax,0xe0(%rsp)
lea    0x0(,%rax,4),%r14
mov    %rbx,%rdi
movsd  %xmm4,0x80(%rsp)
call   1070 <malloc@plt>
mov    %rax,0x50(%rsp)
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,0x48(%rsp)
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,0x40(%rsp)
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,0x38(%rsp)
mov    %r14,0xc0(%rsp)
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,0x28(%rsp)
movsd  0xc93(%rip),%xmm0
divsd  0x80(%rsp),%xmm0
movsd  %xmm0,0x110(%rsp)
mov    %ebp,%ebx
lea    0x0(,%rbx,8),%rdi
call   1070 <malloc@plt>
mov    %rax,%r13
shl    $0x2,%rbx
cmp    $0x2,%ebp
mov    $0x1,%eax
mov    %rbp,0xb8(%rsp)
cmovae %ebp,%eax
mov    %rax,%r14
xor    %r12d,%r12d
mov    0x10(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1070 <malloc@plt>
mov    %rax,0x0(%r13,%r12,8)
add    $0x1,%r12
cmp    %r12,%r14
jne    1440 <mi2+0x2e0>
mov    0x70(%rsp),%r12
lea    -0x5(%r12),%eax
mov    %eax,0x4(%rsp)
mov    0xc0(%rsp),%rdi
call   1070 <malloc@plt>
mov    %rax,%rbx
sub    $0x8,%rsp
mov    %rbp,%rdi
mov    $0x2,%esi
mov    %r12d,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    0xc0(%rsp),%r9
xor    %eax,%eax
mov    %rbx,0xb0(%rsp)
push   %rbx
push   %r13
push   0x80(%rsp)
call   1080 <make_box2@plt>
add    $0x20,%rsp
mov    0x0(%rbp),%rdi
mov    0x8(%rsp),%rax
movsd  (%rax),%xmm0
mov    %r12d,%esi
mov    0x4(%rsp),%ebx
mov    %ebx,%edx
mov    0x50(%rsp),%rcx
mov    0x48(%rsp),%r8
mov    0x40(%rsp),%r9
mov    $0x1,%al
call   1040 <make_box1@plt>
mov    0x8(%rbp),%rdi
mov    0x8(%rsp),%rax
movsd  0x8(%rax),%xmm0
mov    %r12d,%esi
mov    %ebx,%edx
mov    0x38(%rsp),%rcx
mov    0x30(%rsp),%r8
mov    0x28(%rsp),%r9
mov    $0x1,%al
call   1040 <make_box1@plt>
test   %r12d,%r12d
mov    %r13,0xb0(%rsp)
mov    %r14,0xd8(%rsp)
jle    1944 <mi2+0x7e4>
mov    %r12d,%eax
mov    %rax,0x108(%rsp)
mov    0x60(%rsp),%eax
lea    -0x1(%rax),%r12
add    $0xfffffffffffffffe,%rax
mov    %rax,0xa0(%rsp)
mov    %r12,%rax
mov    %r12,0x98(%rsp)
and    $0xfffffffffffffffe,%r12
neg    %r12
xorpd  %xmm3,%xmm3
xor    %r13d,%r13d
jmp    1599 <mi2+0x439>
nopl   0x0(%rax,%rax,1)
cltq
movslq %ebx,%rcx
movsd  (%r14,%rcx,8),%xmm0
movhpd (%r14,%rax,8),%xmm0
movapd 0xc0(%rsp),%xmm3
addpd  0x80(%rsp),%xmm3
addpd  %xmm0,%xmm3
add    $0x1,%r13
cmp    0x108(%rsp),%r13
je     194d <mi2+0x7ed>
movapd %xmm3,0xc0(%rsp)
mov    0x0(%rbp),%rax
mov    0x8(%rbp),%rcx
movsd  (%rax,%r13,8),%xmm0
movaps %xmm0,0x70(%rsp)
movsd  (%rcx,%r13,8),%xmm0
movaps %xmm0,0x10(%rsp)
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %r13d,%r8d
mov    0xb8(%rsp),%r9
movsd  0x110(%rsp),%xmm0
mov    $0x1,%al
push   %r15
push   0xb0(%rsp)
push   0xc0(%rsp)
mov    0x70(%rsp),%rbx
push   %rbx
call   1050 <neiK@plt>
add    $0x20,%rsp
test   %ebx,%ebx
jle    1760 <mi2+0x600>
mov    0x0(%rbp),%rax
cmpq   $0x0,0xa0(%rsp)
je     1790 <mi2+0x630>
xorpd  %xmm1,%xmm1
mov    $0x1,%ecx
mov    0x8(%rsp),%r14
movapd 0xa2b(%rip),%xmm2
movapd 0x10(%rsp),%xmm3
movapd 0x70(%rsp),%xmm4
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movslq (%r15,%rcx,4),%rdx
movapd %xmm4,%xmm0
subsd  (%rax,%rdx,8),%xmm0
andpd  %xmm2,%xmm0
maxsd  %xmm1,%xmm0
movslq 0x4(%r15,%rcx,4),%rdx
movapd %xmm4,%xmm1
subsd  (%rax,%rdx,8),%xmm1
andpd  %xmm2,%xmm1
maxsd  %xmm0,%xmm1
lea    (%r12,%rcx,1),%rdx
add    $0x2,%rdx
add    $0x2,%rcx
cmp    $0x1,%rdx
jne    1650 <mi2+0x4f0>
testb  $0x1,0x98(%rsp)
01
je     16b0 <mi2+0x550>
movslq (%r15,%rcx,4),%rcx
subsd  (%rax,%rcx,8),%xmm4
andpd  0x9b8(%rip),%xmm4
maxsd  %xmm1,%xmm4
movapd %xmm4,%xmm1
xorpd  %xmm4,%xmm4
ucomisd %xmm4,%xmm1
seta   %sil
movapd %xmm1,%xmm0
maxsd  %xmm4,%xmm0
cmpl   $0x0,0x58(%rsp)
mov    %esi,0x80(%rsp)
movsd  %xmm0,0x70(%rsp)
jle    17d0 <mi2+0x670>
mov    0x8(%rbp),%rax
cmpq   $0x0,0xa0(%rsp)
je     17dc <mi2+0x67c>
xorpd  %xmm5,%xmm5
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
movslq (%r15,%rcx,4),%rdx
movapd %xmm3,%xmm0
subsd  (%rax,%rdx,8),%xmm0
andpd  %xmm2,%xmm0
maxsd  %xmm5,%xmm0
movslq 0x4(%r15,%rcx,4),%rdx
movapd %xmm3,%xmm5
subsd  (%rax,%rdx,8),%xmm5
andpd  %xmm2,%xmm5
maxsd  %xmm0,%xmm5
lea    (%r12,%rcx,1),%rdx
add    $0x2,%rdx
add    $0x2,%rcx
cmp    $0x1,%rdx
jne    1700 <mi2+0x5a0>
testb  $0x1,0x98(%rsp)
01
jne    17f3 <mi2+0x693>
movapd %xmm5,0x10(%rsp)
jmp    1810 <mi2+0x6b0>
cs nopw 0x0(%rax,%rax,1)
movl   $0x0,0x80(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x70(%rsp)
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
mov    0x8(%rsp),%r14
jmp    1810 <mi2+0x6b0>
nopl   (%rax)
xorpd  %xmm1,%xmm1
mov    $0x1,%ecx
mov    0x8(%rsp),%r14
movapd 0x8ba(%rip),%xmm2
movapd 0x10(%rsp),%xmm3
movapd 0x70(%rsp),%xmm4
testb  $0x1,0x98(%rsp)
01
jne    1697 <mi2+0x537>
jmp    16b0 <mi2+0x550>
cs nopw 0x0(%rax,%rax,1)
nop
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
jmp    1810 <mi2+0x6b0>
xorpd  %xmm5,%xmm5
mov    $0x1,%ecx
testb  $0x1,0x98(%rsp)
01
je     174b <mi2+0x5eb>
movslq (%r15,%rcx,4),%rcx
subsd  (%rax,%rcx,8),%xmm3
andpd  0x85c(%rip),%xmm3
maxsd  %xmm5,%xmm3
movapd %xmm3,0x10(%rsp)
xchg   %ax,%ax
mov    0x0(%rbp),%rdi
movsd  (%r14),%xmm0
mov    %r13d,%esi
mov    %r13,0x68(%rsp)
mov    0x4(%rsp),%ebx
mov    %ebx,%edx
mov    0x50(%rsp),%rcx
mov    0x48(%rsp),%r8
mov    0x40(%rsp),%r9
mov    $0x2,%al
call   1060 <neiE1@plt>
mov    %r14,%r13
mov    %eax,%r14d
movsd  0x70(%rsp),%xmm1
movapd 0x10(%rsp),%xmm2
ucomisd %xmm1,%xmm2
movapd %xmm2,%xmm0
maxsd  %xmm1,%xmm0
movsd  %xmm0,0x60(%rsp)
ja     1874 <mi2+0x714>
movapd %xmm2,%xmm1
mov    %r14d,%eax
cmpb   $0x0,0x80(%rsp)
jne    18aa <mi2+0x74a>
mov    0x0(%rbp),%rdi
movsd  0x0(%r13),%xmm0
mov    0x68(%rsp),%rsi
mov    %ebx,%edx
movsd  0x60(%rsp),%xmm1
mov    0x50(%rsp),%rcx
mov    0x48(%rsp),%r8
mov    0x40(%rsp),%r9
mov    $0x2,%al
call   1060 <neiE1@plt>
movapd 0x10(%rsp),%xmm1
add    $0x1,%eax
movapd %xmm1,0x10(%rsp)
cltq
movslq %r14d,%rcx
mov    0x20(%rsp),%r14
movsd  (%r14,%rcx,8),%xmm0
movhps (%r14,%rax,8),%xmm0
movaps %xmm0,0x80(%rsp)
mov    0x8(%rbp),%rdi
movsd  0x8(%r13),%xmm0
mov    0x68(%rsp),%r13
mov    %r13d,%esi
mov    %ebx,%edx
mov    0x38(%rsp),%rcx
mov    0x30(%rsp),%r8
mov    0x28(%rsp),%r9
mov    $0x2,%al
call   1060 <neiE1@plt>
mov    %eax,%ebx
movapd 0x10(%rsp),%xmm0
ucomisd 0x70(%rsp),%xmm0
ja     1560 <mi2+0x400>
mov    0x8(%rbp),%rdi
mov    0x8(%rsp),%rax
movsd  0x8(%rax),%xmm0
mov    %r13d,%esi
mov    0x4(%rsp),%edx
movsd  0x60(%rsp),%xmm1
mov    0x38(%rsp),%rcx
mov    0x30(%rsp),%r8
mov    0x28(%rsp),%r9
mov    $0x2,%al
call   1060 <neiE1@plt>
add    $0x1,%eax
jmp    1560 <mi2+0x400>
xorpd  %xmm3,%xmm3
mov    0x20(%rsp),%r14
movapd %xmm3,%xmm0
unpckhpd %xmm3,%xmm0
movsd  0xe8(%rsp),%xmm2
divsd  %xmm2,%xmm0
mov    0xe0(%rsp),%rdx
movsd  (%r14,%rdx,8),%xmm1
movslq 0x58(%rsp),%rax
addsd  (%r14,%rax,8),%xmm1
subsd  %xmm0,%xmm1
mov    0xf0(%rsp),%rcx
movsd  %xmm1,(%rcx)
divsd  %xmm2,%xmm3
movsd  (%r14,%rdx,8),%xmm0
mov    0x100(%rsp),%r14
addsd  (%r14,%rax,8),%xmm0
subsd  %xmm3,%xmm0
mov    0xf8(%rsp),%rax
movsd  %xmm0,(%rax)
mov    %r15,%rdi
call   1030 <free@plt>
xor    %ebx,%ebx
mov    0xb0(%rsp),%r15
mov    0xd8(%rsp),%rbp
nopl   (%rax)
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    19d0 <mi2+0x870>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0xa8(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @mi2(double** %0, i32 %1, i32 %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca double**
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca double*
%20 = alloca double
%21 = alloca double*
%22 = alloca double
%23 = alloca i32
%24 = alloca double
%25 = alloca double
%26 = alloca i32*
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32**
%31 = alloca i32*
%32 = alloca i32**
%33 = alloca i32**
%34 = alloca i32**
%35 = alloca double
%36 = alloca i32
%37 = alloca i32
%38 = alloca double*
store double** %0, double*** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
store i32 2, i32* %37
%39 = load i32, i32* %10
%40 = add nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = mul i64 %41, 8
%43 = call i8* @malloc(i64 %42)
%44 = bitcast i8* %43 to double*
store double* %44, double** %38
store i32 1, i32* %15
br label %45
45: ; preds = %66, %7
%46 = load i32, i32* %15
%47 = load i32, i32* %10
%48 = icmp sle i32 %46, %47
br i1 %48, label %49, label %69
49: ; preds = %45
%50 = load double*, double** %11
%51 = load i32, i32* %15
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
%54 = load double, double* %53
%55 = load i32, i32* %37
%56 = sub nsw i32 %55, 1
%57 = sitofp i32 %56 to double
%58 = load i32, i32* %15
%59 = sitofp i32 %58 to double
%60 = fdiv double %57, %59
%61 = fsub double %54, %60
%62 = load double*, double** %38
%63 = load i32, i32* %15
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %62, i64 %64
store double %61, double* %65
br label %66
66: ; preds = %49
%67 = load i32, i32* %15
%68 = add nsw i32 %67, 1
store i32 %68, i32* %15
br label %45
69: ; preds = %45
%70 = load i32, i32* %10
%71 = add nsw i32 %70, 1
%72 = sext i32 %71 to i64
%73 = mul i64 %72, 4
%74 = call i8* @malloc(i64 %73)
%75 = bitcast i8* %74 to i32*
store i32* %75, i32** %26
%76 = load i32, i32* %37
%77 = add nsw i32 %76, 1
%78 = sext i32 %77 to i64
%79 = mul i64 %78, 8
%80 = call i8* @malloc(i64 %79)
%81 = bitcast i8* %80 to double*
store double* %81, double** %19
store i32 1, i32* %28
br label %82
82: ; preds = %95, %69
%83 = load i32, i32* %28
%84 = sitofp i32 %83 to double
%85 = fmul double 5.000000e-01, %84
%86 = load i32, i32* %28
%87 = sitofp i32 %86 to double
%88 = fmul double %85, %87
%89 = load i32, i32* %10
%90 = sitofp i32 %89 to double
%91 = fmul double %88, %90
%92 = load i32, i32* %9
%93 = sitofp i32 %92 to double
%94 = fcmp olt double %91, %93
br i1 %94, label %95, label %98
95: ; preds = %82
%96 = load i32, i32* %28
%97 = mul nsw i32 %96, 2
store i32 %97, i32* %28
br label %82
98: ; preds = %82
%99 = load i32, i32* %28
%100 = sitofp i32 %99 to double
%101 = fdiv double 4.000000e+00, %100
store double %101, double* %35
%102 = load i32, i32* %28
%103 = sdiv i32 %102, 4
store i32 %103, i32* %36
%104 = load i32, i32* %9
%105 = sub nsw i32 %104, 5
store i32 %105, i32* %29
%106 = load i32, i32* %37
%107 = sext i32 %106 to i64
%108 = mul i64 %107, 8
%109 = call i8* @malloc(i64 %108)
%110 = bitcast i8* %109 to i32**
store i32** %110, i32*** %32
%111 = load i32, i32* %37
%112 = sext i32 %111 to i64
%113 = mul i64 %112, 8
%114 = call i8* @malloc(i64 %113)
%115 = bitcast i8* %114 to i32**
store i32** %115, i32*** %33
%116 = load i32, i32* %37
%117 = sext i32 %116 to i64
%118 = mul i64 %117, 8
%119 = call i8* @malloc(i64 %118)
%120 = bitcast i8* %119 to i32**
store i32** %120, i32*** %34
store i32 0, i32* %27
br label %121
121: ; preds = %155, %98
%122 = load i32, i32* %27
%123 = load i32, i32* %37
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %158
125: ; preds = %121
%126 = load i32, i32* %29
%127 = add nsw i32 %126, 1
%128 = sext i32 %127 to i64
%129 = mul i64 %128, 4
%130 = call i8* @malloc(i64 %129)
%131 = bitcast i8* %130 to i32*
%132 = load i32**, i32*** %32
%133 = load i32, i32* %27
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i32*, i32** %132, i64 %134
store i32* %131, i32** %135
%136 = load i32, i32* %9
%137 = sext i32 %136 to i64
%138 = mul i64 %137, 4
%139 = call i8* @malloc(i64 %138)
%140 = bitcast i8* %139 to i32*
%141 = load i32**, i32*** %33
%142 = load i32, i32* %27
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i32*, i32** %141, i64 %143
store i32* %140, i32** %144
%145 = load i32, i32* %29
%146 = add nsw i32 %145, 1
%147 = sext i32 %146 to i64
%148 = mul i64 %147, 4
%149 = call i8* @malloc(i64 %148)
%150 = bitcast i8* %149 to i32*
%151 = load i32**, i32*** %34
%152 = load i32, i32* %27
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds i32*, i32** %151, i64 %153
store i32* %150, i32** %154
br label %155
155: ; preds = %125
%156 = load i32, i32* %27
%157 = add nsw i32 %156, 1
store i32 %157, i32* %27
br label %121
158: ; preds = %121
%159 = load i32, i32* %28
%160 = sext i32 %159 to i64
%161 = mul i64 %160, 8
%162 = call i8* @malloc(i64 %161)
%163 = bitcast i8* %162 to i32**
store i32** %163, i32*** %30
store i32 0, i32* %15
br label %164
164: ; preds = %178, %158
%165 = load i32, i32* %15
%166 = load i32, i32* %28
%167 = icmp slt i32 %165, %166
br i1 %167, label %168, label %181
168: ; preds = %164
%169 = load i32, i32* %28
%170 = sext i32 %169 to i64
%171 = mul i64 %170, 4
%172 = call i8* @malloc(i64 %171)
%173 = bitcast i8* %172 to i32*
%174 = load i32**, i32*** %30
%175 = load i32, i32* %15
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds i32*, i32** %174, i64 %176
store i32* %173, i32** %177
br label %178
178: ; preds = %168
%179 = load i32, i32* %15
%180 = add nsw i32 %179, 1
store i32 %180, i32* %15
br label %164
181: ; preds = %164
%182 = load i32, i32* %9
%183 = sext i32 %182 to i64
%184 = mul i64 %183, 4
%185 = call i8* @malloc(i64 %184)
%186 = bitcast i8* %185 to i32*
store i32* %186, i32** %31
%187 = load i32, i32* %37
%188 = sext i32 %187 to i64
%189 = mul i64 %188, 8
%190 = call i8* @malloc(i64 %189)
%191 = bitcast i8* %190 to double*
store double* %191, double** %21
%192 = load i32, i32* %37
%193 = sext i32 %192 to i64
%194 = mul i64 %193, 4
%195 = call i8* @malloc(i64 %194)
%196 = bitcast i8* %195 to i32*
store i32* %196, i32** %17
%197 = load i32, i32* %37
%198 = sext i32 %197 to i64
%199 = mul i64 %198, 4
%200 = call i8* @malloc(i64 %199)
%201 = bitcast i8* %200 to i32*
store i32* %201, i32** %18
%202 = load double**, double*** %8
%203 = load i32, i32* %37
%204 = load i32, i32* %9
%205 = load i32, i32* %28
%206 = load i32, i32* %36
%207 = load i32**, i32*** %30
%208 = load i32*, i32** %31
%209 = call i32 (double**, i32, i32, i32, i32, i32, i32, i32**, i32*, ...) bitcast (i32 (...)* @make_box2 to i32 (double**, i32, i32, i32, i32, i32, i32, i32**, i32*, ...)*)(double** %202, i32 %203, i32 %204, i32 0, i32 1, i32 %205, i32 %206, i32** %207, i32* %208)
store i32 0, i32* %27
br label %210
210: ; preds = %243, %181
%211 = load i32, i32* %27
%212 = load i32, i32* %37
%213 = icmp slt i32 %211, %212
br i1 %213, label %214, label %246
214: ; preds = %210
%215 = load double**, double*** %8
%216 = load i32, i32* %27
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds double*, double** %215, i64 %217
%219 = load double*, double** %218
%220 = load i32, i32* %9
%221 = load double*, double** %12
%222 = load i32, i32* %27
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds double, double* %221, i64 %223
%225 = load double, double* %224
%226 = load i32, i32* %29
%227 = load i32**, i32*** %32
%228 = load i32, i32* %27
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds i32*, i32** %227, i64 %229
%231 = load i32*, i32** %230
%232 = load i32**, i32*** %33
%233 = load i32, i32* %27
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds i32*, i32** %232, i64 %234
%236 = load i32*, i32** %235
%237 = load i32**, i32*** %34
%238 = load i32, i32* %27
%239 = sext i32 %238 to i64
%240 = getelementptr inbounds i32*, i32** %237, i64 %239
%241 = load i32*, i32** %240
%242 = call i32 (double*, i32, double, i32, i32*, i32*, i32*, ...) bitcast (i32 (...)* @make_box1 to i32 (double*, i32, double, i32, i32*, i32*, i32*, ...)*)(double* %219, i32 %220, double %225, i32 %226, i32* %231, i32* %236, i32* %241)
br label %243
243: ; preds = %214
%244 = load i32, i32* %27
%245 = add nsw i32 %244, 1
store i32 %245, i32* %27
br label %210
246: ; preds = %210
store double 0.000000e+00, double* %25
store double 0.000000e+00, double* %24
store i32 0, i32* %15
br label %247
247: ; preds = %484, %246
%248 = load i32, i32* %15
%249 = load i32, i32* %9
%250 = icmp slt i32 %248, %249
br i1 %250, label %251, label %487
251: ; preds = %247
store i32 0, i32* %27
br label %252
252: ; preds = %270, %251
%253 = load i32, i32* %27
%254 = load i32, i32* %37
%255 = icmp slt i32 %253, %254
br i1 %255, label %256, label %273
256: ; preds = %252
%257 = load double**, double*** %8
%258 = load i32, i32* %27
%259 = sext i32 %258 to i64
%260 = getelementptr inbounds double*, double** %257, i64 %259
%261 = load double*, double** %260
%262 = load i32, i32* %15
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds double, double* %261, i64 %263
%265 = load double, double* %264
%266 = load double*, double** %19
%267 = load i32, i32* %27
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds double, double* %266, i64 %268
store double %265, double* %269
br label %270
270: ; preds = %256
%271 = load i32, i32* %27
%272 = add nsw i32 %271, 1
store i32 %272, i32* %27
br label %252
273: ; preds = %252
%274 = load double**, double*** %8
%275 = load i32, i32* %37
%276 = load i32, i32* %37
%277 = sub nsw i32 %276, 1
%278 = load i32, i32* %15
%279 = load i32, i32* %28
%280 = load double, double* %35
%281 = load i32, i32* %10
%282 = load i32**, i32*** %30
%283 = load i32*, i32** %31
%284 = load i32*, i32** %26
%285 = call i32 (double**, i32, i32, i32, i32, i32, double, i32, i32**, i32*, i32*, ...) bitcast (i32 (...)* @neiK to i32 (double**, i32, i32, i32, i32, i32, double, i32, i32**, i32*, i32*, ...)*)(double** %274, i32 %275, i32 0, i32 %277, i32 %278, i32 %279, double %280, i32 %281, i32** %282, i32* %283, i32* %284)
store double 0.000000e+00, double* %22
store i32 -1, i32* %23
store i32 0, i32* %27
br label %286
286: ; preds = %352, %273
%287 = load i32, i32* %27
%288 = load i32, i32* %37
%289 = icmp slt i32 %287, %288
br i1 %289, label %290, label %355
290: ; preds = %286
%291 = load double*, double** %21
%292 = load i32, i32* %27
%293 = sext i32 %292 to i64
%294 = getelementptr inbounds double, double* %291, i64 %293
store double 0.000000e+00, double* %294
store i32 1, i32* %16
br label %295
295: ; preds = %333, %290
%296 = load i32, i32* %16
%297 = load i32, i32* %10
%298 = icmp sle i32 %296, %297
br i1 %298, label %299, label %336
299: ; preds = %295
%300 = load double*, double** %19
%301 = load i32, i32* %27
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds double, double* %300, i64 %302
%304 = load double, double* %303
%305 = load double**, double*** %8
%306 = load i32, i32* %27
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds double*, double** %305, i64 %307
%309 = load double*, double** %308
%310 = load i32*, i32** %26
%311 = load i32, i32* %16
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds i32, i32* %310, i64 %312
%314 = load i32, i32* %313
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds double, double* %309, i64 %315
%317 = load double, double* %316
%318 = fsub double %304, %317
%319 = call double @llvm.fabs.f64(double %318)
store double %319, double* %20
%320 = load double*, double** %21
%321 = load i32, i32* %27
%322 = sext i32 %321 to i64
%323 = getelementptr inbounds double, double* %320, i64 %322
%324 = load double, double* %323
%325 = fcmp ogt double %319, %324
br i1 %325, label %326, label %332
326: ; preds = %299
%327 = load double, double* %20
%328 = load double*, double** %21
%329 = load i32, i32* %27
%330 = sext i32 %329 to i64
%331 = getelementptr inbounds double, double* %328, i64 %330
store double %327, double* %331
br label %332
332: ; preds = %326, %299
br label %333
333: ; preds = %332
%334 = load i32, i32* %16
%335 = add nsw i32 %334, 1
store i32 %335, i32* %16
br label %295
336: ; preds = %295
%337 = load double*, double** %21
%338 = load i32, i32* %27
%339 = sext i32 %338 to i64
%340 = getelementptr inbounds double, double* %337, i64 %339
%341 = load double, double* %340
%342 = load double, double* %22
%343 = fcmp ogt double %341, %342
br i1 %343, label %344, label %351
344: ; preds = %336
%345 = load double*, double** %21
%346 = load i32, i32* %27
%347 = sext i32 %346 to i64
%348 = getelementptr inbounds double, double* %345, i64 %347
%349 = load double, double* %348
store double %349, double* %22
%350 = load i32, i32* %27
store i32 %350, i32* %23
br label %351
351: ; preds = %344, %336
br label %352
352: ; preds = %351
%353 = load i32, i32* %27
%354 = add nsw i32 %353, 1
store i32 %354, i32* %27
br label %286
355: ; preds = %286
store i32 0, i32* %27
br label %356
356: ; preds = %480, %355
%357 = load i32, i32* %27
%358 = load i32, i32* %37
%359 = icmp slt i32 %357, %358
br i1 %359, label %360, label %483
360: ; preds = %356
%361 = load double**, double*** %8
%362 = load i32, i32* %27
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds double*, double** %361, i64 %363
%365 = load double*, double** %364
%366 = load i32, i32* %15
%367 = load double*, double** %12
%368 = load i32, i32* %27
%369 = sext i32 %368 to i64
%370 = getelementptr inbounds double, double* %367, i64 %369
%371 = load double, double* %370
%372 = load i32, i32* %29
%373 = load double*, double** %21
%374 = load i32, i32* %27
%375 = sext i32 %374 to i64
%376 = getelementptr inbounds double, double* %373, i64 %375
%377 = load double, double* %376
%378 = load i32**, i32*** %32
%379 = load i32, i32* %27
%380 = sext i32 %379 to i64
%381 = getelementptr inbounds i32*, i32** %378, i64 %380
%382 = load i32*, i32** %381
%383 = load i32**, i32*** %33
%384 = load i32, i32* %27
%385 = sext i32 %384 to i64
%386 = getelementptr inbounds i32*, i32** %383, i64 %385
%387 = load i32*, i32** %386
%388 = load i32**, i32*** %34
%389 = load i32, i32* %27
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds i32*, i32** %388, i64 %390
%392 = load i32*, i32** %391
%393 = call i32 (double*, i32, double, i32, double, i32*, i32*, i32*, ...) bitcast (i32 (...)* @neiE1 to i32 (double*, i32, double, i32, double, i32*, i32*, i32*, ...)*)(double* %365, i32 %366, double %371, i32 %372, double %377, i32* %382, i32* %387, i32* %392)
%394 = load i32*, i32** %18
%395 = load i32, i32* %27
%396 = sext i32 %395 to i64
%397 = getelementptr inbounds i32, i32* %394, i64 %396
store i32 %393, i32* %397
%398 = load i32, i32* %27
%399 = load i32, i32* %23
%400 = icmp eq i32 %398, %399
br i1 %400, label %401, label %422
401: ; preds = %360
%402 = load i32*, i32** %18
%403 = load i32, i32* %27
%404 = sext i32 %403 to i64
%405 = getelementptr inbounds i32, i32* %402, i64 %404
%406 = load i32, i32* %405
%407 = load i32*, i32** %17
%408 = load i32, i32* %27
%409 = sext i32 %408 to i64
%410 = getelementptr inbounds i32, i32* %407, i64 %409
store i32 %406, i32* %410
%411 = load double*, double** %11
%412 = load i32*, i32** %17
%413 = load i32, i32* %27
%414 = sext i32 %413 to i64
%415 = getelementptr inbounds i32, i32* %412, i64 %414
%416 = load i32, i32* %415
%417 = sext i32 %416 to i64
%418 = getelementptr inbounds double, double* %411, i64 %417
%419 = load double, double* %418
%420 = load double, double* %24
%421 = fadd double %420, %419
store double %421, double* %24
br label %468
422: ; preds = %360
%423 = load double**, double*** %8
%424 = load i32, i32* %27
%425 = sext i32 %424 to i64
%426 = getelementptr inbounds double*, double** %423, i64 %425
%427 = load double*, double** %426
%428 = load i32, i32* %15
%429 = load double*, double** %12
%430 = load i32, i32* %27
%431 = sext i32 %430 to i64
%432 = getelementptr inbounds double, double* %429, i64 %431
%433 = load double, double* %432
%434 = load i32, i32* %29
%435 = load double, double* %22
%436 = load i32**, i32*** %32
%437 = load i32, i32* %27
%438 = sext i32 %437 to i64
%439 = getelementptr inbounds i32*, i32** %436, i64 %438
%440 = load i32*, i32** %439
%441 = load i32**, i32*** %33
%442 = load i32, i32* %27
%443 = sext i32 %442 to i64
%444 = getelementptr inbounds i32*, i32** %441, i64 %443
%445 = load i32*, i32** %444
%446 = load i32**, i32*** %34
%447 = load i32, i32* %27
%448 = sext i32 %447 to i64
%449 = getelementptr inbounds i32*, i32** %446, i64 %448
%450 = load i32*, i32** %449
%451 = call i32 (double*, i32, double, i32, double, i32*, i32*, i32*, ...) bitcast (i32 (...)* @neiE1 to i32 (double*, i32, double, i32, double, i32*, i32*, i32*, ...)*)(double* %427, i32 %428, double %433, i32 %434, double %435, i32* %440, i32* %445, i32* %450)
%452 = load i32*, i32** %17
%453 = load i32, i32* %27
%454 = sext i32 %453 to i64
%455 = getelementptr inbounds i32, i32* %452, i64 %454
store i32 %451, i32* %455
%456 = load double*, double** %11
%457 = load i32*, i32** %17
%458 = load i32, i32* %27
%459 = sext i32 %458 to i64
%460 = getelementptr inbounds i32, i32* %457, i64 %459
%461 = load i32, i32* %460
%462 = add nsw i32 %461, 1
%463 = sext i32 %462 to i64
%464 = getelementptr inbounds double, double* %456, i64 %463
%465 = load double, double* %464
%466 = load double, double* %24
%467 = fadd double %466, %465
store double %467, double* %24
br label %468
468: ; preds = %422, %401
%469 = load double*, double** %11
%470 = load i32*, i32** %18
%471 = load i32, i32* %27
%472 = sext i32 %471 to i64
%473 = getelementptr inbounds i32, i32* %470, i64 %472
%474 = load i32, i32* %473
%475 = sext i32 %474 to i64
%476 = getelementptr inbounds double, double* %469, i64 %475
%477 = load double, double* %476
%478 = load double, double* %25
%479 = fadd double %478, %477
store double %479, double* %25
br label %480
480: ; preds = %468
%481 = load i32, i32* %27
%482 = add nsw i32 %481, 1
store i32 %482, i32* %27
br label %356
483: ; preds = %356
br label %484
484: ; preds = %483
%485 = load i32, i32* %15
%486 = add nsw i32 %485, 1
store i32 %486, i32* %15
br label %247
487: ; preds = %247
%488 = load i32, i32* %9
%489 = sitofp i32 %488 to double
%490 = load double, double* %24
%491 = fdiv double %490, %489
store double %491, double* %24
%492 = load double*, double** %11
%493 = load i32, i32* %9
%494 = sext i32 %493 to i64
%495 = getelementptr inbounds double, double* %492, i64 %494
%496 = load double, double* %495
%497 = load double*, double** %11
%498 = load i32, i32* %10
%499 = sext i32 %498 to i64
%500 = getelementptr inbounds double, double* %497, i64 %499
%501 = load double, double* %500
%502 = fadd double %496, %501
%503 = load double, double* %24
%504 = fsub double %502, %503
%505 = load double*, double** %13
store double %504, double* %505
%506 = load i32, i32* %9
%507 = sitofp i32 %506 to double
%508 = load double, double* %25
%509 = fdiv double %508, %507
store double %509, double* %25
%510 = load double*, double** %11
%511 = load i32, i32* %9
%512 = sext i32 %511 to i64
%513 = getelementptr inbounds double, double* %510, i64 %512
%514 = load double, double* %513
%515 = load double*, double** %38
%516 = load i32, i32* %10
%517 = sext i32 %516 to i64
%518 = getelementptr inbounds double, double* %515, i64 %517
%519 = load double, double* %518
%520 = fadd double %514, %519
%521 = load double, double* %25
%522 = fsub double %520, %521
%523 = load double*, double** %14
store double %522, double* %523
%524 = load double*, double** %19
%525 = bitcast double* %524 to i8*
%526 = load i32*, i32** %26
%527 = bitcast i32* %526 to i8*
store i32 0, i32* %15
br label %528
528: ; preds = %539, %487
%529 = load i32, i32* %15
%530 = load i32, i32* %28
%531 = icmp slt i32 %529, %530
br i1 %531, label %532, label %542
532: ; preds = %528
%533 = load i32**, i32*** %30
%534 = load i32, i32* %15
%535 = sext i32 %534 to i64
%536 = getelementptr inbounds i32*, i32** %533, i64 %535
%537 = load i32*, i32** %536
%538 = bitcast i32* %537 to i8*
br label %539
539: ; preds = %532
%540 = load i32, i32* %15
%541 = add nsw i32 %540, 1
store i32 %541, i32* %15
br label %528
542: ; preds = %528
%543 = load i32**, i32*** %30
%544 = bitcast i32** %543 to i8*
%545 = load i32*, i32** %31
%546 = bitcast i32* %545 to i8*
store i32 0, i32* %27
br label %547
547: ; preds = %570, %542
%548 = load i32, i32* %27
%549 = load i32, i32* %37
%550 = icmp slt i32 %548, %549
br i1 %550, label %551, label %573
551: ; preds = %547
%552 = load i32**, i32*** %32
%553 = load i32, i32* %27
%554 = sext i32 %553 to i64
%555 = getelementptr inbounds i32*, i32** %552, i64 %554
%556 = load i32*, i32** %555
%557 = bitcast i32* %556 to i8*
%558 = load i32**, i32*** %33
%559 = load i32, i32* %27
%560 = sext i32 %559 to i64
%561 = getelementptr inbounds i32*, i32** %558, i64 %560
%562 = load i32*, i32** %561
%563 = bitcast i32* %562 to i8*
%564 = load i32**, i32*** %34
%565 = load i32, i32* %27
%566 = sext i32 %565 to i64
%567 = getelementptr inbounds i32*, i32** %564, i64 %566
%568 = load i32*, i32** %567
%569 = bitcast i32* %568 to i8*
br label %570
570: ; preds = %551
%571 = load i32, i32* %27
%572 = add nsw i32 %571, 1
store i32 %572, i32* %27
br label %547
573: ; preds = %547
%574 = load i32**, i32*** %32
%575 = bitcast i32** %574 to i8*
%576 = load i32**, i32*** %33
%577 = bitcast i32** %576 to i8*
%578 = load i32**, i32*** %34
%579 = bitcast i32** %578 to i8*
%580 = load double*, double** %21
%581 = bitcast double* %580 to i8*
%582 = load i32*, i32** %17
%583 = bitcast i32* %582 to i8*
%584 = load i32*, i32** %18
%585 = bitcast i32* %584 to i8*
%586 = load double*, double** %38
%587 = bitcast double* %586 to i8*
ret void
}

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