int nearnd_(double *p, int *ist, int *n, double *x, double *y, double *z__,
            int *list, int *lptr, int *lend, double *al) {
  int ret_val, i__1;
  static int l;
  static double b1, b2, b3;
  static int i1, i2, i3, n1, n2, n3, lp, nn, nr;
  static double ds1;
  static int lp1, lp2;
  static double dx1, dx2, dx3, dy1, dy2, dy3, dz1, dz2, dz3;
  static int lpl;
  static double dsr;
  static int nst, listp[25], lptrp[25];
  --p;
  --lend;
  --z__;
  --y;
  --x;
  --list;
  --lptr;
  nn = *n;
  if (nn < 3) {
    goto L6;
  }
  nst = *ist;
  if (nst < 1 || nst > nn) {
    nst = 1;
  }
  trfind_(&nst, &p[1], n, &x[1], &y[1], &z__[1], &list[1], &lptr[1], &lend[1],
          &b1, &b2, &b3, &i1, &i2, &i3);
  if (i1 == 0) {
    goto L6;
  }
  if (i3 != 0) {
    listp[0] = i1;
    lptrp[0] = 2;
    listp[1] = i2;
    lptrp[1] = 3;
    listp[2] = i3;
    lptrp[2] = 1;
    l = 3;
  } else {
    n1 = i1;
    l = 1;
    lp1 = 2;
    listp[l - 1] = n1;
    lptrp[l - 1] = lp1;
  L1:
    lpl = lend[n1];
    n1 = -list[lpl];
    l = lp1;
    lp1 = l + 1;
    listp[l - 1] = n1;
    lptrp[l - 1] = lp1;
    if (n1 != i2 && lp1 < 25) {
      goto L1;
    }
    l = lp1;
    listp[l - 1] = 0;
    lptrp[l - 1] = 1;
  }
  lp2 = 1;
  n2 = i1;
  lp1 = lptrp[0];
  n1 = listp[lp1 - 1];
L2:
  lp = lstptr_(&lend[n1], &n2, &list[1], &lptr[1]);
  if (list[lp] < 0) {
    goto L3;
  }
  lp = lptr[lp];
  n3 = (i__1 = list[lp], ((i__1) >= 0 ? (i__1) : -(i__1)));
  if (l == 25) {
    goto L4;
  }
  dx1 = x[n1] - p[1];
  dy1 = y[n1] - p[2];
  dz1 = z__[n1] - p[3];
  dx2 = x[n2] - p[1];
  dy2 = y[n2] - p[2];
  dz2 = z__[n2] - p[3];
  dx3 = x[n3] - p[1];
  dy3 = y[n3] - p[2];
  dz3 = z__[n3] - p[3];
  if (dx3 * (dy2 * dz1 - dy1 * dz2) - dy3 * (dx2 * dz1 - dx1 * dz2) +
          dz3 * (dx2 * dy1 - dx1 * dy2) <=
      0.) {
    goto L3;
  }
  ++l;
  lptrp[lp2 - 1] = l;
  listp[l - 1] = n3;
  lptrp[l - 1] = lp1;
  lp1 = l;
  n1 = n3;
  goto L2;
L3:
  if (lp1 == 1) {
    goto L4;
  }
  lp2 = lp1;
  n2 = n1;
  lp1 = lptrp[lp1 - 1];
  n1 = listp[lp1 - 1];
  if (n1 == 0) {
    goto L4;
  }
  goto L2;
L4:
  nr = i1;
  dsr = -(x[nr] * p[1] + y[nr] * p[2] + z__[nr] * p[3]);
  i__1 = l;
  for (lp = 2; lp <= i__1; ++lp) {
    n1 = listp[lp - 1];
    if (n1 == 0) {
      goto L5;
    }
    ds1 = -(x[n1] * p[1] + y[n1] * p[2] + z__[n1] * p[3]);
    if (ds1 < dsr) {
      nr = n1;
      dsr = ds1;
    }
  L5:;
  }
  dsr = -dsr;
  if (dsr > 1.) {
    dsr = 1.;
  }
  *al = acos(dsr);
  ret_val = nr;
  return ret_val;
L6:
  ret_val = 0;
  return ret_val;
}


