#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 DBL_MAX;
double d7dotprod(double *, double *);
int sqrt(int);
double d7bddist(double gvec[7], int bdnum) {
  double D7N_1x[7] = {-1. / sqrt(2.), 1. / sqrt(2.), 0., 0., 0., 0., 0.};
  double D7N_2x[7] = {0., -1. / sqrt(2.), 1. / sqrt(2.), 0., 0., 0., 0.};
  double D7N_3x[7] = {0., 0., -1. / sqrt(2.), 1. / sqrt(2.), 0., 0., 0.};
  double D7N_4x[7] = {-3 / (2 * sqrt(21)), 2 / sqrt(21),  2 / sqrt(21),
                      -3 / (2 * sqrt(21)), -2 / sqrt(21), 3 / (2 * sqrt(21)),
                      3 / (2 * sqrt(21))};
  double D7N_5x[7] = {
      2 / sqrt(21),  -3 / (2 * sqrt(21)), -3 / (2 * sqrt(21)), 2 / sqrt(21),
      -2 / sqrt(21), 3 / (2 * sqrt(21)),  3 / (2 * sqrt(21))};
  double D7N_6x[7] = {2 / sqrt(21),        -3 / (2 * sqrt(21)), 2 / sqrt(21),
                      -3 / (2 * sqrt(21)), 3 / (2 * sqrt(21)),  -2 / sqrt(21),
                      3 / (2 * sqrt(21))};
  double D7N_7x[7] = {
      -3 / (2 * sqrt(21)), 2 / sqrt(21),  -3 / (2 * sqrt(21)), 2 / sqrt(21),
      3 / (2 * sqrt(21)),  -2 / sqrt(21), 3 / (2 * sqrt(21))};
  double D7N_8x[7] = {2 / sqrt(21),        2 / sqrt(21),
                      -3 / (2 * sqrt(21)), -3 / (2 * sqrt(21)),
                      3 / (2 * sqrt(21)),  3 / (2 * sqrt(21)),
                      -2 / sqrt(21)};
  double D7N_9x[7] = {
      -3 / (2 * sqrt(21)), -3 / (2 * sqrt(21)), 2 / sqrt(21), 2 / sqrt(21),
      3 / (2 * sqrt(21)),  3 / (2 * sqrt(21)),  -2 / sqrt(21)};
  if (bdnum < 9) {
    switch (bdnum) {
    case (0):
      return -d7dotprod(D7N_1x, gvec);
      break;
    case (1):
      return -d7dotprod(D7N_2x, gvec);
      break;
    case (2):
      return -d7dotprod(D7N_3x, gvec);
      break;
    case (3):
      return -d7dotprod(D7N_4x, gvec);
      break;
    case (4):
      return -d7dotprod(D7N_5x, gvec);
      break;
    case (5):
      return -d7dotprod(D7N_6x, gvec);
      break;
    case (6):
      return -d7dotprod(D7N_7x, gvec);
      break;
    case (7):
      return -d7dotprod(D7N_8x, gvec);
      break;
    case (8):
      return -d7dotprod(D7N_9x, gvec);
      break;
    default:
      return DBL_MAX;
      break;
    }
  }
  return DBL_MAX;
}


x86 assembly (clang, -O0):
<d7bddist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    $0x2,%edi
call   1040 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec0(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    $0x2,%edi
call   1040 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe99(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    $0x2,%edi
call   1040 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe4f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    $0x2,%edi
call   1040 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe25(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    $0x2,%edi
call   1040 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xdd8(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    $0x2,%edi
call   1040 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xdae(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x188(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1d0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1c8(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1c0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1b8(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1b0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1a8(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x210(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x208(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x200(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1f8(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1f0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1e8(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x1e0(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x250(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x248(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x240(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x238(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x230(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x228(%rbp)
ff
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x220(%rbp)
ff
cmpl   $0x9,-0x14(%rbp)
jge    1a07 <d7bddist+0x8e7>
mov    -0x14(%rbp),%eax
mov    %rax,-0x258(%rbp)
sub    $0x8,%rax
ja     19f2 <d7bddist+0x8d2>
mov    -0x258(%rbp),%rax
lea    0x7dd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0xd0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0x150(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0x190(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0x1d0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
lea    -0x250(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <d7dotprod@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
mov    0x25e7(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1a17 <d7bddist+0x8f7>
mov    0x25d2(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d7bddist>:
push   %rbp
push   %r14
push   %rbx
sub    $0x240,%rsp
mov    %esi,%ebp
mov    %rdi,%r14
mov    $0x2,%edi
call   1040 <sqrt@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1040 <sqrt@plt>
movd   %ebx,%xmm0
movd   %eax,%xmm1
punpckldq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
movapd 0xea2(%rip),%xmm1
divpd  %xmm0,%xmm1
movapd %xmm1,0x200(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x210(%rsp)
movapd %xmm0,0x220(%rsp)
movq   $0x0,0x230(%rsp)
movq   $0x0,0x1c0(%rsp)
mov    $0x2,%edi
call   1040 <sqrt@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1040 <sqrt@plt>
movd   %ebx,%xmm0
movd   %eax,%xmm1
punpckldq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
movapd 0xe39(%rip),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x1c8(%rsp)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x1d8(%rsp)
movupd %xmm0,0x1e8(%rsp)
movapd %xmm0,0x180(%rsp)
mov    $0x2,%edi
call   1040 <sqrt@plt>
mov    %eax,%ebx
mov    $0x2,%edi
call   1040 <sqrt@plt>
movd   %ebx,%xmm0
movd   %eax,%xmm1
punpckldq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
movapd 0xddf(%rip),%xmm1
divpd  %xmm0,%xmm1
movapd %xmm1,0x190(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x1a0(%rsp)
movq   $0x0,0x1b0(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x140(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x148(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x150(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x158(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x160(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x168(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x170(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x100(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x108(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x110(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x118(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x120(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x128(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x130(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xc0(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xc8(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xd0(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xd8(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xe0(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xe8(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xf0(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x80(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x88(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x90(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x98(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xa0(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xa8(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0xb0(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x40(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x48(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x50(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x58(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x60(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x68(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x70(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xfffffffd,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x2,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0x3,%eax
xor    %edx,%edx
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x28(%rsp)
mov    $0x15,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0xfffffffe,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
cmp    $0x8,%ebp
jg     186f <d7bddist+0x74f>
ja     186f <d7bddist+0x74f>
mov    %ebp,%eax
lea    0x7d4(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x200(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
mov    0x276a(%rip),%rax
movsd  (%rax),%xmm0
jmp    18d2 <d7bddist+0x7b2>
lea    0x1c0(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
lea    0x180(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
lea    0x140(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
lea    0x100(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
lea    0xc0(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
lea    0x80(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
lea    0x40(%rsp),%rdi
jmp    18c2 <d7bddist+0x7a2>
mov    %rsp,%rdi
mov    %r14,%rsi
call   1030 <d7dotprod@plt>
xorpd  0x73e(%rip),%xmm0
add    $0x240,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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