#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 */
float point_nearest_line(float *, float *, float *, float *);
double sqrt(float);
int /*<<< orphan*/ vis5d_get_sizePRIME(int, int *, int *, int *, int *, int *,
                                       int *);
int /*<<< orphan*/ vis5d_gridPRIME_to_xyzPRIME(int, int /*<<< orphan*/,
                                               int /*<<< orphan*/, double,
                                               double, float, float *, float *,
                                               float *);
int /*<<< orphan*/ vis5d_project(int, float *, float *, float *);
int /*<<< orphan*/ vis5d_unproject(int, float, float, float *, float *);
int /*<<< orphan*/ vis5d_xyzPRIME_to_gridPRIME(int, int /*<<< orphan*/,
                                               int /*<<< orphan*/, float, float,
                                               float, float *, float *,
                                               float *);
int move_vclip(int index, int num, int curx, float cury, float *r1, float *c1,
               float *r2, float *c2, int corner) {
  float cx, cy;
  float b[3], db[3];
  float p[3], px, py;
  float nr, nc;
  int Nr, Nc, Nl, LowLev, MaxNlVar, WindNl, WindLow;
  vis5d_get_sizePRIME(index, &Nr, &Nc, &Nl, &LowLev, &WindNl, &WindLow);
  nr = (float)(Nr - 1);
  nc = (float)(Nc - 1);
  cx = (float)curx;
  cy = (float)cury;
  vis5d_unproject(index, cx, cy, b, db);
  if (corner < 4) {
    float dist, neardist, neart, t, l;
    float newcol, newrow;
    int edge, nearedge;
    if (corner < 2) {
      l = (float)(Nl - 1 + LowLev);
    } else {
      l = (float)LowLev;
    }
    neardist = 10000.0;
    for (edge = 0; edge < 4; edge++) {
      float r0, c0, r1, c1, a[3], da[3], aa[3];
      switch (edge) {
      case 0:
        r0 = 0.0;
        c0 = 0.0;
        r1 = 0.0;
        c1 = (float)(Nc - 1);
        break;
      case 1:
        r0 = 0.0;
        c0 = (float)(Nc - 1);
        r1 = (float)(Nr - 1);
        c1 = c0;
        break;
      case 2:
        r0 = (float)(Nr - 1);
        c0 = 0.0;
        r1 = (float)(Nr - 1);
        c1 = (float)(Nc - 1);
        break;
      case 3:
        r0 = 0.0;
        c0 = 0.0;
        r1 = (float)(Nr - 1);
        c1 = 0.0;
        break;
      }
      vis5d_gridPRIME_to_xyzPRIME(index, 0, 0, r0, c0, l, &a[0], &a[1], &a[2]);
      vis5d_gridPRIME_to_xyzPRIME(index, 0, 0, r1, c1, l, &aa[0], &aa[1],
                                  &aa[2]);
      da[0] = aa[0] - a[0];
      da[1] = aa[1] - a[1];
      da[2] = aa[2] - a[2];
      t = point_nearest_line(a, da, b, db);
      p[0] = a[0] + da[0] * t;
      p[1] = a[1] + da[1] * t;
      p[2] = a[2] + da[2] * t;
      vis5d_project(index, p, &px, &py);
      dist = sqrt((px - cx) * (px - cx) + (py - cy) * (py - cy));
      if (dist == 0.0)
        return 0;
      if (dist < neardist) {
        neardist = dist;
        nearedge = edge;
        neart = ((t < 0.0) ? 0.0 : ((t > 1.0) ? 1.0 : t));
      }
    }
    switch (nearedge) {
    case 0:
      newcol = nc * neart;
      newrow = 0.0;
      break;
    case 1:
      newcol = nc;
      newrow = nr * neart;
      break;
    case 2:
      newcol = nc * neart;
      newrow = nr;
      break;
    case 3:
      newcol = 0.0;
      newrow = nr * neart;
      break;
    }
    if (corner % 2 == 0) {
      if (sqrt((*r2 - newrow) * (*r2 - newrow) +
               (*c2 - newcol) * (*c2 - newcol)) > 2.0) {
        *r1 = newrow;
        *c1 = newcol;
      }
    } else {
      if (sqrt((*r1 - newrow) * (*r1 - newrow) +
               (*c1 - newcol) * (*c1 - newcol)) > 2.0) {
        *r2 = newrow;
        *c2 = newcol;
      }
    }
    return 1;
  } else {
    float prow, pcol, plev, drow, dcol;
    float newr1, newc1, newr2, newc2;
    float x, y, t;
    if (corner == 4) {
      vis5d_gridPRIME_to_xyzPRIME(index, 0, 0, 1.0, 1.0,
                                  (float)(Nl - 1 + LowLev), &x, &y, &t);
      t = (t - b[2]) / db[2];
    } else {
      vis5d_gridPRIME_to_xyzPRIME(index, 0, 0, 1.0, 1.0, (float)LowLev, &x, &y,
                                  &t);
      t = (t - b[2]) / db[2];
    }
    p[0] = b[0] + t * db[0];
    p[1] = b[1] + t * db[1];
    p[2] = b[2] + t * db[2];
    vis5d_xyzPRIME_to_gridPRIME(index, 0, 0, p[0], p[1], p[2], &prow, &pcol,
                                &plev);
    drow = *r2 - *r1;
    dcol = *c2 - *c1;
    if (drow == 0.0) {
      newc1 = *c1;
      newc2 = *c2;
      newr1 = newr2 = prow;
    } else if (dcol == 0.0) {
      newr1 = *r1;
      newr2 = *r2;
      newc1 = newc2 = pcol;
    } else {
      t = -prow / drow;
      newr1 = 0.0;
      newc1 = pcol + dcol * t;
      t = (nr - prow) / drow;
      newr2 = Nr - 1.0;
      newc2 = pcol + dcol * t;
      if (newc1 < 0.0) {
        t = -pcol / dcol;
        newr1 = prow + drow * t;
        newc1 = 0.0;
      }
      if (newc1 > (float)(Nc - 1)) {
        t = (nc - pcol) / dcol;
        newr1 = prow + drow * t;
        newc1 = (float)(Nc - 1);
      }
      if (newc2 < 0.0) {
        t = -pcol / dcol;
        newr2 = prow + drow * t;
        newc2 = 0.0;
      }
      if (newc2 > (float)(Nc - 1)) {
        t = (nc - pcol) / dcol;
        newr2 = prow + drow * t;
        newc2 = (float)(Nc - 1);
      }
    }
    newc1 = ((newc1 < 0.0) ? 0.0 : ((newc1 > nc) ? nc : newc1));
    newc2 = ((newc2 < 0.0) ? 0.0 : ((newc2 > nc) ? nc : newc2));
    newr1 = ((newr1 < 0.0) ? 0.0 : ((newr1 > nr) ? nr : newr1));
    newr2 = ((newr2 < 0.0) ? 0.0 : ((newr2 > nr) ? nr : newr2));
    if (sqrt((newr1 - newr2) * (newr1 - newr2) +
             (newc1 - newc2) * (newc1 - newc2)) > 2.0) {
      if (drow < 0.0) {
        *r1 = newr2;
        *c1 = newc2;
        *r2 = newr1;
        *c2 = newc1;
      } else {
        *r1 = newr1;
        *c1 = newc1;
        *r2 = newr2;
        *c2 = newc2;
      }
    }
    return 1;
  }
}


