#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ compute_cross_distances(int, int, int, float const *,
                                           float const *, float *);
int /*<<< orphan*/ compute_cross_distances_alt(int, int, int, int,
                                               float const *, float const *,
                                               float *);
int /*<<< orphan*/ free(float *);
float *fvec_new(int);
void stub1(void *, double);
void stub2(void *, double);
void nn_single_full(int distance_type, int n1, int n2, int d, const float *mat2,
                    const float *mat1, const float *vw_weights, int *vw,
                    float *vwdis, void (*peek_fun)(void *arg, double frac),
                    void *peek_arg) {
  int step1 = ((n1) < (1024) ? (n1) : (1024)),
      step2 = ((n2) < (1024) ? (n2) : (1024)), m1, m2, imin;
  long i1, i2, j1, j2;
  float dmin;
  float *dists = fvec_new(step1 * step2), *dline;
  for (i1 = 0; i1 < n1; i1 += step1) {
    m1 = ((step1) < (n1 - i1) ? (step1) : (n1 - i1));
    for (j1 = 0; j1 < m1; j1++) {
      vw[j1 + i1] = -1;
      vwdis[j1 + i1] = 1e30;
    }
    for (i2 = 0; i2 < n2; i2 += step2) {
      m2 = ((step2) < (n2 - i2) ? (step2) : (n2 - i2));
      if (distance_type == 2) {
        compute_cross_distances(d, m2, m1, mat2 + i2 * d, mat1 + i1 * d, dists);
      } else {
        compute_cross_distances_alt(distance_type, d, m2, m1, mat2 + i2 * d,
                                    mat1 + i1 * d, dists);
      }
      if (vw_weights) {
        for (j1 = 0; j1 < m1; j1++) {
          for (j2 = 0; j2 < m2; j2++) {
            dists[j1 * m2 + j2] *= vw_weights[j2 + i2];
          }
        }
      }
      for (j1 = 0; j1 < m1; j1++) {
        dline = dists + j1 * m2;
        imin = vw[i1 + j1];
        dmin = vwdis[i1 + j1];
        for (j2 = 0; j2 < m2; j2++) {
          if (dline[j2] < dmin) {
            imin = j2 + i2;
            dmin = dline[j2];
          }
        }
        vw[i1 + j1] = imin;
        vwdis[i1 + j1] = dmin;
      }
    }
    if (peek_fun) {
      (*peek_fun)(peek_arg, i1 / (double)n1);
    }
  }
  free(dists);
  if (peek_fun) {
    (*peek_fun)(peek_arg, 1);
  }
}


