double minbddist(double gvec[6]) {
  int ii;
  double dists[4];
  double minbd;
  dists[0] = ((((((fabs(gvec[1] - gvec[0])) < (fabs(gvec[2] - gvec[1])))
                     ? (fabs(gvec[1] - gvec[0]))
                     : (fabs(gvec[2] - gvec[1])))) < (fabs(gvec[2] - gvec[0])))
                  ? ((((fabs(gvec[1] - gvec[0])) < (fabs(gvec[2] - gvec[1])))
                          ? (fabs(gvec[1] - gvec[0]))
                          : (fabs(gvec[2] - gvec[1]))))
                  : (fabs(gvec[2] - gvec[0]))) /
             sqrt(2.);
  dists[1] = ((((((fabs(gvec[3])) < (fabs(gvec[4]))) ? (fabs(gvec[3]))
                                                     : (fabs(gvec[4])))) <
               (fabs(gvec[5])))
                  ? ((((fabs(gvec[3])) < (fabs(gvec[4]))) ? (fabs(gvec[3]))
                                                          : (fabs(gvec[4]))))
                  : (fabs(gvec[5])));
  dists[2] =
      ((((((fabs(gvec[1] - fabs(gvec[3]))) < (fabs(gvec[0] - fabs(gvec[4]))))
              ? (fabs(gvec[1] - fabs(gvec[3])))
              : (fabs(gvec[0] - fabs(gvec[4]))))) <
        (fabs(gvec[0] - fabs(gvec[5]))))
           ? ((((fabs(gvec[1] - fabs(gvec[3]))) <
                (fabs(gvec[0] - fabs(gvec[4]))))
                   ? (fabs(gvec[1] - fabs(gvec[3])))
                   : (fabs(gvec[0] - fabs(gvec[4])))))
           : (fabs(gvec[0] - fabs(gvec[5]))));
  dists[2] = (((dists[2]) < (fabs(gvec[1] - fabs(gvec[5]))))
                  ? (dists[2])
                  : (fabs(gvec[1] - fabs(gvec[5]))));
  dists[2] = ((((((dists[2]) < (fabs(gvec[2] - fabs(gvec[4]))))
                     ? (dists[2])
                     : (fabs(gvec[2] - fabs(gvec[4]))))) <
               (fabs(gvec[2] - fabs(gvec[3]))))
                  ? ((((dists[2]) < (fabs(gvec[2] - fabs(gvec[4]))))
                          ? (dists[2])
                          : (fabs(gvec[2] - fabs(gvec[4])))))
                  : (fabs(gvec[2] - fabs(gvec[3])))) /
             sqrt(2.);
  dists[3] = fabs(gvec[0] + gvec[1] + gvec[3] + gvec[4] + gvec[5]);
  dists[3] =
      (((dists[3]) < (fabs(gvec[0] + gvec[1] - gvec[3] - gvec[4] + gvec[5])))
           ? (dists[3])
           : (fabs(gvec[0] + gvec[1] - gvec[3] - gvec[4] + gvec[5])));
  dists[3] =
      (((dists[3]) < (fabs(gvec[0] + gvec[1] - gvec[3] + gvec[4] - gvec[5])))
           ? (dists[3])
           : (fabs(gvec[0] + gvec[1] - gvec[3] + gvec[4] - gvec[5])));
  dists[3] =
      (((dists[3]) < (fabs(gvec[0] + gvec[1] + gvec[3] - gvec[4] - gvec[5])))
           ? (dists[3])
           : (fabs(gvec[0] + gvec[1] + gvec[3] - gvec[4] - gvec[5]))) /
      sqrt(5.);
  minbd = dists[0];
  for (ii = 1; ii < 4; ii++) {
    minbd = (((minbd) < (dists[ii])) ? (minbd) : (dists[ii]));
  }
  return minbd;
}


