void redr(double **x, int dim, int N, int K, double *psi, double *scal,
          double *mir) {
  int i, k, *n2;
  double *xc, dx;
  double *eps;
  double dxy2;
  int *nn;
  int d;
  int BOX, BOX1;
  int **box, *lis;
  int **box1;
  int **lis1;
  int **mxi;
  double epsilon;
  int inveps;
  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));
  n2 = (int *)malloc(dim * sizeof(int));
  make_box2(x, dim, N, 0, dim - 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]);
  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);
    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;
      }
    }
    for (d = 0; d < dim; d++) {
      n2[d] = neiE1(x[d], i, scal[d], BOX1, eps[d], box1[d], lis1[d], mxi[d]);
      dxy2 += psi[n2[d]];
    }
  }
  dxy2 /= N;
  *mir = (dim - 1) * 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(n2);
  free(phi);
}


x86 assembly (clang, -O0):
<redr>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xd8,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xb8(%rbp)
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11f3 <redr+0x93>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm1
cvtsi2sdl -0x34(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0xb8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11a5 <redr+0x45>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x1,-0x70(%rbp)
cvtsi2sdl -0x70(%rbp),%xmm0
movsd  0xdcd(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvtsi2sdl -0x70(%rbp),%xmm0
mulsd  %xmm0,%xmm1
cvtsi2sdl -0x1c(%rbp),%xmm0
mulsd  %xmm0,%xmm1
cvtsi2sdl -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1266 <redr+0x106>
mov    -0x70(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1226 <redr+0xc6>
cvtsi2sdl -0x70(%rbp),%xmm1
movsd  0xd95(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x70(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xac(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x5,%eax
mov    %eax,-0x74(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x90(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0xa0(%rbp)
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    135d <redr+0x1fd>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x90(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
movslq -0x18(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x98(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0xa0(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    12dc <redr+0x17c>
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x80(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    13ab <redr+0x24b>
movslq -0x70(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,%rdx
mov    -0x80(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1375 <redr+0x215>
movslq -0x18(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x88(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x3,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x58(%rbp)
movslq -0x14(%rbp),%rdi
shl    $0x2,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%r8d
sub    $0x1,%r8d
mov    -0x70(%rbp),%r9d
mov    -0xac(%rbp),%r11d
mov    -0x80(%rbp),%r10
mov    -0x88(%rbp),%rax
xor    %ecx,%ecx
mov    %r11d,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1080 <make_box2@plt>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1494 <redr+0x334>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x18(%rbp),%esi
mov    -0x30(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x74(%rbp),%edx
mov    -0x90(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0x98(%rbp),%rax
movslq -0x6c(%rbp),%r8
mov    (%rax,%r8,8),%r8
mov    -0xa0(%rbp),%rax
movslq -0x6c(%rbp),%r9
mov    (%rax,%r9,8),%r9
mov    $0x1,%al
call   1040 <make_box1@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1427 <redr+0x2c7>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    16b7 <redr+0x557>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    14f2 <redr+0x392>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    14b6 <redr+0x356>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x34(%rbp),%r8d
mov    -0x70(%rbp),%r9d
movsd  -0xa8(%rbp),%xmm0
ff
mov    -0x1c(%rbp),%ebx
mov    -0x80(%rbp),%r11
mov    -0x88(%rbp),%r10
mov    -0x68(%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>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15f7 <redr+0x497>
mov    -0x58(%rbp),%rax
movslq -0x6c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     15e4 <redr+0x484>
mov    -0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x68(%rbp),%rcx
movslq -0x38(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
subsd  (%rax,%rcx,8),%xmm0
movaps 0xa6d(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x6c(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    15d1 <redr+0x471>
movsd  -0x50(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15d6 <redr+0x476>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1566 <redr+0x406>
jmp    15e9 <redr+0x489>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1543 <redr+0x3e3>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    16a4 <redr+0x544>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x74(%rbp),%edx
mov    -0x58(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x90(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
mov    -0x98(%rbp),%rax
movslq -0x6c(%rbp),%r8
mov    (%rax,%r8,8),%r8
mov    -0xa0(%rbp),%rax
movslq -0x6c(%rbp),%r9
mov    (%rax,%r9,8),%r9
mov    $0x2,%al
call   1060 <neiE1@plt>
mov    %eax,%edx
mov    -0x40(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%rcx
movslq -0x6c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    15fe <redr+0x49e>
jmp    16a9 <redr+0x549>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14a3 <redr+0x343>
cvtsi2sdl -0x18(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0xb8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x60(%rbp),%xmm0
mov    0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    174a <redr+0x5ea>
mov    -0x80(%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    171f <redr+0x5bf>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    17bc <redr+0x65c>
mov    -0x90(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    1766 <redr+0x606>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb8(%rbp),%rdi
call   1030 <free@plt>
add    $0xd8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<redr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9,%r12
mov    %r8,%rbx
mov    %ecx,%ebp
mov    %rdx,(%rsp)
mov    %esi,%r15d
mov    %rdi,%r13
mov    0x110(%rsp),%rax
mov    %rax,0xa8(%rsp)
lea    0x1(%rbp),%eax
mov    %eax,0x8(%rsp)
movslq %eax,%r14
lea    0x0(,%r14,8),%rdi
call   1070 <malloc@plt>
mov    %rbp,0x40(%rsp)
test   %ebp,%ebp
jle    12c6 <redr+0x166>
lea    -0x1(%r15),%ecx
cvtsi2sd %ecx,%xmm0
mov    0x8(%rsp),%ecx
lea    -0x1(%rcx),%r9
mov    $0x1,%edx
cmp    $0x2,%r9
jb     12a0 <redr+0x140>
mov    %r9,%r8
and    $0xfffffffffffffffe,%r8
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x2(%r8),%rsi
mov    %rsi,%rdx
shr    %rdx
add    $0x1,%rdx
test   %rsi,%rsi
je     19d0 <redr+0x870>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
movdqa 0xe05(%rip),%xmm2
mov    $0x1,%edi
movdqa 0xe08(%rip),%xmm3
movdqa 0xe10(%rip),%xmm4
movupd (%rbx,%rdi,8),%xmm5
cvtdq2pd %xmm2,%xmm6
movapd %xmm1,%xmm7
divpd  %xmm6,%xmm7
subpd  %xmm7,%xmm5
movupd %xmm5,(%rax,%rdi,8)
movdqa %xmm2,%xmm5
paddd  %xmm3,%xmm5
movupd 0x10(%rbx,%rdi,8),%xmm6
cvtdq2pd %xmm5,%xmm5
movapd %xmm1,%xmm7
divpd  %xmm5,%xmm7
subpd  %xmm7,%xmm6
movupd %xmm6,0x10(%rax,%rdi,8)
paddd  %xmm4,%xmm2
add    $0x4,%rdi
add    $0xfffffffffffffffe,%rsi
jne    1220 <redr+0xc0>
cvtdq2pd %xmm2,%xmm2
test   $0x1,%dl
je     1287 <redr+0x127>
movupd (%rbx,%rdi,8),%xmm3
divpd  %xmm2,%xmm1
subpd  %xmm1,%xmm3
movupd %xmm3,(%rax,%rdi,8)
cmp    %r8,%r9
je     12c6 <redr+0x166>
or     $0x1,%r9
mov    %r9,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rbx,%rdx,8),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
movapd %xmm0,%xmm3
divsd  %xmm2,%xmm3
subsd  %xmm3,%xmm1
movsd  %xmm1,(%rax,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    12a0 <redr+0x140>
mov    %r12,0x90(%rsp)
mov    %rbx,0x98(%rsp)
mov    %rax,0xb0(%rsp)
shl    $0x2,%r14
mov    %r14,%rdi
call   1070 <malloc@plt>
mov    %rax,%r12
movslq %r15d,%rbp
lea    0x8(,%rbp,8),%rdi
call   1070 <malloc@plt>
mov    %rax,0x50(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x40(%rsp),%xmm0
mov    (%rsp),%rbx
xorps  %xmm3,%xmm3
cvtsi2sd %ebx,%xmm3
mov    $0x1,%eax
movsd  0xd2d(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
xorps  %xmm4,%xmm4
cvtsi2sd %eax,%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm2
lea    (%rcx,%rcx,1),%eax
ucomisd %xmm2,%xmm3
ja     1330 <redr+0x1d0>
movq   %xmm4,0x58(%rsp)
mov    %rcx,0x78(%rsp)
movsd  %xmm3,0x88(%rsp)
movsd  0xcea(%rip),%xmm0
movsd  %xmm0,0x38(%rsp)
shl    $0x3,%rbp
mov    %rbp,%rdi
call   1070 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %rbp,%rdi
call   1070 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %rbp,0x10(%rsp)
mov    %rbp,%rdi
call   1070 <malloc@plt>
mov    %rax,%rbp
movslq %ebx,%rax
mov    %rax,0x60(%rsp)
mov    %r15d,%edx
mov    %r15,0x48(%rsp)
test   %r15d,%r15d
mov    %r13,%r14
jle    1420 <redr+0x2c0>
mov    0x60(%rsp),%rax
lea    -0x10(,%rax,4),%r13
ff
lea    0x0(,%rax,4),%rax
mov    %rax,0x20(%rsp)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %rdx,%r15
call   1070 <malloc@plt>
mov    0x18(%rsp),%rcx
mov    %rax,(%rcx,%rbx,8)
mov    0x20(%rsp),%rdi
call   1070 <malloc@plt>
mov    0x30(%rsp),%rcx
mov    %rax,(%rcx,%rbx,8)
mov    %r13,%rdi
call   1070 <malloc@plt>
mov    %r15,%rdx
mov    %rax,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    13e0 <redr+0x280>
mov    %rdx,0x28(%rsp)
mov    %rbp,0x80(%rsp)
movsd  0x38(%rsp),%xmm0
divsd  0x58(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
mov    0x78(%rsp),%rbx
mov    %ebx,%eax
shr    $0x2,%eax
mov    %rax,0x68(%rsp)
mov    (%rsp),%rax
add    $0xfffffffb,%eax
mov    %eax,0x58(%rsp)
mov    %ebx,%r15d
lea    0x0(,%r15,8),%rdi
call   1070 <malloc@plt>
mov    %rax,%r13
shl    $0x2,%r15
cmp    $0x2,%ebx
mov    $0x1,%ebp
cmovae %ebx,%ebp
xor    %ebx,%ebx
nopl   (%rax)
mov    %r15,%rdi
call   1070 <malloc@plt>
mov    %rax,0x0(%r13,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1480 <redr+0x320>
mov    %rbp,0xa0(%rsp)
mov    0x60(%rsp),%rax
lea    0x0(,%rax,4),%rdi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    0x10(%rsp),%rdi
call   1070 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    0x48(%rsp),%rbp
lea    -0x1(%rbp),%r8d
sub    $0x8,%rsp
mov    %r14,%rdi
mov    %ebp,%esi
mov    0x8(%rsp),%rdx
xor    %ecx,%ecx
mov    %r8d,0x14(%rsp)
mov    0x80(%rsp),%r9
xor    %eax,%eax
mov    %rbx,0x78(%rsp)
push   %rbx
mov    %r13,0x20(%rsp)
push   %r13
push   0x80(%rsp)
call   1080 <make_box2@plt>
add    $0x20,%rsp
test   %ebp,%ebp
mov    0x90(%rsp),%r13
mov    0x18(%rsp),%rax
mov    0x30(%rsp),%rsi
mov    0x80(%rsp),%rbp
mov    0x28(%rsp),%r15
mov    0x58(%rsp),%edx
jle    1571 <redr+0x411>
xor    %ebx,%ebx
mov    (%r14,%rbx,8),%rdi
movsd  0x0(%r13,%rbx,8),%xmm0
mov    (%rax,%rbx,8),%rcx
mov    (%rsi,%rbx,8),%r8
mov    0x0(%rbp,%rbx,8),%r9
mov    (%rsp),%rsi
mov    $0x1,%al
mov    %edx,%r15d
call   1040 <make_box1@plt>
mov    %r15d,%edx
mov    0x30(%rsp),%rsi
mov    0x18(%rsp),%rax
mov    0x28(%rsp),%r15
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1530 <redr+0x3d0>
mov    (%rsp),%rax
test   %eax,%eax
jle    18aa <redr+0x74a>
mov    %eax,%eax
mov    %rax,0x68(%rsp)
mov    0x8(%rsp),%r13d
lea    -0x1(%r15),%rax
mov    %rax,0xc0(%rsp)
add    $0xffffffffffffffff,%r13
mov    %r13,0xb8(%rsp)
mov    %r15d,%ebp
and    $0x3,%ebp
mov    %r15d,%edx
and    $0xfffffffc,%edx
and    $0xfffffffffffffffe,%r13
neg    %r13
xorpd  %xmm2,%xmm2
xor    %ebx,%ebx
mov    0x40(%rsp),%r15
mov    0x50(%rsp),%rdi
mov    0x48(%rsp),%rsi
mov    %rbp,0xd0(%rsp)
mov    %rdx,0xc8(%rsp)
jmp    1646 <redr+0x4e6>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %edx,%edx
mov    0xc(%rsp),%ecx
mov    %ebx,%r8d
movsd  0x38(%rsp),%xmm0
mov    $0x1,%al
push   %r12
push   0x78(%rsp)
push   0x20(%rsp)
push   %r15
call   1050 <neiK@plt>
movsd  0x20(%rsp),%xmm2
add    $0x20,%rsp
add    $0x1,%rbx
cmp    0x68(%rsp),%rbx
mov    0x48(%rsp),%rsi
mov    0x40(%rsp),%r15
mov    0x50(%rsp),%rdi
movsd  0x88(%rsp),%xmm1
mov    0xd0(%rsp),%rbp
mov    0xc8(%rsp),%rdx
je     18c6 <redr+0x766>
test   %esi,%esi
mov    0x78(%rsp),%r9
movsd  %xmm2,(%rsp)
jle    15e0 <redr+0x480>
cmpq   $0x3,0xc0(%rsp)
jae    1670 <redr+0x510>
xor    %eax,%eax
jmp    16c7 <redr+0x567>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rax,8),%rcx
movsd  (%rcx,%rbx,8),%xmm0
movsd  %xmm0,(%rdi,%rax,8)
mov    0x8(%r14,%rax,8),%rcx
movsd  (%rcx,%rbx,8),%xmm0
movsd  %xmm0,0x8(%rdi,%rax,8)
mov    0x10(%r14,%rax,8),%rcx
movsd  (%rcx,%rbx,8),%xmm0
movsd  %xmm0,0x10(%rdi,%rax,8)
mov    0x18(%r14,%rax,8),%rcx
movsd  (%rcx,%rbx,8),%xmm0
movsd  %xmm0,0x18(%rdi,%rax,8)
add    $0x4,%rax
cmp    %rax,%rdx
jne    1680 <redr+0x520>
test   %rbp,%rbp
je     16f7 <redr+0x597>
lea    (%rdi,%rax,8),%rcx
lea    (%r14,%rax,8),%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
mov    (%rax,%rdx,8),%rdi
movsd  (%rdi,%rbx,8),%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rbp
jne    16e0 <redr+0x580>
mov    %r14,%rdi
xor    %edx,%edx
mov    0xc(%rsp),%ecx
mov    %ebx,%r8d
movsd  0x38(%rsp),%xmm0
mov    $0x1,%al
push   %r12
push   0x78(%rsp)
push   0x20(%rsp)
push   %r15
mov    %rsi,%rbp
call   1050 <neiK@plt>
mov    %rbp,%r10
add    $0x20,%rsp
test   %r10d,%r10d
jle    18a0 <redr+0x740>
xor    %eax,%eax
mov    0x8(%rsp),%r8d
mov    0x28(%rsp),%rbp
mov    0x50(%rsp),%r9
mov    0x20(%rsp),%rdi
mov    0xb8(%rsp),%r11
movapd 0x8eb(%rip),%xmm3
movapd 0x8e3(%rip),%xmm4
jmp    1772 <redr+0x612>
nop
movsd  %xmm1,(%rdi,%rax,8)
add    $0x1,%rax
cmp    %rbp,%rax
je     1810 <redr+0x6b0>
movq   $0x0,(%rdi,%rax,8)
test   %r15d,%r15d
jle    1765 <redr+0x605>
movsd  (%r9,%rax,8),%xmm0
mov    (%r14,%rax,8),%rcx
xorpd  %xmm1,%xmm1
mov    $0x1,%edx
cmp    $0x2,%r8d
je     17dd <redr+0x67d>
nopl   0x0(%rax,%rax,1)
movslq (%r12,%rdx,4),%rsi
movapd %xmm0,%xmm2
subsd  (%rcx,%rsi,8),%xmm2
andpd  %xmm4,%xmm2
maxsd  %xmm1,%xmm2
movslq 0x4(%r12,%rdx,4),%rsi
movapd %xmm0,%xmm1
subsd  (%rcx,%rsi,8),%xmm1
andpd  %xmm4,%xmm1
maxsd  %xmm2,%xmm1
lea    (%rdx,%r13,1),%rsi
add    $0x2,%rsi
add    $0x2,%rdx
cmp    $0x1,%rsi
jne    17a0 <redr+0x640>
test   $0x1,%r11b
je     1760 <redr+0x600>
movslq (%r12,%rdx,4),%rdx
subsd  (%rcx,%rdx,8),%xmm0
andpd  %xmm3,%xmm0
maxsd  %xmm1,%xmm0
movapd %xmm0,%xmm1
jmp    1760 <redr+0x600>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %r10d,%r10d
movsd  (%rsp),%xmm2
jle    160f <redr+0x4af>
xor    %r15d,%r15d
mov    0x18(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
movsd  %xmm2,(%rsp)
mov    (%r14,%r15,8),%rdi
mov    0x90(%rsp),%rax
movsd  (%rax,%r15,8),%xmm0
mov    0x20(%rsp),%rax
movsd  (%rax,%r15,8),%xmm1
mov    0x0(%rbp,%r15,8),%rcx
mov    0x30(%rsp),%rax
mov    (%rax,%r15,8),%r8
mov    0x80(%rsp),%rax
mov    (%rax,%r15,8),%r9
mov    %ebx,%esi
mov    0x58(%rsp),%edx
mov    $0x2,%al
call   1060 <neiE1@plt>
movsd  (%rsp),%xmm2
cltq
mov    0x98(%rsp),%rcx
addsd  (%rcx,%rax,8),%xmm2
add    $0x1,%r15
cmp    %r15,0x28(%rsp)
jne    1830 <redr+0x6d0>
jmp    160f <redr+0x4af>
nopl   (%rax)
movsd  (%rsp),%xmm2
jmp    160f <redr+0x4af>
xorpd  %xmm2,%xmm2
mov    0x40(%rsp),%r15
mov    0x50(%rsp),%rdi
movsd  0x88(%rsp),%xmm1
mov    0x48(%rsp),%rsi
mov    %rsi,%r13
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rsp),%xmm0
divsd  %xmm1,%xmm2
movslq %r15d,%rax
mov    0x98(%rsp),%rcx
mov    0x60(%rsp),%rdx
mulsd  (%rcx,%rdx,8),%xmm0
mov    0xb0(%rsp),%r14
addsd  (%r14,%rax,8),%xmm0
subsd  %xmm2,%xmm0
mov    0xa8(%rsp),%rax
movsd  %xmm0,(%rax)
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %ebx,%ebx
mov    0x18(%rsp),%r12
mov    0xa0(%rsp),%rbp
mov    0x10(%rsp),%r15
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1930 <redr+0x7d0>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%rdi
call   1030 <free@plt>
test   %r13d,%r13d
mov    0x30(%rsp),%r13
mov    0x80(%rsp),%r15
mov    0x28(%rsp),%rbp
jle    1995 <redr+0x835>
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r12,%rbx,8),%rdi
call   1030 <free@plt>
mov    0x0(%r13,%rbx,8),%rdi
call   1030 <free@plt>
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1970 <redr+0x810>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
movapd 0x628(%rip),%xmm2
mov    $0x1,%edi
test   $0x1,%dl
jne    1275 <redr+0x115>
jmp    1287 <redr+0x127>

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

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