x86 assembly (clang, -O0):
<nn_single_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
cmpl   $0x400,-0x8(%rbp)
jge    118b <nn_single_full+0x4b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x74(%rbp)
jmp    1198 <nn_single_full+0x58>
mov    $0x400,%eax
mov    %eax,-0x74(%rbp)
jmp    1198 <nn_single_full+0x58>
mov    -0x74(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    11b6 <nn_single_full+0x76>
mov    -0xc(%rbp),%eax
mov    %eax,-0x78(%rbp)
jmp    11c3 <nn_single_full+0x83>
mov    $0x400,%eax
mov    %eax,-0x78(%rbp)
jmp    11c3 <nn_single_full+0x83>
mov    -0x78(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%edi
imul   -0x28(%rbp),%edi
call   1060 <fvec_new@plt>
mov    %rax,-0x68(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jge    154e <nn_single_full+0x40e>
movslq -0x24(%rbp),%rax
movslq -0x8(%rbp),%rcx
sub    -0x40(%rbp),%rcx
cmp    %rcx,%rax
jge    1214 <nn_single_full+0xd4>
movslq -0x24(%rbp),%rax
mov    %rax,-0x80(%rbp)
jmp    1220 <nn_single_full+0xe0>
movslq -0x8(%rbp),%rax
sub    -0x40(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %eax,-0x2c(%rbp)
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmp    %rcx,%rax
jge    127d <nn_single_full+0x13d>
mov    0x18(%rbp),%rax
mov    -0x50(%rbp),%rcx
add    -0x40(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
mov    -0x50(%rbp),%rcx
add    -0x40(%rbp),%rcx
movss  0xda1(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    122f <nn_single_full+0xef>
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmp    %rcx,%rax
jge    1514 <nn_single_full+0x3d4>
movslq -0x28(%rbp),%rax
movslq -0xc(%rbp),%rcx
sub    -0x48(%rbp),%rcx
cmp    %rcx,%rax
jge    12bb <nn_single_full+0x17b>
movslq -0x28(%rbp),%rax
mov    %rax,-0x88(%rbp)
jmp    12ca <nn_single_full+0x18a>
movslq -0xc(%rbp),%rax
sub    -0x48(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %eax,-0x30(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    1323 <nn_single_full+0x1e3>
mov    -0x10(%rbp),%edi
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x48(%rbp),%rax
movslq -0x10(%rbp),%r8
imul   %r8,%rax
shl    $0x2,%rax
add    %rax,%rcx
mov    -0x20(%rbp),%r8
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%r9
imul   %r9,%rax
shl    $0x2,%rax
add    %rax,%r8
mov    -0x68(%rbp),%r9
call   1040 <compute_cross_distances@plt>
jmp    136a <nn_single_full+0x22a>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x48(%rbp),%rax
movslq -0x10(%rbp),%r9
imul   %r9,%rax
shl    $0x2,%rax
add    %rax,%r8
mov    -0x20(%rbp),%r9
mov    -0x40(%rbp),%rax
movslq -0x10(%rbp),%r10
imul   %r10,%rax
shl    $0x2,%rax
add    %rax,%r9
mov    -0x68(%rbp),%rax
mov    %rax,(%rsp)
call   1050 <compute_cross_distances_alt@plt>
cmpq   $0x0,0x10(%rbp)
je     1402 <nn_single_full+0x2c2>
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmp    %rcx,%rax
jge    13fd <nn_single_full+0x2bd>
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x30(%rbp),%rcx
cmp    %rcx,%rax
jge    13e7 <nn_single_full+0x2a7>
mov    0x10(%rbp),%rax
mov    -0x58(%rbp),%rcx
add    -0x48(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x68(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x30(%rbp),%rdx
imul   %rdx,%rcx
add    -0x58(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1396 <nn_single_full+0x256>
jmp    13ec <nn_single_full+0x2ac>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    137d <nn_single_full+0x23d>
jmp    1402 <nn_single_full+0x2c2>
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmp    %rcx,%rax
jge    14fe <nn_single_full+0x3be>
mov    -0x68(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x30(%rbp),%rdx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    0x18(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    -0x50(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x34(%rbp)
mov    0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    -0x50(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x5c(%rbp)
movq   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x30(%rbp),%rcx
cmp    %rcx,%rax
jge    14c5 <nn_single_full+0x385>
mov    -0x70(%rbp),%rax
mov    -0x58(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
movss  -0x5c(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    14af <nn_single_full+0x36f>
mov    -0x58(%rbp),%rax
add    -0x48(%rbp),%rax
mov    %eax,-0x34(%rbp)
mov    -0x70(%rbp),%rax
mov    -0x58(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x5c(%rbp)
jmp    14b4 <nn_single_full+0x374>
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
jmp    1466 <nn_single_full+0x326>
mov    -0x34(%rbp),%edx
mov    0x18(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    -0x50(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movss  -0x5c(%rbp),%xmm0
mov    0x20(%rbp),%rax
mov    -0x40(%rbp),%rcx
add    -0x50(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    140a <nn_single_full+0x2ca>
jmp    1503 <nn_single_full+0x3c3>
movslq -0x28(%rbp),%rax
add    -0x48(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    1285 <nn_single_full+0x145>
cmpq   $0x0,0x28(%rbp)
je     1538 <nn_single_full+0x3f8>
mov    0x28(%rbp),%rax
mov    0x30(%rbp),%rdi
cvtsi2sdq -0x40(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   *%rax
jmp    153d <nn_single_full+0x3fd>
movslq -0x24(%rbp),%rax
add    -0x40(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    11e1 <nn_single_full+0xa1>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,0x28(%rbp)
je     1574 <nn_single_full+0x434>
mov    0x28(%rbp),%rax
mov    0x30(%rbp),%rdi
movsd  0xa8e(%rip),%xmm0
call   *%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_single_full>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x168,%rsp
mov    %r9,0xd8(%rsp)
mov    %r8,0x128(%rsp)
mov    %ecx,0xc(%rsp)
mov    %esi,%r13d
mov    %edi,0x2c(%rsp)
mov    0x1c0(%rsp),%rax
mov    %rax,0x50(%rsp)
mov    0x1b8(%rsp),%rax
mov    %rax,0x58(%rsp)
mov    0x1b0(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    0x1a8(%rsp),%r14
mov    0x1a0(%rsp),%rax
mov    %rax,0x20(%rsp)
cmp    $0x400,%esi
mov    $0x400,%r15d
mov    $0x400,%ebp
cmovl  %esi,%ebp
cmp    $0x400,%edx
mov    %edx,0x28(%rsp)
cmovl  %edx,%r15d
mov    %r15d,%edi
imul   %ebp,%edi
call   1060 <fvec_new@plt>
mov    %rax,%r12
test   %r13d,%r13d
jle    1a7b <nn_single_full+0x93b>
mov    %r14,%rcx
movslq %r13d,%r8
movslq %ebp,%r9
movslq 0x28(%rsp),%rbx
movslq %r15d,%rbp
movslq 0xc(%rsp),%rax
mov    %rax,0x80(%rsp)
cvtsi2sd %r13d,%xmm0
movsd  %xmm0,0xd0(%rsp)
mov    0x40(%rsp),%rax
lea    0x70(%rax),%r10
lea    0x0(,%r9,4),%rdx
mov    %rdx,0xe0(%rsp)
lea    0x70(%r14),%r11
lea    0x10(%rax),%r14
lea    0x10(%rcx),%r15
mov    0x20(%rsp),%rdx
lea    0x30(%rdx),%rsi
mov    %rsi,0xc8(%rsp)
lea    0x0(,%rbp,4),%rsi
mov    %rsi,0x120(%rsp)
lea    0x30(%r12),%rsi
mov    %rsi,0x118(%rsp)
add    $0x4,%rdx
mov    %rdx,0xc0(%rsp)
pcmpeqd %xmm4,%xmm4
movaps 0xd89(%rip),%xmm5
xor    %r13d,%r13d
mov    %rcx,%rdx
mov    %r8,0x60(%rsp)
mov    %rcx,0xb8(%rsp)
mov    %rax,%rcx
mov    %r12,0x38(%rsp)
mov    %rbx,0x90(%rsp)
mov    %rbp,0x88(%rsp)
mov    %r8,0xf0(%rsp)
mov    %r9,0xe8(%rsp)
jmp    1320 <nn_single_full+0x1e0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0xe8(%rsp),%r9
add    %r9,%r13
mov    0x110(%rsp),%r10
mov    0xe0(%rsp),%rax
add    %rax,%r10
mov    0x108(%rsp),%r11
add    %rax,%r11
mov    0x100(%rsp),%r14
add    %rax,%r14
mov    0xf8(%rsp),%r15
add    %rax,%r15
mov    0x68(%rsp),%rcx
add    %rax,%rcx
mov    0x70(%rsp),%rdx
add    %rax,%rdx
mov    0xf0(%rsp),%r8
cmp    %r8,%r13
jge    1a7b <nn_single_full+0x93b>
mov    0x60(%rsp),%rsi
mov    %rsi,%rax
sub    %r9,%rsi
mov    %rsi,0x60(%rsp)
cmovge %r9,%rax
movslq %eax,%rsi
cmp    $0x2,%rsi
mov    $0x1,%eax
cmovl  %rax,%rsi
mov    %r8,%rdi
mov    %r13,%rax
mov    %r13,0x48(%rsp)
sub    %r13,%rdi
cmp    %r9,%rdi
cmovg  %r9,%rdi
mov    %rdi,0x98(%rsp)
shl    $0x20,%rdi
mov    %rdi,0xa0(%rsp)
test   %rdi,%rdi
mov    0x40(%rsp),%r13
mov    %rsi,0x18(%rsp)
mov    %rdx,0x70(%rsp)
mov    %rcx,0x68(%rsp)
jle    14c7 <nn_single_full+0x387>
cmp    $0x8,%rsi
jae    13a0 <nn_single_full+0x260>
xor    %eax,%eax
jmp    14b0 <nn_single_full+0x370>
nopw   0x0(%rax,%rax,1)
mov    %rsi,%rax
movabs $0x7ffffffffffffff8,%rcx
ff ff 7f
and    %rcx,%rax
lea    -0x8(%rax),%rdx
mov    %rdx,%rcx
shr    $0x3,%rcx
lea    0x1(%rcx),%rsi
cmp    $0x18,%rdx
jae    13cc <nn_single_full+0x28c>
xor    %edx,%edx
jmp    1450 <nn_single_full+0x310>
mov    %rsi,%rdi
and    $0xfffffffffffffffc,%rdi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movdqu %xmm4,-0x70(%r11,%rdx,4)
movdqu %xmm4,-0x60(%r11,%rdx,4)
movups %xmm5,-0x70(%r10,%rdx,4)
movups %xmm5,-0x60(%r10,%rdx,4)
movdqu %xmm4,-0x50(%r11,%rdx,4)
movdqu %xmm4,-0x40(%r11,%rdx,4)
movups %xmm5,-0x50(%r10,%rdx,4)
movups %xmm5,-0x40(%r10,%rdx,4)
movdqu %xmm4,-0x30(%r11,%rdx,4)
movdqu %xmm4,-0x20(%r11,%rdx,4)
movups %xmm5,-0x30(%r10,%rdx,4)
movups %xmm5,-0x20(%r10,%rdx,4)
movdqu %xmm4,-0x10(%r11,%rdx,4)
movdqu %xmm4,(%r11,%rdx,4)
movups %xmm5,-0x10(%r10,%rdx,4)
movups %xmm5,(%r10,%rdx,4)
add    $0x20,%rdx
add    $0xfffffffffffffffc,%rdi
jne    13e0 <nn_single_full+0x2a0>
test   $0x3,%sil
je     148d <nn_single_full+0x34d>
add    $0x1,%cl
movzbl %cl,%ecx
and    $0x3,%ecx
shl    $0x5,%rcx
lea    (%r14,%rdx,4),%rsi
lea    (%r15,%rdx,4),%rdx
xor    %edi,%edi
nopl   (%rax)
movdqu %xmm4,-0x10(%rdx,%rdi,1)
movdqu %xmm4,(%rdx,%rdi,1)
movups %xmm5,-0x10(%rsi,%rdi,1)
movups %xmm5,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    1470 <nn_single_full+0x330>
mov    0x18(%rsp),%rsi
cmp    %rax,%rsi
mov    0x70(%rsp),%rdx
mov    0x68(%rsp),%rcx
je     14c7 <nn_single_full+0x387>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movl   $0xffffffff,(%rdx,%rax,4)
movl   $0x7149f2ca,(%rcx,%rax,4)
add    $0x1,%rax
cmp    %rax,%rsi
jne    14b0 <nn_single_full+0x370>
mov    %r15,0xf8(%rsp)
mov    %r14,0x100(%rsp)
mov    %r11,0x108(%rsp)
mov    %r10,0x110(%rsp)
cmpl   $0x0,0x28(%rsp)
mov    0x2c(%rsp),%edi
jle    1a30 <nn_single_full+0x8f0>
cmpq   $0x0,0x20(%rsp)
sete   %al
mov    0x48(%rsp),%rcx
imul   0x80(%rsp),%rcx
mov    0xd8(%rsp),%rdx
lea    (%rdx,%rcx,4),%rcx
mov    %rcx,0x78(%rsp)
cmpq   $0x0,0xa0(%rsp)
setle  %cl
or     %al,%cl
mov    %cl,0xb(%rsp)
mov    0xc0(%rsp),%r15
mov    0xc8(%rsp),%rcx
mov    %rbx,%rdx
xor    %esi,%esi
jmp    1598 <nn_single_full+0x458>
nopw   0x0(%rax,%rax,1)
mov    0x88(%rsp),%rbp
mov    0x10(%rsp),%rsi
add    %rbp,%rsi
mov    0x120(%rsp),%rax
mov    0xb0(%rsp),%rcx
add    %rax,%rcx
add    %rax,%r15
mov    0x90(%rsp),%rbx
cmp    %rbx,%rsi
mov    0x2c(%rsp),%edi
mov    0x38(%rsp),%r12
mov    0x130(%rsp),%rdx
jge    1a30 <nn_single_full+0x8f0>
mov    %rcx,0xb0(%rsp)
mov    %rdx,%rax
sub    %rbp,%rdx
cmovge %rbp,%rax
movslq %eax,%rcx
cmp    $0x2,%rcx
mov    $0x1,%r14d
mov    %rcx,%rax
mov    %rcx,0x30(%rsp)
cmovge %rcx,%r14
sub    %rsi,%rbx
cmp    %rbp,%rbx
cmovg  %rbp,%rbx
mov    %rsi,0x10(%rsp)
mov    %rsi,%rax
imul   0x80(%rsp),%rax
mov    0x128(%rsp),%rcx
lea    (%rcx,%rax,4),%r8
cmp    $0x2,%edi
mov    %rdx,0x130(%rsp)
mov    %rbx,0xa8(%rsp)
jne    1620 <nn_single_full+0x4e0>
mov    0xc(%rsp),%edi
mov    %ebx,%esi
mov    0x98(%rsp),%rdx
mov    %r8,%rcx
mov    0x78(%rsp),%r8
mov    %r12,%r9
call   1040 <compute_cross_distances@plt>
jmp    163c <nn_single_full+0x4fc>
nop
mov    %r12,(%rsp)
mov    0xc(%rsp),%esi
mov    %ebx,%edx
mov    0x98(%rsp),%rcx
mov    0x78(%rsp),%r9
call   1050 <compute_cross_distances_alt@plt>
movaps 0x9bd(%rip),%xmm5
pcmpeqd %xmm4,%xmm4
mov    0x18(%rsp),%rdx
mov    0x10(%rsp),%rcx
mov    0x30(%rsp),%rax
lea    0x0(,%rax,4),%r11
cmpb   $0x0,0xb(%rsp)
je     17e0 <nn_single_full+0x6a0>
cmpq   $0x0,0xa0(%rsp)
mov    0xb8(%rsp),%rdx
mov    0xa8(%rsp),%rsi
jle    1550 <nn_single_full+0x410>
mov    %r14d,%ecx
and    $0x3,%ecx
mov    %r14,%r12
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%r12
neg    %r12
lea    -0x1(%r14),%rax
mov    %rax,0x30(%rsp)
shl    $0x20,%rsi
mov    0x38(%rsp),%rdi
xor    %r10d,%r10d
mov    %rsi,%r8
jmp    16eb <nn_single_full+0x5ab>
nopl   0x0(%rax,%rax,1)
movaps %xmm0,%xmm1
mov    0xb8(%rsp),%rdx
mov    %eax,(%rdx,%r9,4)
movss  %xmm1,0x0(%r13,%r9,4)
add    $0x1,%r10
add    %r11,%rdi
cmp    0x18(%rsp),%r10
mov    %r8,%rsi
je     1550 <nn_single_full+0x410>
mov    0x48(%rsp),%rax
lea    (%r10,%rax,1),%r9
mov    (%rdx,%r9,4),%eax
movss  0x0(%r13,%r9,4),%xmm0
test   %rsi,%rsi
jle    16c0 <nn_single_full+0x580>
cmpq   $0x3,0x30(%rsp)
jae    1710 <nn_single_full+0x5d0>
xor    %ebx,%ebx
jmp    1789 <nn_single_full+0x649>
mov    $0x3,%ebx
mov    0x10(%rsp),%rsi
nopw   0x0(%rax,%rax,1)
movss  -0xc(%rdi,%rbx,4),%xmm1
ucomiss %xmm1,%xmm0
movss  -0x8(%rdi,%rbx,4),%xmm2
cmova  %esi,%eax
minss  %xmm0,%xmm1
lea    0x1(%rsi),%ebp
ucomiss %xmm2,%xmm1
minss  %xmm1,%xmm2
cmovbe %eax,%ebp
movss  -0x4(%rdi,%rbx,4),%xmm1
lea    0x2(%rsi),%r13d
ucomiss %xmm1,%xmm2
minss  %xmm2,%xmm1
cmovbe %ebp,%r13d
movss  (%rdi,%rbx,4),%xmm0
lea    0x3(%rsi),%eax
ucomiss %xmm0,%xmm1
minss  %xmm1,%xmm0
cmovbe %r13d,%eax
add    $0x4,%esi
lea    (%r12,%rbx,1),%rbp
add    $0x4,%rbp
add    $0x4,%rbx
cmp    $0x3,%rbp
jne    1720 <nn_single_full+0x5e0>
add    $0xfffffffffffffffd,%rbx
mov    0x40(%rsp),%r13
movaps %xmm0,%xmm1
test   $0x3,%r14b
je     16c3 <nn_single_full+0x583>
mov    0x10(%rsp),%rdx
lea    (%rdx,%rbx,1),%esi
lea    (%rdi,%rbx,4),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  (%rbx,%rbp,4),%xmm1
ucomiss %xmm1,%xmm0
lea    (%rsi,%rbp,1),%edx
cmova  %edx,%eax
minss  %xmm0,%xmm1
add    $0x1,%rbp
movaps %xmm1,%xmm0
cmp    %rbp,%rcx
jne    17b0 <nn_single_full+0x670>
jmp    16c3 <nn_single_full+0x583>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rsi
movabs $0x7ffffffffffffff8,%rax
ff ff 7f
and    %rax,%rsi
mov    %rsi,0x150(%rsp)
lea    -0x8(%rsi),%rax
mov    %rax,0x148(%rsp)
mov    %rax,%rsi
shr    $0x3,%rsi
add    $0x1,%rsi
mov    %rsi,%rax
mov    %rsi,0x140(%rsp)
and    $0xfffffffffffffffe,%rsi
mov    %rsi,0x138(%rsp)
mov    0x20(%rsp),%rax
lea    (%rax,%rcx,4),%rax
mov    %rax,0x158(%rsp)
lea    (%rax,%r14,4),%rax
mov    %rax,0x160(%rsp)
mov    0xa8(%rsp),%rax
mov    %rax,%rdi
shl    $0x20,%rdi
movslq %eax,%rsi
mov    %r12,%r8
mov    0x118(%rsp),%r9
xor    %r10d,%r10d
jmp    1883 <nn_single_full+0x743>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r10
add    %r11,%r9
add    %r11,%r8
cmp    %rdx,%r10
je     1669 <nn_single_full+0x529>
test   %rdi,%rdi
jle    1870 <nn_single_full+0x730>
mov    %r10,%rbp
imul   %rsi,%rbp
cmp    $0x8,%r14
jb     18c5 <nn_single_full+0x785>
mov    0x30(%rsp),%rax
imul   %r10,%rax
lea    (%r12,%rax,4),%rbx
cmp    0x160(%rsp),%rbx
jae    1945 <nn_single_full+0x805>
add    %r14,%rax
lea    (%r12,%rax,4),%rax
cmp    %rax,0x158(%rsp)
jae    1945 <nn_single_full+0x805>
xor    %ebx,%ebx
mov    %rbx,%rax
or     $0x1,%rax
test   $0x1,%r14b
je     18ff <nn_single_full+0x7bf>
lea    (%rbx,%rcx,1),%rdx
mov    0x20(%rsp),%r12
movss  (%r12,%rdx,4),%xmm0
mov    0x18(%rsp),%rdx
mov    0x38(%rsp),%r12
add    %rbx,%rbp
mulss  (%r12,%rbp,4),%xmm0
movss  %xmm0,(%r12,%rbp,4)
mov    %rax,%rbx
cmp    %rax,%r14
je     1870 <nn_single_full+0x730>
nopl   0x0(%rax,%rax,1)
movss  -0x4(%r15,%rbx,4),%xmm0
mulss  (%r8,%rbx,4),%xmm0
movss  %xmm0,(%r8,%rbx,4)
movss  (%r15,%rbx,4),%xmm0
mulss  0x4(%r8,%rbx,4),%xmm0
movss  %xmm0,0x4(%r8,%rbx,4)
add    $0x2,%rbx
cmp    %rbx,%r14
jne    1910 <nn_single_full+0x7d0>
jmp    1870 <nn_single_full+0x730>
cmpq   $0x0,0x148(%rsp)
je     19c9 <nn_single_full+0x889>
mov    0x138(%rsp),%rax
xor    %ebx,%ebx
mov    0xb0(%rsp),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups -0x30(%rcx,%rbx,4),%xmm0
movups -0x20(%rcx,%rbx,4),%xmm1
movups -0x30(%r9,%rbx,4),%xmm2
mulps  %xmm0,%xmm2
movups -0x20(%r9,%rbx,4),%xmm0
mulps  %xmm1,%xmm0
movups -0x10(%r9,%rbx,4),%xmm1
movups (%r9,%rbx,4),%xmm3
movups %xmm2,-0x30(%r9,%rbx,4)
movups %xmm0,-0x20(%r9,%rbx,4)
movups -0x10(%rcx,%rbx,4),%xmm0
mulps  %xmm1,%xmm0
movups (%rcx,%rbx,4),%xmm1
mulps  %xmm3,%xmm1
movups %xmm0,-0x10(%r9,%rbx,4)
movups %xmm1,(%r9,%rbx,4)
add    $0x10,%rbx
add    $0xfffffffffffffffe,%rax
jne    1970 <nn_single_full+0x830>
jmp    19cb <nn_single_full+0x88b>
xor    %ebx,%ebx
testb  $0x1,0x140(%rsp)
01
mov    0x10(%rsp),%rcx
je     1a10 <nn_single_full+0x8d0>
lea    (%rbx,%rcx,1),%rax
mov    0x20(%rsp),%rdx
movups (%rdx,%rax,4),%xmm0
movups 0x10(%rdx,%rax,4),%xmm1
mov    0x18(%rsp),%rdx
add    %rbp,%rbx
movups (%r12,%rbx,4),%xmm2
mulps  %xmm0,%xmm2
movups 0x10(%r12,%rbx,4),%xmm0
mulps  %xmm1,%xmm0
movups %xmm2,(%r12,%rbx,4)
movups %xmm0,0x10(%r12,%rbx,4)
mov    0x150(%rsp),%rax
mov    %rax,%rbx
cmp    %rax,%r14
je     1870 <nn_single_full+0x730>
jmp    18c7 <nn_single_full+0x787>
nopl   0x0(%rax)
mov    0x58(%rsp),%rax
test   %rax,%rax
mov    0x48(%rsp),%r13
je     12c0 <nn_single_full+0x180>
xorps  %xmm0,%xmm0
cvtsi2sd %r13,%xmm0
divsd  0xd0(%rsp),%xmm0
mov    0x50(%rsp),%rdi
call   *%rax
movaps 0x59e(%rip),%xmm5
pcmpeqd %xmm4,%xmm4
mov    0x88(%rsp),%rbp
mov    0x90(%rsp),%rbx
jmp    12c0 <nn_single_full+0x180>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rax
test   %rax,%rax
je     1aad <nn_single_full+0x96d>
movsd  0x57b(%rip),%xmm0
mov    0x50(%rsp),%rdi
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    *%rax
add    $0x168,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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