x86 assembly (clang, -O0):
<minbddist>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
movaps 0xec9(%rip),%xmm0
pand   %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movaps 0xeac(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1188 <minbddist+0x78>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movaps 0xe86(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    11aa <minbddist+0x9a>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movaps 0xe5f(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movaps 0xe39(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    126f <minbddist+0x15f>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
movaps 0xe13(%rip),%xmm0
pand   %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movaps 0xdf6(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    123e <minbddist+0x12e>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movaps 0xdd0(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1260 <minbddist+0x150>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm0
movaps 0xda9(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1290 <minbddist+0x180>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm0
movaps 0xd79(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xd6e(%rip),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
movaps 0xd38(%rip),%xmm0
pand   %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movaps 0xd24(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1308 <minbddist+0x1f8>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movaps 0xd06(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    1321 <minbddist+0x211>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movaps 0xce8(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movaps 0xcca(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    13bc <minbddist+0x2ac>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
movaps 0xcac(%rip),%xmm0
pand   %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movaps 0xc98(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1394 <minbddist+0x284>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movaps 0xc7a(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    13ad <minbddist+0x29d>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
movaps 0xc5c(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    13d5 <minbddist+0x2c5>
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm0
movaps 0xc34(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movaps 0xc08(%rip),%xmm2
pand   %xmm2,%xmm0
subsd  %xmm0,%xmm1
movaps 0xbf9(%rip),%xmm0
pand   %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
movaps 0xbdd(%rip),%xmm3
pand   %xmm3,%xmm2
subsd  %xmm2,%xmm0
movaps 0xbce(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1476 <minbddist+0x366>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
movaps 0xba7(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0xb98(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    14a6 <minbddist+0x396>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
movaps 0xb72(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0xb63(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
movaps 0xb3d(%rip),%xmm3
pand   %xmm3,%xmm2
subsd  %xmm2,%xmm0
movaps 0xb2e(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    15b9 <minbddist+0x4a9>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
movaps 0xb07(%rip),%xmm2
pand   %xmm2,%xmm0
subsd  %xmm0,%xmm1
movaps 0xaf8(%rip),%xmm0
pand   %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
movaps 0xadc(%rip),%xmm3
pand   %xmm3,%xmm2
subsd  %xmm2,%xmm0
movaps 0xacd(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1577 <minbddist+0x467>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
movaps 0xaa6(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0xa97(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    15a7 <minbddist+0x497>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
movaps 0xa71(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0xa62(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    15ec <minbddist+0x4dc>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
movaps 0xa2f(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0xa20(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm2
movaps 0x9e9(%rip),%xmm3
pand   %xmm3,%xmm2
subsd  %xmm2,%xmm0
movaps 0x9da(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1646 <minbddist+0x536>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    167a <minbddist+0x56a>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
movaps 0x9a1(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0x992(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
movaps 0x95b(%rip),%xmm3
pand   %xmm3,%xmm2
subsd  %xmm2,%xmm0
movaps 0x94c(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    16d4 <minbddist+0x5c4>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    1708 <minbddist+0x5f8>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
movaps 0x913(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0x904(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm1
ff
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm2
movaps 0x8d7(%rip),%xmm3
pand   %xmm3,%xmm2
subsd  %xmm2,%xmm0
movaps 0x8c8(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    17dc <minbddist+0x6cc>
movsd  -0x20(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
movaps 0x89c(%rip),%xmm3
pand   %xmm3,%xmm2
subsd  %xmm2,%xmm0
movaps 0x88d(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1793 <minbddist+0x683>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    17c7 <minbddist+0x6b7>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
movaps 0x854(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0x845(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    1810 <minbddist+0x700>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
movaps 0x80b(%rip),%xmm2
pand   %xmm2,%xmm1
subsd  %xmm1,%xmm0
movaps 0x7fc(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0x7e8(%rip),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x28(%rax),%xmm0
movaps 0x78c(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x28(%rax),%xmm0
movaps 0x74b(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    18d5 <minbddist+0x7c5>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
jmp    1914 <minbddist+0x804>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x28(%rax),%xmm0
movaps 0x6f8(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x28(%rax),%xmm0
movaps 0x6a7(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1979 <minbddist+0x869>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
jmp    19b8 <minbddist+0x8a8>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x28(%rax),%xmm0
movaps 0x654(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x28(%rax),%xmm0
movaps 0x603(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1a1d <minbddist+0x90d>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    1a5c <minbddist+0x94c>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
subsd  0x28(%rax),%xmm0
movaps 0x5b0(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x5a4(%rip),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1b00 <minbddist+0x9f0>
movsd  -0x38(%rbp),%xmm1
movslq -0xc(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1ad3 <minbddist+0x9c3>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    1ae5 <minbddist+0x9d5>
movslq -0xc(%rbp),%rax
movsd  -0x30(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1a9e <minbddist+0x98e>
movsd  -0x38(%rbp),%xmm0
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minbddist>:
movupd (%rdi),%xmm0
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
movsd  0x10(%rdi),%xmm9
movapd %xmm0,%xmm3
movapd %xmm9,%xmm5
subsd  %xmm0,%xmm5
movapd %xmm0,%xmm8
movapd %xmm2,%xmm12
addsd  %xmm0,%xmm2
movapd %xmm0,%xmm4
shufpd $0x1,%xmm0,%xmm4
movsd  %xmm9,%xmm3
subpd  %xmm4,%xmm3
movapd 0xeb8(%rip),%xmm13
andpd  %xmm13,%xmm3
pshufd $0xee,%xmm3,%xmm0
minsd  %xmm3,%xmm0
andpd  %xmm13,%xmm5
minsd  %xmm5,%xmm0
movsd  0xea8(%rip),%xmm10
divsd  %xmm10,%xmm0
movupd 0x18(%rdi),%xmm3
movapd %xmm3,%xmm1
andpd  %xmm13,%xmm1
pshufd $0xee,%xmm1,%xmm11
subpd  %xmm1,%xmm4
movapd %xmm9,%xmm14
subsd  %xmm1,%xmm9
movapd %xmm1,%xmm7
minsd  %xmm11,%xmm7
movapd %xmm2,%xmm1
addsd  %xmm3,%xmm1
subsd  %xmm3,%xmm2
unpckhpd %xmm3,%xmm3
movapd %xmm1,%xmm5
addsd  %xmm3,%xmm5
movapd %xmm2,%xmm6
subsd  %xmm3,%xmm6
addsd  %xmm3,%xmm2
subsd  %xmm3,%xmm1
movsd  0x28(%rdi),%xmm3
addsd  %xmm3,%xmm5
addsd  %xmm3,%xmm6
subsd  %xmm3,%xmm2
subsd  %xmm3,%xmm1
andpd  %xmm13,%xmm3
minsd  %xmm3,%xmm7
minsd  %xmm7,%xmm0
andpd  %xmm13,%xmm4
pshufd $0xee,%xmm4,%xmm7
minsd  %xmm7,%xmm4
subsd  %xmm3,%xmm8
andpd  %xmm13,%xmm8
minsd  %xmm8,%xmm4
subsd  %xmm3,%xmm12
andpd  %xmm13,%xmm12
minsd  %xmm12,%xmm4
subsd  %xmm11,%xmm14
andpd  %xmm13,%xmm14
minsd  %xmm14,%xmm4
andpd  %xmm13,%xmm9
minsd  %xmm9,%xmm4
divsd  %xmm10,%xmm4
minsd  %xmm4,%xmm0
andpd  %xmm13,%xmm5
andpd  %xmm13,%xmm6
minsd  %xmm6,%xmm5
andpd  %xmm13,%xmm2
minsd  %xmm2,%xmm5
andpd  %xmm13,%xmm1
minsd  %xmm1,%xmm5
divsd  0xdc0(%rip),%xmm5
minsd  %xmm5,%xmm0
ret

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

LLVM IR (-O2):
define double @minbddist(double* nocapture %0) {
%2 = bitcast double* %0 to <2 x double>*
%3 = load <2 x double>, <2 x double>* %2
%4 = shufflevector <2 x double> %3, <2 x double> poison, <2 x i32> <i32 1, i32 0>
%5 = extractelement <2 x double> %3, i64 1
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = insertelement <2 x double> %3, double %7, i64 0
%9 = fsub <2 x double> %8, %4
%10 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %9)
%11 = extractelement <2 x double> %10, i64 0
%12 = extractelement <2 x double> %10, i64 1
%13 = fcmp olt double %12, %11
%14 = select i1 %13, double %12, double %11
%15 = extractelement <2 x double> %3, i64 0
%16 = fsub double %7, %15
%17 = tail call double @llvm.fabs.f64(double %16)
%18 = fcmp olt double %14, %17
%19 = select i1 %18, double %14, double %17
%20 = fdiv double %19, 0x3FF6A09E667F3BCD
%21 = getelementptr inbounds double, double* %0, i64 3
%22 = bitcast double* %21 to <2 x double>*
%23 = load <2 x double>, <2 x double>* %22
%24 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %23)
%25 = extractelement <2 x double> %24, i64 0
%26 = extractelement <2 x double> %24, i64 1
%27 = fcmp olt double %25, %26
%28 = select i1 %27, double %25, double %26
%29 = getelementptr inbounds double, double* %0, i64 5
%30 = load double, double* %29
%31 = tail call double @llvm.fabs.f64(double %30)
%32 = fcmp olt double %28, %31
%33 = select i1 %32, double %28, double %31
%34 = fsub <2 x double> %4, %24
%35 = call <2 x double> @llvm.fabs.v2f64(<2 x double> %34)
%36 = extractelement <2 x double> %35, i64 0
%37 = extractelement <2 x double> %35, i64 1
%38 = fcmp olt double %36, %37
%39 = select i1 %38, double %36, double %37
%40 = fsub double %15, %31
%41 = tail call double @llvm.fabs.f64(double %40)
%42 = fcmp olt double %39, %41
%43 = select i1 %42, double %39, double %41
%44 = fsub double %5, %31
%45 = tail call double @llvm.fabs.f64(double %44)
%46 = fcmp olt double %43, %45
%47 = select i1 %46, double %43, double %45
%48 = fsub double %7, %26
%49 = tail call double @llvm.fabs.f64(double %48)
%50 = fcmp olt double %47, %49
%51 = select i1 %50, double %47, double %49
%52 = fsub double %7, %25
%53 = tail call double @llvm.fabs.f64(double %52)
%54 = fcmp olt double %51, %53
%55 = select i1 %54, double %51, double %53
%56 = fdiv double %55, 0x3FF6A09E667F3BCD
%57 = fadd double %5, %15
%58 = extractelement <2 x double> %23, i64 0
%59 = fadd double %57, %58
%60 = extractelement <2 x double> %23, i64 1
%61 = fadd double %59, %60
%62 = fadd double %61, %30
%63 = tail call double @llvm.fabs.f64(double %62)
%64 = fsub double %57, %58
%65 = fsub double %64, %60
%66 = fadd double %65, %30
%67 = tail call double @llvm.fabs.f64(double %66)
%68 = fcmp olt double %63, %67
%69 = select i1 %68, double %63, double %67
%70 = fadd double %64, %60
%71 = fsub double %70, %30
%72 = tail call double @llvm.fabs.f64(double %71)
%73 = fcmp olt double %69, %72
%74 = select i1 %73, double %69, double %72
%75 = fsub double %59, %60
%76 = fsub double %75, %30
%77 = tail call double @llvm.fabs.f64(double %76)
%78 = fcmp olt double %74, %77
%79 = select i1 %78, double %74, double %77
%80 = fdiv double %79, 0x4001E3779B97F4A8
%81 = fcmp olt double %20, %33
%82 = select i1 %81, double %20, double %33
%83 = fcmp olt double %82, %56
%84 = select i1 %83, double %82, double %56
%85 = fcmp olt double %84, %80
%86 = select i1 %85, double %84, double %80
ret double %86
}