#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 */
double D7Dist_2bds_rev(double *, double *, double *, double *, double *,
                       double *, int, double *, double *, double *, double *,
                       int, double);
int /*<<< orphan*/ d71234distsq(double *, double *);
int /*<<< orphan*/ d7bdmaps(double *, double *, int *, double **, double **,
                            double **, double **, double, int *);
double d7minbddist(double *);
double sqrt(int /*<<< orphan*/);
double D7Dist_pass(double gvec1[7], double gvec2[7], double dist) {
  double dists1[9];
  double pgs1[9][7], rgs1[9][7], mpgs1[9][7], mvecs1[9][7];
  double dists2[9];
  double pgs2[9][7], rgs2[9][7], mpgs2[9][7], mvecs2[9][7];
  int iord1[9], iord2[9];
  double mindists1;
  double mindists2;
  int jx1, jx2;
  int j1, j2;
  int ngood1, ngood2;
  double maxdist;
  maxdist = 0.999995 * dist;
  d7bdmaps(gvec1, dists1, iord1, pgs1, rgs1, mpgs1, mvecs1, maxdist, &ngood1);
  d7bdmaps(gvec2, dists2, iord2, pgs2, rgs2, mpgs2, mvecs2, maxdist, &ngood2);
  mindists1 = d7minbddist(gvec1);
  mindists2 = d7minbddist(gvec2);
  if (mindists1 + mindists2 > dist)
    return dist;
  if (mindists1 + mindists2 < maxdist) {
    for (jx1 = 0; jx1 < ngood1; jx1++) {
      double d1;
      j1 = iord1[jx1];
      if (j1 < 3 || j1 == 6 || j1 == 8)
        continue;
      d1 = dists1[j1];
      if (d1 < maxdist) {
        dist = (((dist) < (sqrt(d71234distsq(gvec2, mpgs1[j1])) + d1))
                    ? (dist)
                    : (sqrt(d71234distsq(gvec2, mpgs1[j1])) + d1));
      }
    }
    for (jx2 = 0; jx2 < ngood2; jx2++) {
      double d2;
      j2 = iord2[jx2];
      if (j2 < 3 || j2 == 6 || j2 == 8)
        continue;
      d2 = dists2[j2];
      if (d2 < maxdist) {
        dist = (((dist) < ((sqrt(d71234distsq(gvec1, mpgs2[j2])) + d2)))
                    ? (dist)
                    : ((sqrt(d71234distsq(gvec1, mpgs2[j2])) + d2)));
      }
    }
  }
  maxdist = 0.999995 * dist;
  for (jx1 = 0; jx1 < ngood1; jx1++) {
    double d1;
    j1 = iord1[jx1];
    if (j1 < 3 || j1 == 6 || j1 == 8)
      continue;
    d1 = dists1[j1];
    if (d1 < maxdist) {
      for (jx2 = 0; jx2 < ngood2; jx2++) {
        double d2;
        j2 = iord2[jx2];
        if (j2 < 3 || j2 == 6 || j2 == 8)
          continue;
        d2 = dists2[j2];
        if (d2 < maxdist) {
          dist = D7Dist_2bds_rev(gvec1, gvec2, pgs1[j1], mpgs1[j1], pgs2[j1],
                                 mpgs2[j1], j1, pgs2[j2], mpgs2[j2], pgs1[j2],
                                 mpgs1[j2], j2, dist);
        }
      }
    }
  }
  return dist;
}