x86 assembly (clang, -O0):
<move_vclip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x70(%rbp),%rsi
lea    -0x74(%rbp),%rdx
lea    -0x78(%rbp),%rcx
lea    -0x7c(%rbp),%r8
lea    -0x84(%rbp),%r9
lea    -0x88(%rbp),%rax
mov    %rax,(%rsp)
call   1060 <vis5d_get_sizePRIME@plt>
mov    -0x70(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x6c(%rbp)
cvtsi2ssl -0x10(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%edi
movss  -0x34(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
lea    -0x44(%rbp),%rsi
lea    -0x50(%rbp),%rdx
call   1040 <vis5d_unproject@plt>
cmpl   $0x4,0x18(%rbp)
jge    185a <move_vclip+0x6ea>
cmpl   $0x2,0x18(%rbp)
jge    1240 <move_vclip+0xd0>
mov    -0x78(%rbp),%eax
sub    $0x1,%eax
add    -0x7c(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x9c(%rbp)
ff
jmp    124d <move_vclip+0xdd>
cvtsi2ssl -0x7c(%rbp),%xmm0
movss  %xmm0,-0x9c(%rbp)
ff
movss  0x1dbb(%rip),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0xa8(%rbp)
cmpl   $0x4,-0xa8(%rbp)
jge    1669 <move_vclip+0x4f9>
mov    -0xa8(%rbp),%eax
mov    %rax,-0x118(%rbp)
sub    $0x3,%rax
ja     1397 <move_vclip+0x227>
mov    -0x118(%rbp),%rax
lea    0x1d8b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb4(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb8(%rbp)
ff
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xbc(%rbp)
ff
jmp    1397 <move_vclip+0x227>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb0(%rbp)
ff
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xb4(%rbp)
ff
mov    -0x70(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xb8(%rbp)
ff
movss  -0xb4(%rbp),%xmm0
ff
movss  %xmm0,-0xbc(%rbp)
ff
jmp    1397 <move_vclip+0x227>
mov    -0x70(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb4(%rbp)
ff
mov    -0x70(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xb8(%rbp)
ff
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xbc(%rbp)
ff
jmp    1397 <move_vclip+0x227>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb4(%rbp)
ff
mov    -0x70(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xbc(%rbp)
ff
mov    -0x8(%rbp),%edi
movss  -0xb0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0xb4(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x9c(%rbp),%xmm2
ff
lea    -0xc8(%rbp),%rcx
lea    -0xc8(%rbp),%r8
add    $0x4,%r8
lea    -0xc8(%rbp),%r9
add    $0x8,%r9
xor    %edx,%edx
mov    %edx,%esi
call   1070 <vis5d_gridPRIME_to_xyzPRIME@plt>
mov    -0x8(%rbp),%edi
movss  -0xb8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0xbc(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x9c(%rbp),%xmm2
ff
lea    -0xe0(%rbp),%rcx
lea    -0xe0(%rbp),%r8
add    $0x4,%r8
lea    -0xe0(%rbp),%r9
add    $0x8,%r9
xor    %edx,%edx
mov    %edx,%esi
call   1070 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  -0xe0(%rbp),%xmm0
ff
subss  -0xc8(%rbp),%xmm0
ff
movss  %xmm0,-0xd4(%rbp)
ff
movss  -0xdc(%rbp),%xmm0
ff
subss  -0xc4(%rbp),%xmm0
ff
movss  %xmm0,-0xd0(%rbp)
ff
movss  -0xd8(%rbp),%xmm0
ff
subss  -0xc0(%rbp),%xmm0
ff
movss  %xmm0,-0xcc(%rbp)
ff
lea    -0xc8(%rbp),%rdi
lea    -0xd4(%rbp),%rsi
lea    -0x44(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1030 <point_nearest_line@plt>
movss  %xmm0,-0x98(%rbp)
ff
movss  -0xc8(%rbp),%xmm1
ff
movss  -0xd4(%rbp),%xmm0
ff
movss  -0x98(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0xc4(%rbp),%xmm1
ff
movss  -0xd0(%rbp),%xmm0
ff
movss  -0x98(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0xc0(%rbp),%xmm1
ff
movss  -0xcc(%rbp),%xmm0
ff
movss  -0x98(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x5c(%rbp),%rsi
lea    -0x60(%rbp),%rdx
lea    -0x64(%rbp),%rcx
call   1050 <vis5d_project@plt>
movss  -0x60(%rbp),%xmm0
subss  -0x34(%rbp),%xmm0
movss  -0x60(%rbp),%xmm2
subss  -0x34(%rbp),%xmm2
movss  -0x64(%rbp),%xmm1
subss  -0x38(%rbp),%xmm1
movss  -0x64(%rbp),%xmm3
subss  -0x38(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x8c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1587 <move_vclip+0x417>
jp     1587 <move_vclip+0x417>
movl   $0x0,-0x4(%rbp)
jmp    2027 <move_vclip+0xeb7>
movss  -0x8c(%rbp),%xmm1
ff
movss  -0x90(%rbp),%xmm0
ff
ucomiss %xmm1,%xmm0
jbe    1650 <move_vclip+0x4e0>
movss  -0x8c(%rbp),%xmm0
ff
movss  %xmm0,-0x90(%rbp)
ff
mov    -0xa8(%rbp),%eax
mov    %eax,-0xac(%rbp)
movss  -0x98(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    15e5 <move_vclip+0x475>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
jmp    163c <move_vclip+0x4cc>
movss  -0x98(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  0x1a07(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1618 <move_vclip+0x4a8>
movsd  0x19f5(%rip),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
jmp    162c <move_vclip+0x4bc>
movss  -0x98(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x128(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x120(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x94(%rbp)
ff
jmp    1655 <move_vclip+0x4e5>
mov    -0xa8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa8(%rbp)
jmp    1267 <move_vclip+0xf7>
mov    -0xac(%rbp),%eax
mov    %rax,-0x130(%rbp)
sub    $0x3,%rax
ja     172a <move_vclip+0x5ba>
mov    -0x130(%rbp),%rax
lea    0x1986(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movss  -0x6c(%rbp),%xmm0
mulss  -0x94(%rbp),%xmm0
ff
movss  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xa4(%rbp)
ff
jmp    172a <move_vclip+0x5ba>
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0xa0(%rbp)
ff
movss  -0x68(%rbp),%xmm0
mulss  -0x94(%rbp),%xmm0
ff
movss  %xmm0,-0xa4(%rbp)
ff
jmp    172a <move_vclip+0x5ba>
movss  -0x6c(%rbp),%xmm0
mulss  -0x94(%rbp),%xmm0
ff
movss  %xmm0,-0xa0(%rbp)
ff
movss  -0x68(%rbp),%xmm0
movss  %xmm0,-0xa4(%rbp)
ff
jmp    172a <move_vclip+0x5ba>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xa0(%rbp)
ff
movss  -0x68(%rbp),%xmm0
mulss  -0x94(%rbp),%xmm0
ff
movss  %xmm0,-0xa4(%rbp)
ff
mov    0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    17c6 <move_vclip+0x656>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
subss  -0xa4(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm2
subss  -0xa4(%rbp),%xmm2
ff
mov    0x10(%rbp),%rax
movss  (%rax),%xmm1
subss  -0xa0(%rbp),%xmm1
ff
mov    0x10(%rbp),%rax
movss  (%rax),%xmm3
subss  -0xa0(%rbp),%xmm3
ff
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
movsd  0x1871(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    17c1 <move_vclip+0x651>
movss  -0xa4(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0xa0(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
jmp    184e <move_vclip+0x6de>
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
subss  -0xa4(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm2
subss  -0xa4(%rbp),%xmm2
ff
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm1
subss  -0xa0(%rbp),%xmm1
ff
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm3
subss  -0xa0(%rbp),%xmm3
ff
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
movsd  0x17e9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1849 <move_vclip+0x6d9>
movss  -0xa4(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0xa0(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movss  %xmm0,(%rax)
jmp    184e <move_vclip+0x6de>
movl   $0x1,-0x4(%rbp)
jmp    2027 <move_vclip+0xeb7>
cmpl   $0x4,0x18(%rbp)
jne    18bc <move_vclip+0x74c>
mov    -0x8(%rbp),%edi
mov    -0x78(%rbp),%eax
sub    $0x1,%eax
add    -0x7c(%rbp),%eax
cvtsi2ss %eax,%xmm2
xor    %edx,%edx
movsd  0x1782(%rip),%xmm1
lea    -0x108(%rbp),%rcx
lea    -0x10c(%rbp),%r8
lea    -0x110(%rbp),%r9
mov    %edx,%esi
movaps %xmm1,%xmm0
call   1070 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  -0x110(%rbp),%xmm0
ff
subss  -0x3c(%rbp),%xmm0
divss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x110(%rbp)
ff
jmp    1907 <move_vclip+0x797>
mov    -0x8(%rbp),%edi
cvtsi2ssl -0x7c(%rbp),%xmm2
xor    %edx,%edx
movsd  0x1732(%rip),%xmm1
lea    -0x108(%rbp),%rcx
lea    -0x10c(%rbp),%r8
lea    -0x110(%rbp),%r9
mov    %edx,%esi
movaps %xmm1,%xmm0
call   1070 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  -0x110(%rbp),%xmm0
ff
subss  -0x3c(%rbp),%xmm0
divss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x110(%rbp)
ff
movss  -0x44(%rbp),%xmm1
movss  -0x110(%rbp),%xmm0
ff
movss  -0x50(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movss  -0x40(%rbp),%xmm1
movss  -0x110(%rbp),%xmm0
ff
movss  -0x4c(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x3c(%rbp),%xmm1
movss  -0x110(%rbp),%xmm0
ff
movss  -0x48(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x54(%rbp)
mov    -0x8(%rbp),%edi
movss  -0x5c(%rbp),%xmm0
movss  -0x58(%rbp),%xmm1
movss  -0x54(%rbp),%xmm2
xor    %edx,%edx
lea    -0xe4(%rbp),%rcx
lea    -0xe8(%rbp),%r8
lea    -0xec(%rbp),%r9
mov    %edx,%esi
call   1090 <vis5d_xyzPRIME_to_gridPRIME@plt>
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
subss  (%rax),%xmm0
movss  %xmm0,-0xf0(%rbp)
ff
mov    0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x28(%rbp),%rax
subss  (%rax),%xmm0
movss  %xmm0,-0xf4(%rbp)
ff
movss  -0xf0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1a20 <move_vclip+0x8b0>
jp     1a20 <move_vclip+0x8b0>
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xfc(%rbp)
ff
mov    0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x104(%rbp)
ff
movss  -0xe4(%rbp),%xmm0
ff
movss  %xmm0,-0x100(%rbp)
ff
movss  %xmm0,-0xf8(%rbp)
ff
jmp    1d06 <move_vclip+0xb96>
movss  -0xf4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1a7c <move_vclip+0x90c>
jp     1a7c <move_vclip+0x90c>
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xf8(%rbp)
ff
mov    -0x30(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x100(%rbp)
ff
movss  -0xe8(%rbp),%xmm0
ff
movss  %xmm0,-0x104(%rbp)
ff
movss  %xmm0,-0xfc(%rbp)
ff
jmp    1d01 <move_vclip+0xb91>
movss  -0xe4(%rbp),%xmm0
ff
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
divss  -0xf0(%rbp),%xmm0
ff
movss  %xmm0,-0x110(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xf8(%rbp)
ff
movss  -0xe8(%rbp),%xmm1
ff
movss  -0xf4(%rbp),%xmm0
ff
movss  -0x110(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xfc(%rbp)
ff
movss  -0x68(%rbp),%xmm0
subss  -0xe4(%rbp),%xmm0
ff
divss  -0xf0(%rbp),%xmm0
ff
movss  %xmm0,-0x110(%rbp)
ff
cvtsi2sdl -0x70(%rbp),%xmm0
movsd  0x1502(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x100(%rbp)
ff
movss  -0xe8(%rbp),%xmm1
ff
movss  -0xf4(%rbp),%xmm0
ff
movss  -0x110(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x104(%rbp)
ff
movss  -0xfc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1ba7 <move_vclip+0xa37>
movss  -0xe8(%rbp),%xmm0
ff
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
divss  -0xf4(%rbp),%xmm0
ff
movss  %xmm0,-0x110(%rbp)
ff
movss  -0xe4(%rbp),%xmm1
ff
movss  -0xf0(%rbp),%xmm0
ff
movss  -0x110(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xf8(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xfc(%rbp)
ff
movss  -0xfc(%rbp),%xmm0
ff
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm1
ucomiss %xmm1,%xmm0
jbe    1c19 <move_vclip+0xaa9>
movss  -0x6c(%rbp),%xmm0
subss  -0xe8(%rbp),%xmm0
ff
divss  -0xf4(%rbp),%xmm0
ff
movss  %xmm0,-0x110(%rbp)
ff
movss  -0xe4(%rbp),%xmm1
ff
movss  -0xf0(%rbp),%xmm0
ff
movss  -0x110(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xf8(%rbp)
ff
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xfc(%rbp)
ff
movss  -0x104(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1c8a <move_vclip+0xb1a>
movss  -0xe8(%rbp),%xmm0
ff
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
divss  -0xf4(%rbp),%xmm0
ff
movss  %xmm0,-0x110(%rbp)
ff
movss  -0xe4(%rbp),%xmm1
ff
movss  -0xf0(%rbp),%xmm0
ff
movss  -0x110(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x100(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0x104(%rbp)
ff
movss  -0x104(%rbp),%xmm0
ff
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm1
ucomiss %xmm1,%xmm0
jbe    1cfc <move_vclip+0xb8c>
movss  -0x6c(%rbp),%xmm0
subss  -0xe8(%rbp),%xmm0
ff
divss  -0xf4(%rbp),%xmm0
ff
movss  %xmm0,-0x110(%rbp)
ff
movss  -0xe4(%rbp),%xmm1
ff
movss  -0xf0(%rbp),%xmm0
ff
movss  -0x110(%rbp),%xmm2
ff
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x100(%rbp)
ff
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x104(%rbp)
ff
jmp    1d01 <move_vclip+0xb91>
jmp    1d06 <move_vclip+0xb96>
movss  -0xfc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1d2f <move_vclip+0xbbf>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
jmp    1d77 <move_vclip+0xc07>
movss  -0xfc(%rbp),%xmm0
ff
ucomiss -0x6c(%rbp),%xmm0
jbe    1d53 <move_vclip+0xbe3>
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x13c(%rbp)
ff
jmp    1d63 <move_vclip+0xbf3>
movss  -0xfc(%rbp),%xmm0
ff
movss  %xmm0,-0x13c(%rbp)
ff
movss  -0x13c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x138(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xfc(%rbp)
ff
movss  -0x104(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1db4 <move_vclip+0xc44>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
jmp    1dfc <move_vclip+0xc8c>
movss  -0x104(%rbp),%xmm0
ff
ucomiss -0x6c(%rbp),%xmm0
jbe    1dd8 <move_vclip+0xc68>
movss  -0x6c(%rbp),%xmm0
movss  %xmm0,-0x14c(%rbp)
ff
jmp    1de8 <move_vclip+0xc78>
movss  -0x104(%rbp),%xmm0
ff
movss  %xmm0,-0x14c(%rbp)
ff
movss  -0x14c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x148(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x104(%rbp)
ff
movss  -0xf8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1e39 <move_vclip+0xcc9>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
jmp    1e81 <move_vclip+0xd11>
movss  -0xf8(%rbp),%xmm0
ff
ucomiss -0x68(%rbp),%xmm0
jbe    1e5d <move_vclip+0xced>
movss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x15c(%rbp)
ff
jmp    1e6d <move_vclip+0xcfd>
movss  -0xf8(%rbp),%xmm0
ff
movss  %xmm0,-0x15c(%rbp)
ff
movss  -0x15c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x158(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xf8(%rbp)
ff
movss  -0x100(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1ebe <move_vclip+0xd4e>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
jmp    1f06 <move_vclip+0xd96>
movss  -0x100(%rbp),%xmm0
ff
ucomiss -0x68(%rbp),%xmm0
jbe    1ee2 <move_vclip+0xd72>
movss  -0x68(%rbp),%xmm0
movss  %xmm0,-0x16c(%rbp)
ff
jmp    1ef2 <move_vclip+0xd82>
movss  -0x100(%rbp),%xmm0
ff
movss  %xmm0,-0x16c(%rbp)
ff
movss  -0x16c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x168(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x100(%rbp)
ff
movss  -0xf8(%rbp),%xmm0
ff
subss  -0x100(%rbp),%xmm0
ff
movss  -0xf8(%rbp),%xmm2
ff
subss  -0x100(%rbp),%xmm2
ff
movss  -0xfc(%rbp),%xmm1
ff
subss  -0x104(%rbp),%xmm1
ff
movss  -0xfc(%rbp),%xmm3
ff
subss  -0x104(%rbp),%xmm3
ff
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
movsd  0x1095(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    2020 <move_vclip+0xeb0>
movss  -0xf0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1fdb <move_vclip+0xe6b>
movss  -0x100(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x104(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0xf8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0xfc(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movss  %xmm0,(%rax)
jmp    201b <move_vclip+0xeab>
movss  -0xf8(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0xfc(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x100(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x104(%rbp),%xmm0
ff
mov    0x10(%rbp),%rax
movss  %xmm0,(%rax)
jmp    2020 <move_vclip+0xeb0>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_vclip>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    %r9,%r14
mov    %r8,%r13
mov    %rcx,%r15
movss  %xmm0,0x70(%rsp)
mov    %edx,%ebx
mov    %edi,%ebp
mov    0x188(%rsp),%r12d
lea    0x128(%rsp),%rax
mov    %rax,(%rsp)
lea    0x1c(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x74(%rsp),%rcx
lea    0x28(%rsp),%r8
lea    0x12c(%rsp),%r9
call   1060 <vis5d_get_sizePRIME@plt>
mov    0x1c(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movaps %xmm0,0x90(%rsp)
mov    0x18(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movaps %xmm0,0x40(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
lea    0xb4(%rsp),%rsi
lea    0xa8(%rsp),%rdx
mov    %ebp,%edi
movss  %xmm0,0xa4(%rsp)
movss  0x70(%rsp),%xmm1
call   1040 <vis5d_unproject@plt>
cmp    $0x3,%r12d
jg     124f <move_vclip+0xdf>
cmp    $0x1,%r12d
mov    %r13,0x68(%rsp)
mov    %r14,0x120(%rsp)
mov    %r15,0x118(%rsp)
jg     1277 <move_vclip+0x107>
mov    0x74(%rsp),%eax
mov    0x28(%rsp),%ecx
add    %ecx,%eax
add    $0xffffffff,%eax
jmp    127b <move_vclip+0x10b>
mov    0x180(%rsp),%rbx
cmp    $0x4,%r12d
jne    15da <move_vclip+0x46a>
mov    0x74(%rsp),%eax
mov    0x28(%rsp),%ecx
add    %ecx,%eax
add    $0xffffffff,%eax
cvtsi2ss %eax,%xmm2
jmp    15e0 <move_vclip+0x470>
mov    0x28(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xf0(%rsp)
xor    %r13d,%r13d
movss  0xd9a(%rip),%xmm0
lea    0x2c(%rsp),%r12
lea    0xd96(%rip),%rbx
xor    %r15d,%r15d
jmp    12ba <move_vclip+0x14a>
nopw   0x0(%rax,%rax,1)
cmp    $0x4,%r13d
je     16dc <move_vclip+0x56c>
movss  %xmm0,0x100(%rsp)
cmp    $0x3,%r13d
ja     1400 <move_vclip+0x290>
mov    %r13d,%eax
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
jmp    *%rax
mov    0x18(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x24(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0xe0(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0xd0(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0xc0(%rsp)
jmp    1400 <move_vclip+0x290>
cs nopw 0x0(%rax,%rax,1)
mov    0x18(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
mov    0x1c(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc0(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0xe0(%rsp)
movss  %xmm1,0xd0(%rsp)
movss  %xmm1,0x24(%rsp)
jmp    1400 <move_vclip+0x290>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x1c(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    0x18(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
movss  %xmm1,0x24(%rsp)
xorps  %xmm1,%xmm1
movss  %xmm1,0xd0(%rsp)
movss  %xmm0,0xe0(%rsp)
movss  %xmm0,0xc0(%rsp)
jmp    1400 <move_vclip+0x290>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x1c(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0xc0(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0xe0(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0xd0(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rsp)
nopl   0x0(%rax,%rax,1)
movss  0xe0(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0xd0(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
movss  0xf0(%rsp),%xmm2
mov    %r12,%rcx
lea    0x30(%rsp),%r8
lea    0x34(%rsp),%r9
call   1070 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  0xc0(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x24(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
movss  0xf0(%rsp),%xmm2
lea    0x78(%rsp),%rcx
lea    0x7c(%rsp),%r8
lea    0x80(%rsp),%r9
call   1070 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  0x78(%rsp),%xmm0
movss  0x7c(%rsp),%xmm1
subss  0x2c(%rsp),%xmm0
movss  %xmm0,0x5c(%rsp)
subss  0x30(%rsp),%xmm1
movss  %xmm1,0x60(%rsp)
movss  0x80(%rsp),%xmm0
subss  0x34(%rsp),%xmm0
movss  %xmm0,0x64(%rsp)
mov    %r12,%rdi
lea    0x5c(%rsp),%rsi
lea    0xb4(%rsp),%rdx
lea    0xa8(%rsp),%rcx
call   1030 <point_nearest_line@plt>
movss  0x5c(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  0x2c(%rsp),%xmm1
movss  %xmm1,0x84(%rsp)
movss  0x60(%rsp),%xmm1
mulss  %xmm0,%xmm1
addss  0x30(%rsp),%xmm1
movss  %xmm1,0x88(%rsp)
movss  0x64(%rsp),%xmm1
movaps %xmm0,0x130(%rsp)
mulss  %xmm0,%xmm1
addss  0x34(%rsp),%xmm1
movss  %xmm1,0x8c(%rsp)
mov    %ebp,%edi
lea    0x84(%rsp),%rsi
lea    0x3c(%rsp),%rdx
lea    0x38(%rsp),%rcx
call   1050 <vis5d_project@plt>
movss  0x3c(%rsp),%xmm0
subss  0xa4(%rsp),%xmm0
movss  0x38(%rsp),%xmm1
subss  0x70(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
cvtsd2ss %xmm0,%xmm0
xorps  %xmm4,%xmm4
ucomiss %xmm4,%xmm0
setp   %al
setne  %cl
or     %al,%cl
movss  0x100(%rsp),%xmm3
ucomiss %xmm0,%xmm3
seta   %al
and    %cl,%al
test   %al,%al
je     15af <move_vclip+0x43f>
movss  0xa9f(%rip),%xmm1
movaps 0x130(%rsp),%xmm2
minss  %xmm2,%xmm1
cmpltss %xmm4,%xmm2
andnps %xmm1,%xmm2
movss  %xmm2,0x20(%rsp)
movaps 0x90(%rsp),%xmm2
cmovne %r13d,%r14d
ucomiss %xmm4,%xmm0
jne    15c6 <move_vclip+0x456>
jnp    1a40 <move_vclip+0x8d0>
add    $0x1,%r13d
test   %al,%al
jne    12b0 <move_vclip+0x140>
movaps %xmm3,%xmm0
jmp    12b0 <move_vclip+0x140>
cvtsi2ssl 0x28(%rsp),%xmm2
movsd  0xa18(%rip),%xmm0
lea    0x3c(%rsp),%rcx
lea    0x38(%rsp),%r8
lea    0x14(%rsp),%r9
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
movaps %xmm0,%xmm1
call   1070 <vis5d_gridPRIME_to_xyzPRIME@plt>
movss  0x14(%rsp),%xmm4
movss  0xbc(%rsp),%xmm3
subss  %xmm3,%xmm4
movss  0xb0(%rsp),%xmm2
divss  %xmm2,%xmm4
movss  %xmm4,0x14(%rsp)
movss  0xa8(%rsp),%xmm0
mulss  %xmm4,%xmm0
addss  0xb4(%rsp),%xmm0
movss  %xmm0,0x84(%rsp)
movss  0xac(%rsp),%xmm1
mulss  %xmm4,%xmm1
addss  0xb8(%rsp),%xmm1
movss  %xmm1,0x88(%rsp)
mulss  %xmm4,%xmm2
addss  %xmm3,%xmm2
movss  %xmm2,0x8c(%rsp)
lea    0x2c(%rsp),%rcx
lea    0x5c(%rsp),%r8
lea    0x78(%rsp),%r9
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1090 <vis5d_xyzPRIME_to_gridPRIME@plt>
movss  (%r14),%xmm4
movss  (%r15),%xmm3
movaps %xmm4,%xmm6
subss  %xmm3,%xmm6
movss  (%rbx),%xmm5
movss  0x0(%r13),%xmm7
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm6
movaps %xmm6,0xf0(%rsp)
jne    1729 <move_vclip+0x5b9>
jp     1729 <move_vclip+0x5b9>
movss  0x2c(%rsp),%xmm3
movaps %xmm3,%xmm4
movaps 0x90(%rsp),%xmm1
movaps 0x40(%rsp),%xmm2
jmp    1955 <move_vclip+0x7e5>
cmp    $0x3,%r14d
mov    0x120(%rsp),%r13
mov    0x180(%rsp),%r12
mov    0x118(%rsp),%rbp
ja     182b <move_vclip+0x6bb>
mov    %r14d,%eax
lea    0x940(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movaps 0x40(%rsp),%xmm0
mulss  0x20(%rsp),%xmm0
movaps %xmm0,0x40(%rsp)
xorps  %xmm2,%xmm2
jmp    1850 <move_vclip+0x6e0>
subss  %xmm7,%xmm5
ucomiss %xmm0,%xmm5
movaps 0x90(%rsp),%xmm1
movaps 0x40(%rsp),%xmm2
jne    174f <move_vclip+0x5df>
jp     174f <move_vclip+0x5df>
movss  0x5c(%rsp),%xmm7
movaps %xmm7,%xmm5
jmp    1955 <move_vclip+0x7e5>
movss  0x2c(%rsp),%xmm8
movaps %xmm8,%xmm2
divss  %xmm6,%xmm2
movss  0x5c(%rsp),%xmm9
mulss  %xmm5,%xmm2
movaps %xmm9,%xmm7
subss  %xmm2,%xmm7
movaps %xmm1,%xmm2
subss  %xmm8,%xmm2
divss  %xmm6,%xmm2
movss  %xmm2,0x14(%rsp)
mulss  %xmm5,%xmm2
xorps  %xmm3,%xmm3
ucomiss %xmm7,%xmm3
jbe    17b0 <move_vclip+0x640>
movaps 0x88a(%rip),%xmm3
xorps  %xmm9,%xmm3
divss  %xmm5,%xmm3
movss  %xmm3,0x14(%rsp)
mulss  %xmm6,%xmm3
addss  %xmm8,%xmm3
xorps  %xmm7,%xmm7
mov    0x18(%rsp),%eax
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
addss  %xmm9,%xmm2
ucomiss %xmm0,%xmm7
jbe    17e8 <move_vclip+0x678>
movaps 0x40(%rsp),%xmm3
subss  %xmm9,%xmm3
divss  %xmm5,%xmm3
movss  %xmm3,0x14(%rsp)
mulss  %xmm6,%xmm3
addss  %xmm8,%xmm3
movaps %xmm0,%xmm7
xorps  %xmm4,%xmm4
ucomiss %xmm2,%xmm4
jbe    1914 <move_vclip+0x7a4>
movaps 0x825(%rip),%xmm4
xorps  %xmm9,%xmm4
divss  %xmm5,%xmm4
movss  %xmm4,0x14(%rsp)
mulss  %xmm6,%xmm4
addss  %xmm8,%xmm4
xorps  %xmm2,%xmm2
ucomiss %xmm0,%xmm2
ja     1932 <move_vclip+0x7c2>
movaps %xmm2,%xmm5
movaps 0x40(%rsp),%xmm2
jmp    1955 <move_vclip+0x7e5>
jmp    1850 <move_vclip+0x6e0>
mulss  0x20(%rsp),%xmm2
jmp    1850 <move_vclip+0x6e0>
movaps 0x40(%rsp),%xmm0
mulss  0x20(%rsp),%xmm0
jmp    184b <move_vclip+0x6db>
mulss  0x20(%rsp),%xmm2
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
mov    0x68(%rsp),%rbx
mov    0x188(%rsp),%eax
test   $0x1,%al
movaps %xmm2,0x90(%rsp)
jne    18be <move_vclip+0x74e>
movss  0x0(%r13),%xmm0
subss  %xmm2,%xmm0
movss  (%r12),%xmm1
subss  0x40(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
mov    $0x1,%r15d
ucomisd 0x773(%rip),%xmm0
jbe    1a40 <move_vclip+0x8d0>
movaps 0x90(%rsp),%xmm0
movss  %xmm0,0x0(%rbp)
movaps 0x40(%rsp),%xmm0
movss  %xmm0,(%rbx)
jmp    1a40 <move_vclip+0x8d0>
movss  0x0(%rbp),%xmm0
subss  %xmm2,%xmm0
movss  (%rbx),%xmm1
subss  0x40(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
mov    $0x1,%r15d
ucomisd 0x720(%rip),%xmm0
jbe    1a40 <move_vclip+0x8d0>
movaps 0x90(%rsp),%xmm0
movss  %xmm0,0x0(%r13)
movaps 0x40(%rsp),%xmm0
movss  %xmm0,(%r12)
jmp    1a40 <move_vclip+0x8d0>
xorps  %xmm4,%xmm4
cvtsi2sdl 0x1c(%rsp),%xmm4
addsd  0x6e3(%rip),%xmm4
cvtsd2ss %xmm4,%xmm4
ucomiss %xmm0,%xmm2
jbe    181e <move_vclip+0x6ae>
movaps 0x40(%rsp),%xmm2
movaps %xmm2,%xmm4
subss  %xmm9,%xmm4
divss  %xmm5,%xmm4
movss  %xmm4,0x14(%rsp)
mulss  %xmm6,%xmm4
addss  %xmm8,%xmm4
movaps %xmm0,%xmm5
movaps %xmm2,%xmm0
minss  %xmm7,%xmm0
xorps  %xmm6,%xmm6
cmpltss %xmm6,%xmm7
andnps %xmm0,%xmm7
movaps %xmm7,0xc0(%rsp)
minss  %xmm5,%xmm2
cmpltss %xmm6,%xmm5
andnps %xmm2,%xmm5
movaps %xmm5,0xd0(%rsp)
movaps %xmm1,%xmm0
minss  %xmm3,%xmm0
cmpltss %xmm6,%xmm3
andnps %xmm0,%xmm3
movaps %xmm3,0x100(%rsp)
minss  %xmm4,%xmm1
cmpltss %xmm6,%xmm4
andnps %xmm1,%xmm4
movaps %xmm4,0xe0(%rsp)
movaps %xmm3,%xmm0
subss  %xmm4,%xmm0
movaps %xmm7,%xmm1
subss  %xmm5,%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
call   1080 <sqrt@plt>
ucomisd 0x63b(%rip),%xmm0
jbe    1a3a <move_vclip+0x8ca>
movaps 0xc0(%rsp),%xmm4
movaps 0xd0(%rsp),%xmm2
movaps 0xf0(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
cmpltss %xmm0,%xmm1
movaps %xmm1,%xmm0
movaps 0xe0(%rsp),%xmm5
andps  %xmm5,%xmm0
movaps 0x100(%rsp),%xmm3
andnps %xmm3,%xmm1
orps   %xmm0,%xmm1
ja     1a1d <move_vclip+0x8ad>
movaps %xmm4,%xmm0
jmp    1a26 <move_vclip+0x8b6>
movaps %xmm2,%xmm0
movaps %xmm3,%xmm5
movaps %xmm4,%xmm2
movss  %xmm1,(%r15)
movss  %xmm0,0x0(%r13)
movss  %xmm5,(%r14)
movss  %xmm2,(%rbx)
mov    $0x1,%r15d
mov    %r15d,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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