x86 assembly (clang, -O0):
<nearnd_>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %rcx,-0x50(%rbp)
mov    %r8,-0x58(%rbp)
mov    %r9,-0x60(%rbp)
mov    -0x38(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x38(%rbp)
mov    0x20(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,0x20(%rbp)
mov    -0x60(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x58(%rbp)
mov    -0x50(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x50(%rbp)
mov    0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,0x10(%rbp)
mov    0x18(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,0x18(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%eax
mov    %eax,0x2ec0(%rip)
cmpl   $0x3,0x2eb9(%rip)
jge    11de <nearnd_+0xae>
jmp    1aa9 <nearnd_+0x979>
mov    -0x40(%rbp),%rax
mov    (%rax),%eax
mov    %eax,0x2f16(%rip)
cmpl   $0x1,0x2f0f(%rip)
jl     1209 <nearnd_+0xd9>
mov    0x2f03(%rip),%eax
cmp    0x2e89(%rip),%eax
jle    1213 <nearnd_+0xe3>
movl   $0x1,0x2eed(%rip)
mov    -0x38(%rbp),%rsi
add    $0x8,%rsi
mov    -0x48(%rbp),%rdx
mov    -0x50(%rbp),%rcx
add    $0x8,%rcx
mov    -0x58(%rbp),%r8
add    $0x8,%r8
mov    -0x60(%rbp),%r9
add    $0x8,%r9
mov    0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x78(%rbp)
mov    0x18(%rbp),%r13
add    $0x4,%r13
mov    0x20(%rbp),%r12
add    $0x4,%r12
lea    0x2ea6(%rip),%rdi
lea    0x2df7(%rip),%r15
lea    0x2df8(%rip),%r14
lea    0x2df9(%rip),%rbx
lea    0x2dfa(%rip),%r11
lea    0x2df7(%rip),%r10
lea    0x2df4(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x70(%rbp),%rax
mov    %r13,0x8(%rsp)
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
mov    %r14,0x20(%rsp)
mov    %rbx,0x28(%rsp)
mov    %r11,0x30(%rsp)
mov    %r10,0x38(%rsp)
mov    %rax,0x40(%rsp)
mov    $0x0,%al
call   1040 <trfind_@plt>
cmpl   $0x0,0x2da6(%rip)
jne    12d5 <nearnd_+0x1a5>
jmp    1aa9 <nearnd_+0x979>
cmpl   $0x0,0x2d9c(%rip)
je     1333 <nearnd_+0x203>
mov    0x2d88(%rip),%eax
mov    %eax,0x2e22(%rip)
movl   $0x2,0x2e88(%rip)
mov    0x2d76(%rip),%eax
mov    %eax,0x2e10(%rip)
movl   $0x3,0x2e76(%rip)
mov    0x2d64(%rip),%eax
mov    %eax,0x2dfe(%rip)
movl   $0x1,0x2e64(%rip)
movl   $0x3,0x2d22(%rip)
jmp    146c <nearnd_+0x33c>
mov    0x2d37(%rip),%eax
mov    %eax,0x2d3d(%rip)
movl   $0x1,0x2d07(%rip)
movl   $0x2,0x2d4d(%rip)
mov    0x2d23(%rip),%edx
mov    0x2cf1(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2da4(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x2d2b(%rip),%edx
mov    0x2cd5(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2df8(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x20(%rbp),%rax
movslq 0x2ce6(%rip),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,0x2d51(%rip)
mov    0x10(%rbp),%rcx
movslq 0x2d46(%rip),%rdx
xor    %eax,%eax
sub    (%rcx,%rdx,4),%eax
mov    %eax,0x2cc7(%rip)
mov    0x2ce5(%rip),%eax
mov    %eax,0x2c8f(%rip)
mov    0x2c89(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2cd0(%rip)
mov    0x2ca6(%rip),%edx
mov    0x2c74(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d27(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x2cae(%rip),%edx
mov    0x2c58(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d7b(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x2c6e(%rip),%eax
cmp    0x2c60(%rip),%eax
je     142c <nearnd_+0x2fc>
cmpl   $0x19,0x2c7f(%rip)
jge    142c <nearnd_+0x2fc>
jmp    138b <nearnd_+0x25b>
mov    0x2c6e(%rip),%eax
mov    %eax,0x2c18(%rip)
mov    0x2c12(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2cc5(%rip),%rax
movl   $0x0,(%rax,%rcx,4)
mov    0x2bf8(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2d1b(%rip),%rax
movl   $0x1,(%rax,%rcx,4)
movl   $0x1,0x2c2e(%rip)
mov    0x2bf4(%rip),%eax
mov    %eax,0x2bfe(%rip)
mov    0x2cf8(%rip),%eax
mov    %eax,0x2c12(%rip)
mov    0x2c0c(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2c6f(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,0x2bd2(%rip)
mov    0x20(%rbp),%rdi
movslq 0x2bc7(%rip),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    0x10(%rbp),%rdx
add    $0x4,%rdx
mov    0x18(%rbp),%rcx
add    $0x4,%rcx
lea    0x2bad(%rip),%rsi
mov    $0x0,%al
call   1030 <lstptr_@plt>
mov    %eax,0x2ba8(%rip)
mov    0x10(%rbp),%rax
movslq 0x2b9d(%rip),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jge    14fa <nearnd_+0x3ca>
jmp    1812 <nearnd_+0x6e2>
mov    0x18(%rbp),%rax
movslq 0x2b83(%rip),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,0x2b7a(%rip)
mov    0x10(%rbp),%rax
movslq 0x2b6f(%rip),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x68(%rbp)
cmpl   $0x0,-0x68(%rbp)
jl     1534 <nearnd_+0x404>
mov    -0x68(%rbp),%eax
mov    %eax,-0x7c(%rbp)
jmp    153c <nearnd_+0x40c>
xor    %eax,%eax
sub    -0x68(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    %eax,0x2b3f(%rip)
cmpl   $0x19,0x2b04(%rip)
jne    1557 <nearnd_+0x427>
jmp    188b <nearnd_+0x75b>
mov    -0x50(%rbp),%rax
movslq 0x2b1a(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,0x2b30(%rip)
mov    -0x58(%rbp),%rax
movslq 0x2af9(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,0x2b27(%rip)
mov    -0x60(%rbp),%rax
movslq 0x2ad8(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x18(%rax),%xmm0
movsd  %xmm0,0x2b1e(%rip)
mov    -0x50(%rbp),%rax
movslq 0x2abb(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,0x2ad5(%rip)
mov    -0x58(%rbp),%rax
movslq 0x2a9a(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,0x2acc(%rip)
mov    -0x60(%rbp),%rax
movslq 0x2a79(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x18(%rax),%xmm0
movsd  %xmm0,0x2ac3(%rip)
mov    -0x50(%rbp),%rax
movslq 0x2a5c(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,0x2a7a(%rip)
mov    -0x58(%rbp),%rax
movslq 0x2a3b(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x10(%rax),%xmm0
movsd  %xmm0,0x2a71(%rip)
mov    -0x60(%rbp),%rax
movslq 0x2a1a(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
subsd  0x18(%rax),%xmm0
movsd  %xmm0,0x2a68(%rip)
movsd  0x2a30(%rip),%xmm0
movsd  0x2a38(%rip),%xmm2
movsd  0x2a40(%rip),%xmm3
movsd  0x2a20(%rip),%xmm1
mulsd  0x2a38(%rip),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0x2a01(%rip),%xmm1
movsd  0x29d9(%rip),%xmm3
movsd  0x29f9(%rip),%xmm5
movsd  0x29c1(%rip),%xmm4
mulsd  0x29f1(%rip),%xmm4
movq   %xmm4,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm4
mulsd  %xmm5,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0x29af(%rip),%xmm1
movsd  0x296f(%rip),%xmm2
movsd  0x2977(%rip),%xmm4
movsd  0x2957(%rip),%xmm3
mulsd  0x296f(%rip),%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     1792 <nearnd_+0x662>
jmp    1812 <nearnd_+0x6e2>
mov    0x28b8(%rip),%eax
add    $0x1,%eax
mov    %eax,0x28af(%rip)
mov    0x28a9(%rip),%edx
mov    0x28f7(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x29c6(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x28c1(%rip),%edx
mov    0x2887(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x293a(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x28c1(%rip),%edx
mov    0x286b(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x298e(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    0x2855(%rip),%eax
mov    %eax,0x289f(%rip)
mov    0x287d(%rip),%eax
mov    %eax,0x286f(%rip)
jmp    14aa <nearnd_+0x37a>
cmpl   $0x1,0x2887(%rip)
jne    1824 <nearnd_+0x6f4>
jmp    188b <nearnd_+0x75b>
mov    0x2876(%rip),%eax
mov    %eax,0x2874(%rip)
mov    0x2846(%rip),%eax
mov    %eax,0x2844(%rip)
mov    0x285e(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x2931(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,0x2848(%rip)
mov    0x2842(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x28a5(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,0x2808(%rip)
cmpl   $0x0,0x2801(%rip)
jne    1886 <nearnd_+0x756>
jmp    188b <nearnd_+0x75b>
jmp    14aa <nearnd_+0x37a>
mov    0x27df(%rip),%eax
mov    %eax,0x27f9(%rip)
mov    -0x50(%rbp),%rax
movslq 0x27ee(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x58(%rbp),%rax
movslq 0x27d5(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x60(%rbp),%rax
movslq 0x27b4(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,0x27e7(%rip)
mov    0x2739(%rip),%eax
mov    %eax,-0x68(%rbp)
movl   $0x2,0x2764(%rip)
mov    0x275e(%rip),%eax
cmp    -0x68(%rbp),%eax
jg     1a2f <nearnd_+0x8ff>
mov    0x274f(%rip),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    0x27ca(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,0x272d(%rip)
cmpl   $0x0,0x2726(%rip)
jne    1961 <nearnd_+0x831>
jmp    1a16 <nearnd_+0x8e6>
mov    -0x50(%rbp),%rax
movslq 0x2710(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x38(%rbp),%rax
movsd  0x8(%rax),%xmm2
mov    -0x58(%rbp),%rax
movslq 0x26f7(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x60(%rbp),%rax
movslq 0x26d6(%rip),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,0x26bd(%rip)
movsd  0x26b5(%rip),%xmm1
movsd  0x270d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1a11 <nearnd_+0x8e1>
mov    0x2681(%rip),%eax
mov    %eax,0x268f(%rip)
movsd  0x268f(%rip),%xmm0
movsd  %xmm0,0x26e7(%rip)
jmp    1a16 <nearnd_+0x8e6>
jmp    1a1b <nearnd_+0x8eb>
mov    0x2667(%rip),%eax
add    $0x1,%eax
mov    %eax,0x265e(%rip)
jmp    1924 <nearnd_+0x7f4>
movsd  0x26c1(%rip),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,0x26a2(%rip)
movsd  0x269a(%rip),%xmm0
movsd  0x59a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1a80 <nearnd_+0x950>
movsd  0x588(%rip),%xmm0
movsd  %xmm0,0x2678(%rip)
movsd  0x2670(%rip),%xmm0
call   1050 <acos@plt>
mov    0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    0x25f5(%rip),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1ab6 <nearnd_+0x986>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearnd_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    (%rdx),%eax
xor    %r14d,%r14d
cmp    $0x3,%eax
jl     15c1 <nearnd_+0x491>
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdi,%r13
mov    0x50(%rsp),%rbx
mov    (%rsi),%ecx
cmp    %eax,%ecx
mov    $0x1,%eax
mov    %ecx,%esi
cmovg  %eax,%esi
test   %ecx,%ecx
cmovle %eax,%esi
mov    %esi,0x2f20(%rip)
lea    0x2f19(%rip),%rdi
sub    $0x8,%rsp
lea    0x2ef6(%rip),%r10
lea    0x2eeb(%rip),%r11
lea    0x2ee0(%rip),%rbp
xor    %r14d,%r14d
mov    %r13,%rsi
mov    %r12,%rcx
mov    %r9,0x8(%rsp)
mov    0x8(%rsp),%r9
xor    %eax,%eax
push   %r10
push   %r11
push   %rbp
lea    0x2eb7(%rip),%rbp
push   %rbp
lea    0x2ea7(%rip),%rbp
push   %rbp
lea    0x2e97(%rip),%rbp
push   %rbp
push   %rbx
push   0x88(%rsp)
push   0x88(%rsp)
call   1040 <trfind_@plt>
mov    0x50(%rsp),%rax
add    $0x50,%rsp
mov    0x2e8a(%rip),%r8d
test   %r8d,%r8d
je     15c1 <nearnd_+0x491>
mov    %rax,%r14
add    $0xfffffffffffffffc,%rbx
mov    0x2e7c(%rip),%eax
test   %eax,%eax
je     124d <nearnd_+0x11d>
mov    %r8d,0x2e99(%rip)
movl   $0x2,0x2eff(%rip)
mov    0x2e5d(%rip),%ecx
mov    %ecx,0x2e87(%rip)
movabs $0x100000003,%rcx
mov    %rcx,0x2ee6(%rip)
mov    %eax,0x2e74(%rip)
movl   $0x3,0x2e12(%rip)
mov    $0x2,%eax
mov    0x40(%rsp),%rdx
jmp    12d3 <nearnd_+0x1a3>
mov    %r8d,0x2e28(%rip)
movl   $0x2,0x2e2a(%rip)
mov    %r8d,0x2e3b(%rip)
movl   $0x2,0x2ea1(%rip)
mov    $0x2,%edi
mov    0x2dfa(%rip),%esi
lea    0x2e1f(%rip),%rcx
lea    0x2e88(%rip),%r9
mov    %r8d,%eax
mov    0x40(%rsp),%rdx
cltq
movslq (%rbx,%rax,4),%rbp
xor    %eax,%eax
sub    -0x4(%rdx,%rbp,4),%eax
lea    0x1(%rdi),%rbp
mov    %eax,-0x4(%rcx,%rdi,4)
mov    %ebp,-0x4(%r9,%rdi,4)
cmp    %eax,%esi
je     12b6 <nearnd_+0x186>
cmp    $0x18,%rdi
mov    %rbp,%rdi
jb     1290 <nearnd_+0x160>
mov    %ebp,0x2d94(%rip)
movl   $0x0,-0x4(%rcx,%rbp,4)
movl   $0x1,-0x4(%r9,%rbp,4)
mov    0x2e3d(%rip),%eax
movl   $0x1,0x2daf(%rip)
mov    %r8d,0x2d9c(%rip)
mov    %eax,0x2d9e(%rip)
cltq
lea    0x2dad(%rip),%rbp
mov    -0x4(%rbp,%rax,4),%eax
jmp    133a <nearnd_+0x20a>
nopl   0x0(%rax)
lea    0x1(%rcx),%edi
mov    %edi,0x2d47(%rip)
movslq 0x2d7c(%rip),%rsi
mov    %rbx,%r8
mov    %rbp,%rbx
lea    0x2df3(%rip),%rbp
mov    %edi,-0x4(%rbp,%rsi,4)
mov    %eax,(%rbx,%rcx,4)
mov    0x2d5e(%rip),%esi
mov    %esi,0x0(%rbp,%rcx,4)
mov    %rbx,%rbp
mov    %r8,%rbx
mov    %edi,0x2d4e(%rip)
mov    %eax,0x2d3c(%rip)
cltq
lea    (%rbx,%rax,4),%rdi
lea    0x2d33(%rip),%rsi
mov    0x48(%rsp),%rcx
xor    %eax,%eax
call   1030 <lstptr_@plt>
mov    0x40(%rsp),%rdx
cltq
cmpl   $0x0,-0x4(%rdx,%rax,4)
js     146c <nearnd_+0x33c>
mov    0x48(%rsp),%rcx
movslq -0x4(%rcx,%rax,4),%rax
mov    -0x4(%rdx,%rax,4),%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
movslq 0x2cc9(%rip),%rcx
cmp    $0x19,%rcx
je     14af <nearnd_+0x37f>
movslq 0x2ce4(%rip),%rsi
movsd  -0x8(%r12,%rsi,8),%xmm8
movsd  0x0(%r13),%xmm5
movsd  0x8(%r13),%xmm4
subsd  %xmm5,%xmm8
movsd  -0x8(%r15,%rsi,8),%xmm9
subsd  %xmm4,%xmm9
movsd  -0x8(%r14,%rsi,8),%xmm3
movsd  0x10(%r13),%xmm7
subsd  %xmm7,%xmm3
movslq 0x2cac(%rip),%rsi
movsd  -0x8(%r12,%rsi,8),%xmm2
subsd  %xmm5,%xmm2
movsd  -0x8(%r15,%rsi,8),%xmm6
subsd  %xmm4,%xmm6
movsd  -0x8(%r14,%rsi,8),%xmm0
subsd  %xmm7,%xmm0
mov    %eax,%esi
movsd  -0x8(%r12,%rsi,8),%xmm1
subsd  %xmm5,%xmm1
movsd  -0x8(%r15,%rsi,8),%xmm5
subsd  %xmm4,%xmm5
movsd  -0x8(%r14,%rsi,8),%xmm10
subsd  %xmm7,%xmm10
movapd %xmm0,%xmm7
mulsd  %xmm9,%xmm7
movapd %xmm6,%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm7,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm8,%xmm0
mulsd  %xmm2,%xmm3
subsd  %xmm0,%xmm3
mulsd  %xmm5,%xmm3
subsd  %xmm3,%xmm4
mulsd  %xmm8,%xmm6
mulsd  %xmm9,%xmm2
subsd  %xmm6,%xmm2
mulsd  %xmm10,%xmm2
addsd  %xmm4,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm2,%xmm0
jb     1300 <nearnd_+0x1d0>
movslq 0x2c15(%rip),%rax
cmp    $0x1,%rax
je     14af <nearnd_+0x37f>
mov    %eax,0x2c0d(%rip)
mov    0x2bf7(%rip),%ecx
mov    %ecx,0x2bf5(%rip)
lea    0x2c7e(%rip),%rcx
movslq -0x4(%rcx,%rax,4),%rax
mov    %eax,0x2beb(%rip)
mov    -0x4(%rbp,%rax,4),%eax
mov    %eax,0x2bd5(%rip)
test   %eax,%eax
jne    1340 <nearnd_+0x210>
movslq 0x2bba(%rip),%rax
mov    %eax,0x2bc8(%rip)
movsd  0x0(%r13),%xmm1
movsd  0x8(%r13),%xmm2
movsd  -0x8(%r15,%rax,8),%xmm0
mulsd  %xmm2,%xmm0
movsd  -0x8(%r12,%rax,8),%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm0,%xmm4
movsd  0x10(%r13),%xmm3
movsd  -0x8(%r14,%rax,8),%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm4,%xmm0
xorpd  0xb01(%rip),%xmm0
mov    0x2b4b(%rip),%eax
cmp    $0x2,%eax
jge    1511 <nearnd_+0x3e1>
mov    0x58(%rsp),%rbx
jmp    1588 <nearnd_+0x458>
add    $0xffffffffffffffff,%rax
xor    %ecx,%ecx
movapd 0xae1(%rip),%xmm4
mov    0x58(%rsp),%rbx
jmp    1539 <nearnd_+0x409>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rcx
cmp    %rcx,%rax
je     1582 <nearnd_+0x452>
movslq 0x4(%rbp,%rcx,4),%rdx
test   %rdx,%rdx
je     1530 <nearnd_+0x400>
movsd  -0x8(%r15,%rdx,8),%xmm5
mulsd  %xmm2,%xmm5
movsd  -0x8(%r12,%rdx,8),%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm5,%xmm6
movsd  -0x8(%r14,%rdx,8),%xmm5
mulsd  %xmm3,%xmm5
addsd  %xmm6,%xmm5
xorpd  %xmm4,%xmm5
ucomisd %xmm5,%xmm0
jbe    1530 <nearnd_+0x400>
mov    %edx,0x2b08(%rip)
movapd %xmm5,%xmm0
jmp    1530 <nearnd_+0x400>
mov    %edx,0x2af4(%rip)
movapd 0xa70(%rip),%xmm1
xorpd  %xmm0,%xmm1
cmpltsd 0xa73(%rip),%xmm0
movsd  0xa73(%rip),%xmm2
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
call   1050 <acos@plt>
movsd  %xmm0,(%rbx)
mov    0x2ac3(%rip),%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@nearnd_.l = internal unnamed_addr global i32 0
@nearnd_.b1 = internal global double 0.000000e+00
@nearnd_.b2 = internal global double 0.000000e+00
@nearnd_.b3 = internal global double 0.000000e+00
@nearnd_.i1 = internal global i32 0
@nearnd_.i2 = internal global i32 0
@nearnd_.i3 = internal global i32 0
@nearnd_.n1 = internal unnamed_addr global i32 0
@nearnd_.n2 = internal global i32 0
@nearnd_.nr = internal unnamed_addr global i32 0
@nearnd_.lp1 = internal unnamed_addr global i32 0
@nearnd_.lp2 = internal unnamed_addr global i32 0
@nearnd_.nst = internal global i32 0
@nearnd_.listp = internal unnamed_addr global [25 x i32] zeroinitializer
@nearnd_.lptrp = internal unnamed_addr global [25 x i32] zeroinitializer
define i32 @nearnd_(double* %0, i32* nocapture %1, i32* %2, double* %3, double* %4, double* %5, i32* %6, i32* %7, i32* %8, double* nocapture writeonly %9) {
%11 = getelementptr inbounds i32, i32* %8, i64 -1
%12 = getelementptr inbounds double, double* %5, i64 -1
%13 = getelementptr inbounds double, double* %4, i64 -1
%14 = getelementptr inbounds double, double* %3, i64 -1
%15 = getelementptr inbounds i32, i32* %6, i64 -1
%16 = getelementptr inbounds i32, i32* %7, i64 -1
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 3
br i1 %18, label %213, label %19
19: ; preds = %10
%20 = load i32, i32* %1
%21 = icmp slt i32 %20, 1
%22 = icmp sgt i32 %20, %17
%23 = select i1 %21, i1 true, i1 %22
%24 = select i1 %23, i32 1, i32 %20
store i32 %24, i32* @nearnd_.nst
%25 = tail call i32 (i32*, double*, i32*, double*, double*, double*, i32*, i32*, i32*, double*, double*, double*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @trfind_ to i32 (i32*, double*, i32*, double*, double*, double*, i32*, i32*, i32*, double*, double*, double*, i32*, i32*, i32*, ...)*)(i32* @nearnd_.nst, double* %0, i32* %2, double* %3, double* %4, double* %5, i32* %6, i32* %7, i32* %8, double* @nearnd_.b1, double* @nearnd_.b2, double* @nearnd_.b3, i32* @nearnd_.i1, i32* @nearnd_.i2, i32* @nearnd_.i3)
%26 = load i32, i32* @nearnd_.i1
%27 = icmp eq i32 %26, 0
br i1 %27, label %213, label %28
28: ; preds = %19
%29 = load i32, i32* @nearnd_.i3
%30 = icmp eq i32 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %28
store i32 %26, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 0)
store i32 2, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 0)
%32 = load i32, i32* @nearnd_.i2
store i32 %32, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 1)
store i32 3, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 1)
store i32 %29, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 2)
store i32 1, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 2)
store i32 3, i32* @nearnd_.l
br label %58
33: ; preds = %28
store i32 %26, i32* @nearnd_.n1
store i32 2, i32* @nearnd_.lp1
store i32 %26, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 0)
store i32 2, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 0)
%34 = load i32, i32* @nearnd_.i2
br label %35
35: ; preds = %35, %33
%36 = phi i64 [ %45, %35 ], [ 2, %33 ]
%37 = phi i32 [ %44, %35 ], [ %26, %33 ]
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i32, i32* %11, i64 %38
%40 = load i32, i32* %39
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %15, i64 %41
%43 = load i32, i32* %42
%44 = sub nsw i32 0, %43
%45 = add nuw nsw i64 %36, 1
%46 = add nsw i64 %36, -1
%47 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 %46
store i32 %44, i32* %47
%48 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 %46
%49 = trunc i64 %45 to i32
store i32 %49, i32* %48
%50 = icmp ne i32 %34, %44
%51 = icmp ult i64 %36, 24
%52 = select i1 %50, i1 %51, i1 false
br i1 %52, label %35, label %53
53: ; preds = %35
%54 = trunc i64 %45 to i32
store i32 %54, i32* @nearnd_.l
%55 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 %36
store i32 0, i32* %55
%56 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 %36
store i32 1, i32* %56
%57 = load i32, i32* getelementptr inbounds ([25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 0)
br label %58
58: ; preds = %53, %31
%59 = phi i32 [ %57, %53 ], [ 2, %31 ]
store i32 1, i32* @nearnd_.lp2
store i32 %26, i32* @nearnd_.n2
store i32 %59, i32* @nearnd_.lp1
%60 = add nsw i32 %59, -1
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 %61
%63 = load i32, i32* %62
store i32 %63, i32* @nearnd_.n1
%64 = getelementptr inbounds double, double* %0, i64 1
%65 = getelementptr inbounds double, double* %0, i64 2
br label %66
66: ; preds = %143, %58
%67 = phi i32 [ %63, %58 ], [ %144, %143 ]
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i32, i32* %11, i64 %68
%70 = tail call i32 (i32*, i32*, i32*, i32*, ...) bitcast (i32 (...)* @lstptr_ to i32 (i32*, i32*, i32*, i32*, ...)*)(i32* %69, i32* @nearnd_.n2, i32* %6, i32* %7)
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i32, i32* %15, i64 %71
%73 = load i32, i32* %72
%74 = icmp slt i32 %73, 0
br i1 %74, label %145, label %75
75: ; preds = %66
%76 = getelementptr inbounds i32, i32* %16, i64 %71
%77 = load i32, i32* %76
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i32, i32* %15, i64 %78
%80 = load i32, i32* %79
%81 = tail call i32 @llvm.abs.i32(i32 %80, i1 true)
%82 = load i32, i32* @nearnd_.l
%83 = icmp eq i32 %82, 25
br i1 %83, label %159, label %84
84: ; preds = %75
%85 = load i32, i32* @nearnd_.n1
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds double, double* %14, i64 %86
%88 = load double, double* %87
%89 = load double, double* %0
%90 = fsub double %88, %89
%91 = getelementptr inbounds double, double* %13, i64 %86
%92 = load double, double* %91
%93 = load double, double* %64
%94 = fsub double %92, %93
%95 = getelementptr inbounds double, double* %12, i64 %86
%96 = load double, double* %95
%97 = load double, double* %65
%98 = fsub double %96, %97
%99 = load i32, i32* @nearnd_.n2
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %14, i64 %100
%102 = load double, double* %101
%103 = fsub double %102, %89
%104 = getelementptr inbounds double, double* %13, i64 %100
%105 = load double, double* %104
%106 = fsub double %105, %93
%107 = getelementptr inbounds double, double* %12, i64 %100
%108 = load double, double* %107
%109 = fsub double %108, %97
%110 = zext i32 %81 to i64
%111 = getelementptr inbounds double, double* %14, i64 %110
%112 = load double, double* %111
%113 = fsub double %112, %89
%114 = getelementptr inbounds double, double* %13, i64 %110
%115 = load double, double* %114
%116 = fsub double %115, %93
%117 = getelementptr inbounds double, double* %12, i64 %110
%118 = load double, double* %117
%119 = fsub double %118, %97
%120 = fneg double %94
%121 = fmul double %109, %120
%122 = tail call double @llvm.fmuladd.f64(double %106, double %98, double %121)
%123 = fneg double %90
%124 = fmul double %109, %123
%125 = tail call double @llvm.fmuladd.f64(double %103, double %98, double %124)
%126 = fneg double %116
%127 = fmul double %125, %126
%128 = tail call double @llvm.fmuladd.f64(double %113, double %122, double %127)
%129 = fmul double %106, %123
%130 = tail call double @llvm.fmuladd.f64(double %103, double %94, double %129)
%131 = tail call double @llvm.fmuladd.f64(double %119, double %130, double %128)
%132 = fcmp ugt double %131, 0.000000e+00
br i1 %132, label %133, label %145
133: ; preds = %84
%134 = add nsw i32 %82, 1
store i32 %134, i32* @nearnd_.l
%135 = load i32, i32* @nearnd_.lp2
%136 = add nsw i32 %135, -1
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 %137
store i32 %134, i32* %138
%139 = sext i32 %82 to i64
%140 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 %139
store i32 %81, i32* %140
%141 = load i32, i32* @nearnd_.lp1
%142 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 %139
store i32 %141, i32* %142
store i32 %134, i32* @nearnd_.lp1
store i32 %81, i32* @nearnd_.n1
br label %143
143: ; preds = %133, %148
%144 = phi i32 [ %81, %133 ], [ %157, %148 ]
br label %66
145: ; preds = %84, %66
%146 = load i32, i32* @nearnd_.lp1
%147 = icmp eq i32 %146, 1
br i1 %147, label %159, label %148
148: ; preds = %145
store i32 %146, i32* @nearnd_.lp2
%149 = load i32, i32* @nearnd_.n1
store i32 %149, i32* @nearnd_.n2
%150 = add nsw i32 %146, -1
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.lptrp, i64 0, i64 %151
%153 = load i32, i32* %152
store i32 %153, i32* @nearnd_.lp1
%154 = add nsw i32 %153, -1
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 %155
%157 = load i32, i32* %156
store i32 %157, i32* @nearnd_.n1
%158 = icmp eq i32 %157, 0
br i1 %158, label %159, label %143
159: ; preds = %148, %145, %75
%160 = load i32, i32* @nearnd_.i1
store i32 %160, i32* @nearnd_.nr
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds double, double* %14, i64 %161
%163 = load double, double* %162
%164 = load double, double* %0
%165 = getelementptr inbounds double, double* %13, i64 %161
%166 = load double, double* %165
%167 = load double, double* %64
%168 = fmul double %166, %167
%169 = tail call double @llvm.fmuladd.f64(double %163, double %164, double %168)
%170 = getelementptr inbounds double, double* %12, i64 %161
%171 = load double, double* %170
%172 = load double, double* %65
%173 = tail call double @llvm.fmuladd.f64(double %171, double %172, double %169)
%174 = fneg double %173
%175 = load i32, i32* @nearnd_.l
%176 = icmp slt i32 %175, 2
br i1 %176, label %206, label %177
177: ; preds = %159
%178 = add nuw i32 %175, 1
%179 = zext i32 %178 to i64
br label %180
180: ; preds = %177, %201
%181 = phi i64 [ 2, %177 ], [ %203, %201 ]
%182 = phi double [ %174, %177 ], [ %202, %201 ]
%183 = add nsw i64 %181, -1
%184 = getelementptr inbounds [25 x i32], [25 x i32]* @nearnd_.listp, i64 0, i64 %183
%185 = load i32, i32* %184
%186 = icmp eq i32 %185, 0
br i1 %186, label %201, label %187
187: ; preds = %180
%188 = sext i32 %185 to i64
%189 = getelementptr inbounds double, double* %14, i64 %188
%190 = load double, double* %189
%191 = getelementptr inbounds double, double* %13, i64 %188
%192 = load double, double* %191
%193 = fmul double %167, %192
%194 = tail call double @llvm.fmuladd.f64(double %190, double %164, double %193)
%195 = getelementptr inbounds double, double* %12, i64 %188
%196 = load double, double* %195
%197 = tail call double @llvm.fmuladd.f64(double %196, double %172, double %194)
%198 = fneg double %197
%199 = fcmp ogt double %182, %198
br i1 %199, label %200, label %201
200: ; preds = %187
store i32 %185, i32* @nearnd_.nr
br label %201
201: ; preds = %180, %200, %187
%202 = phi double [ %182, %180 ], [ %198, %200 ], [ %182, %187 ]
%203 = add nuw nsw i64 %181, 1
%204 = icmp eq i64 %203, %179
br i1 %204, label %205, label %180
205: ; preds = %201
store i32 %185, i32* @nearnd_.n1
br label %206
206: ; preds = %205, %159
%207 = phi double [ %202, %205 ], [ %174, %159 ]
%208 = fneg double %207
%209 = fcmp olt double %207, -1.000000e+00
%210 = select i1 %209, double 1.000000e+00, double %208
%211 = tail call double @acos(double %210)
store double %211, double* %9
%212 = load i32, i32* @nearnd_.nr
br label %213
213: ; preds = %10, %19, %206
%214 = phi i32 [ %212, %206 ], [ 0, %19 ], [ 0, %10 ]
ret i32 %214
}