x86 assembly (clang, -O0):
<D7Dist_pass>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x11b8,%rsp
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  0xe8b(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1160(%rbp)
ff
mov    -0x28(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0x1100(%rbp),%rdx
lea    -0x280(%rbp),%rcx
lea    -0x480(%rbp),%r8
lea    -0x680(%rbp),%r9
lea    -0x880(%rbp),%r10
movsd  -0x1160(%rbp),%xmm0
ff
lea    -0x1154(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <d7bdmaps@plt>
mov    -0x30(%rbp),%rdi
lea    -0x8d0(%rbp),%rsi
lea    -0x1130(%rbp),%rdx
lea    -0xad0(%rbp),%rcx
lea    -0xcd0(%rbp),%r8
lea    -0xed0(%rbp),%r9
lea    -0x10d0(%rbp),%r10
movsd  -0x1160(%rbp),%xmm0
ff
lea    -0x1158(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <d7bdmaps@plt>
mov    -0x28(%rbp),%rdi
call   1060 <d7minbddist@plt>
movsd  %xmm0,-0x1138(%rbp)
ff
mov    -0x30(%rbp),%rdi
call   1060 <d7minbddist@plt>
movsd  %xmm0,-0x1140(%rbp)
ff
movsd  -0x1138(%rbp),%xmm0
ff
addsd  -0x1140(%rbp),%xmm0
ff
ucomisd -0x38(%rbp),%xmm0
jbe    1261 <D7Dist_pass+0x111>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    176a <D7Dist_pass+0x61a>
movsd  -0x1138(%rbp),%xmm1
ff
addsd  -0x1140(%rbp),%xmm1
ff
movsd  -0x1160(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1513 <D7Dist_pass+0x3c3>
movl   $0x0,-0x1144(%rbp)
mov    -0x1144(%rbp),%eax
cmp    -0x1154(%rbp),%eax
jge    13c7 <D7Dist_pass+0x277>
movslq -0x1144(%rbp),%rax
mov    -0x1100(%rbp,%rax,4),%eax
mov    %eax,-0x114c(%rbp)
cmpl   $0x3,-0x114c(%rbp)
jl     12da <D7Dist_pass+0x18a>
cmpl   $0x6,-0x114c(%rbp)
je     12da <D7Dist_pass+0x18a>
cmpl   $0x8,-0x114c(%rbp)
jne    12df <D7Dist_pass+0x18f>
jmp    13b3 <D7Dist_pass+0x263>
movslq -0x114c(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x1168(%rbp)
ff
movsd  -0x1168(%rbp),%xmm1
ff
movsd  -0x1160(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    13ae <D7Dist_pass+0x25e>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1188(%rbp)
ff
mov    -0x30(%rbp),%rdi
movslq -0x114c(%rbp),%rax
lea    -0x680(%rbp),%rsi
imul   $0x38,%rax,%rax
add    %rax,%rsi
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
movsd  -0x1188(%rbp),%xmm1
ff
addsd  -0x1168(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    136c <D7Dist_pass+0x21c>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1190(%rbp)
ff
jmp    13a1 <D7Dist_pass+0x251>
mov    -0x30(%rbp),%rdi
movslq -0x114c(%rbp),%rax
lea    -0x680(%rbp),%rsi
imul   $0x38,%rax,%rax
add    %rax,%rsi
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
addsd  -0x1168(%rbp),%xmm0
ff
movsd  %xmm0,-0x1190(%rbp)
ff
movsd  -0x1190(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
jmp    13b3 <D7Dist_pass+0x263>
mov    -0x1144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1144(%rbp)
jmp    128d <D7Dist_pass+0x13d>
movl   $0x0,-0x1148(%rbp)
mov    -0x1148(%rbp),%eax
cmp    -0x1158(%rbp),%eax
jge    150e <D7Dist_pass+0x3be>
movslq -0x1148(%rbp),%rax
mov    -0x1130(%rbp,%rax,4),%eax
mov    %eax,-0x1150(%rbp)
cmpl   $0x3,-0x1150(%rbp)
jl     141e <D7Dist_pass+0x2ce>
cmpl   $0x6,-0x1150(%rbp)
je     141e <D7Dist_pass+0x2ce>
cmpl   $0x8,-0x1150(%rbp)
jne    1423 <D7Dist_pass+0x2d3>
jmp    14fa <D7Dist_pass+0x3aa>
movslq -0x1150(%rbp),%rax
movsd  -0x8d0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1170(%rbp)
ff
movsd  -0x1170(%rbp),%xmm1
ff
movsd  -0x1160(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    14f5 <D7Dist_pass+0x3a5>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1198(%rbp)
ff
mov    -0x28(%rbp),%rdi
movslq -0x1150(%rbp),%rax
lea    -0xed0(%rbp),%rsi
imul   $0x38,%rax,%rax
add    %rax,%rsi
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
movsd  -0x1198(%rbp),%xmm1
ff
addsd  -0x1170(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    14b3 <D7Dist_pass+0x363>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x11a0(%rbp)
ff
jmp    14e8 <D7Dist_pass+0x398>
mov    -0x28(%rbp),%rdi
movslq -0x1150(%rbp),%rax
lea    -0xed0(%rbp),%rsi
imul   $0x38,%rax,%rax
add    %rax,%rsi
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
addsd  -0x1170(%rbp),%xmm0
ff
movsd  %xmm0,-0x11a0(%rbp)
ff
movsd  -0x11a0(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
jmp    14fa <D7Dist_pass+0x3aa>
mov    -0x1148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1148(%rbp)
jmp    13d1 <D7Dist_pass+0x281>
jmp    1513 <D7Dist_pass+0x3c3>
movsd  0xae5(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1160(%rbp)
ff
movl   $0x0,-0x1144(%rbp)
mov    -0x1144(%rbp),%eax
cmp    -0x1154(%rbp),%eax
jge    1760 <D7Dist_pass+0x610>
movslq -0x1144(%rbp),%rax
mov    -0x1100(%rbp,%rax,4),%eax
mov    %eax,-0x114c(%rbp)
cmpl   $0x3,-0x114c(%rbp)
jl     157f <D7Dist_pass+0x42f>
cmpl   $0x6,-0x114c(%rbp)
je     157f <D7Dist_pass+0x42f>
cmpl   $0x8,-0x114c(%rbp)
jne    1584 <D7Dist_pass+0x434>
jmp    174c <D7Dist_pass+0x5fc>
movslq -0x114c(%rbp),%rax
movsd  -0x80(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x1178(%rbp)
ff
movsd  -0x1178(%rbp),%xmm1
ff
movsd  -0x1160(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1747 <D7Dist_pass+0x5f7>
movl   $0x0,-0x1148(%rbp)
mov    -0x1148(%rbp),%eax
cmp    -0x1158(%rbp),%eax
jge    1742 <D7Dist_pass+0x5f2>
movslq -0x1148(%rbp),%rax
mov    -0x1130(%rbp,%rax,4),%eax
mov    %eax,-0x1150(%rbp)
cmpl   $0x3,-0x1150(%rbp)
jl     160a <D7Dist_pass+0x4ba>
cmpl   $0x6,-0x1150(%rbp)
je     160a <D7Dist_pass+0x4ba>
cmpl   $0x8,-0x1150(%rbp)
jne    160f <D7Dist_pass+0x4bf>
jmp    172e <D7Dist_pass+0x5de>
movslq -0x1150(%rbp),%rax
movsd  -0x8d0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x1180(%rbp)
ff
movsd  -0x1180(%rbp),%xmm1
ff
movsd  -0x1160(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1729 <D7Dist_pass+0x5d9>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq -0x114c(%rbp),%rax
lea    -0x280(%rbp),%rdx
imul   $0x38,%rax,%rax
add    %rax,%rdx
movslq -0x114c(%rbp),%rax
lea    -0x680(%rbp),%rcx
imul   $0x38,%rax,%rax
add    %rax,%rcx
movslq -0x114c(%rbp),%rax
lea    -0xad0(%rbp),%r8
imul   $0x38,%rax,%rax
add    %rax,%r8
movslq -0x114c(%rbp),%rax
lea    -0xed0(%rbp),%r9
imul   $0x38,%rax,%rax
add    %rax,%r9
mov    -0x114c(%rbp),%r15d
movslq -0x1150(%rbp),%rax
lea    -0xad0(%rbp),%r14
imul   $0x38,%rax,%rax
add    %rax,%r14
movslq -0x1150(%rbp),%rax
lea    -0xed0(%rbp),%rbx
imul   $0x38,%rax,%rax
add    %rax,%rbx
movslq -0x1150(%rbp),%rax
lea    -0x280(%rbp),%r11
imul   $0x38,%rax,%rax
add    %rax,%r11
movslq -0x1150(%rbp),%rax
lea    -0x680(%rbp),%r10
imul   $0x38,%rax,%rax
add    %rax,%r10
mov    -0x1150(%rbp),%eax
movsd  -0x38(%rbp),%xmm0
mov    %r15d,(%rsp)
mov    %r14,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1030 <D7Dist_2bds_rev@plt>
movsd  %xmm0,-0x38(%rbp)
jmp    172e <D7Dist_pass+0x5de>
mov    -0x1148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1148(%rbp)
jmp    15bd <D7Dist_pass+0x46d>
jmp    1747 <D7Dist_pass+0x5f7>
jmp    174c <D7Dist_pass+0x5fc>
mov    -0x1144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1144(%rbp)
jmp    1532 <D7Dist_pass+0x3e2>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x11b8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<D7Dist_pass>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1138,%rsp
movsd  %xmm0,0x20(%rsp)
mov    %rsi,%r14
mov    %rdi,%r13
movsd  0xe8b(%rip),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  %xmm1,0x18(%rsp)
lea    0x14(%rsp),%rax
lea    0xd40(%rsp),%rbp
lea    0xf0(%rsp),%rsi
lea    0x70(%rsp),%rdx
lea    0x740(%rsp),%rcx
lea    0xf40(%rsp),%r8
lea    0x340(%rsp),%r9
push   %rax
push   %rbp
call   1040 <d7bdmaps@plt>
add    $0x10,%rsp
lea    0x10(%rsp),%rax
lea    0x940(%rsp),%rbp
lea    0xa0(%rsp),%rsi
lea    0x40(%rsp),%rdx
lea    0x540(%rsp),%rcx
lea    0xb40(%rsp),%r8
lea    0x140(%rsp),%r9
mov    %r14,%rdi
movsd  0x18(%rsp),%xmm0
push   %rax
push   %rbp
call   1040 <d7bdmaps@plt>
add    $0x10,%rsp
mov    %r13,%rdi
call   1060 <d7minbddist@plt>
movsd  %xmm0,0x8(%rsp)
mov    %r14,%rdi
call   1060 <d7minbddist@plt>
movsd  0x20(%rsp),%xmm1
addsd  0x8(%rsp),%xmm0
ucomisd %xmm1,%xmm0
ja     151d <D7Dist_pass+0x3cd>
movsd  0x18(%rsp),%xmm2
ucomisd %xmm0,%xmm2
jbe    13c6 <D7Dist_pass+0x276>
movapd %xmm2,%xmm0
cmpl   $0x0,0x14(%rsp)
jle    1306 <D7Dist_pass+0x1b6>
xor    %ebp,%ebp
jmp    1272 <D7Dist_pass+0x122>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
movslq 0x14(%rsp),%rax
cmp    %rax,%rbp
jge    1306 <D7Dist_pass+0x1b6>
mov    0x70(%rsp,%rbp,4),%eax
cmp    $0x3,%eax
jl     1260 <D7Dist_pass+0x110>
cmp    $0x6,%eax
je     1260 <D7Dist_pass+0x110>
cmp    $0x8,%eax
je     1260 <D7Dist_pass+0x110>
mov    %eax,%eax
movsd  0xf0(%rsp,%rax,8),%xmm2
ucomisd %xmm2,%xmm0
jbe    1260 <D7Dist_pass+0x110>
imul   $0x38,%rax,%rax
lea    (%rsp,%rax,1),%rbx
add    $0x340,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
movsd  %xmm1,0x20(%rsp)
movsd  %xmm2,0x8(%rsp)
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
movsd  0x20(%rsp),%xmm1
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
movsd  0x18(%rsp),%xmm0
ja     1260 <D7Dist_pass+0x110>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
jmp    1260 <D7Dist_pass+0x110>
cmpl   $0x0,0x10(%rsp)
jle    13c6 <D7Dist_pass+0x276>
xor    %ebp,%ebp
jmp    1332 <D7Dist_pass+0x1e2>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
movslq 0x10(%rsp),%rax
cmp    %rax,%rbp
jge    13c6 <D7Dist_pass+0x276>
mov    0x40(%rsp,%rbp,4),%eax
cmp    $0x3,%eax
jl     1320 <D7Dist_pass+0x1d0>
cmp    $0x6,%eax
je     1320 <D7Dist_pass+0x1d0>
cmp    $0x8,%eax
je     1320 <D7Dist_pass+0x1d0>
mov    %eax,%eax
movsd  0xa0(%rsp,%rax,8),%xmm2
ucomisd %xmm2,%xmm0
jbe    1320 <D7Dist_pass+0x1d0>
imul   $0x38,%rax,%rax
lea    (%rsp,%rax,1),%rbx
add    $0x140,%rbx
mov    %r13,%rdi
mov    %rbx,%rsi
movsd  %xmm1,0x20(%rsp)
movsd  %xmm2,0x8(%rsp)
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
movsd  0x20(%rsp),%xmm1
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
movsd  0x18(%rsp),%xmm0
ja     1320 <D7Dist_pass+0x1d0>
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <d71234distsq@plt>
mov    %eax,%edi
call   1070 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
jmp    1320 <D7Dist_pass+0x1d0>
mov    0x14(%rsp),%eax
test   %eax,%eax
jle    151d <D7Dist_pass+0x3cd>
mov    %r14,0x30(%rsp)
movsd  0xc21(%rip),%xmm0
mulsd  %xmm1,%xmm0
xor    %r14d,%r14d
movsd  %xmm0,0x28(%rsp)
jmp    1410 <D7Dist_pass+0x2c0>
mov    0x14(%rsp),%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r14
movslq %eax,%rcx
cmp    %rcx,%r14
jge    151d <D7Dist_pass+0x3cd>
mov    0x70(%rsp,%r14,4),%r15d
cmp    $0x3,%r15d
jl     1400 <D7Dist_pass+0x2b0>
cmp    $0x6,%r15d
je     1400 <D7Dist_pass+0x2b0>
cmp    $0x8,%r15d
je     1400 <D7Dist_pass+0x2b0>
mov    %r15d,%edx
ucomisd 0xf0(%rsp,%rdx,8),%xmm0
jbe    1400 <D7Dist_pass+0x2b0>
mov    0x10(%rsp),%ecx
test   %ecx,%ecx
jle    1400 <D7Dist_pass+0x2b0>
imul   $0x38,%rdx,%rax
lea    (%rsp,%rax,1),%rdx
add    $0x740,%rdx
mov    %rdx,0x18(%rsp)
lea    0x340(%rsp,%rax,1),%rdx
mov    %rdx,0x20(%rsp)
lea    0x540(%rsp,%rax,1),%rdx
mov    %rdx,0x8(%rsp)
add    %rsp,%rax
add    $0x140,%rax
mov    %rax,0x38(%rsp)
xor    %r12d,%r12d
jmp    1490 <D7Dist_pass+0x340>
xchg   %ax,%ax
add    $0x1,%r12
movslq %ecx,%rax
cmp    %rax,%r12
jge    13ee <D7Dist_pass+0x29e>
mov    0x40(%rsp,%r12,4),%eax
cmp    $0x3,%eax
jl     1480 <D7Dist_pass+0x330>
cmp    $0x6,%eax
je     1480 <D7Dist_pass+0x330>
cmp    $0x8,%eax
je     1480 <D7Dist_pass+0x330>
mov    %eax,%edx
ucomisd 0xa0(%rsp,%rdx,8),%xmm0
jbe    1480 <D7Dist_pass+0x330>
imul   $0x38,%rdx,%rcx
lea    (%rsp,%rcx,1),%r10
add    $0x540,%r10
lea    0x140(%rsp,%rcx,1),%r11
lea    0x740(%rsp,%rcx,1),%rbx
lea    0x340(%rsp,%rcx,1),%rbp
mov    %r13,%rdi
mov    0x30(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    0x20(%rsp),%rcx
mov    0x8(%rsp),%r8
mov    0x38(%rsp),%r9
movapd %xmm1,%xmm0
push   %rax
push   %rbp
push   %rbx
push   %r11
push   %r10
push   %r15
call   1030 <D7Dist_2bds_rev@plt>
add    $0x30,%rsp
movapd %xmm0,%xmm1
movsd  0x28(%rsp),%xmm0
mov    0x10(%rsp),%ecx
jmp    1480 <D7Dist_pass+0x330>
movapd %xmm1,%xmm0
add    $0x1138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define double @D7Dist_pass(double* %0, double* %1, double %2) {
%4 = alloca [9 x double]
%5 = alloca [9 x [7 x double]]
%6 = alloca [9 x [7 x double]]
%7 = alloca [9 x [7 x double]]
%8 = alloca [9 x [7 x double]]
%9 = alloca [9 x double]
%10 = alloca [9 x [7 x double]]
%11 = alloca [9 x [7 x double]]
%12 = alloca [9 x [7 x double]]
%13 = alloca [9 x [7 x double]]
%14 = alloca [9 x i32]
%15 = alloca [9 x i32]
%16 = alloca i32
%17 = alloca i32
%18 = bitcast [9 x double]* %4 to i8*
%19 = bitcast [9 x [7 x double]]* %5 to i8*
%20 = bitcast [9 x [7 x double]]* %6 to i8*
%21 = bitcast [9 x [7 x double]]* %7 to i8*
%22 = bitcast [9 x [7 x double]]* %8 to i8*
%23 = bitcast [9 x double]* %9 to i8*
%24 = bitcast [9 x [7 x double]]* %10 to i8*
%25 = bitcast [9 x [7 x double]]* %11 to i8*
%26 = bitcast [9 x [7 x double]]* %12 to i8*
%27 = bitcast [9 x [7 x double]]* %13 to i8*
%28 = bitcast [9 x i32]* %14 to i8*
%29 = bitcast [9 x i32]* %15 to i8*
%30 = bitcast i32* %16 to i8*
%31 = bitcast i32* %17 to i8*
%32 = fmul double %2, 0x3FEFFFF583A53B8E
%33 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 0
%34 = getelementptr inbounds [9 x i32], [9 x i32]* %14, i64 0, i64 0
%35 = bitcast [9 x [7 x double]]* %5 to double**
%36 = bitcast [9 x [7 x double]]* %6 to double**
%37 = bitcast [9 x [7 x double]]* %7 to double**
%38 = bitcast [9 x [7 x double]]* %8 to double**
%39 = call i32 @d7bdmaps(double* %0, double* %33, i32* %34, double** %35, double** %36, double** %37, double** %38, double %32, i32* %16)
%40 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 0
%41 = getelementptr inbounds [9 x i32], [9 x i32]* %15, i64 0, i64 0
%42 = bitcast [9 x [7 x double]]* %10 to double**
%43 = bitcast [9 x [7 x double]]* %11 to double**
%44 = bitcast [9 x [7 x double]]* %12 to double**
%45 = bitcast [9 x [7 x double]]* %13 to double**
%46 = call i32 @d7bdmaps(double* %1, double* %40, i32* %41, double** %42, double** %43, double** %44, double** %45, double %32, i32* %17)
%47 = call double @d7minbddist(double* %0)
%48 = call double @d7minbddist(double* %1)
%49 = fadd double %47, %48
%50 = fcmp ogt double %49, %2
br i1 %50, label %180, label %51
51: ; preds = %3
%52 = fcmp olt double %49, %32
br i1 %52, label %53, label %118
53: ; preds = %51
%54 = load i32, i32* %16
%55 = icmp sgt i32 %54, 0
br i1 %55, label %60, label %56
56: ; preds = %83, %53
%57 = phi double [ %2, %53 ], [ %84, %83 ]
%58 = load i32, i32* %17
%59 = icmp sgt i32 %58, 0
br i1 %59, label %89, label %118
60: ; preds = %53, %83
%61 = phi i64 [ %85, %83 ], [ 0, %53 ]
%62 = phi double [ %84, %83 ], [ %2, %53 ]
%63 = getelementptr inbounds [9 x i32], [9 x i32]* %14, i64 0, i64 %61
%64 = load i32, i32* %63
%65 = freeze i32 %64
%66 = icmp slt i32 %65, 3
br i1 %66, label %83, label %67
67: ; preds = %60
switch i32 %65, label %68 [
i32 8, label %83
i32 6, label %83
]
68: ; preds = %67
%69 = zext i32 %65 to i64
%70 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %69
%71 = load double, double* %70
%72 = fcmp olt double %71, %32
br i1 %72, label %73, label %83
73: ; preds = %68
%74 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %7, i64 0, i64 %69, i64 0
%75 = call i32 @d71234distsq(double* %1, double* %74)
%76 = call double @sqrt(i32 %75)
%77 = fadd double %71, %76
%78 = fcmp olt double %62, %77
br i1 %78, label %83, label %79
79: ; preds = %73
%80 = call i32 @d71234distsq(double* %1, double* %74)
%81 = call double @sqrt(i32 %80)
%82 = fadd double %71, %81
br label %83
83: ; preds = %68, %73, %79, %60, %67, %67
%84 = phi double [ %62, %67 ], [ %62, %67 ], [ %62, %60 ], [ %62, %68 ], [ %82, %79 ], [ %62, %73 ]
%85 = add nuw nsw i64 %61, 1
%86 = load i32, i32* %16
%87 = sext i32 %86 to i64
%88 = icmp slt i64 %85, %87
br i1 %88, label %60, label %56
89: ; preds = %56, %112
%90 = phi i64 [ %114, %112 ], [ 0, %56 ]
%91 = phi double [ %113, %112 ], [ %57, %56 ]
%92 = getelementptr inbounds [9 x i32], [9 x i32]* %15, i64 0, i64 %90
%93 = load i32, i32* %92
%94 = freeze i32 %93
%95 = icmp slt i32 %94, 3
br i1 %95, label %112, label %96
96: ; preds = %89
switch i32 %94, label %97 [
i32 8, label %112
i32 6, label %112
]
97: ; preds = %96
%98 = zext i32 %94 to i64
%99 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %98
%100 = load double, double* %99
%101 = fcmp olt double %100, %32
br i1 %101, label %102, label %112
102: ; preds = %97
%103 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %12, i64 0, i64 %98, i64 0
%104 = call i32 @d71234distsq(double* %0, double* %103)
%105 = call double @sqrt(i32 %104)
%106 = fadd double %100, %105
%107 = fcmp olt double %91, %106
br i1 %107, label %112, label %108
108: ; preds = %102
%109 = call i32 @d71234distsq(double* %0, double* %103)
%110 = call double @sqrt(i32 %109)
%111 = fadd double %100, %110
br label %112
112: ; preds = %97, %102, %108, %89, %96, %96
%113 = phi double [ %91, %96 ], [ %91, %96 ], [ %91, %89 ], [ %91, %97 ], [ %111, %108 ], [ %91, %102 ]
%114 = add nuw nsw i64 %90, 1
%115 = load i32, i32* %17
%116 = sext i32 %115 to i64
%117 = icmp slt i64 %114, %116
br i1 %117, label %89, label %118
118: ; preds = %112, %56, %51
%119 = phi double [ %2, %51 ], [ %57, %56 ], [ %113, %112 ]
%120 = fmul double %119, 0x3FEFFFF583A53B8E
%121 = load i32, i32* %16
%122 = icmp sgt i32 %121, 0
br i1 %122, label %123, label %180
123: ; preds = %118, %174
%124 = phi i32 [ %175, %174 ], [ %121, %118 ]
%125 = phi i64 [ %177, %174 ], [ 0, %118 ]
%126 = phi double [ %176, %174 ], [ %119, %118 ]
%127 = getelementptr inbounds [9 x i32], [9 x i32]* %14, i64 0, i64 %125
%128 = load i32, i32* %127
%129 = freeze i32 %128
%130 = icmp slt i32 %129, 3
br i1 %130, label %174, label %131
131: ; preds = %123
switch i32 %129, label %132 [
i32 8, label %174
i32 6, label %174
]
132: ; preds = %131
%133 = zext i32 %129 to i64
%134 = getelementptr inbounds [9 x double], [9 x double]* %4, i64 0, i64 %133
%135 = load double, double* %134
%136 = fcmp olt double %135, %120
%137 = load i32, i32* %17
%138 = icmp sgt i32 %137, 0
%139 = select i1 %136, i1 %138, i1 false
br i1 %139, label %140, label %174
140: ; preds = %132
%141 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %5, i64 0, i64 %133, i64 0
%142 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %7, i64 0, i64 %133, i64 0
%143 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %10, i64 0, i64 %133, i64 0
%144 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %12, i64 0, i64 %133, i64 0
br label %145
145: ; preds = %140, %166
%146 = phi i32 [ %137, %140 ], [ %167, %166 ]
%147 = phi i64 [ 0, %140 ], [ %169, %166 ]
%148 = phi double [ %126, %140 ], [ %168, %166 ]
%149 = getelementptr inbounds [9 x i32], [9 x i32]* %15, i64 0, i64 %147
%150 = load i32, i32* %149
%151 = freeze i32 %150
%152 = icmp slt i32 %151, 3
br i1 %152, label %166, label %153
153: ; preds = %145
switch i32 %151, label %154 [
i32 8, label %166
i32 6, label %166
]
154: ; preds = %153
%155 = zext i32 %151 to i64
%156 = getelementptr inbounds [9 x double], [9 x double]* %9, i64 0, i64 %155
%157 = load double, double* %156
%158 = fcmp olt double %157, %120
br i1 %158, label %159, label %166
159: ; preds = %154
%160 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %10, i64 0, i64 %155, i64 0
%161 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %12, i64 0, i64 %155, i64 0
%162 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %5, i64 0, i64 %155, i64 0
%163 = getelementptr inbounds [9 x [7 x double]], [9 x [7 x double]]* %7, i64 0, i64 %155, i64 0
%164 = call double @D7Dist_2bds_rev(double* %0, double* %1, double* %141, double* %142, double* %143, double* %144, i32 %129, double* %160, double* %161, double* %162, double* %163, i32 %151, double %148)
%165 = load i32, i32* %17
br label %166
166: ; preds = %154, %159, %145, %153, %153
%167 = phi i32 [ %146, %153 ], [ %146, %153 ], [ %146, %145 ], [ %165, %159 ], [ %146, %154 ]
%168 = phi double [ %148, %153 ], [ %148, %153 ], [ %148, %145 ], [ %164, %159 ], [ %148, %154 ]
%169 = add nuw nsw i64 %147, 1
%170 = sext i32 %167 to i64
%171 = icmp slt i64 %169, %170
br i1 %171, label %145, label %172
172: ; preds = %166
%173 = load i32, i32* %16
br label %174
174: ; preds = %172, %132, %123, %131, %131
%175 = phi i32 [ %124, %131 ], [ %124, %131 ], [ %124, %123 ], [ %124, %132 ], [ %173, %172 ]
%176 = phi double [ %126, %131 ], [ %126, %131 ], [ %126, %123 ], [ %126, %132 ], [ %168, %172 ]
%177 = add nuw nsw i64 %125, 1
%178 = sext i32 %175 to i64
%179 = icmp slt i64 %177, %178
br i1 %179, label %123, label %180
180: ; preds = %174, %118, %3
%181 = phi double [ %2, %3 ], [ %119, %118 ], [ %176, %174 ]
ret double %181
}