Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/vis12-cl/test/square-detect/square_score-5.log
ViewVC logotype

View of /branches/vis12-cl/test/square-detect/square_score-5.log

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2402 - (download) (annotate)
Sat Jul 27 13:55:03 2013 UTC (6 years, 1 month ago) by jhr
File size: 298618 byte(s)
  Create branch for adding OpenCL to vis12 branch.  Based on r2401 of the vis12 branch.
/* Program start */
field#2(2)[] T = ⊛<#2; %2; $[]> (bspln3, load<%2; $[]> ("square-template.nrrd"));
field#2(2)[] F = ⊛<#2; %2; $[]> (bspln3, load<%2; $[]> ("square-rotate.nrrd"));
vec2 v00 = [0.0, 0.0];
vec2 v01 = [unary -<$[]> (0.5e0), 0.5e0];
vec2 v02 = [unary -<$[]> (0.5e0), unary -<$[]> (0.5e0)];
vec2 v03 = [0.5e0, 0.5e0];
vec2 v04 = [0.5e0, unary -<$[]> (0.5e0)];
strand R (int i, int j, int k)
{
  vec3 t = [-<$[]> (/ ($i2r (i), 0.60e2), 0.5e0), -<$[]> (/ ($i2r (j), 0.60e2), 0.5e0), -<$[]> (/ ($i2r (k), 0.60e2), 0.5e0)];
  output real score = 0.0;
  vec2 r0 = [0.0, 0.0];
  vec2 r1 = [0.0, 0.0];
  vec2 pos = [0.0, 0.0];
  Update
  {
  r0 = [-<$[]> (0.1e1, * (* (0.2e1, t[2]), t[2])), * (* (unary -<$[]> (0.2e1), sqrt (-<$[]> (0.1e1, * (t[2], t[2])))), t[2])];
    r1 = [* (* (0.2e1, sqrt (-<$[]> (0.1e1, * (t[2], t[2])))), t[2]), -<$[]> (0.1e1, * (* (0.2e1, t[2]), t[2]))];
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v00), •<$[2]; $[2]; $[]> (r1, v00)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v00, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v00)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v00))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v01), •<$[2]; $[2]; $[]> (r1, v01)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v01, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v01)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v01))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v02), •<$[2]; $[2]; $[]> (r1, v02)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v02, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v02)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v02))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v03), •<$[2]; $[2]; $[]> (r1, v03)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v03, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v03)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v03))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v04), •<$[2]; $[2]; $[]> (r1, v04)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v04, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v04)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v04))));
      }
    stabilize;
    }
  
  Stabilize
  {
  }
  
}
/* Program end */
/* Simplified Program start */
{
  field#2(2)[] T00A3;
  field#2(2)[] F00AC;
  vec2 v0000B5;
  vec2 v0100B6;
  vec2 v0200B8;
  vec2 v0300BB;
  vec2 v0400BC;
  _t0171 = bspln30095 ();
  _t0172 = "square-template.nrrd";
  _t0173 = load0080<%2; $[]> (_t0172);
  T00A3 = ⊛003A<#2; %2; $[]> (_t0171, _t0173);
  _t0174 = bspln30095 ();
  _t0175 = "square-rotate.nrrd";
  _t0176 = load0080<%2; $[]> (_t0175);
  F00AC = ⊛003A<#2; %2; $[]> (_t0174, _t0176);
  _t0177 = 0.0;
  _t0178 = 0.0;
  v0000B5 = [_t0177, _t0178];
  _t0179 = 0.5e0;
  _t017A = unary -004D<$[]> (_t0179);
  _t017B = 0.5e0;
  v0100B6 = [_t017A, _t017B];
  _t017C = 0.5e0;
  _t017D = unary -004D<$[]> (_t017C);
  _t017E = 0.5e0;
  _t017F = unary -004D<$[]> (_t017E);
  v0200B8 = [_t017D, _t017F];
  _t0180 = 0.5e0;
  _t0181 = 0.5e0;
  v0300BB = [_t0180, _t0181];
  _t0182 = 0.5e0;
  _t0183 = 0.5e0;
  _t0184 = unary -004D<$[]> (_t0183);
  v0400BC = [_t0182, _t0184];
}
Array
  {
    _t021C = 0;
    _t021D = 60;
    _t021E = 0;
    _t021F = 60;
    _t0220 = 0;
    _t0221 = 60;
  }
  for int i016E = _t021C .. _t021D
    for int j016F = _t021E .. _t021F
      for int k0170 = _t0220 .. _t0221
        { }
        new R(i016E, j016F, k0170);
strand R (int i00C0, int j00BF, int k00BE)
{{
    vec3 t00C1;
    output real score00C5;
    vec2 r000C6;
    vec2 r100C7;
    vec2 pos00C8;
    _t0185 = $i2r009B (i00C0);
    _t0186 = 0.60e2;
    _t0187 = /002A (_t0185, _t0186);
    _t0188 = 0.5e0;
    _t0189 = -0016<$[]> (_t0187, _t0188);
    _t018A = $i2r009B (j00BF);
    _t018B = 0.60e2;
    _t018C = /002A (_t018A, _t018B);
    _t018D = 0.5e0;
    _t018E = -0016<$[]> (_t018C, _t018D);
    _t018F = $i2r009B (k00BE);
    _t0190 = 0.60e2;
    _t0191 = /002A (_t018F, _t0190);
    _t0192 = 0.5e0;
    _t0193 = -0016<$[]> (_t0191, _t0192);
    t00C1 = [_t0189, _t018E, _t0193];
    score00C5 = 0.0;
    _t0194 = 0.0;
    _t0195 = 0.0;
    r000C6 = [_t0194, _t0195];
    _t0196 = 0.0;
    _t0197 = 0.0;
    r100C7 = [_t0196, _t0197];
    _t0198 = 0.0;
    _t0199 = 0.0;
    pos00C8 = [_t0198, _t0199];
  }
  Update
  {
    _t019A = 0.1e1;
    _t019B = 0.2e1;
    _t019C = 2;
    _t019D = t00C1[_t019C];
    _t019E = *001C (_t019B, _t019D);
    _t019F = 2;
    _t01A0 = t00C1[_t019F];
    _t01A1 = *001C (_t019E, _t01A0);
    _t01A2 = -0016<$[]> (_t019A, _t01A1);
    _t01A3 = 0.2e1;
    _t01A4 = unary -004D<$[]> (_t01A3);
    _t01A5 = 0.1e1;
    _t01A6 = 2;
    _t01A7 = t00C1[_t01A6];
    _t01A8 = 2;
    _t01A9 = t00C1[_t01A8];
    _t01AA = *001C (_t01A7, _t01A9);
    _t01AB = -0016<$[]> (_t01A5, _t01AA);
    _t01AC = sqrt0091 (_t01AB);
    _t01AD = *001C (_t01A4, _t01AC);
    _t01AE = 2;
    _t01AF = t00C1[_t01AE];
    _t01B0 = *001C (_t01AD, _t01AF);
    r000C6 = [_t01A2, _t01B0];
    _t01B1 = 0.2e1;
    _t01B2 = 0.1e1;
    _t01B3 = 2;
    _t01B4 = t00C1[_t01B3];
    _t01B5 = 2;
    _t01B6 = t00C1[_t01B5];
    _t01B7 = *001C (_t01B4, _t01B6);
    _t01B8 = -0016<$[]> (_t01B2, _t01B7);
    _t01B9 = sqrt0091 (_t01B8);
    _t01BA = *001C (_t01B1, _t01B9);
    _t01BB = 2;
    _t01BC = t00C1[_t01BB];
    _t01BD = *001C (_t01BA, _t01BC);
    _t01BE = 0.1e1;
    _t01BF = 0.2e1;
    _t01C0 = 2;
    _t01C1 = t00C1[_t01C0];
    _t01C2 = *001C (_t01BF, _t01C1);
    _t01C3 = 2;
    _t01C4 = t00C1[_t01C3];
    _t01C5 = *001C (_t01C2, _t01C4);
    _t01C6 = -0016<$[]> (_t01BE, _t01C5);
    r100C7 = [_t01BD, _t01C6];
    _t01C7 = •0079<$[2]; $[2]; $[]> (r000C6, v0000B5);
    _t01C8 = •0079<$[2]; $[2]; $[]> (r100C7, v0000B5);
    _t01C9 = [_t01C7, _t01C8];
    _t01CA = 0;
    _t01CB = t00C1[_t01CA];
    _t01CC = 1;
    _t01CD = t00C1[_t01CC];
    _t01CE = [_t01CB, _t01CD];
    pos00C8 = +000F<$[2]> (_t01C9, _t01CE);
    bool _t01CF;
    _t01D0 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t01D0
      _t01CF = inside007D<#2; %2; $[]> (v0000B5, T00A3);
    else
      _t01CF = false;
    if _t01CF {
      _t01D1 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01D2 = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t01D3 = -0016<$[]> (_t01D1, _t01D2);
      _t01D4 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01D5 = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t01D6 = -0016<$[]> (_t01D4, _t01D5);
      _t01D7 = *001C (_t01D3, _t01D6);
      score00C5 = +000F<$[]> (score00C5, _t01D7);
    }
    _t01D8 = •0079<$[2]; $[2]; $[]> (r000C6, v0100B6);
    _t01D9 = •0079<$[2]; $[2]; $[]> (r100C7, v0100B6);
    _t01DA = [_t01D8, _t01D9];
    _t01DB = 0;
    _t01DC = t00C1[_t01DB];
    _t01DD = 1;
    _t01DE = t00C1[_t01DD];
    _t01DF = [_t01DC, _t01DE];
    pos00C8 = +000F<$[2]> (_t01DA, _t01DF);
    bool _t01E0;
    _t01E1 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t01E1
      _t01E0 = inside007D<#2; %2; $[]> (v0100B6, T00A3);
    else
      _t01E0 = false;
    if _t01E0 {
      _t01E2 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01E3 = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t01E4 = -0016<$[]> (_t01E2, _t01E3);
      _t01E5 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01E6 = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t01E7 = -0016<$[]> (_t01E5, _t01E6);
      _t01E8 = *001C (_t01E4, _t01E7);
      score00C5 = +000F<$[]> (score00C5, _t01E8);
    }
    _t01E9 = •0079<$[2]; $[2]; $[]> (r000C6, v0200B8);
    _t01EA = •0079<$[2]; $[2]; $[]> (r100C7, v0200B8);
    _t01EB = [_t01E9, _t01EA];
    _t01EC = 0;
    _t01ED = t00C1[_t01EC];
    _t01EE = 1;
    _t01EF = t00C1[_t01EE];
    _t01F0 = [_t01ED, _t01EF];
    pos00C8 = +000F<$[2]> (_t01EB, _t01F0);
    bool _t01F1;
    _t01F2 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t01F2
      _t01F1 = inside007D<#2; %2; $[]> (v0200B8, T00A3);
    else
      _t01F1 = false;
    if _t01F1 {
      _t01F3 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01F4 = @0060<#2; %2; $[]> (T00A3, v0200B8);
      _t01F5 = -0016<$[]> (_t01F3, _t01F4);
      _t01F6 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01F7 = @0060<#2; %2; $[]> (T00A3, v0200B8);
      _t01F8 = -0016<$[]> (_t01F6, _t01F7);
      _t01F9 = *001C (_t01F5, _t01F8);
      score00C5 = +000F<$[]> (score00C5, _t01F9);
    }
    _t01FA = •0079<$[2]; $[2]; $[]> (r000C6, v0300BB);
    _t01FB = •0079<$[2]; $[2]; $[]> (r100C7, v0300BB);
    _t01FC = [_t01FA, _t01FB];
    _t01FD = 0;
    _t01FE = t00C1[_t01FD];
    _t01FF = 1;
    _t0200 = t00C1[_t01FF];
    _t0201 = [_t01FE, _t0200];
    pos00C8 = +000F<$[2]> (_t01FC, _t0201);
    bool _t0202;
    _t0203 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t0203
      _t0202 = inside007D<#2; %2; $[]> (v0300BB, T00A3);
    else
      _t0202 = false;
    if _t0202 {
      _t0204 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0205 = @0060<#2; %2; $[]> (T00A3, v0300BB);
      _t0206 = -0016<$[]> (_t0204, _t0205);
      _t0207 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0208 = @0060<#2; %2; $[]> (T00A3, v0300BB);
      _t0209 = -0016<$[]> (_t0207, _t0208);
      _t020A = *001C (_t0206, _t0209);
      score00C5 = +000F<$[]> (score00C5, _t020A);
    }
    _t020B = •0079<$[2]; $[2]; $[]> (r000C6, v0400BC);
    _t020C = •0079<$[2]; $[2]; $[]> (r100C7, v0400BC);
    _t020D = [_t020B, _t020C];
    _t020E = 0;
    _t020F = t00C1[_t020E];
    _t0210 = 1;
    _t0211 = t00C1[_t0210];
    _t0212 = [_t020F, _t0211];
    pos00C8 = +000F<$[2]> (_t020D, _t0212);
    bool _t0213;
    _t0214 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t0214
      _t0213 = inside007D<#2; %2; $[]> (v0400BC, T00A3);
    else
      _t0213 = false;
    if _t0213 {
      _t0215 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0216 = @0060<#2; %2; $[]> (T00A3, v0400BC);
      _t0217 = -0016<$[]> (_t0215, _t0216);
      _t0218 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0219 = @0060<#2; %2; $[]> (T00A3, v0400BC);
      _t021A = -0016<$[]> (_t0218, _t0219);
      _t021B = *001C (_t0217, _t021A);
      score00C5 = +000F<$[]> (score00C5, _t021B);
    }
    stabilize;
  }
  Stabilize
  { }
}
/* Program end */
**** static variables:  _t0172 _t0173 _t0175 _t0176
eval assignment: _t0172 = "square-template.nrrd"
square-template.nrrd file header:
  type: int
  dimension: 2
  space dimension: 2
  sizes: 21 21
  space directions: (0.050000000000000003,0) (0,0.050000000000000003)
  kinds: space space
  endian: little
  encoding: raw
  space origin: (-0.5,-0.5)
eval assignment: _t0173 = IMAGE2D<int>
eval assignment: _t0175 = "square-rotate.nrrd"
square-rotate.nrrd file header:
  type: float
  dimension: 2
  space dimension: 2
  sizes: 21 21
  space directions: (0.050000000000000003,0) (0,0.050000000000000003)
  kinds: space space
  endian: little
  encoding: raw
  space origin: (-0.5,-0.5)
eval assignment: _t0176 = IMAGE2D<float>
eval assignment: _t0177 = 0.0
eval assignment: _t0178 = 0.0
eval assignment: v0000B5 = tensor
eval assignment: _t0179 = 0.5
eval assignment: _t017B = 0.5
eval assignment: _t017C = 0.5
eval assignment: _t017E = 0.5
eval assignment: _t0180 = 0.5
eval assignment: _t0181 = 0.5
eval assignment: v0300BB = tensor
eval assignment: _t0182 = 0.5
eval assignment: _t0183 = 0.5
/* Simplified Program start */
{
  field#2(2)[] T00A3;
  field#2(2)[] F00AC;
  vec2 v0000B5;
  vec2 v0100B6;
  vec2 v0200B8;
  vec2 v0300BB;
  vec2 v0400BC;
  _t0171 = bspln30095 ();
  _t0172 = "square-template.nrrd";
  _t0173 = load (IMAGE2D<int> ,_t0172);
  T00A3 = ⊛003A<#2; %2; $[]> (_t0171, _t0173);
  _t0174 = bspln30095 ();
  _t0175 = "square-rotate.nrrd";
  _t0176 = load (IMAGE2D<float> ,_t0175);
  F00AC = ⊛003A<#2; %2; $[]> (_t0174, _t0176);
  _t0177 = 0.0;
  _t0178 = 0.0;
  v0000B5 = [_t0177, _t0178];
  _t0179 = 0.5e0;
  _t017A = unary -004D<$[]> (_t0179);
  _t017B = 0.5e0;
  v0100B6 = [_t017A, _t017B];
  _t017C = 0.5e0;
  _t017D = unary -004D<$[]> (_t017C);
  _t017E = 0.5e0;
  _t017F = unary -004D<$[]> (_t017E);
  v0200B8 = [_t017D, _t017F];
  _t0180 = 0.5e0;
  _t0181 = 0.5e0;
  v0300BB = [_t0180, _t0181];
  _t0182 = 0.5e0;
  _t0183 = 0.5e0;
  _t0184 = unary -004D<$[]> (_t0183);
  v0400BC = [_t0182, _t0184];
}
Array
  {
    _t021C = 0;
    _t021D = 60;
    _t021E = 0;
    _t021F = 60;
    _t0220 = 0;
    _t0221 = 60;
  }
  for int i016E = _t021C .. _t021D
    for int j016F = _t021E .. _t021F
      for int k0170 = _t0220 .. _t0221
        { }
        new R(i016E, j016F, k0170);
strand R (int i00C0, int j00BF, int k00BE)
{{
    vec3 t00C1;
    output real score00C5;
    vec2 r000C6;
    vec2 r100C7;
    vec2 pos00C8;
    _t0185 = $i2r009B (i00C0);
    _t0186 = 0.60e2;
    _t0187 = /002A (_t0185, _t0186);
    _t0188 = 0.5e0;
    _t0189 = -0016<$[]> (_t0187, _t0188);
    _t018A = $i2r009B (j00BF);
    _t018B = 0.60e2;
    _t018C = /002A (_t018A, _t018B);
    _t018D = 0.5e0;
    _t018E = -0016<$[]> (_t018C, _t018D);
    _t018F = $i2r009B (k00BE);
    _t0190 = 0.60e2;
    _t0191 = /002A (_t018F, _t0190);
    _t0192 = 0.5e0;
    _t0193 = -0016<$[]> (_t0191, _t0192);
    t00C1 = [_t0189, _t018E, _t0193];
    score00C5 = 0.0;
    _t0194 = 0.0;
    _t0195 = 0.0;
    r000C6 = [_t0194, _t0195];
    _t0196 = 0.0;
    _t0197 = 0.0;
    r100C7 = [_t0196, _t0197];
    _t0198 = 0.0;
    _t0199 = 0.0;
    pos00C8 = [_t0198, _t0199];
  }
  Update
  {
    _t019A = 0.1e1;
    _t019B = 0.2e1;
    _t019C = 2;
    _t019D = t00C1[_t019C];
    _t019E = *001C (_t019B, _t019D);
    _t019F = 2;
    _t01A0 = t00C1[_t019F];
    _t01A1 = *001C (_t019E, _t01A0);
    _t01A2 = -0016<$[]> (_t019A, _t01A1);
    _t01A3 = 0.2e1;
    _t01A4 = unary -004D<$[]> (_t01A3);
    _t01A5 = 0.1e1;
    _t01A6 = 2;
    _t01A7 = t00C1[_t01A6];
    _t01A8 = 2;
    _t01A9 = t00C1[_t01A8];
    _t01AA = *001C (_t01A7, _t01A9);
    _t01AB = -0016<$[]> (_t01A5, _t01AA);
    _t01AC = sqrt0091 (_t01AB);
    _t01AD = *001C (_t01A4, _t01AC);
    _t01AE = 2;
    _t01AF = t00C1[_t01AE];
    _t01B0 = *001C (_t01AD, _t01AF);
    r000C6 = [_t01A2, _t01B0];
    _t01B1 = 0.2e1;
    _t01B2 = 0.1e1;
    _t01B3 = 2;
    _t01B4 = t00C1[_t01B3];
    _t01B5 = 2;
    _t01B6 = t00C1[_t01B5];
    _t01B7 = *001C (_t01B4, _t01B6);
    _t01B8 = -0016<$[]> (_t01B2, _t01B7);
    _t01B9 = sqrt0091 (_t01B8);
    _t01BA = *001C (_t01B1, _t01B9);
    _t01BB = 2;
    _t01BC = t00C1[_t01BB];
    _t01BD = *001C (_t01BA, _t01BC);
    _t01BE = 0.1e1;
    _t01BF = 0.2e1;
    _t01C0 = 2;
    _t01C1 = t00C1[_t01C0];
    _t01C2 = *001C (_t01BF, _t01C1);
    _t01C3 = 2;
    _t01C4 = t00C1[_t01C3];
    _t01C5 = *001C (_t01C2, _t01C4);
    _t01C6 = -0016<$[]> (_t01BE, _t01C5);
    r100C7 = [_t01BD, _t01C6];
    _t01C7 = •0079<$[2]; $[2]; $[]> (r000C6, v0000B5);
    _t01C8 = •0079<$[2]; $[2]; $[]> (r100C7, v0000B5);
    _t01C9 = [_t01C7, _t01C8];
    _t01CA = 0;
    _t01CB = t00C1[_t01CA];
    _t01CC = 1;
    _t01CD = t00C1[_t01CC];
    _t01CE = [_t01CB, _t01CD];
    pos00C8 = +000F<$[2]> (_t01C9, _t01CE);
    bool _t01CF;
    _t01D0 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t01D0
      _t01CF = inside007D<#2; %2; $[]> (v0000B5, T00A3);
    else
      _t01CF = false;
    if _t01CF {
      _t01D1 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01D2 = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t01D3 = -0016<$[]> (_t01D1, _t01D2);
      _t01D4 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01D5 = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t01D6 = -0016<$[]> (_t01D4, _t01D5);
      _t01D7 = *001C (_t01D3, _t01D6);
      score00C5 = +000F<$[]> (score00C5, _t01D7);
    }
    _t01D8 = •0079<$[2]; $[2]; $[]> (r000C6, v0100B6);
    _t01D9 = •0079<$[2]; $[2]; $[]> (r100C7, v0100B6);
    _t01DA = [_t01D8, _t01D9];
    _t01DB = 0;
    _t01DC = t00C1[_t01DB];
    _t01DD = 1;
    _t01DE = t00C1[_t01DD];
    _t01DF = [_t01DC, _t01DE];
    pos00C8 = +000F<$[2]> (_t01DA, _t01DF);
    bool _t01E0;
    _t01E1 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t01E1
      _t01E0 = inside007D<#2; %2; $[]> (v0100B6, T00A3);
    else
      _t01E0 = false;
    if _t01E0 {
      _t01E2 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01E3 = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t01E4 = -0016<$[]> (_t01E2, _t01E3);
      _t01E5 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01E6 = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t01E7 = -0016<$[]> (_t01E5, _t01E6);
      _t01E8 = *001C (_t01E4, _t01E7);
      score00C5 = +000F<$[]> (score00C5, _t01E8);
    }
    _t01E9 = •0079<$[2]; $[2]; $[]> (r000C6, v0200B8);
    _t01EA = •0079<$[2]; $[2]; $[]> (r100C7, v0200B8);
    _t01EB = [_t01E9, _t01EA];
    _t01EC = 0;
    _t01ED = t00C1[_t01EC];
    _t01EE = 1;
    _t01EF = t00C1[_t01EE];
    _t01F0 = [_t01ED, _t01EF];
    pos00C8 = +000F<$[2]> (_t01EB, _t01F0);
    bool _t01F1;
    _t01F2 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t01F2
      _t01F1 = inside007D<#2; %2; $[]> (v0200B8, T00A3);
    else
      _t01F1 = false;
    if _t01F1 {
      _t01F3 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01F4 = @0060<#2; %2; $[]> (T00A3, v0200B8);
      _t01F5 = -0016<$[]> (_t01F3, _t01F4);
      _t01F6 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t01F7 = @0060<#2; %2; $[]> (T00A3, v0200B8);
      _t01F8 = -0016<$[]> (_t01F6, _t01F7);
      _t01F9 = *001C (_t01F5, _t01F8);
      score00C5 = +000F<$[]> (score00C5, _t01F9);
    }
    _t01FA = •0079<$[2]; $[2]; $[]> (r000C6, v0300BB);
    _t01FB = •0079<$[2]; $[2]; $[]> (r100C7, v0300BB);
    _t01FC = [_t01FA, _t01FB];
    _t01FD = 0;
    _t01FE = t00C1[_t01FD];
    _t01FF = 1;
    _t0200 = t00C1[_t01FF];
    _t0201 = [_t01FE, _t0200];
    pos00C8 = +000F<$[2]> (_t01FC, _t0201);
    bool _t0202;
    _t0203 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t0203
      _t0202 = inside007D<#2; %2; $[]> (v0300BB, T00A3);
    else
      _t0202 = false;
    if _t0202 {
      _t0204 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0205 = @0060<#2; %2; $[]> (T00A3, v0300BB);
      _t0206 = -0016<$[]> (_t0204, _t0205);
      _t0207 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0208 = @0060<#2; %2; $[]> (T00A3, v0300BB);
      _t0209 = -0016<$[]> (_t0207, _t0208);
      _t020A = *001C (_t0206, _t0209);
      score00C5 = +000F<$[]> (score00C5, _t020A);
    }
    _t020B = •0079<$[2]; $[2]; $[]> (r000C6, v0400BC);
    _t020C = •0079<$[2]; $[2]; $[]> (r100C7, v0400BC);
    _t020D = [_t020B, _t020C];
    _t020E = 0;
    _t020F = t00C1[_t020E];
    _t0210 = 1;
    _t0211 = t00C1[_t0210];
    _t0212 = [_t020F, _t0211];
    pos00C8 = +000F<$[2]> (_t020D, _t0212);
    bool _t0213;
    _t0214 = inside007D<#2; %2; $[]> (pos00C8, F00AC);
    if _t0214
      _t0213 = inside007D<#2; %2; $[]> (v0400BC, T00A3);
    else
      _t0213 = false;
    if _t0213 {
      _t0215 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0216 = @0060<#2; %2; $[]> (T00A3, v0400BC);
      _t0217 = -0016<$[]> (_t0215, _t0216);
      _t0218 = @0060<#2; %2; $[]> (F00AC, pos00C8);
      _t0219 = @0060<#2; %2; $[]> (T00A3, v0400BC);
      _t021A = -0016<$[]> (_t0218, _t0219);
      _t021B = *001C (_t0217, _t021A);
      score00C5 = +000F<$[]> (score00C5, _t021B);
    }
    stabilize;
  }
  Stabilize
  { }
}
/* Program end */
##### HighIL after translation to HighIL ####
## properties
  none
## globals
  global field T0228#15
  global field F0230#15
  global tensor[2] v000236#5
  global tensor[2] v01023E#5
  global tensor[2] v020248#5
  global tensor[2] v03024E#5
  global tensor[2] v040256#5
  global kernel _t0222#1
  global string _t0224#1
  global image2D _t0226#1
  global kernel _t022A#1
  global string _t022C#1
  global image2D _t022E#1
  global real _t0232#1
  global real _t0234#1
  global real _t0238#1
  global real _t023A#1
  global real _t023C#1
  global real _t0240#1
  global real _t0242#1
  global real _t0244#1
  global real _t0246#1
  global real _t024A#1
  global real _t024C#1
  global real _t0250#1
  global real _t0252#1
  global real _t0254#1
## global initialization
  ENTRY0258:  preds = []
    kernel _t0222#1 = Kernel<bspln3,0>;
    string _t0224#1 = "square-template.nrrd";
    image2D _t0226#1 = LoadImage<IMAGE2D<int>>(_t0224);
    field T0228#15 = Field<2>(_t0226,_t0222);
    kernel _t022A#1 = Kernel<bspln3,0>;
    string _t022C#1 = "square-rotate.nrrd";
    image2D _t022E#1 = LoadImage<IMAGE2D<float>>(_t022C);
    field F0230#15 = Field<2>(_t022E,_t022A);
    real _t0232#1 = 0.0;
    real _t0234#1 = 0.0;
    tensor[2] v000236#5 = <tensor[2]>[_t0232,_t0234];
    real _t0238#1 = 0.5e0;
    real _t023A#1 = Neg<real>(_t0238);
    real _t023C#1 = 0.5e0;
    tensor[2] v01023E#5 = <tensor[2]>[_t023A,_t023C];
    real _t0240#1 = 0.5e0;
    real _t0242#1 = Neg<real>(_t0240);
    real _t0244#1 = 0.5e0;
    real _t0246#1 = Neg<real>(_t0244);
    tensor[2] v020248#5 = <tensor[2]>[_t0242,_t0246];
    real _t024A#1 = 0.5e0;
    real _t024C#1 = 0.5e0;
    tensor[2] v03024E#5 = <tensor[2]>[_t024A,_t024C];
    real _t0250#1 = 0.5e0;
    real _t0252#1 = 0.5e0;
    real _t0254#1 = Neg<real>(_t0252);
    tensor[2] v040256#5 = <tensor[2]>[_t0250,_t0254];
    return (T0228,F0230,v000236,v01023E,v020248,v03024E,v040256,_t0222,_t0224,_t0226,_t022A,_t022C,_t022E,_t0232,_t0234,_t0238,_t023A,_t023C,_t0240,_t0242,_t0244,_t0246,_t024A,_t024C,_t0250,_t0252,_t0254)
## initially
  ARRAY
    ENTRY0266:  preds = []
      int _t025A#2 = 0;
      int _t025C#2 = 60;
      int _t025E#2 = 0;
      int _t0260#2 = 60;
      int _t0262#2 = 0;
      int _t0264#2 = 60;
      live vars = (_t0264,_t0262,_t0260,_t025E,_t025C,_t025A)
    for int i0268#1 = _t025A .. _t025C
      for int j0269#1 = _t025E .. _t0260
        for int k026A#1 = _t0262 .. _t0264
          ENTRY026B:  preds = []
            live vars = ()
          new R(i0268,j0269,k026A);
## strands
  strand R (int i026D#1, int j026E#1, int k026F#1)
    state: tensor[3] self.t;output real self.score;tensor[2] self.r0;tensor[2] self.r1;tensor[2] self.pos;
      ENTRY02A9:  preds = []
        real _t0275#1 = IntToReal(i026D);
        real _t0277#1 = 0.60e2;
        real _t0279#1 = Div<real>(_t0275,_t0277);
        real _t027B#1 = 0.5e0;
        real _t027D#1 = Sub<real>(_t0279,_t027B);
        real _t027F#1 = IntToReal(j026E);
        real _t0281#1 = 0.60e2;
        real _t0283#1 = Div<real>(_t027F,_t0281);
        real _t0285#1 = 0.5e0;
        real _t0287#1 = Sub<real>(_t0283,_t0285);
        real _t0289#1 = IntToReal(k026F);
        real _t028B#1 = 0.60e2;
        real _t028D#1 = Div<real>(_t0289,_t028B);
        real _t028F#1 = 0.5e0;
        real _t0291#1 = Sub<real>(_t028D,_t028F);
        tensor[3] t0293#1 = <tensor[3]>[_t027D,_t0287,_t0291];
        real score0295#1 = 0.0;
        real _t0297#1 = 0.0;
        real _t0299#1 = 0.0;
        tensor[2] r0029B#1 = <tensor[2]>[_t0297,_t0299];
        real _t029D#1 = 0.0;
        real _t029F#1 = 0.0;
        tensor[2] r102A1#1 = <tensor[2]>[_t029D,_t029F];
        real _t02A3#1 = 0.0;
        real _t02A5#1 = 0.0;
        tensor[2] pos02A7#1 = <tensor[2]>[_t02A3,_t02A5];
        self.t = t0293;
        self.score = score0295;
        self.r0 = r0029B;
        self.r1 = r102A1;
        self.pos = pos02A7;
        strand_init ()
    method Update
        ENTRY0409:  preds = []
          tensor[3] t02B0#21 = self.t;
          real score02B1#2 = self.score;
          tensor[2] r002B2#0 = self.r0;
          tensor[2] r102B3#0 = self.r1;
          tensor[2] pos02B4#0 = self.pos;
          real _t02BA#1 = 0.1e1;
          real _t02BC#1 = 0.2e1;
          int _t02BE#1 = 2;
          real _t02C0#1 = TensorSub<tensor[3]>(t02B0,_t02BE);
          real _t02C2#1 = Mul<real>(_t02BC,_t02C0);
          int _t02C4#1 = 2;
          real _t02C6#1 = TensorSub<tensor[3]>(t02B0,_t02C4);
          real _t02C8#1 = Mul<real>(_t02C2,_t02C6);
          real _t02CA#1 = Sub<real>(_t02BA,_t02C8);
          real _t02CC#1 = 0.2e1;
          real _t02CE#1 = Neg<real>(_t02CC);
          real _t02D0#1 = 0.1e1;
          int _t02D2#1 = 2;
          real _t02D4#1 = TensorSub<tensor[3]>(t02B0,_t02D2);
          int _t02D6#1 = 2;
          real _t02D8#1 = TensorSub<tensor[3]>(t02B0,_t02D6);
          real _t02DA#1 = Mul<real>(_t02D4,_t02D8);
          real _t02DC#1 = Sub<real>(_t02D0,_t02DA);
          real _t02DE#1 = sqrt(_t02DC);
          real _t02E0#1 = Mul<real>(_t02CE,_t02DE);
          int _t02E2#1 = 2;
          real _t02E4#1 = TensorSub<tensor[3]>(t02B0,_t02E2);
          real _t02E6#1 = Mul<real>(_t02E0,_t02E4);
          tensor[2] r002E8#6 = <tensor[2]>[_t02CA,_t02E6];
          real _t02EA#1 = 0.2e1;
          real _t02EC#1 = 0.1e1;
          int _t02EE#1 = 2;
          real _t02F0#1 = TensorSub<tensor[3]>(t02B0,_t02EE);
          int _t02F2#1 = 2;
          real _t02F4#1 = TensorSub<tensor[3]>(t02B0,_t02F2);
          real _t02F6#1 = Mul<real>(_t02F0,_t02F4);
          real _t02F8#1 = Sub<real>(_t02EC,_t02F6);
          real _t02FA#1 = sqrt(_t02F8);
          real _t02FC#1 = Mul<real>(_t02EA,_t02FA);
          int _t02FE#1 = 2;
          real _t0300#1 = TensorSub<tensor[3]>(t02B0,_t02FE);
          real _t0302#1 = Mul<real>(_t02FC,_t0300);
          real _t0304#1 = 0.1e1;
          real _t0306#1 = 0.2e1;
          int _t0308#1 = 2;
          real _t030A#1 = TensorSub<tensor[3]>(t02B0,_t0308);
          real _t030C#1 = Mul<real>(_t0306,_t030A);
          int _t030E#1 = 2;
          real _t0310#1 = TensorSub<tensor[3]>(t02B0,_t030E);
          real _t0312#1 = Mul<real>(_t030C,_t0310);
          real _t0314#1 = Sub<real>(_t0304,_t0312);
          tensor[2] r10316#6 = <tensor[2]>[_t0302,_t0314];
          real _t0318#1 = Dot<tensor[2]>(r002E8,v000236);
          real _t031A#1 = Dot<tensor[2]>(r10316,v000236);
          tensor[2] _t031C#1 = <tensor[2]>[_t0318,_t031A];
          int _t031E#1 = 0;
          real _t0320#1 = TensorSub<tensor[3]>(t02B0,_t031E);
          int _t0322#1 = 1;
          real _t0324#1 = TensorSub<tensor[3]>(t02B0,_t0322);
          tensor[2] _t0326#1 = <tensor[2]>[_t0320,_t0324];
          tensor[2] pos0328#3 = Add<tensor[2]>(_t031C,_t0326);
          bool _t032B#1 = Inside<2>(pos0328,F0230);
          if _t032B then goto ASSIGN0330 else goto ASSIGN0332
        ASSIGN0330:  preds = [COND0333]
          bool _t032E#1 = Inside<2>(v000236,T0228);
          goto JOIN032D
        JOIN032D:  preds = [ASSIGN0330,ASSIGN0332]
          bool _t032F#1 = phi(_t032E,_t0331)
          if _t032F then goto ASSIGN0336 else goto JOIN0334
        ASSIGN0336:  preds = [COND0346]
          real _t0335#1 = Probe<tensor[2],real>(F0230,pos0328);
          real _t0337#1 = Probe<tensor[2],real>(T0228,v000236);
          real _t0339#1 = Sub<real>(_t0335,_t0337);
          real _t033B#1 = Probe<tensor[2],real>(F0230,pos0328);
          real _t033D#1 = Probe<tensor[2],real>(T0228,v000236);
          real _t033F#1 = Sub<real>(_t033B,_t033D);
          real _t0341#1 = Mul<real>(_t0339,_t033F);
          real score0343#1 = Add<real>(score02B1,_t0341);
          goto JOIN0334
        JOIN0334:  preds = [ASSIGN0345,COND0346]
          real score0344#2 = phi(score0343,score02B1)
          real _t0347#1 = Dot<tensor[2]>(r002E8,v01023E);
          real _t0349#1 = Dot<tensor[2]>(r10316,v01023E);
          tensor[2] _t034B#1 = <tensor[2]>[_t0347,_t0349];
          int _t034D#1 = 0;
          real _t034F#1 = TensorSub<tensor[3]>(t02B0,_t034D);
          int _t0351#1 = 1;
          real _t0353#1 = TensorSub<tensor[3]>(t02B0,_t0351);
          tensor[2] _t0355#1 = <tensor[2]>[_t034F,_t0353];
          tensor[2] pos0357#3 = Add<tensor[2]>(_t034B,_t0355);
          bool _t035A#1 = Inside<2>(pos0357,F0230);
          if _t035A then goto ASSIGN035F else goto ASSIGN0361
        ASSIGN035F:  preds = [COND0362]
          bool _t035D#1 = Inside<2>(v01023E,T0228);
          goto JOIN035C
        JOIN035C:  preds = [ASSIGN035F,ASSIGN0361]
          bool _t035E#1 = phi(_t035D,_t0360)
          if _t035E then goto ASSIGN0365 else goto JOIN0363
        ASSIGN0365:  preds = [COND0375]
          real _t0364#1 = Probe<tensor[2],real>(F0230,pos0357);
          real _t0366#1 = Probe<tensor[2],real>(T0228,v01023E);
          real _t0368#1 = Sub<real>(_t0364,_t0366);
          real _t036A#1 = Probe<tensor[2],real>(F0230,pos0357);
          real _t036C#1 = Probe<tensor[2],real>(T0228,v01023E);
          real _t036E#1 = Sub<real>(_t036A,_t036C);
          real _t0370#1 = Mul<real>(_t0368,_t036E);
          real score0372#1 = Add<real>(score0344,_t0370);
          goto JOIN0363
        JOIN0363:  preds = [ASSIGN0374,COND0375]
          real score0373#2 = phi(score0372,score0344)
          real _t0376#1 = Dot<tensor[2]>(r002E8,v020248);
          real _t0378#1 = Dot<tensor[2]>(r10316,v020248);
          tensor[2] _t037A#1 = <tensor[2]>[_t0376,_t0378];
          int _t037C#1 = 0;
          real _t037E#1 = TensorSub<tensor[3]>(t02B0,_t037C);
          int _t0380#1 = 1;
          real _t0382#1 = TensorSub<tensor[3]>(t02B0,_t0380);
          tensor[2] _t0384#1 = <tensor[2]>[_t037E,_t0382];
          tensor[2] pos0386#3 = Add<tensor[2]>(_t037A,_t0384);
          bool _t0389#1 = Inside<2>(pos0386,F0230);
          if _t0389 then goto ASSIGN038E else goto ASSIGN0390
        ASSIGN038E:  preds = [COND0391]
          bool _t038C#1 = Inside<2>(v020248,T0228);
          goto JOIN038B
        JOIN038B:  preds = [ASSIGN038E,ASSIGN0390]
          bool _t038D#1 = phi(_t038C,_t038F)
          if _t038D then goto ASSIGN0394 else goto JOIN0392
        ASSIGN0394:  preds = [COND03A4]
          real _t0393#1 = Probe<tensor[2],real>(F0230,pos0386);
          real _t0395#1 = Probe<tensor[2],real>(T0228,v020248);
          real _t0397#1 = Sub<real>(_t0393,_t0395);
          real _t0399#1 = Probe<tensor[2],real>(F0230,pos0386);
          real _t039B#1 = Probe<tensor[2],real>(T0228,v020248);
          real _t039D#1 = Sub<real>(_t0399,_t039B);
          real _t039F#1 = Mul<real>(_t0397,_t039D);
          real score03A1#1 = Add<real>(score0373,_t039F);
          goto JOIN0392
        JOIN0392:  preds = [ASSIGN03A3,COND03A4]
          real score03A2#2 = phi(score03A1,score0373)
          real _t03A5#1 = Dot<tensor[2]>(r002E8,v03024E);
          real _t03A7#1 = Dot<tensor[2]>(r10316,v03024E);
          tensor[2] _t03A9#1 = <tensor[2]>[_t03A5,_t03A7];
          int _t03AB#1 = 0;
          real _t03AD#1 = TensorSub<tensor[3]>(t02B0,_t03AB);
          int _t03AF#1 = 1;
          real _t03B1#1 = TensorSub<tensor[3]>(t02B0,_t03AF);
          tensor[2] _t03B3#1 = <tensor[2]>[_t03AD,_t03B1];
          tensor[2] pos03B5#3 = Add<tensor[2]>(_t03A9,_t03B3);
          bool _t03B8#1 = Inside<2>(pos03B5,F0230);
          if _t03B8 then goto ASSIGN03BD else goto ASSIGN03BF
        ASSIGN03BD:  preds = [COND03C0]
          bool _t03BB#1 = Inside<2>(v03024E,T0228);
          goto JOIN03BA
        JOIN03BA:  preds = [ASSIGN03BD,ASSIGN03BF]
          bool _t03BC#1 = phi(_t03BB,_t03BE)
          if _t03BC then goto ASSIGN03C3 else goto JOIN03C1
        ASSIGN03C3:  preds = [COND03D3]
          real _t03C2#1 = Probe<tensor[2],real>(F0230,pos03B5);
          real _t03C4#1 = Probe<tensor[2],real>(T0228,v03024E);
          real _t03C6#1 = Sub<real>(_t03C2,_t03C4);
          real _t03C8#1 = Probe<tensor[2],real>(F0230,pos03B5);
          real _t03CA#1 = Probe<tensor[2],real>(T0228,v03024E);
          real _t03CC#1 = Sub<real>(_t03C8,_t03CA);
          real _t03CE#1 = Mul<real>(_t03C6,_t03CC);
          real score03D0#1 = Add<real>(score03A2,_t03CE);
          goto JOIN03C1
        JOIN03C1:  preds = [ASSIGN03D2,COND03D3]
          real score03D1#2 = phi(score03D0,score03A2)
          real _t03D4#1 = Dot<tensor[2]>(r002E8,v040256);
          real _t03D6#1 = Dot<tensor[2]>(r10316,v040256);
          tensor[2] _t03D8#1 = <tensor[2]>[_t03D4,_t03D6];
          int _t03DA#1 = 0;
          real _t03DC#1 = TensorSub<tensor[3]>(t02B0,_t03DA);
          int _t03DE#1 = 1;
          real _t03E0#1 = TensorSub<tensor[3]>(t02B0,_t03DE);
          tensor[2] _t03E2#1 = <tensor[2]>[_t03DC,_t03E0];
          tensor[2] pos03E4#4 = Add<tensor[2]>(_t03D8,_t03E2);
          bool _t03E7#1 = Inside<2>(pos03E4,F0230);
          if _t03E7 then goto ASSIGN03EC else goto ASSIGN03EE
        ASSIGN03EC:  preds = [COND03EF]
          bool _t03EA#1 = Inside<2>(v040256,T0228);
          goto JOIN03E9
        JOIN03E9:  preds = [ASSIGN03EC,ASSIGN03EE]
          bool _t03EB#1 = phi(_t03EA,_t03ED)
          if _t03EB then goto ASSIGN03F2 else goto JOIN03F0
        ASSIGN03F2:  preds = [COND0402]
          real _t03F1#1 = Probe<tensor[2],real>(F0230,pos03E4);
          real _t03F3#1 = Probe<tensor[2],real>(T0228,v040256);
          real _t03F5#1 = Sub<real>(_t03F1,_t03F3);
          real _t03F7#1 = Probe<tensor[2],real>(F0230,pos03E4);
          real _t03F9#1 = Probe<tensor[2],real>(T0228,v040256);
          real _t03FB#1 = Sub<real>(_t03F7,_t03F9);
          real _t03FD#1 = Mul<real>(_t03F5,_t03FB);
          real score03FF#1 = Add<real>(score03D1,_t03FD);
          goto JOIN03F0
        JOIN03F0:  preds = [ASSIGN0401,COND0402]
          real score0400#1 = phi(score03FF,score03D1)
          self.t = t02B0;
          self.score = score0400;
          self.r0 = r002E8;
          self.r1 = r10316;
          self.pos = pos03E4;
          stabilize ()
        ASSIGN03EE:  preds = [COND03EF]
          bool _t03ED#1 = false;
          goto JOIN03E9
        ASSIGN03BF:  preds = [COND03C0]
          bool _t03BE#1 = false;
          goto JOIN03BA
        ASSIGN0390:  preds = [COND0391]
          bool _t038F#1 = false;
          goto JOIN038B
        ASSIGN0361:  preds = [COND0362]
          bool _t0360#1 = false;
          goto JOIN035C
        ASSIGN0332:  preds = [COND0333]
          bool _t0331#1 = false;
          goto JOIN032D
    end Update
    method Stabilize
        ENTRY0415:  preds = []
          tensor[3] t040B#1 = self.t;
          real score040C#1 = self.score;
          tensor[2] r0040D#1 = self.r0;
          tensor[2] r1040E#1 = self.r1;
          tensor[2] pos040F#1 = self.pos;
          self.t = t040B;
          self.score = score040C;
          self.r0 = r0040D;
          self.r1 = r1040E;
          self.pos = pos040F;
          return ()
    end Stabilize
  end R
#### end program ####
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
++ high-il:redundant-assign
##### HighIL after value numbering ####
## properties
  none
## globals
  global field T0228#15
  global field F0230#15
  global tensor[2] v000236#5
  global tensor[2] v01023E#5
  global tensor[2] v020248#5
  global tensor[2] v03024E#5
  global tensor[2] v040256#5
  global string _t0224#1
  global image2D _t0226#1
  global kernel _t0222#3
  global string _t022C#1
  global image2D _t022E#1
  global real _t0232#3
  global real _t0238#12
  global real _t023A#7
## global initialization
  ENTRY0258:  preds = []
    kernel _t0222#3 = Kernel<bspln3,0>;
    string _t0224#1 = "square-template.nrrd";
    image2D _t0226#1 = LoadImage<IMAGE2D<int>>(_t0224);
    field T0228#15 = Field<2>(_t0226,_t0222);
    string _t022C#1 = "square-rotate.nrrd";
    image2D _t022E#1 = LoadImage<IMAGE2D<float>>(_t022C);
    field F0230#15 = Field<2>(_t022E,_t0222);
    real _t0232#3 = 0.0;
    tensor[2] v000236#5 = <tensor[2]>[_t0232,_t0232];
    real _t0238#12 = 0.5e0;
    real _t023A#7 = Neg<real>(_t0238);
    tensor[2] v01023E#5 = <tensor[2]>[_t023A,_t0238];
    tensor[2] v020248#5 = <tensor[2]>[_t023A,_t023A];
    tensor[2] v03024E#5 = <tensor[2]>[_t0238,_t0238];
    tensor[2] v040256#5 = <tensor[2]>[_t0238,_t023A];
    return (T0228,F0230,v000236,v01023E,v020248,v03024E,v040256,_t0224,_t0226,_t0222,_t022C,_t022E,_t0232,_t0238,_t023A)
## initially
  ARRAY
    ENTRY0266:  preds = []
      int _t025A#4 = 0;
      int _t025C#4 = 60;
      live vars = (_t025C,_t025A)
    for int i0268#1 = _t025A .. _t025C
      for int j0269#1 = _t025A .. _t025C
        for int k026A#1 = _t025A .. _t025C
          ENTRY026B:  preds = []
            live vars = ()
          new R(i0268,j0269,k026A);
## strands
  strand R (int i026D#1, int j026E#1, int k026F#1)
    state: tensor[3] self.t;output real self.score;tensor[2] self.r0;tensor[2] self.r1;tensor[2] self.pos;
      ENTRY02A9:  preds = []
        real _t0275#1 = IntToReal(i026D);
        real _t0277#3 = 0.60e2;
        real _t0279#1 = Div<real>(_t0275,_t0277);
        real _t027B#3 = 0.5e0;
        real _t027D#1 = Sub<real>(_t0279,_t027B);
        real _t027F#1 = IntToReal(j026E);
        real _t0283#1 = Div<real>(_t027F,_t0277);
        real _t0287#1 = Sub<real>(_t0283,_t027B);
        real _t0289#1 = IntToReal(k026F);
        real _t028D#1 = Div<real>(_t0289,_t0277);
        real _t0291#1 = Sub<real>(_t028D,_t027B);
        tensor[3] t0293#1 = <tensor[3]>[_t027D,_t0287,_t0291];
        real score0295#3 = 0.0;
        tensor[2] r0029B#3 = <tensor[2]>[score0295,score0295];
        self.t = t0293;
        self.score = score0295;
        self.r0 = r0029B;
        self.r1 = r0029B;
        self.pos = r0029B;
        strand_init ()
    method Update
        ENTRY0409:  preds = []
          tensor[3] t02B0#21 = self.t;
          real score02B1#2 = self.score;
          tensor[2] r002B2#0 = self.r0;
          tensor[2] r102B3#0 = self.r1;
          tensor[2] pos02B4#0 = self.pos;
          real _t02BA#2 = 0.1e1;
          real _t02BC#3 = 0.2e1;
          int _t02BE#1 = 2;
          real _t02C0#6 = TensorSub<tensor[3]>(t02B0,_t02BE);
          real _t02C2#1 = Mul<real>(_t02BC,_t02C0);
          real _t02C8#1 = Mul<real>(_t02C2,_t02C0);
          real _t02CA#2 = Sub<real>(_t02BA,_t02C8);
          real _t02CE#1 = Neg<real>(_t02BC);
          real _t02DA#1 = Mul<real>(_t02C0,_t02C0);
          real _t02DC#1 = Sub<real>(_t02BA,_t02DA);
          real _t02DE#2 = sqrt(_t02DC);
          real _t02E0#1 = Mul<real>(_t02CE,_t02DE);
          real _t02E6#1 = Mul<real>(_t02E0,_t02C0);
          tensor[2] r002E8#6 = <tensor[2]>[_t02CA,_t02E6];
          real _t02FC#1 = Mul<real>(_t02BC,_t02DE);
          real _t0302#1 = Mul<real>(_t02FC,_t02C0);
          tensor[2] r10316#6 = <tensor[2]>[_t0302,_t02CA];
          real _t0318#1 = Dot<tensor[2]>(r002E8,v000236);
          real _t031A#1 = Dot<tensor[2]>(r10316,v000236);
          tensor[2] _t031C#1 = <tensor[2]>[_t0318,_t031A];
          int _t031E#1 = 0;
          real _t0320#1 = TensorSub<tensor[3]>(t02B0,_t031E);
          int _t0322#1 = 1;
          real _t0324#1 = TensorSub<tensor[3]>(t02B0,_t0322);
          tensor[2] _t0326#5 = <tensor[2]>[_t0320,_t0324];
          tensor[2] pos0328#3 = Add<tensor[2]>(_t031C,_t0326);
          bool _t032B#1 = Inside<2>(pos0328,F0230);
          if _t032B then goto ASSIGN0330 else goto ASSIGN0332
        ASSIGN0330:  preds = [COND0333]
          bool _t032E#1 = Inside<2>(v000236,T0228);
          goto JOIN032D
        JOIN032D:  preds = [ASSIGN0330,ASSIGN0332]
          bool _t032F#1 = phi(_t032E,_t0331)
          if _t032F then goto ASSIGN0336 else goto JOIN0334
        ASSIGN0336:  preds = [COND0346]
          real _t0335#1 = Probe<tensor[2],real>(F0230,pos0328);
          real _t0337#1 = Probe<tensor[2],real>(T0228,v000236);
          real _t0339#2 = Sub<real>(_t0335,_t0337);
          real _t0341#1 = Mul<real>(_t0339,_t0339);
          real score0343#1 = Add<real>(score02B1,_t0341);
          goto JOIN0334
        JOIN0334:  preds = [ASSIGN0345,COND0346]
          real score0344#2 = phi(score0343,score02B1)
          real _t0347#1 = Dot<tensor[2]>(r002E8,v01023E);
          real _t0349#1 = Dot<tensor[2]>(r10316,v01023E);
          tensor[2] _t034B#1 = <tensor[2]>[_t0347,_t0349];
          tensor[2] pos0357#3 = Add<tensor[2]>(_t034B,_t0326);
          bool _t035A#1 = Inside<2>(pos0357,F0230);
          if _t035A then goto ASSIGN035F else goto ASSIGN0361
        ASSIGN035F:  preds = [COND0362]
          bool _t035D#1 = Inside<2>(v01023E,T0228);
          goto JOIN035C
        JOIN035C:  preds = [ASSIGN035F,ASSIGN0361]
          bool _t035E#1 = phi(_t035D,_t0360)
          if _t035E then goto ASSIGN0365 else goto JOIN0363
        ASSIGN0365:  preds = [COND0375]
          real _t0364#1 = Probe<tensor[2],real>(F0230,pos0357);
          real _t0366#1 = Probe<tensor[2],real>(T0228,v01023E);
          real _t0368#2 = Sub<real>(_t0364,_t0366);
          real _t0370#1 = Mul<real>(_t0368,_t0368);
          real score0372#1 = Add<real>(score0344,_t0370);
          goto JOIN0363
        JOIN0363:  preds = [ASSIGN0374,COND0375]
          real score0373#2 = phi(score0372,score0344)
          real _t0376#1 = Dot<tensor[2]>(r002E8,v020248);
          real _t0378#1 = Dot<tensor[2]>(r10316,v020248);
          tensor[2] _t037A#1 = <tensor[2]>[_t0376,_t0378];
          tensor[2] pos0386#3 = Add<tensor[2]>(_t037A,_t0326);
          bool _t0389#1 = Inside<2>(pos0386,F0230);
          if _t0389 then goto ASSIGN038E else goto ASSIGN0390
        ASSIGN038E:  preds = [COND0391]
          bool _t038C#1 = Inside<2>(v020248,T0228);
          goto JOIN038B
        JOIN038B:  preds = [ASSIGN038E,ASSIGN0390]
          bool _t038D#1 = phi(_t038C,_t038F)
          if _t038D then goto ASSIGN0394 else goto JOIN0392
        ASSIGN0394:  preds = [COND03A4]
          real _t0393#1 = Probe<tensor[2],real>(F0230,pos0386);
          real _t0395#1 = Probe<tensor[2],real>(T0228,v020248);
          real _t0397#2 = Sub<real>(_t0393,_t0395);
          real _t039F#1 = Mul<real>(_t0397,_t0397);
          real score03A1#1 = Add<real>(score0373,_t039F);
          goto JOIN0392
        JOIN0392:  preds = [ASSIGN03A3,COND03A4]
          real score03A2#2 = phi(score03A1,score0373)
          real _t03A5#1 = Dot<tensor[2]>(r002E8,v03024E);
          real _t03A7#1 = Dot<tensor[2]>(r10316,v03024E);
          tensor[2] _t03A9#1 = <tensor[2]>[_t03A5,_t03A7];
          tensor[2] pos03B5#3 = Add<tensor[2]>(_t03A9,_t0326);
          bool _t03B8#1 = Inside<2>(pos03B5,F0230);
          if _t03B8 then goto ASSIGN03BD else goto ASSIGN03BF
        ASSIGN03BD:  preds = [COND03C0]
          bool _t03BB#1 = Inside<2>(v03024E,T0228);
          goto JOIN03BA
        JOIN03BA:  preds = [ASSIGN03BD,ASSIGN03BF]
          bool _t03BC#1 = phi(_t03BB,_t03BE)
          if _t03BC then goto ASSIGN03C3 else goto JOIN03C1
        ASSIGN03C3:  preds = [COND03D3]
          real _t03C2#1 = Probe<tensor[2],real>(F0230,pos03B5);
          real _t03C4#1 = Probe<tensor[2],real>(T0228,v03024E);
          real _t03C6#2 = Sub<real>(_t03C2,_t03C4);
          real _t03CE#1 = Mul<real>(_t03C6,_t03C6);
          real score03D0#1 = Add<real>(score03A2,_t03CE);
          goto JOIN03C1
        JOIN03C1:  preds = [ASSIGN03D2,COND03D3]
          real score03D1#2 = phi(score03D0,score03A2)
          real _t03D4#1 = Dot<tensor[2]>(r002E8,v040256);
          real _t03D6#1 = Dot<tensor[2]>(r10316,v040256);
          tensor[2] _t03D8#1 = <tensor[2]>[_t03D4,_t03D6];
          tensor[2] pos03E4#4 = Add<tensor[2]>(_t03D8,_t0326);
          bool _t03E7#1 = Inside<2>(pos03E4,F0230);
          if _t03E7 then goto ASSIGN03EC else goto ASSIGN03EE
        ASSIGN03EC:  preds = [COND03EF]
          bool _t03EA#1 = Inside<2>(v040256,T0228);
          goto JOIN03E9
        JOIN03E9:  preds = [ASSIGN03EC,ASSIGN03EE]
          bool _t03EB#1 = phi(_t03EA,_t03ED)
          if _t03EB then goto ASSIGN03F2 else goto JOIN03F0
        ASSIGN03F2:  preds = [COND0402]
          real _t03F1#1 = Probe<tensor[2],real>(F0230,pos03E4);
          real _t03F3#1 = Probe<tensor[2],real>(T0228,v040256);
          real _t03F5#2 = Sub<real>(_t03F1,_t03F3);
          real _t03FD#1 = Mul<real>(_t03F5,_t03F5);
          real score03FF#1 = Add<real>(score03D1,_t03FD);
          goto JOIN03F0
        JOIN03F0:  preds = [ASSIGN0401,COND0402]
          real score0400#1 = phi(score03FF,score03D1)
          self.t = t02B0;
          self.score = score0400;
          self.r0 = r002E8;
          self.r1 = r10316;
          self.pos = pos03E4;
          stabilize ()
        ASSIGN03EE:  preds = [COND03EF]
          bool _t03ED#1 = false;
          goto JOIN03E9
        ASSIGN03BF:  preds = [COND03C0]
          bool _t03BE#1 = false;
          goto JOIN03BA
        ASSIGN0390:  preds = [COND0391]
          bool _t038F#1 = false;
          goto JOIN038B
        ASSIGN0361:  preds = [COND0362]
          bool _t0360#1 = false;
          goto JOIN035C
        ASSIGN0332:  preds = [COND0333]
          bool _t0331#1 = false;
          goto JOIN032D
    end Update
    method Stabilize
        ENTRY0415:  preds = []
          tensor[3] t040B#1 = self.t;
          real score040C#1 = self.score;
          tensor[2] r0040D#1 = self.r0;
          tensor[2] r1040E#1 = self.r1;
          tensor[2] pos040F#1 = self.pos;
          self.t = t040B;
          self.score = score040C;
          self.r0 = r0040D;
          self.r1 = r1040E;
          self.pos = pos040F;
          return ()
    end Stabilize
  end R
#### end program ####
++ high-opt:unused
++ high-opt:unused
++ high-opt:unused
##### HighIL after normalization ####
## properties
  none
## globals
  global field T0228#15
  global field F0230#15
  global tensor[2] v000236#5
  global tensor[2] v01023E#5
  global tensor[2] v020248#5
  global tensor[2] v03024E#5
  global tensor[2] v040256#5
  global string _t0224#1
  global image2D _t0226#1
  global kernel _t0222#3
  global string _t022C#1
  global image2D _t022E#1
  global real _t0232#3
  global real _t0238#12
  global real _t023A#7
## global initialization
  ENTRY0258:  preds = []
    kernel _t0222#3 = Kernel<bspln3,0>;
    string _t0224#1 = "square-template.nrrd";
    image2D _t0226#1 = LoadImage<IMAGE2D<int>>(_t0224);
    field T0228#15 = Field<2>(_t0226,_t0222);
    string _t022C#1 = "square-rotate.nrrd";
    image2D _t022E#1 = LoadImage<IMAGE2D<float>>(_t022C);
    field F0230#15 = Field<2>(_t022E,_t0222);
    real _t0232#3 = 0.0;
    tensor[2] v000236#5 = <tensor[2]>[_t0232,_t0232];
    real _t0238#12 = 0.5e0;
    real _t023A#7 = Neg<real>(_t0238);
    tensor[2] v01023E#5 = <tensor[2]>[_t023A,_t0238];
    tensor[2] v020248#5 = <tensor[2]>[_t023A,_t023A];
    tensor[2] v03024E#5 = <tensor[2]>[_t0238,_t0238];
    tensor[2] v040256#5 = <tensor[2]>[_t0238,_t023A];
    return (T0228,F0230,v000236,v01023E,v020248,v03024E,v040256,_t0224,_t0226,_t0222,_t022C,_t022E,_t0232,_t0238,_t023A)
## initially
  ARRAY
    ENTRY0266:  preds = []
      int _t025A#4 = 0;
      int _t025C#4 = 60;
      live vars = (_t025C,_t025A)
    for int i0268#1 = _t025A .. _t025C
      for int j0269#1 = _t025A .. _t025C
        for int k026A#1 = _t025A .. _t025C
          ENTRY026B:  preds = []
            live vars = ()
          new R(i0268,j0269,k026A);
## strands
  strand R (int i026D#1, int j026E#1, int k026F#1)
    state: tensor[3] self.t;output real self.score;tensor[2] self.r0;tensor[2] self.r1;tensor[2] self.pos;
      ENTRY02A9:  preds = []
        real _t0275#1 = IntToReal(i026D);
        real _t0277#3 = 0.60e2;
        real _t0279#1 = Div<real>(_t0275,_t0277);
        real _t027B#3 = 0.5e0;
        real _t027D#1 = Sub<real>(_t0279,_t027B);
        real _t027F#1 = IntToReal(j026E);
        real _t0283#1 = Div<real>(_t027F,_t0277);
        real _t0287#1 = Sub<real>(_t0283,_t027B);
        real _t0289#1 = IntToReal(k026F);
        real _t028D#1 = Div<real>(_t0289,_t0277);
        real _t0291#1 = Sub<real>(_t028D,_t027B);
        tensor[3] t0293#1 = <tensor[3]>[_t027D,_t0287,_t0291];
        real score0295#3 = 0.0;
        tensor[2] r0029B#3 = <tensor[2]>[score0295,score0295];
        self.t = t0293;
        self.score = score0295;
        self.r0 = r0029B;
        self.r1 = r0029B;
        self.pos = r0029B;
        strand_init ()
    method Update
        ENTRY0409:  preds = []
          tensor[3] t02B0#21 = self.t;
          real score02B1#2 = self.score;
          real _t02BA#2 = 0.1e1;
          real _t02BC#3 = 0.2e1;
          int _t02BE#1 = 2;
          real _t02C0#6 = TensorSub<tensor[3]>(t02B0,_t02BE);
          real _t02C2#1 = Mul<real>(_t02BC,_t02C0);
          real _t02C8#1 = Mul<real>(_t02C2,_t02C0);
          real _t02CA#2 = Sub<real>(_t02BA,_t02C8);
          real _t02CE#1 = Neg<real>(_t02BC);
          real _t02DA#1 = Mul<real>(_t02C0,_t02C0);
          real _t02DC#1 = Sub<real>(_t02BA,_t02DA);
          real _t02DE#2 = sqrt(_t02DC);
          real _t02E0#1 = Mul<real>(_t02CE,_t02DE);
          real _t02E6#1 = Mul<real>(_t02E0,_t02C0);
          tensor[2] r002E8#6 = <tensor[2]>[_t02CA,_t02E6];
          real _t02FC#1 = Mul<real>(_t02BC,_t02DE);
          real _t0302#1 = Mul<real>(_t02FC,_t02C0);
          tensor[2] r10316#6 = <tensor[2]>[_t0302,_t02CA];
          real _t0318#1 = Dot<tensor[2]>(r002E8,v000236);
          real _t031A#1 = Dot<tensor[2]>(r10316,v000236);
          tensor[2] _t031C#1 = <tensor[2]>[_t0318,_t031A];
          int _t031E#1 = 0;
          real _t0320#1 = TensorSub<tensor[3]>(t02B0,_t031E);
          int _t0322#1 = 1;
          real _t0324#1 = TensorSub<tensor[3]>(t02B0,_t0322);
          tensor[2] _t0326#5 = <tensor[2]>[_t0320,_t0324];
          tensor[2] pos0328#3 = Add<tensor[2]>(_t031C,_t0326);
          bool _t032B#1 = Inside<2>(pos0328,F0230);
          if _t032B then goto ASSIGN0330 else goto ASSIGN0332
        ASSIGN0330:  preds = [COND0333]
          bool _t032E#1 = Inside<2>(v000236,T0228);
          goto JOIN032D
        JOIN032D:  preds = [ASSIGN0330,ASSIGN0332]
          bool _t032F#1 = phi(_t032E,_t0331)
          if _t032F then goto ASSIGN0336 else goto JOIN0334
        ASSIGN0336:  preds = [COND0346]
          real _t0335#1 = Probe<tensor[2],real>(F0230,pos0328);
          real _t0337#1 = Probe<tensor[2],real>(T0228,v000236);
          real _t0339#2 = Sub<real>(_t0335,_t0337);
          real _t0341#1 = Mul<real>(_t0339,_t0339);
          real score0343#1 = Add<real>(score02B1,_t0341);
          goto JOIN0334
        JOIN0334:  preds = [ASSIGN0345,COND0346]
          real score0344#2 = phi(score0343,score02B1)
          real _t0347#1 = Dot<tensor[2]>(r002E8,v01023E);
          real _t0349#1 = Dot<tensor[2]>(r10316,v01023E);
          tensor[2] _t034B#1 = <tensor[2]>[_t0347,_t0349];
          tensor[2] pos0357#3 = Add<tensor[2]>(_t034B,_t0326);
          bool _t035A#1 = Inside<2>(pos0357,F0230);
          if _t035A then goto ASSIGN035F else goto ASSIGN0361
        ASSIGN035F:  preds = [COND0362]
          bool _t035D#1 = Inside<2>(v01023E,T0228);
          goto JOIN035C
        JOIN035C:  preds = [ASSIGN035F,ASSIGN0361]
          bool _t035E#1 = phi(_t035D,_t0360)
          if _t035E then goto ASSIGN0365 else goto JOIN0363
        ASSIGN0365:  preds = [COND0375]
          real _t0364#1 = Probe<tensor[2],real>(F0230,pos0357);
          real _t0366#1 = Probe<tensor[2],real>(T0228,v01023E);
          real _t0368#2 = Sub<real>(_t0364,_t0366);
          real _t0370#1 = Mul<real>(_t0368,_t0368);
          real score0372#1 = Add<real>(score0344,_t0370);
          goto JOIN0363
        JOIN0363:  preds = [ASSIGN0374,COND0375]
          real score0373#2 = phi(score0372,score0344)
          real _t0376#1 = Dot<tensor[2]>(r002E8,v020248);
          real _t0378#1 = Dot<tensor[2]>(r10316,v020248);
          tensor[2] _t037A#1 = <tensor[2]>[_t0376,_t0378];
          tensor[2] pos0386#3 = Add<tensor[2]>(_t037A,_t0326);
          bool _t0389#1 = Inside<2>(pos0386,F0230);
          if _t0389 then goto ASSIGN038E else goto ASSIGN0390
        ASSIGN038E:  preds = [COND0391]
          bool _t038C#1 = Inside<2>(v020248,T0228);
          goto JOIN038B
        JOIN038B:  preds = [ASSIGN038E,ASSIGN0390]
          bool _t038D#1 = phi(_t038C,_t038F)
          if _t038D then goto ASSIGN0394 else goto JOIN0392
        ASSIGN0394:  preds = [COND03A4]
          real _t0393#1 = Probe<tensor[2],real>(F0230,pos0386);
          real _t0395#1 = Probe<tensor[2],real>(T0228,v020248);
          real _t0397#2 = Sub<real>(_t0393,_t0395);
          real _t039F#1 = Mul<real>(_t0397,_t0397);
          real score03A1#1 = Add<real>(score0373,_t039F);
          goto JOIN0392
        JOIN0392:  preds = [ASSIGN03A3,COND03A4]
          real score03A2#2 = phi(score03A1,score0373)
          real _t03A5#1 = Dot<tensor[2]>(r002E8,v03024E);
          real _t03A7#1 = Dot<tensor[2]>(r10316,v03024E);
          tensor[2] _t03A9#1 = <tensor[2]>[_t03A5,_t03A7];
          tensor[2] pos03B5#3 = Add<tensor[2]>(_t03A9,_t0326);
          bool _t03B8#1 = Inside<2>(pos03B5,F0230);
          if _t03B8 then goto ASSIGN03BD else goto ASSIGN03BF
        ASSIGN03BD:  preds = [COND03C0]
          bool _t03BB#1 = Inside<2>(v03024E,T0228);
          goto JOIN03BA
        JOIN03BA:  preds = [ASSIGN03BD,ASSIGN03BF]
          bool _t03BC#1 = phi(_t03BB,_t03BE)
          if _t03BC then goto ASSIGN03C3 else goto JOIN03C1
        ASSIGN03C3:  preds = [COND03D3]
          real _t03C2#1 = Probe<tensor[2],real>(F0230,pos03B5);
          real _t03C4#1 = Probe<tensor[2],real>(T0228,v03024E);
          real _t03C6#2 = Sub<real>(_t03C2,_t03C4);
          real _t03CE#1 = Mul<real>(_t03C6,_t03C6);
          real score03D0#1 = Add<real>(score03A2,_t03CE);
          goto JOIN03C1
        JOIN03C1:  preds = [ASSIGN03D2,COND03D3]
          real score03D1#2 = phi(score03D0,score03A2)
          real _t03D4#1 = Dot<tensor[2]>(r002E8,v040256);
          real _t03D6#1 = Dot<tensor[2]>(r10316,v040256);
          tensor[2] _t03D8#1 = <tensor[2]>[_t03D4,_t03D6];
          tensor[2] pos03E4#4 = Add<tensor[2]>(_t03D8,_t0326);
          bool _t03E7#1 = Inside<2>(pos03E4,F0230);
          if _t03E7 then goto ASSIGN03EC else goto ASSIGN03EE
        ASSIGN03EC:  preds = [COND03EF]
          bool _t03EA#1 = Inside<2>(v040256,T0228);
          goto JOIN03E9
        JOIN03E9:  preds = [ASSIGN03EC,ASSIGN03EE]
          bool _t03EB#1 = phi(_t03EA,_t03ED)
          if _t03EB then goto ASSIGN03F2 else goto JOIN03F0
        ASSIGN03F2:  preds = [COND0402]
          real _t03F1#1 = Probe<tensor[2],real>(F0230,pos03E4);
          real _t03F3#1 = Probe<tensor[2],real>(T0228,v040256);
          real _t03F5#2 = Sub<real>(_t03F1,_t03F3);
          real _t03FD#1 = Mul<real>(_t03F5,_t03F5);
          real score03FF#1 = Add<real>(score03D1,_t03FD);
          goto JOIN03F0
        JOIN03F0:  preds = [ASSIGN0401,COND0402]
          real score0400#1 = phi(score03FF,score03D1)
          self.t = t02B0;
          self.score = score0400;
          self.r0 = r002E8;
          self.r1 = r10316;
          self.pos = pos03E4;
          stabilize ()
        ASSIGN03EE:  preds = [COND03EF]
          bool _t03ED#1 = false;
          goto JOIN03E9
        ASSIGN03BF:  preds = [COND03C0]
          bool _t03BE#1 = false;
          goto JOIN03BA
        ASSIGN0390:  preds = [COND0391]
          bool _t038F#1 = false;
          goto JOIN038B
        ASSIGN0361:  preds = [COND0362]
          bool _t0360#1 = false;
          goto JOIN035C
        ASSIGN0332:  preds = [COND0333]
          bool _t0331#1 = false;
          goto JOIN032D
    end Update
    method Stabilize
        ENTRY0415:  preds = []
          tensor[3] t040B#1 = self.t;
          real score040C#1 = self.score;
          tensor[2] r0040D#1 = self.r0;
          tensor[2] r1040E#1 = self.r1;
          tensor[2] pos040F#1 = self.pos;
          self.t = t040B;
          self.score = score040C;
          self.r0 = r0040D;
          self.r1 = r1040E;
          self.pos = pos040F;
          return ()
    end Stabilize
  end R
#### end program ####
##### MidIL after translation to MidIL ####
## properties
  none
## globals
  global int T0459#0
  global int F045A#0
  global real2 v00044B#4
  global real2 v010451#4
  global real2 v020453#4
  global real2 v030455#4
  global real2 v040457#4
  global string _t0441#1
  global image(IMAGE2D<int>) _t0443#35
  global int _t043F#0
  global string _t0445#1
  global image(IMAGE2D<float>) _t0447#35
  global real _t0449#2
  global real _t044D#5
  global real _t044F#4
## global initialization
  ENTRY043E:  preds = []
    int _t043F#0 = 0;
    string _t0441#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0443#35 = LoadImage<IMAGE2D<int>>(_t0441);
    string _t0445#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0447#35 = LoadImage<IMAGE2D<float>>(_t0445);
    real _t0449#2 = 0.0;
    real2 v00044B#4 = <real2>[_t0449,_t0449];
    real _t044D#5 = 0.5e0;
    real _t044F#4 = Neg<real>(_t044D);
    real2 v010451#4 = <real2>[_t044F,_t044D];
    real2 v020453#4 = <real2>[_t044F,_t044F];
    real2 v030455#4 = <real2>[_t044D,_t044D];
    real2 v040457#4 = <real2>[_t044D,_t044F];
    return (T0459,F045A,v00044B,v010451,v020453,v030455,v040457,_t0441,_t0443,_t043F,_t0445,_t0447,_t0449,_t044D,_t044F)
## initially
  ARRAY
    ENTRY0461:  preds = []
      int _t045D#4 = 0;
      int _t045E#4 = 60;
      live vars = (_t045E,_t045D)
    for int i045C#1 = _t045D .. _t045E
      for int j045F#1 = _t045D .. _t045E
        for int k0460#1 = _t045D .. _t045E
          ENTRY0465:  preds = []
            live vars = ()
          new R(i045C,j045F,k0460);
## strands
  strand R (int i0467#1, int j0468#1, int k0469#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY046F:  preds = []
        real _t0470#1 = IntToReal(i0467);
        real _t0472#3 = 0.60e2;
        real _t0474#1 = Div<real>(_t0470,_t0472);
        real _t0476#3 = 0.5e0;
        real _t0478#1 = Sub<real>(_t0474,_t0476);
        real _t047A#1 = IntToReal(j0468);
        real _t047C#1 = Div<real>(_t047A,_t0472);
        real _t047E#1 = Sub<real>(_t047C,_t0476);
        real _t0480#1 = IntToReal(k0469);
        real _t0482#1 = Div<real>(_t0480,_t0472);
        real _t0484#1 = Sub<real>(_t0482,_t0476);
        real3 t0486#1 = <real3>[_t0478,_t047E,_t0484];
        real score0488#3 = 0.0;
        real2 r0048A#3 = <real2>[score0488,score0488];
        self.t = t0486;
        self.score = score0488;
        self.r0 = r0048A;
        self.r1 = r0048A;
        self.pos = r0048A;
        strand_init ()
    method Update
        ENTRY0492:  preds = []
          real3 t0493#4 = self.t;
          real score0495#2 = self.score;
          real _t0497#2 = 0.1e1;
          real _t0499#3 = 0.2e1;
          int _t049B#1 = 2;
          real _t049D#6 = Subscript<real3>(t0493,_t049B);
          real _t049F#1 = Mul<real>(_t0499,_t049D);
          real _t04A1#1 = Mul<real>(_t049F,_t049D);
          real _t04A3#2 = Sub<real>(_t0497,_t04A1);
          real _t04A5#1 = Neg<real>(_t0499);
          real _t04A7#1 = Mul<real>(_t049D,_t049D);
          real _t04A9#1 = Sub<real>(_t0497,_t04A7);
          real _t04AB#2 = sqrt(_t04A9);
          real _t04AD#1 = Mul<real>(_t04A5,_t04AB);
          real _t04AF#1 = Mul<real>(_t04AD,_t049D);
          real2 r004B1#6 = <real2>[_t04A3,_t04AF];
          real _t04B3#1 = Mul<real>(_t0499,_t04AB);
          real _t04B5#1 = Mul<real>(_t04B3,_t049D);
          real2 r104B7#6 = <real2>[_t04B5,_t04A3];
          real _t04B9#1 = Dot<2>(r004B1,v00044B);
          real _t04BB#1 = Dot<2>(r104B7,v00044B);
          real2 _t04BD#1 = <real2>[_t04B9,_t04BB];
          int _t04BF#1 = 0;
          real _t04C1#1 = Subscript<real3>(t0493,_t04BF);
          int _t04C3#1 = 1;
          real _t04C5#1 = Subscript<real3>(t0493,_t04C3);
          real2 _t04C7#5 = <real2>[_t04C1,_t04C5];
          real2 pos04C9#2 = Add<real2>(_t04BD,_t04C7);
          real2 x04CC#1 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos04C9);
          bool _t04CB#1 = Inside<IMAGE2D<float>,2>(x04CC,_t0447);
          if _t04CB then goto ASSIGN04D2 else goto ASSIGN0A40
        ASSIGN04D2:  preds = [COND04CF]
          real2 x04D1#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v00044B);
          bool _t04D0#1 = Inside<IMAGE2D<int>,2>(x04D1,_t0443);
          goto JOIN04D6
        JOIN04D6:  preds = [ASSIGN04D3,ASSIGN0A40]
          bool _t04D4#1 = phi(_t04D0,_t04D5)
          if _t04D4 then goto ASSIGN0517 else goto JOIN05D9
        ASSIGN0517:  preds = [COND04D7]
          real2 x04D9#2 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos04C9);
          real2 nd04DB#2 = Floor<2>(x04D9);
          real2 f04DA#2 = Sub<real2>(x04D9,nd04DB);
          int{2} n04DC#8 = RealToInt<2>(nd04DB);
          int t104F8#1 = -1;
          int t204F9#1 = Index<int{2},0>(n04DC);
          int ix04F7#1 = Add<int>(t104F8,t204F9);
          int t104FB#1 = -1;
          int t204FC#1 = Index<int{2},1>(n04DC);
          int iy04FA#1 = Add<int>(t104FB,t204FC);
          addr(IMAGE2D<float>) a04FD#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04FA);
          real4 v004DE#1 = LoadVoxels<IMAGE2D<float>,4>(a04FD);
          int t104F1#1 = -1;
          int t204F2#1 = Index<int{2},0>(n04DC);
          int ix04F0#1 = Add<int>(t104F1,t204F2);
          int t104F4#1 = 0;
          int t204F5#1 = Index<int{2},1>(n04DC);
          int iy04F3#1 = Add<int>(t104F4,t204F5);
          addr(IMAGE2D<float>) a04F6#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F0,iy04F3);
          real4 v104DF#1 = LoadVoxels<IMAGE2D<float>,4>(a04F6);
          int t104EA#1 = -1;
          int t204EB#1 = Index<int{2},0>(n04DC);
          int ix04E9#1 = Add<int>(t104EA,t204EB);
          int t104ED#1 = 1;
          int t204EE#1 = Index<int{2},1>(n04DC);
          int iy04EC#1 = Add<int>(t104ED,t204EE);
          addr(IMAGE2D<float>) a04EF#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04E9,iy04EC);
          real4 v204E0#1 = LoadVoxels<IMAGE2D<float>,4>(a04EF);
          int t104E3#1 = -1;
          int t204E4#1 = Index<int{2},0>(n04DC);
          int ix04E2#1 = Add<int>(t104E3,t204E4);
          int t104E6#1 = 2;
          int t204E7#1 = Index<int{2},1>(n04DC);
          int iy04E5#1 = Add<int>(t104E6,t204E7);
          addr(IMAGE2D<float>) a04E8#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04E2,iy04E5);
          real4 v304E1#1 = LoadVoxels<IMAGE2D<float>,4>(a04E8);
          real fy0509#4 = Index<real2,1>(f04DA);
          real r0511#1 = 0.1e1;
          real t3050E#1 = Add<real>(fy0509,r0511);
          real t2050D#1 = fy0509;
          real r0510#1 = 0.1e1;
          real t1050C#1 = Sub<real>(fy0509,r0510);
          real r050F#1 = 0.2e1;
          real t0050B#1 = Sub<real>(fy0509,r050F);
          real4 a050A#1 = <real4>[t3050E,t2050D,t1050C,t0050B];
          real4 hy04FF#1 = EvalKernel<4,bspln3,0>(a050A);
          real fx0500#4 = Index<real2,0>(f04DA);
          real r0508#1 = 0.1e1;
          real t30505#1 = Add<real>(fx0500,r0508);
          real t20504#1 = fx0500;
          real r0507#1 = 0.1e1;
          real t10503#1 = Sub<real>(fx0500,r0507);
          real r0506#1 = 0.2e1;
          real t00502#1 = Sub<real>(fx0500,r0506);
          real4 a0501#1 = <real4>[t30505,t20504,t10503,t00502];
          real4 hx04FE#4 = EvalKernel<4,bspln3,0>(a0501);
          real t00513#1 = Dot<4>(v004DE,hx04FE);
          real t10514#1 = Dot<4>(v104DF,hx04FE);
          real t20515#1 = Dot<4>(v204E0,hx04FE);
          real t30516#1 = Dot<4>(v304E1,hx04FE);
          real4 tv0512#1 = <real4>[t00513,t10514,t20515,t30516];
          real _t04D8#1 = Dot<4>(hy04FF,tv0512);
          real2 x0556#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v00044B);
          real2 nd0558#2 = Floor<2>(x0556);
          real2 f0557#2 = Sub<real2>(x0556,nd0558);
          int{2} n0559#8 = RealToInt<2>(nd0558);
          int t10575#1 = -1;
          int t20576#1 = Index<int{2},0>(n0559);
          int ix0574#1 = Add<int>(t10575,t20576);
          int t10578#1 = -1;
          int t20579#1 = Index<int{2},1>(n0559);
          int iy0577#1 = Add<int>(t10578,t20579);
          addr(IMAGE2D<int>) a057A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0577);
          real4 v0055B#1 = LoadVoxels<IMAGE2D<int>,4>(a057A);
          int t1056E#1 = -1;
          int t2056F#1 = Index<int{2},0>(n0559);
          int ix056D#1 = Add<int>(t1056E,t2056F);
          int t10571#1 = 0;
          int t20572#1 = Index<int{2},1>(n0559);
          int iy0570#1 = Add<int>(t10571,t20572);
          addr(IMAGE2D<int>) a0573#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix056D,iy0570);
          real4 v1055C#1 = LoadVoxels<IMAGE2D<int>,4>(a0573);
          int t10567#1 = -1;
          int t20568#1 = Index<int{2},0>(n0559);
          int ix0566#1 = Add<int>(t10567,t20568);
          int t1056A#1 = 1;
          int t2056B#1 = Index<int{2},1>(n0559);
          int iy0569#1 = Add<int>(t1056A,t2056B);
          addr(IMAGE2D<int>) a056C#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0566,iy0569);
          real4 v2055D#1 = LoadVoxels<IMAGE2D<int>,4>(a056C);
          int t10560#1 = -1;
          int t20561#1 = Index<int{2},0>(n0559);
          int ix055F#1 = Add<int>(t10560,t20561);
          int t10563#1 = 2;
          int t20564#1 = Index<int{2},1>(n0559);
          int iy0562#1 = Add<int>(t10563,t20564);
          addr(IMAGE2D<int>) a0565#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix055F,iy0562);
          real4 v3055E#1 = LoadVoxels<IMAGE2D<int>,4>(a0565);
          real fy0586#4 = Index<real2,1>(f0557);
          real r058E#1 = 0.1e1;
          real t3058B#1 = Add<real>(fy0586,r058E);
          real t2058A#1 = fy0586;
          real r058D#1 = 0.1e1;
          real t10589#1 = Sub<real>(fy0586,r058D);
          real r058C#1 = 0.2e1;
          real t00588#1 = Sub<real>(fy0586,r058C);
          real4 a0587#1 = <real4>[t3058B,t2058A,t10589,t00588];
          real4 hy057C#1 = EvalKernel<4,bspln3,0>(a0587);
          real fx057D#4 = Index<real2,0>(f0557);
          real r0585#1 = 0.1e1;
          real t30582#1 = Add<real>(fx057D,r0585);
          real t20581#1 = fx057D;
          real r0584#1 = 0.1e1;
          real t10580#1 = Sub<real>(fx057D,r0584);
          real r0583#1 = 0.2e1;
          real t0057F#1 = Sub<real>(fx057D,r0583);
          real4 a057E#1 = <real4>[t30582,t20581,t10580,t0057F];
          real4 hx057B#4 = EvalKernel<4,bspln3,0>(a057E);
          real t00590#1 = Dot<4>(v0055B,hx057B);
          real t10591#1 = Dot<4>(v1055C,hx057B);
          real t20592#1 = Dot<4>(v2055D,hx057B);
          real t30593#1 = Dot<4>(v3055E,hx057B);
          real4 tv058F#1 = <real4>[t00590,t10591,t20592,t30593];
          real _t0555#1 = Dot<4>(hy057C,tv058F);
          real _t05D2#2 = Sub<real>(_t04D8,_t0555);
          real _t05D4#1 = Mul<real>(_t05D2,_t05D2);
          real score05D6#1 = Add<real>(score0495,_t05D4);
          goto JOIN05D9
        JOIN05D9:  preds = [ASSIGN05D7,COND04D7]
          real score05D8#2 = phi(score05D6,score0495)
          real _t05DA#1 = Dot<2>(r004B1,v010451);
          real _t05DC#1 = Dot<2>(r104B7,v010451);
          real2 _t05DE#1 = <real2>[_t05DA,_t05DC];
          real2 pos05E0#2 = Add<real2>(_t05DE,_t04C7);
          real2 x05E3#1 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos05E0);
          bool _t05E2#1 = Inside<IMAGE2D<float>,2>(x05E3,_t0447);
          if _t05E2 then goto ASSIGN05E9 else goto ASSIGN0A3F
        ASSIGN05E9:  preds = [COND05E6]
          real2 x05E8#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v010451);
          bool _t05E7#1 = Inside<IMAGE2D<int>,2>(x05E8,_t0443);
          goto JOIN05ED
        JOIN05ED:  preds = [ASSIGN05EA,ASSIGN0A3F]
          bool _t05EB#1 = phi(_t05E7,_t05EC)
          if _t05EB then goto ASSIGN062E else goto JOIN06F0
        ASSIGN062E:  preds = [COND05EE]
          real2 x05F0#2 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos05E0);
          real2 nd05F2#2 = Floor<2>(x05F0);
          real2 f05F1#2 = Sub<real2>(x05F0,nd05F2);
          int{2} n05F3#8 = RealToInt<2>(nd05F2);
          int t1060F#1 = -1;
          int t20610#1 = Index<int{2},0>(n05F3);
          int ix060E#1 = Add<int>(t1060F,t20610);
          int t10612#1 = -1;
          int t20613#1 = Index<int{2},1>(n05F3);
          int iy0611#1 = Add<int>(t10612,t20613);
          addr(IMAGE2D<float>) a0614#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy0611);
          real4 v005F5#1 = LoadVoxels<IMAGE2D<float>,4>(a0614);
          int t10608#1 = -1;
          int t20609#1 = Index<int{2},0>(n05F3);
          int ix0607#1 = Add<int>(t10608,t20609);
          int t1060B#1 = 0;
          int t2060C#1 = Index<int{2},1>(n05F3);
          int iy060A#1 = Add<int>(t1060B,t2060C);
          addr(IMAGE2D<float>) a060D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0607,iy060A);
          real4 v105F6#1 = LoadVoxels<IMAGE2D<float>,4>(a060D);
          int t10601#1 = -1;
          int t20602#1 = Index<int{2},0>(n05F3);
          int ix0600#1 = Add<int>(t10601,t20602);
          int t10604#1 = 1;
          int t20605#1 = Index<int{2},1>(n05F3);
          int iy0603#1 = Add<int>(t10604,t20605);
          addr(IMAGE2D<float>) a0606#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0600,iy0603);
          real4 v205F7#1 = LoadVoxels<IMAGE2D<float>,4>(a0606);
          int t105FA#1 = -1;
          int t205FB#1 = Index<int{2},0>(n05F3);
          int ix05F9#1 = Add<int>(t105FA,t205FB);
          int t105FD#1 = 2;
          int t205FE#1 = Index<int{2},1>(n05F3);
          int iy05FC#1 = Add<int>(t105FD,t205FE);
          addr(IMAGE2D<float>) a05FF#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix05F9,iy05FC);
          real4 v305F8#1 = LoadVoxels<IMAGE2D<float>,4>(a05FF);
          real fy0620#4 = Index<real2,1>(f05F1);
          real r0628#1 = 0.1e1;
          real t30625#1 = Add<real>(fy0620,r0628);
          real t20624#1 = fy0620;
          real r0627#1 = 0.1e1;
          real t10623#1 = Sub<real>(fy0620,r0627);
          real r0626#1 = 0.2e1;
          real t00622#1 = Sub<real>(fy0620,r0626);
          real4 a0621#1 = <real4>[t30625,t20624,t10623,t00622];
          real4 hy0616#1 = EvalKernel<4,bspln3,0>(a0621);
          real fx0617#4 = Index<real2,0>(f05F1);
          real r061F#1 = 0.1e1;
          real t3061C#1 = Add<real>(fx0617,r061F);
          real t2061B#1 = fx0617;
          real r061E#1 = 0.1e1;
          real t1061A#1 = Sub<real>(fx0617,r061E);
          real r061D#1 = 0.2e1;
          real t00619#1 = Sub<real>(fx0617,r061D);
          real4 a0618#1 = <real4>[t3061C,t2061B,t1061A,t00619];
          real4 hx0615#4 = EvalKernel<4,bspln3,0>(a0618);
          real t0062A#1 = Dot<4>(v005F5,hx0615);
          real t1062B#1 = Dot<4>(v105F6,hx0615);
          real t2062C#1 = Dot<4>(v205F7,hx0615);
          real t3062D#1 = Dot<4>(v305F8,hx0615);
          real4 tv0629#1 = <real4>[t0062A,t1062B,t2062C,t3062D];
          real _t05EF#1 = Dot<4>(hy0616,tv0629);
          real2 x066D#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v010451);
          real2 nd066F#2 = Floor<2>(x066D);
          real2 f066E#2 = Sub<real2>(x066D,nd066F);
          int{2} n0670#8 = RealToInt<2>(nd066F);
          int t1068C#1 = -1;
          int t2068D#1 = Index<int{2},0>(n0670);
          int ix068B#1 = Add<int>(t1068C,t2068D);
          int t1068F#1 = -1;
          int t20690#1 = Index<int{2},1>(n0670);
          int iy068E#1 = Add<int>(t1068F,t20690);
          addr(IMAGE2D<int>) a0691#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy068E);
          real4 v00672#1 = LoadVoxels<IMAGE2D<int>,4>(a0691);
          int t10685#1 = -1;
          int t20686#1 = Index<int{2},0>(n0670);
          int ix0684#1 = Add<int>(t10685,t20686);
          int t10688#1 = 0;
          int t20689#1 = Index<int{2},1>(n0670);
          int iy0687#1 = Add<int>(t10688,t20689);
          addr(IMAGE2D<int>) a068A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0684,iy0687);
          real4 v10673#1 = LoadVoxels<IMAGE2D<int>,4>(a068A);
          int t1067E#1 = -1;
          int t2067F#1 = Index<int{2},0>(n0670);
          int ix067D#1 = Add<int>(t1067E,t2067F);
          int t10681#1 = 1;
          int t20682#1 = Index<int{2},1>(n0670);
          int iy0680#1 = Add<int>(t10681,t20682);
          addr(IMAGE2D<int>) a0683#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix067D,iy0680);
          real4 v20674#1 = LoadVoxels<IMAGE2D<int>,4>(a0683);
          int t10677#1 = -1;
          int t20678#1 = Index<int{2},0>(n0670);
          int ix0676#1 = Add<int>(t10677,t20678);
          int t1067A#1 = 2;
          int t2067B#1 = Index<int{2},1>(n0670);
          int iy0679#1 = Add<int>(t1067A,t2067B);
          addr(IMAGE2D<int>) a067C#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0676,iy0679);
          real4 v30675#1 = LoadVoxels<IMAGE2D<int>,4>(a067C);
          real fy069D#4 = Index<real2,1>(f066E);
          real r06A5#1 = 0.1e1;
          real t306A2#1 = Add<real>(fy069D,r06A5);
          real t206A1#1 = fy069D;
          real r06A4#1 = 0.1e1;
          real t106A0#1 = Sub<real>(fy069D,r06A4);
          real r06A3#1 = 0.2e1;
          real t0069F#1 = Sub<real>(fy069D,r06A3);
          real4 a069E#1 = <real4>[t306A2,t206A1,t106A0,t0069F];
          real4 hy0693#1 = EvalKernel<4,bspln3,0>(a069E);
          real fx0694#4 = Index<real2,0>(f066E);
          real r069C#1 = 0.1e1;
          real t30699#1 = Add<real>(fx0694,r069C);
          real t20698#1 = fx0694;
          real r069B#1 = 0.1e1;
          real t10697#1 = Sub<real>(fx0694,r069B);
          real r069A#1 = 0.2e1;
          real t00696#1 = Sub<real>(fx0694,r069A);
          real4 a0695#1 = <real4>[t30699,t20698,t10697,t00696];
          real4 hx0692#4 = EvalKernel<4,bspln3,0>(a0695);
          real t006A7#1 = Dot<4>(v00672,hx0692);
          real t106A8#1 = Dot<4>(v10673,hx0692);
          real t206A9#1 = Dot<4>(v20674,hx0692);
          real t306AA#1 = Dot<4>(v30675,hx0692);
          real4 tv06A6#1 = <real4>[t006A7,t106A8,t206A9,t306AA];
          real _t066C#1 = Dot<4>(hy0693,tv06A6);
          real _t06E9#2 = Sub<real>(_t05EF,_t066C);
          real _t06EB#1 = Mul<real>(_t06E9,_t06E9);
          real score06ED#1 = Add<real>(score05D8,_t06EB);
          goto JOIN06F0
        JOIN06F0:  preds = [ASSIGN06EE,COND05EE]
          real score06EF#2 = phi(score06ED,score05D8)
          real _t06F1#1 = Dot<2>(r004B1,v020453);
          real _t06F3#1 = Dot<2>(r104B7,v020453);
          real2 _t06F5#1 = <real2>[_t06F1,_t06F3];
          real2 pos06F7#2 = Add<real2>(_t06F5,_t04C7);
          real2 x06FA#1 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos06F7);
          bool _t06F9#1 = Inside<IMAGE2D<float>,2>(x06FA,_t0447);
          if _t06F9 then goto ASSIGN0700 else goto ASSIGN0A3E
        ASSIGN0700:  preds = [COND06FD]
          real2 x06FF#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v020453);
          bool _t06FE#1 = Inside<IMAGE2D<int>,2>(x06FF,_t0443);
          goto JOIN0704
        JOIN0704:  preds = [ASSIGN0701,ASSIGN0A3E]
          bool _t0702#1 = phi(_t06FE,_t0703)
          if _t0702 then goto ASSIGN0745 else goto JOIN0807
        ASSIGN0745:  preds = [COND0705]
          real2 x0707#2 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos06F7);
          real2 nd0709#2 = Floor<2>(x0707);
          real2 f0708#2 = Sub<real2>(x0707,nd0709);
          int{2} n070A#8 = RealToInt<2>(nd0709);
          int t10726#1 = -1;
          int t20727#1 = Index<int{2},0>(n070A);
          int ix0725#1 = Add<int>(t10726,t20727);
          int t10729#1 = -1;
          int t2072A#1 = Index<int{2},1>(n070A);
          int iy0728#1 = Add<int>(t10729,t2072A);
          addr(IMAGE2D<float>) a072B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy0728);
          real4 v0070C#1 = LoadVoxels<IMAGE2D<float>,4>(a072B);
          int t1071F#1 = -1;
          int t20720#1 = Index<int{2},0>(n070A);
          int ix071E#1 = Add<int>(t1071F,t20720);
          int t10722#1 = 0;
          int t20723#1 = Index<int{2},1>(n070A);
          int iy0721#1 = Add<int>(t10722,t20723);
          addr(IMAGE2D<float>) a0724#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix071E,iy0721);
          real4 v1070D#1 = LoadVoxels<IMAGE2D<float>,4>(a0724);
          int t10718#1 = -1;
          int t20719#1 = Index<int{2},0>(n070A);
          int ix0717#1 = Add<int>(t10718,t20719);
          int t1071B#1 = 1;
          int t2071C#1 = Index<int{2},1>(n070A);
          int iy071A#1 = Add<int>(t1071B,t2071C);
          addr(IMAGE2D<float>) a071D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0717,iy071A);
          real4 v2070E#1 = LoadVoxels<IMAGE2D<float>,4>(a071D);
          int t10711#1 = -1;
          int t20712#1 = Index<int{2},0>(n070A);
          int ix0710#1 = Add<int>(t10711,t20712);
          int t10714#1 = 2;
          int t20715#1 = Index<int{2},1>(n070A);
          int iy0713#1 = Add<int>(t10714,t20715);
          addr(IMAGE2D<float>) a0716#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0710,iy0713);
          real4 v3070F#1 = LoadVoxels<IMAGE2D<float>,4>(a0716);
          real fy0737#4 = Index<real2,1>(f0708);
          real r073F#1 = 0.1e1;
          real t3073C#1 = Add<real>(fy0737,r073F);
          real t2073B#1 = fy0737;
          real r073E#1 = 0.1e1;
          real t1073A#1 = Sub<real>(fy0737,r073E);
          real r073D#1 = 0.2e1;
          real t00739#1 = Sub<real>(fy0737,r073D);
          real4 a0738#1 = <real4>[t3073C,t2073B,t1073A,t00739];
          real4 hy072D#1 = EvalKernel<4,bspln3,0>(a0738);
          real fx072E#4 = Index<real2,0>(f0708);
          real r0736#1 = 0.1e1;
          real t30733#1 = Add<real>(fx072E,r0736);
          real t20732#1 = fx072E;
          real r0735#1 = 0.1e1;
          real t10731#1 = Sub<real>(fx072E,r0735);
          real r0734#1 = 0.2e1;
          real t00730#1 = Sub<real>(fx072E,r0734);
          real4 a072F#1 = <real4>[t30733,t20732,t10731,t00730];
          real4 hx072C#4 = EvalKernel<4,bspln3,0>(a072F);
          real t00741#1 = Dot<4>(v0070C,hx072C);
          real t10742#1 = Dot<4>(v1070D,hx072C);
          real t20743#1 = Dot<4>(v2070E,hx072C);
          real t30744#1 = Dot<4>(v3070F,hx072C);
          real4 tv0740#1 = <real4>[t00741,t10742,t20743,t30744];
          real _t0706#1 = Dot<4>(hy072D,tv0740);
          real2 x0784#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v020453);
          real2 nd0786#2 = Floor<2>(x0784);
          real2 f0785#2 = Sub<real2>(x0784,nd0786);
          int{2} n0787#8 = RealToInt<2>(nd0786);
          int t107A3#1 = -1;
          int t207A4#1 = Index<int{2},0>(n0787);
          int ix07A2#1 = Add<int>(t107A3,t207A4);
          int t107A6#1 = -1;
          int t207A7#1 = Index<int{2},1>(n0787);
          int iy07A5#1 = Add<int>(t107A6,t207A7);
          addr(IMAGE2D<int>) a07A8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy07A5);
          real4 v00789#1 = LoadVoxels<IMAGE2D<int>,4>(a07A8);
          int t1079C#1 = -1;
          int t2079D#1 = Index<int{2},0>(n0787);
          int ix079B#1 = Add<int>(t1079C,t2079D);
          int t1079F#1 = 0;
          int t207A0#1 = Index<int{2},1>(n0787);
          int iy079E#1 = Add<int>(t1079F,t207A0);
          addr(IMAGE2D<int>) a07A1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix079B,iy079E);
          real4 v1078A#1 = LoadVoxels<IMAGE2D<int>,4>(a07A1);
          int t10795#1 = -1;
          int t20796#1 = Index<int{2},0>(n0787);
          int ix0794#1 = Add<int>(t10795,t20796);
          int t10798#1 = 1;
          int t20799#1 = Index<int{2},1>(n0787);
          int iy0797#1 = Add<int>(t10798,t20799);
          addr(IMAGE2D<int>) a079A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0794,iy0797);
          real4 v2078B#1 = LoadVoxels<IMAGE2D<int>,4>(a079A);
          int t1078E#1 = -1;
          int t2078F#1 = Index<int{2},0>(n0787);
          int ix078D#1 = Add<int>(t1078E,t2078F);
          int t10791#1 = 2;
          int t20792#1 = Index<int{2},1>(n0787);
          int iy0790#1 = Add<int>(t10791,t20792);
          addr(IMAGE2D<int>) a0793#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix078D,iy0790);
          real4 v3078C#1 = LoadVoxels<IMAGE2D<int>,4>(a0793);
          real fy07B4#4 = Index<real2,1>(f0785);
          real r07BC#1 = 0.1e1;
          real t307B9#1 = Add<real>(fy07B4,r07BC);
          real t207B8#1 = fy07B4;
          real r07BB#1 = 0.1e1;
          real t107B7#1 = Sub<real>(fy07B4,r07BB);
          real r07BA#1 = 0.2e1;
          real t007B6#1 = Sub<real>(fy07B4,r07BA);
          real4 a07B5#1 = <real4>[t307B9,t207B8,t107B7,t007B6];
          real4 hy07AA#1 = EvalKernel<4,bspln3,0>(a07B5);
          real fx07AB#4 = Index<real2,0>(f0785);
          real r07B3#1 = 0.1e1;
          real t307B0#1 = Add<real>(fx07AB,r07B3);
          real t207AF#1 = fx07AB;
          real r07B2#1 = 0.1e1;
          real t107AE#1 = Sub<real>(fx07AB,r07B2);
          real r07B1#1 = 0.2e1;
          real t007AD#1 = Sub<real>(fx07AB,r07B1);
          real4 a07AC#1 = <real4>[t307B0,t207AF,t107AE,t007AD];
          real4 hx07A9#4 = EvalKernel<4,bspln3,0>(a07AC);
          real t007BE#1 = Dot<4>(v00789,hx07A9);
          real t107BF#1 = Dot<4>(v1078A,hx07A9);
          real t207C0#1 = Dot<4>(v2078B,hx07A9);
          real t307C1#1 = Dot<4>(v3078C,hx07A9);
          real4 tv07BD#1 = <real4>[t007BE,t107BF,t207C0,t307C1];
          real _t0783#1 = Dot<4>(hy07AA,tv07BD);
          real _t0800#2 = Sub<real>(_t0706,_t0783);
          real _t0802#1 = Mul<real>(_t0800,_t0800);
          real score0804#1 = Add<real>(score06EF,_t0802);
          goto JOIN0807
        JOIN0807:  preds = [ASSIGN0805,COND0705]
          real score0806#2 = phi(score0804,score06EF)
          real _t0808#1 = Dot<2>(r004B1,v030455);
          real _t080A#1 = Dot<2>(r104B7,v030455);
          real2 _t080C#1 = <real2>[_t0808,_t080A];
          real2 pos080E#2 = Add<real2>(_t080C,_t04C7);
          real2 x0811#1 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos080E);
          bool _t0810#1 = Inside<IMAGE2D<float>,2>(x0811,_t0447);
          if _t0810 then goto ASSIGN0817 else goto ASSIGN0A3D
        ASSIGN0817:  preds = [COND0814]
          real2 x0816#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v030455);
          bool _t0815#1 = Inside<IMAGE2D<int>,2>(x0816,_t0443);
          goto JOIN081B
        JOIN081B:  preds = [ASSIGN0818,ASSIGN0A3D]
          bool _t0819#1 = phi(_t0815,_t081A)
          if _t0819 then goto ASSIGN085C else goto JOIN091E
        ASSIGN085C:  preds = [COND081C]
          real2 x081E#2 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos080E);
          real2 nd0820#2 = Floor<2>(x081E);
          real2 f081F#2 = Sub<real2>(x081E,nd0820);
          int{2} n0821#8 = RealToInt<2>(nd0820);
          int t1083D#1 = -1;
          int t2083E#1 = Index<int{2},0>(n0821);
          int ix083C#1 = Add<int>(t1083D,t2083E);
          int t10840#1 = -1;
          int t20841#1 = Index<int{2},1>(n0821);
          int iy083F#1 = Add<int>(t10840,t20841);
          addr(IMAGE2D<float>) a0842#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy083F);
          real4 v00823#1 = LoadVoxels<IMAGE2D<float>,4>(a0842);
          int t10836#1 = -1;
          int t20837#1 = Index<int{2},0>(n0821);
          int ix0835#1 = Add<int>(t10836,t20837);
          int t10839#1 = 0;
          int t2083A#1 = Index<int{2},1>(n0821);
          int iy0838#1 = Add<int>(t10839,t2083A);
          addr(IMAGE2D<float>) a083B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0835,iy0838);
          real4 v10824#1 = LoadVoxels<IMAGE2D<float>,4>(a083B);
          int t1082F#1 = -1;
          int t20830#1 = Index<int{2},0>(n0821);
          int ix082E#1 = Add<int>(t1082F,t20830);
          int t10832#1 = 1;
          int t20833#1 = Index<int{2},1>(n0821);
          int iy0831#1 = Add<int>(t10832,t20833);
          addr(IMAGE2D<float>) a0834#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix082E,iy0831);
          real4 v20825#1 = LoadVoxels<IMAGE2D<float>,4>(a0834);
          int t10828#1 = -1;
          int t20829#1 = Index<int{2},0>(n0821);
          int ix0827#1 = Add<int>(t10828,t20829);
          int t1082B#1 = 2;
          int t2082C#1 = Index<int{2},1>(n0821);
          int iy082A#1 = Add<int>(t1082B,t2082C);
          addr(IMAGE2D<float>) a082D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0827,iy082A);
          real4 v30826#1 = LoadVoxels<IMAGE2D<float>,4>(a082D);
          real fy084E#4 = Index<real2,1>(f081F);
          real r0856#1 = 0.1e1;
          real t30853#1 = Add<real>(fy084E,r0856);
          real t20852#1 = fy084E;
          real r0855#1 = 0.1e1;
          real t10851#1 = Sub<real>(fy084E,r0855);
          real r0854#1 = 0.2e1;
          real t00850#1 = Sub<real>(fy084E,r0854);
          real4 a084F#1 = <real4>[t30853,t20852,t10851,t00850];
          real4 hy0844#1 = EvalKernel<4,bspln3,0>(a084F);
          real fx0845#4 = Index<real2,0>(f081F);
          real r084D#1 = 0.1e1;
          real t3084A#1 = Add<real>(fx0845,r084D);
          real t20849#1 = fx0845;
          real r084C#1 = 0.1e1;
          real t10848#1 = Sub<real>(fx0845,r084C);
          real r084B#1 = 0.2e1;
          real t00847#1 = Sub<real>(fx0845,r084B);
          real4 a0846#1 = <real4>[t3084A,t20849,t10848,t00847];
          real4 hx0843#4 = EvalKernel<4,bspln3,0>(a0846);
          real t00858#1 = Dot<4>(v00823,hx0843);
          real t10859#1 = Dot<4>(v10824,hx0843);
          real t2085A#1 = Dot<4>(v20825,hx0843);
          real t3085B#1 = Dot<4>(v30826,hx0843);
          real4 tv0857#1 = <real4>[t00858,t10859,t2085A,t3085B];
          real _t081D#1 = Dot<4>(hy0844,tv0857);
          real2 x089B#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v030455);
          real2 nd089D#2 = Floor<2>(x089B);
          real2 f089C#2 = Sub<real2>(x089B,nd089D);
          int{2} n089E#8 = RealToInt<2>(nd089D);
          int t108BA#1 = -1;
          int t208BB#1 = Index<int{2},0>(n089E);
          int ix08B9#1 = Add<int>(t108BA,t208BB);
          int t108BD#1 = -1;
          int t208BE#1 = Index<int{2},1>(n089E);
          int iy08BC#1 = Add<int>(t108BD,t208BE);
          addr(IMAGE2D<int>) a08BF#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08BC);
          real4 v008A0#1 = LoadVoxels<IMAGE2D<int>,4>(a08BF);
          int t108B3#1 = -1;
          int t208B4#1 = Index<int{2},0>(n089E);
          int ix08B2#1 = Add<int>(t108B3,t208B4);
          int t108B6#1 = 0;
          int t208B7#1 = Index<int{2},1>(n089E);
          int iy08B5#1 = Add<int>(t108B6,t208B7);
          addr(IMAGE2D<int>) a08B8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B2,iy08B5);
          real4 v108A1#1 = LoadVoxels<IMAGE2D<int>,4>(a08B8);
          int t108AC#1 = -1;
          int t208AD#1 = Index<int{2},0>(n089E);
          int ix08AB#1 = Add<int>(t108AC,t208AD);
          int t108AF#1 = 1;
          int t208B0#1 = Index<int{2},1>(n089E);
          int iy08AE#1 = Add<int>(t108AF,t208B0);
          addr(IMAGE2D<int>) a08B1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08AB,iy08AE);
          real4 v208A2#1 = LoadVoxels<IMAGE2D<int>,4>(a08B1);
          int t108A5#1 = -1;
          int t208A6#1 = Index<int{2},0>(n089E);
          int ix08A4#1 = Add<int>(t108A5,t208A6);
          int t108A8#1 = 2;
          int t208A9#1 = Index<int{2},1>(n089E);
          int iy08A7#1 = Add<int>(t108A8,t208A9);
          addr(IMAGE2D<int>) a08AA#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08A4,iy08A7);
          real4 v308A3#1 = LoadVoxels<IMAGE2D<int>,4>(a08AA);
          real fy08CB#4 = Index<real2,1>(f089C);
          real r08D3#1 = 0.1e1;
          real t308D0#1 = Add<real>(fy08CB,r08D3);
          real t208CF#1 = fy08CB;
          real r08D2#1 = 0.1e1;
          real t108CE#1 = Sub<real>(fy08CB,r08D2);
          real r08D1#1 = 0.2e1;
          real t008CD#1 = Sub<real>(fy08CB,r08D1);
          real4 a08CC#1 = <real4>[t308D0,t208CF,t108CE,t008CD];
          real4 hy08C1#1 = EvalKernel<4,bspln3,0>(a08CC);
          real fx08C2#4 = Index<real2,0>(f089C);
          real r08CA#1 = 0.1e1;
          real t308C7#1 = Add<real>(fx08C2,r08CA);
          real t208C6#1 = fx08C2;
          real r08C9#1 = 0.1e1;
          real t108C5#1 = Sub<real>(fx08C2,r08C9);
          real r08C8#1 = 0.2e1;
          real t008C4#1 = Sub<real>(fx08C2,r08C8);
          real4 a08C3#1 = <real4>[t308C7,t208C6,t108C5,t008C4];
          real4 hx08C0#4 = EvalKernel<4,bspln3,0>(a08C3);
          real t008D5#1 = Dot<4>(v008A0,hx08C0);
          real t108D6#1 = Dot<4>(v108A1,hx08C0);
          real t208D7#1 = Dot<4>(v208A2,hx08C0);
          real t308D8#1 = Dot<4>(v308A3,hx08C0);
          real4 tv08D4#1 = <real4>[t008D5,t108D6,t208D7,t308D8];
          real _t089A#1 = Dot<4>(hy08C1,tv08D4);
          real _t0917#2 = Sub<real>(_t081D,_t089A);
          real _t0919#1 = Mul<real>(_t0917,_t0917);
          real score091B#1 = Add<real>(score0806,_t0919);
          goto JOIN091E
        JOIN091E:  preds = [ASSIGN091C,COND081C]
          real score091D#2 = phi(score091B,score0806)
          real _t091F#1 = Dot<2>(r004B1,v040457);
          real _t0921#1 = Dot<2>(r104B7,v040457);
          real2 _t0923#1 = <real2>[_t091F,_t0921];
          real2 pos0925#3 = Add<real2>(_t0923,_t04C7);
          real2 x0928#1 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos0925);
          bool _t0927#1 = Inside<IMAGE2D<float>,2>(x0928,_t0447);
          if _t0927 then goto ASSIGN092E else goto ASSIGN0A3C
        ASSIGN092E:  preds = [COND092B]
          real2 x092D#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v040457);
          bool _t092C#1 = Inside<IMAGE2D<int>,2>(x092D,_t0443);
          goto JOIN0932
        JOIN0932:  preds = [ASSIGN092F,ASSIGN0A3C]
          bool _t0930#1 = phi(_t092C,_t0931)
          if _t0930 then goto ASSIGN0973 else goto JOIN0A35
        ASSIGN0973:  preds = [COND0933]
          real2 x0935#2 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos0925);
          real2 nd0937#2 = Floor<2>(x0935);
          real2 f0936#2 = Sub<real2>(x0935,nd0937);
          int{2} n0938#8 = RealToInt<2>(nd0937);
          int t10954#1 = -1;
          int t20955#1 = Index<int{2},0>(n0938);
          int ix0953#1 = Add<int>(t10954,t20955);
          int t10957#1 = -1;
          int t20958#1 = Index<int{2},1>(n0938);
          int iy0956#1 = Add<int>(t10957,t20958);
          addr(IMAGE2D<float>) a0959#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy0956);
          real4 v0093A#1 = LoadVoxels<IMAGE2D<float>,4>(a0959);
          int t1094D#1 = -1;
          int t2094E#1 = Index<int{2},0>(n0938);
          int ix094C#1 = Add<int>(t1094D,t2094E);
          int t10950#1 = 0;
          int t20951#1 = Index<int{2},1>(n0938);
          int iy094F#1 = Add<int>(t10950,t20951);
          addr(IMAGE2D<float>) a0952#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix094C,iy094F);
          real4 v1093B#1 = LoadVoxels<IMAGE2D<float>,4>(a0952);
          int t10946#1 = -1;
          int t20947#1 = Index<int{2},0>(n0938);
          int ix0945#1 = Add<int>(t10946,t20947);
          int t10949#1 = 1;
          int t2094A#1 = Index<int{2},1>(n0938);
          int iy0948#1 = Add<int>(t10949,t2094A);
          addr(IMAGE2D<float>) a094B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0945,iy0948);
          real4 v2093C#1 = LoadVoxels<IMAGE2D<float>,4>(a094B);
          int t1093F#1 = -1;
          int t20940#1 = Index<int{2},0>(n0938);
          int ix093E#1 = Add<int>(t1093F,t20940);
          int t10942#1 = 2;
          int t20943#1 = Index<int{2},1>(n0938);
          int iy0941#1 = Add<int>(t10942,t20943);
          addr(IMAGE2D<float>) a0944#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix093E,iy0941);
          real4 v3093D#1 = LoadVoxels<IMAGE2D<float>,4>(a0944);
          real fy0965#4 = Index<real2,1>(f0936);
          real r096D#1 = 0.1e1;
          real t3096A#1 = Add<real>(fy0965,r096D);
          real t20969#1 = fy0965;
          real r096C#1 = 0.1e1;
          real t10968#1 = Sub<real>(fy0965,r096C);
          real r096B#1 = 0.2e1;
          real t00967#1 = Sub<real>(fy0965,r096B);
          real4 a0966#1 = <real4>[t3096A,t20969,t10968,t00967];
          real4 hy095B#1 = EvalKernel<4,bspln3,0>(a0966);
          real fx095C#4 = Index<real2,0>(f0936);
          real r0964#1 = 0.1e1;
          real t30961#1 = Add<real>(fx095C,r0964);
          real t20960#1 = fx095C;
          real r0963#1 = 0.1e1;
          real t1095F#1 = Sub<real>(fx095C,r0963);
          real r0962#1 = 0.2e1;
          real t0095E#1 = Sub<real>(fx095C,r0962);
          real4 a095D#1 = <real4>[t30961,t20960,t1095F,t0095E];
          real4 hx095A#4 = EvalKernel<4,bspln3,0>(a095D);
          real t0096F#1 = Dot<4>(v0093A,hx095A);
          real t10970#1 = Dot<4>(v1093B,hx095A);
          real t20971#1 = Dot<4>(v2093C,hx095A);
          real t30972#1 = Dot<4>(v3093D,hx095A);
          real4 tv096E#1 = <real4>[t0096F,t10970,t20971,t30972];
          real _t0934#1 = Dot<4>(hy095B,tv096E);
          real2 x09B2#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v040457);
          real2 nd09B4#2 = Floor<2>(x09B2);
          real2 f09B3#2 = Sub<real2>(x09B2,nd09B4);
          int{2} n09B5#8 = RealToInt<2>(nd09B4);
          int t109D1#1 = -1;
          int t209D2#1 = Index<int{2},0>(n09B5);
          int ix09D0#1 = Add<int>(t109D1,t209D2);
          int t109D4#1 = -1;
          int t209D5#1 = Index<int{2},1>(n09B5);
          int iy09D3#1 = Add<int>(t109D4,t209D5);
          addr(IMAGE2D<int>) a09D6#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09D3);
          real4 v009B7#1 = LoadVoxels<IMAGE2D<int>,4>(a09D6);
          int t109CA#1 = -1;
          int t209CB#1 = Index<int{2},0>(n09B5);
          int ix09C9#1 = Add<int>(t109CA,t209CB);
          int t109CD#1 = 0;
          int t209CE#1 = Index<int{2},1>(n09B5);
          int iy09CC#1 = Add<int>(t109CD,t209CE);
          addr(IMAGE2D<int>) a09CF#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09C9,iy09CC);
          real4 v109B8#1 = LoadVoxels<IMAGE2D<int>,4>(a09CF);
          int t109C3#1 = -1;
          int t209C4#1 = Index<int{2},0>(n09B5);
          int ix09C2#1 = Add<int>(t109C3,t209C4);
          int t109C6#1 = 1;
          int t209C7#1 = Index<int{2},1>(n09B5);
          int iy09C5#1 = Add<int>(t109C6,t209C7);
          addr(IMAGE2D<int>) a09C8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09C2,iy09C5);
          real4 v209B9#1 = LoadVoxels<IMAGE2D<int>,4>(a09C8);
          int t109BC#1 = -1;
          int t209BD#1 = Index<int{2},0>(n09B5);
          int ix09BB#1 = Add<int>(t109BC,t209BD);
          int t109BF#1 = 2;
          int t209C0#1 = Index<int{2},1>(n09B5);
          int iy09BE#1 = Add<int>(t109BF,t209C0);
          addr(IMAGE2D<int>) a09C1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09BB,iy09BE);
          real4 v309BA#1 = LoadVoxels<IMAGE2D<int>,4>(a09C1);
          real fy09E2#4 = Index<real2,1>(f09B3);
          real r09EA#1 = 0.1e1;
          real t309E7#1 = Add<real>(fy09E2,r09EA);
          real t209E6#1 = fy09E2;
          real r09E9#1 = 0.1e1;
          real t109E5#1 = Sub<real>(fy09E2,r09E9);
          real r09E8#1 = 0.2e1;
          real t009E4#1 = Sub<real>(fy09E2,r09E8);
          real4 a09E3#1 = <real4>[t309E7,t209E6,t109E5,t009E4];
          real4 hy09D8#1 = EvalKernel<4,bspln3,0>(a09E3);
          real fx09D9#4 = Index<real2,0>(f09B3);
          real r09E1#1 = 0.1e1;
          real t309DE#1 = Add<real>(fx09D9,r09E1);
          real t209DD#1 = fx09D9;
          real r09E0#1 = 0.1e1;
          real t109DC#1 = Sub<real>(fx09D9,r09E0);
          real r09DF#1 = 0.2e1;
          real t009DB#1 = Sub<real>(fx09D9,r09DF);
          real4 a09DA#1 = <real4>[t309DE,t209DD,t109DC,t009DB];
          real4 hx09D7#4 = EvalKernel<4,bspln3,0>(a09DA);
          real t009EC#1 = Dot<4>(v009B7,hx09D7);
          real t109ED#1 = Dot<4>(v109B8,hx09D7);
          real t209EE#1 = Dot<4>(v209B9,hx09D7);
          real t309EF#1 = Dot<4>(v309BA,hx09D7);
          real4 tv09EB#1 = <real4>[t009EC,t109ED,t209EE,t309EF];
          real _t09B1#1 = Dot<4>(hy09D8,tv09EB);
          real _t0A2E#2 = Sub<real>(_t0934,_t09B1);
          real _t0A30#1 = Mul<real>(_t0A2E,_t0A2E);
          real score0A32#1 = Add<real>(score091D,_t0A30);
          goto JOIN0A35
        JOIN0A35:  preds = [ASSIGN0A33,COND0933]
          real score0A34#1 = phi(score0A32,score091D)
          self.t = t0493;
          self.score = score0A34;
          self.r0 = r004B1;
          self.r1 = r104B7;
          self.pos = pos0925;
          stabilize ()
        ASSIGN0A3C:  preds = [COND092B]
          bool _t0931#1 = false;
          goto JOIN0932
        ASSIGN0A3D:  preds = [COND0814]
          bool _t081A#1 = false;
          goto JOIN081B
        ASSIGN0A3E:  preds = [COND06FD]
          bool _t0703#1 = false;
          goto JOIN0704
        ASSIGN0A3F:  preds = [COND05E6]
          bool _t05EC#1 = false;
          goto JOIN05ED
        ASSIGN0A40:  preds = [COND04CF]
          bool _t04D5#1 = false;
          goto JOIN04D6
    end Update
    method Stabilize
        ENTRY0A42:  preds = []
          real3 t0A43#1 = self.t;
          real score0A45#1 = self.score;
          real2 r00A47#1 = self.r0;
          real2 r10A49#1 = self.r1;
          real2 pos0A4B#1 = self.pos;
          self.t = t0A43;
          self.score = score0A45;
          self.r0 = r00A47;
          self.r1 = r10A49;
          self.pos = pos0A4B;
          return ()
    end Stabilize
  end R
#### end program ####
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
++ mid-il:redundant-assign
##### MidIL after value numbering ####
## properties
  none
## globals
  global int T0459#0
  global int F045A#0
  global real2 v00044B#4
  global real2 v010451#4
  global real2 v020453#4
  global real2 v030455#4
  global real2 v040457#4
  global string _t0441#1
  global image(IMAGE2D<int>) _t0443#35
  global int _t043F#0
  global string _t0445#1
  global image(IMAGE2D<float>) _t0447#35
  global real _t0449#2
  global real _t044D#5
  global real _t044F#4
## global initialization
  ENTRY043E:  preds = []
    int _t043F#0 = 0;
    string _t0441#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0443#35 = LoadImage<IMAGE2D<int>>(_t0441);
    string _t0445#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0447#35 = LoadImage<IMAGE2D<float>>(_t0445);
    real _t0449#2 = 0.0;
    real2 v00044B#4 = <real2>[_t0449,_t0449];
    real _t044D#5 = 0.5e0;
    real _t044F#4 = Neg<real>(_t044D);
    real2 v010451#4 = <real2>[_t044F,_t044D];
    real2 v020453#4 = <real2>[_t044F,_t044F];
    real2 v030455#4 = <real2>[_t044D,_t044D];
    real2 v040457#4 = <real2>[_t044D,_t044F];
    return (T0459,F045A,v00044B,v010451,v020453,v030455,v040457,_t0441,_t0443,_t043F,_t0445,_t0447,_t0449,_t044D,_t044F)
## initially
  ARRAY
    ENTRY0461:  preds = []
      int _t045D#4 = 0;
      int _t045E#4 = 60;
      live vars = (_t045E,_t045D)
    for int i045C#1 = _t045D .. _t045E
      for int j045F#1 = _t045D .. _t045E
        for int k0460#1 = _t045D .. _t045E
          ENTRY0465:  preds = []
            live vars = ()
          new R(i045C,j045F,k0460);
## strands
  strand R (int i0467#1, int j0468#1, int k0469#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY046F:  preds = []
        real _t0470#1 = IntToReal(i0467);
        real _t0472#3 = 0.60e2;
        real _t0474#1 = Div<real>(_t0470,_t0472);
        real _t0476#3 = 0.5e0;
        real _t0478#1 = Sub<real>(_t0474,_t0476);
        real _t047A#1 = IntToReal(j0468);
        real _t047C#1 = Div<real>(_t047A,_t0472);
        real _t047E#1 = Sub<real>(_t047C,_t0476);
        real _t0480#1 = IntToReal(k0469);
        real _t0482#1 = Div<real>(_t0480,_t0472);
        real _t0484#1 = Sub<real>(_t0482,_t0476);
        real3 t0486#1 = <real3>[_t0478,_t047E,_t0484];
        real score0488#3 = 0.0;
        real2 r0048A#3 = <real2>[score0488,score0488];
        self.t = t0486;
        self.score = score0488;
        self.r0 = r0048A;
        self.r1 = r0048A;
        self.pos = r0048A;
        strand_init ()
    method Update
        ENTRY0492:  preds = []
          real3 t0493#4 = self.t;
          real score0495#2 = self.score;
          real _t0497#42 = 0.1e1;
          real _t0499#23 = 0.2e1;
          int _t049B#11 = 2;
          real _t049D#6 = Subscript<real3>(t0493,_t049B);
          real _t049F#1 = Mul<real>(_t0499,_t049D);
          real _t04A1#1 = Mul<real>(_t049F,_t049D);
          real _t04A3#2 = Sub<real>(_t0497,_t04A1);
          real _t04A5#1 = Neg<real>(_t0499);
          real _t04A7#1 = Mul<real>(_t049D,_t049D);
          real _t04A9#1 = Sub<real>(_t0497,_t04A7);
          real _t04AB#2 = sqrt(_t04A9);
          real _t04AD#1 = Mul<real>(_t04A5,_t04AB);
          real _t04AF#1 = Mul<real>(_t04AD,_t049D);
          real2 r004B1#6 = <real2>[_t04A3,_t04AF];
          real _t04B3#1 = Mul<real>(_t0499,_t04AB);
          real _t04B5#1 = Mul<real>(_t04B3,_t049D);
          real2 r104B7#6 = <real2>[_t04B5,_t04A3];
          real _t04B9#1 = Dot<2>(r004B1,v00044B);
          real _t04BB#1 = Dot<2>(r104B7,v00044B);
          real2 _t04BD#1 = <real2>[_t04B9,_t04BB];
          int _t04BF#11 = 0;
          real _t04C1#1 = Subscript<real3>(t0493,_t04BF);
          int _t04C3#11 = 1;
          real _t04C5#1 = Subscript<real3>(t0493,_t04C3);
          real2 _t04C7#5 = <real2>[_t04C1,_t04C5];
          real2 pos04C9#2 = Add<real2>(_t04BD,_t04C7);
          real2 x04CC#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos04C9);
          bool _t04CB#1 = Inside<IMAGE2D<float>,2>(x04CC,_t0447);
          if _t04CB then goto ASSIGN04D2 else goto ASSIGN0A40
        ASSIGN04D2:  preds = [COND04CF]
          real2 x04D1#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v00044B);
          bool _t04D0#1 = Inside<IMAGE2D<int>,2>(x04D1,_t0443);
          goto JOIN04D6
        JOIN04D6:  preds = [ASSIGN04D3,ASSIGN0A40]
          bool _t04D4#1 = phi(_t04D0,_t04D5)
          if _t04D4 then goto ASSIGN0A53 else goto JOIN05D9
        ASSIGN0A53:  preds = [COND04D7]
          real2 nd04DB#2 = Floor<2>(x04CC);
          real2 f04DA#2 = Sub<real2>(x04CC,nd04DB);
          int{2} n04DC#8 = RealToInt<2>(nd04DB);
          int t104F8#4 = -1;
          int t204F9#1 = Index<int{2},0>(n04DC);
          int ix04F7#4 = Add<int>(t104F8,t204F9);
          int t204FC#4 = Index<int{2},1>(n04DC);
          int iy04FA#1 = Add<int>(t104F8,t204FC);
          addr(IMAGE2D<float>) a04FD#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04FA);
          real4 v004DE#1 = LoadVoxels<IMAGE2D<float>,4>(a04FD);
          int iy04F3#1 = Add<int>(_t04BF,t204FC);
          addr(IMAGE2D<float>) a04F6#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04F3);
          real4 v104DF#1 = LoadVoxels<IMAGE2D<float>,4>(a04F6);
          int iy04EC#1 = Add<int>(_t04C3,t204FC);
          addr(IMAGE2D<float>) a04EF#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04EC);
          real4 v204E0#1 = LoadVoxels<IMAGE2D<float>,4>(a04EF);
          int iy04E5#1 = Add<int>(_t049B,t204FC);
          addr(IMAGE2D<float>) a04E8#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04E5);
          real4 v304E1#1 = LoadVoxels<IMAGE2D<float>,4>(a04E8);
          real fy0509#5 = Index<real2,1>(f04DA);
          real t3050E#1 = Add<real>(fy0509,_t0497);
          real t1050C#1 = Sub<real>(fy0509,_t0497);
          real t0050B#1 = Sub<real>(fy0509,_t0499);
          real4 a050A#1 = <real4>[t3050E,fy0509,t1050C,t0050B];
          real4 hy04FF#1 = EvalKernel<4,bspln3,0>(a050A);
          real fx0500#5 = Index<real2,0>(f04DA);
          real t30505#1 = Add<real>(fx0500,_t0497);
          real t10503#1 = Sub<real>(fx0500,_t0497);
          real t00502#1 = Sub<real>(fx0500,_t0499);
          real4 a0501#1 = <real4>[t30505,fx0500,t10503,t00502];
          real4 hx04FE#4 = EvalKernel<4,bspln3,0>(a0501);
          real t00513#1 = Dot<4>(v004DE,hx04FE);
          real t10514#1 = Dot<4>(v104DF,hx04FE);
          real t20515#1 = Dot<4>(v204E0,hx04FE);
          real t30516#1 = Dot<4>(v304E1,hx04FE);
          real4 tv0512#1 = <real4>[t00513,t10514,t20515,t30516];
          real _t04D8#1 = Dot<4>(hy04FF,tv0512);
          real2 x0556#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v00044B);
          real2 nd0558#2 = Floor<2>(x0556);
          real2 f0557#2 = Sub<real2>(x0556,nd0558);
          int{2} n0559#8 = RealToInt<2>(nd0558);
          int t20576#1 = Index<int{2},0>(n0559);
          int ix0574#4 = Add<int>(t104F8,t20576);
          int t20579#4 = Index<int{2},1>(n0559);
          int iy0577#1 = Add<int>(t104F8,t20579);
          addr(IMAGE2D<int>) a057A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0577);
          real4 v0055B#1 = LoadVoxels<IMAGE2D<int>,4>(a057A);
          int iy0570#1 = Add<int>(_t04BF,t20579);
          addr(IMAGE2D<int>) a0573#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0570);
          real4 v1055C#1 = LoadVoxels<IMAGE2D<int>,4>(a0573);
          int iy0569#1 = Add<int>(_t04C3,t20579);
          addr(IMAGE2D<int>) a056C#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0569);
          real4 v2055D#1 = LoadVoxels<IMAGE2D<int>,4>(a056C);
          int iy0562#1 = Add<int>(_t049B,t20579);
          addr(IMAGE2D<int>) a0565#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0562);
          real4 v3055E#1 = LoadVoxels<IMAGE2D<int>,4>(a0565);
          real fy0586#5 = Index<real2,1>(f0557);
          real t3058B#1 = Add<real>(fy0586,_t0497);
          real t10589#1 = Sub<real>(fy0586,_t0497);
          real t00588#1 = Sub<real>(fy0586,_t0499);
          real4 a0587#1 = <real4>[t3058B,fy0586,t10589,t00588];
          real4 hy057C#1 = EvalKernel<4,bspln3,0>(a0587);
          real fx057D#5 = Index<real2,0>(f0557);
          real t30582#1 = Add<real>(fx057D,_t0497);
          real t10580#1 = Sub<real>(fx057D,_t0497);
          real t0057F#1 = Sub<real>(fx057D,_t0499);
          real4 a057E#1 = <real4>[t30582,fx057D,t10580,t0057F];
          real4 hx057B#4 = EvalKernel<4,bspln3,0>(a057E);
          real t00590#1 = Dot<4>(v0055B,hx057B);
          real t10591#1 = Dot<4>(v1055C,hx057B);
          real t20592#1 = Dot<4>(v2055D,hx057B);
          real t30593#1 = Dot<4>(v3055E,hx057B);
          real4 tv058F#1 = <real4>[t00590,t10591,t20592,t30593];
          real _t0555#1 = Dot<4>(hy057C,tv058F);
          real _t05D2#2 = Sub<real>(_t04D8,_t0555);
          real _t05D4#1 = Mul<real>(_t05D2,_t05D2);
          real score05D6#1 = Add<real>(score0495,_t05D4);
          goto JOIN05D9
        JOIN05D9:  preds = [ASSIGN05D7,COND04D7]
          real score05D8#2 = phi(score05D6,score0495)
          real _t05DA#1 = Dot<2>(r004B1,v010451);
          real _t05DC#1 = Dot<2>(r104B7,v010451);
          real2 _t05DE#1 = <real2>[_t05DA,_t05DC];
          real2 pos05E0#2 = Add<real2>(_t05DE,_t04C7);
          real2 x05E3#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos05E0);
          bool _t05E2#1 = Inside<IMAGE2D<float>,2>(x05E3,_t0447);
          if _t05E2 then goto ASSIGN05E9 else goto ASSIGN0A3F
        ASSIGN05E9:  preds = [COND05E6]
          real2 x05E8#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v010451);
          bool _t05E7#1 = Inside<IMAGE2D<int>,2>(x05E8,_t0443);
          goto JOIN05ED
        JOIN05ED:  preds = [ASSIGN05EA,ASSIGN0A3F]
          bool _t05EB#1 = phi(_t05E7,_t05EC)
          if _t05EB then goto ASSIGN0A74 else goto JOIN06F0
        ASSIGN0A74:  preds = [COND05EE]
          real2 nd05F2#2 = Floor<2>(x05E3);
          real2 f05F1#2 = Sub<real2>(x05E3,nd05F2);
          int{2} n05F3#8 = RealToInt<2>(nd05F2);
          int t1060F#4 = -1;
          int t20610#1 = Index<int{2},0>(n05F3);
          int ix060E#4 = Add<int>(t1060F,t20610);
          int t20613#4 = Index<int{2},1>(n05F3);
          int iy0611#1 = Add<int>(t1060F,t20613);
          addr(IMAGE2D<float>) a0614#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy0611);
          real4 v005F5#1 = LoadVoxels<IMAGE2D<float>,4>(a0614);
          int iy060A#1 = Add<int>(_t04BF,t20613);
          addr(IMAGE2D<float>) a060D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy060A);
          real4 v105F6#1 = LoadVoxels<IMAGE2D<float>,4>(a060D);
          int iy0603#1 = Add<int>(_t04C3,t20613);
          addr(IMAGE2D<float>) a0606#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy0603);
          real4 v205F7#1 = LoadVoxels<IMAGE2D<float>,4>(a0606);
          int iy05FC#1 = Add<int>(_t049B,t20613);
          addr(IMAGE2D<float>) a05FF#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy05FC);
          real4 v305F8#1 = LoadVoxels<IMAGE2D<float>,4>(a05FF);
          real fy0620#5 = Index<real2,1>(f05F1);
          real t30625#1 = Add<real>(fy0620,_t0497);
          real t10623#1 = Sub<real>(fy0620,_t0497);
          real t00622#1 = Sub<real>(fy0620,_t0499);
          real4 a0621#1 = <real4>[t30625,fy0620,t10623,t00622];
          real4 hy0616#1 = EvalKernel<4,bspln3,0>(a0621);
          real fx0617#5 = Index<real2,0>(f05F1);
          real t3061C#1 = Add<real>(fx0617,_t0497);
          real t1061A#1 = Sub<real>(fx0617,_t0497);
          real t00619#1 = Sub<real>(fx0617,_t0499);
          real4 a0618#1 = <real4>[t3061C,fx0617,t1061A,t00619];
          real4 hx0615#4 = EvalKernel<4,bspln3,0>(a0618);
          real t0062A#1 = Dot<4>(v005F5,hx0615);
          real t1062B#1 = Dot<4>(v105F6,hx0615);
          real t2062C#1 = Dot<4>(v205F7,hx0615);
          real t3062D#1 = Dot<4>(v305F8,hx0615);
          real4 tv0629#1 = <real4>[t0062A,t1062B,t2062C,t3062D];
          real _t05EF#1 = Dot<4>(hy0616,tv0629);
          real2 x066D#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v010451);
          real2 nd066F#2 = Floor<2>(x066D);
          real2 f066E#2 = Sub<real2>(x066D,nd066F);
          int{2} n0670#8 = RealToInt<2>(nd066F);
          int t2068D#1 = Index<int{2},0>(n0670);
          int ix068B#4 = Add<int>(t1060F,t2068D);
          int t20690#4 = Index<int{2},1>(n0670);
          int iy068E#1 = Add<int>(t1060F,t20690);
          addr(IMAGE2D<int>) a0691#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy068E);
          real4 v00672#1 = LoadVoxels<IMAGE2D<int>,4>(a0691);
          int iy0687#1 = Add<int>(_t04BF,t20690);
          addr(IMAGE2D<int>) a068A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy0687);
          real4 v10673#1 = LoadVoxels<IMAGE2D<int>,4>(a068A);
          int iy0680#1 = Add<int>(_t04C3,t20690);
          addr(IMAGE2D<int>) a0683#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy0680);
          real4 v20674#1 = LoadVoxels<IMAGE2D<int>,4>(a0683);
          int iy0679#1 = Add<int>(_t049B,t20690);
          addr(IMAGE2D<int>) a067C#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy0679);
          real4 v30675#1 = LoadVoxels<IMAGE2D<int>,4>(a067C);
          real fy069D#5 = Index<real2,1>(f066E);
          real t306A2#1 = Add<real>(fy069D,_t0497);
          real t106A0#1 = Sub<real>(fy069D,_t0497);
          real t0069F#1 = Sub<real>(fy069D,_t0499);
          real4 a069E#1 = <real4>[t306A2,fy069D,t106A0,t0069F];
          real4 hy0693#1 = EvalKernel<4,bspln3,0>(a069E);
          real fx0694#5 = Index<real2,0>(f066E);
          real t30699#1 = Add<real>(fx0694,_t0497);
          real t10697#1 = Sub<real>(fx0694,_t0497);
          real t00696#1 = Sub<real>(fx0694,_t0499);
          real4 a0695#1 = <real4>[t30699,fx0694,t10697,t00696];
          real4 hx0692#4 = EvalKernel<4,bspln3,0>(a0695);
          real t006A7#1 = Dot<4>(v00672,hx0692);
          real t106A8#1 = Dot<4>(v10673,hx0692);
          real t206A9#1 = Dot<4>(v20674,hx0692);
          real t306AA#1 = Dot<4>(v30675,hx0692);
          real4 tv06A6#1 = <real4>[t006A7,t106A8,t206A9,t306AA];
          real _t066C#1 = Dot<4>(hy0693,tv06A6);
          real _t06E9#2 = Sub<real>(_t05EF,_t066C);
          real _t06EB#1 = Mul<real>(_t06E9,_t06E9);
          real score06ED#1 = Add<real>(score05D8,_t06EB);
          goto JOIN06F0
        JOIN06F0:  preds = [ASSIGN06EE,COND05EE]
          real score06EF#2 = phi(score06ED,score05D8)
          real _t06F1#1 = Dot<2>(r004B1,v020453);
          real _t06F3#1 = Dot<2>(r104B7,v020453);
          real2 _t06F5#1 = <real2>[_t06F1,_t06F3];
          real2 pos06F7#2 = Add<real2>(_t06F5,_t04C7);
          real2 x06FA#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos06F7);
          bool _t06F9#1 = Inside<IMAGE2D<float>,2>(x06FA,_t0447);
          if _t06F9 then goto ASSIGN0700 else goto ASSIGN0A3E
        ASSIGN0700:  preds = [COND06FD]
          real2 x06FF#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v020453);
          bool _t06FE#1 = Inside<IMAGE2D<int>,2>(x06FF,_t0443);
          goto JOIN0704
        JOIN0704:  preds = [ASSIGN0701,ASSIGN0A3E]
          bool _t0702#1 = phi(_t06FE,_t0703)
          if _t0702 then goto ASSIGN0A95 else goto JOIN0807
        ASSIGN0A95:  preds = [COND0705]
          real2 nd0709#2 = Floor<2>(x06FA);
          real2 f0708#2 = Sub<real2>(x06FA,nd0709);
          int{2} n070A#8 = RealToInt<2>(nd0709);
          int t10726#4 = -1;
          int t20727#1 = Index<int{2},0>(n070A);
          int ix0725#4 = Add<int>(t10726,t20727);
          int t2072A#4 = Index<int{2},1>(n070A);
          int iy0728#1 = Add<int>(t10726,t2072A);
          addr(IMAGE2D<float>) a072B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy0728);
          real4 v0070C#1 = LoadVoxels<IMAGE2D<float>,4>(a072B);
          int iy0721#1 = Add<int>(_t04BF,t2072A);
          addr(IMAGE2D<float>) a0724#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy0721);
          real4 v1070D#1 = LoadVoxels<IMAGE2D<float>,4>(a0724);
          int iy071A#1 = Add<int>(_t04C3,t2072A);
          addr(IMAGE2D<float>) a071D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy071A);
          real4 v2070E#1 = LoadVoxels<IMAGE2D<float>,4>(a071D);
          int iy0713#1 = Add<int>(_t049B,t2072A);
          addr(IMAGE2D<float>) a0716#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy0713);
          real4 v3070F#1 = LoadVoxels<IMAGE2D<float>,4>(a0716);
          real fy0737#5 = Index<real2,1>(f0708);
          real t3073C#1 = Add<real>(fy0737,_t0497);
          real t1073A#1 = Sub<real>(fy0737,_t0497);
          real t00739#1 = Sub<real>(fy0737,_t0499);
          real4 a0738#1 = <real4>[t3073C,fy0737,t1073A,t00739];
          real4 hy072D#1 = EvalKernel<4,bspln3,0>(a0738);
          real fx072E#5 = Index<real2,0>(f0708);
          real t30733#1 = Add<real>(fx072E,_t0497);
          real t10731#1 = Sub<real>(fx072E,_t0497);
          real t00730#1 = Sub<real>(fx072E,_t0499);
          real4 a072F#1 = <real4>[t30733,fx072E,t10731,t00730];
          real4 hx072C#4 = EvalKernel<4,bspln3,0>(a072F);
          real t00741#1 = Dot<4>(v0070C,hx072C);
          real t10742#1 = Dot<4>(v1070D,hx072C);
          real t20743#1 = Dot<4>(v2070E,hx072C);
          real t30744#1 = Dot<4>(v3070F,hx072C);
          real4 tv0740#1 = <real4>[t00741,t10742,t20743,t30744];
          real _t0706#1 = Dot<4>(hy072D,tv0740);
          real2 x0784#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v020453);
          real2 nd0786#2 = Floor<2>(x0784);
          real2 f0785#2 = Sub<real2>(x0784,nd0786);
          int{2} n0787#8 = RealToInt<2>(nd0786);
          int t207A4#1 = Index<int{2},0>(n0787);
          int ix07A2#4 = Add<int>(t10726,t207A4);
          int t207A7#4 = Index<int{2},1>(n0787);
          int iy07A5#1 = Add<int>(t10726,t207A7);
          addr(IMAGE2D<int>) a07A8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy07A5);
          real4 v00789#1 = LoadVoxels<IMAGE2D<int>,4>(a07A8);
          int iy079E#1 = Add<int>(_t04BF,t207A7);
          addr(IMAGE2D<int>) a07A1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy079E);
          real4 v1078A#1 = LoadVoxels<IMAGE2D<int>,4>(a07A1);
          int iy0797#1 = Add<int>(_t04C3,t207A7);
          addr(IMAGE2D<int>) a079A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy0797);
          real4 v2078B#1 = LoadVoxels<IMAGE2D<int>,4>(a079A);
          int iy0790#1 = Add<int>(_t049B,t207A7);
          addr(IMAGE2D<int>) a0793#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy0790);
          real4 v3078C#1 = LoadVoxels<IMAGE2D<int>,4>(a0793);
          real fy07B4#5 = Index<real2,1>(f0785);
          real t307B9#1 = Add<real>(fy07B4,_t0497);
          real t107B7#1 = Sub<real>(fy07B4,_t0497);
          real t007B6#1 = Sub<real>(fy07B4,_t0499);
          real4 a07B5#1 = <real4>[t307B9,fy07B4,t107B7,t007B6];
          real4 hy07AA#1 = EvalKernel<4,bspln3,0>(a07B5);
          real fx07AB#5 = Index<real2,0>(f0785);
          real t307B0#1 = Add<real>(fx07AB,_t0497);
          real t107AE#1 = Sub<real>(fx07AB,_t0497);
          real t007AD#1 = Sub<real>(fx07AB,_t0499);
          real4 a07AC#1 = <real4>[t307B0,fx07AB,t107AE,t007AD];
          real4 hx07A9#4 = EvalKernel<4,bspln3,0>(a07AC);
          real t007BE#1 = Dot<4>(v00789,hx07A9);
          real t107BF#1 = Dot<4>(v1078A,hx07A9);
          real t207C0#1 = Dot<4>(v2078B,hx07A9);
          real t307C1#1 = Dot<4>(v3078C,hx07A9);
          real4 tv07BD#1 = <real4>[t007BE,t107BF,t207C0,t307C1];
          real _t0783#1 = Dot<4>(hy07AA,tv07BD);
          real _t0800#2 = Sub<real>(_t0706,_t0783);
          real _t0802#1 = Mul<real>(_t0800,_t0800);
          real score0804#1 = Add<real>(score06EF,_t0802);
          goto JOIN0807
        JOIN0807:  preds = [ASSIGN0805,COND0705]
          real score0806#2 = phi(score0804,score06EF)
          real _t0808#1 = Dot<2>(r004B1,v030455);
          real _t080A#1 = Dot<2>(r104B7,v030455);
          real2 _t080C#1 = <real2>[_t0808,_t080A];
          real2 pos080E#2 = Add<real2>(_t080C,_t04C7);
          real2 x0811#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos080E);
          bool _t0810#1 = Inside<IMAGE2D<float>,2>(x0811,_t0447);
          if _t0810 then goto ASSIGN0817 else goto ASSIGN0A3D
        ASSIGN0817:  preds = [COND0814]
          real2 x0816#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v030455);
          bool _t0815#1 = Inside<IMAGE2D<int>,2>(x0816,_t0443);
          goto JOIN081B
        JOIN081B:  preds = [ASSIGN0818,ASSIGN0A3D]
          bool _t0819#1 = phi(_t0815,_t081A)
          if _t0819 then goto ASSIGN0AB6 else goto JOIN091E
        ASSIGN0AB6:  preds = [COND081C]
          real2 nd0820#2 = Floor<2>(x0811);
          real2 f081F#2 = Sub<real2>(x0811,nd0820);
          int{2} n0821#8 = RealToInt<2>(nd0820);
          int t1083D#4 = -1;
          int t2083E#1 = Index<int{2},0>(n0821);
          int ix083C#4 = Add<int>(t1083D,t2083E);
          int t20841#4 = Index<int{2},1>(n0821);
          int iy083F#1 = Add<int>(t1083D,t20841);
          addr(IMAGE2D<float>) a0842#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy083F);
          real4 v00823#1 = LoadVoxels<IMAGE2D<float>,4>(a0842);
          int iy0838#1 = Add<int>(_t04BF,t20841);
          addr(IMAGE2D<float>) a083B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy0838);
          real4 v10824#1 = LoadVoxels<IMAGE2D<float>,4>(a083B);
          int iy0831#1 = Add<int>(_t04C3,t20841);
          addr(IMAGE2D<float>) a0834#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy0831);
          real4 v20825#1 = LoadVoxels<IMAGE2D<float>,4>(a0834);
          int iy082A#1 = Add<int>(_t049B,t20841);
          addr(IMAGE2D<float>) a082D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy082A);
          real4 v30826#1 = LoadVoxels<IMAGE2D<float>,4>(a082D);
          real fy084E#5 = Index<real2,1>(f081F);
          real t30853#1 = Add<real>(fy084E,_t0497);
          real t10851#1 = Sub<real>(fy084E,_t0497);
          real t00850#1 = Sub<real>(fy084E,_t0499);
          real4 a084F#1 = <real4>[t30853,fy084E,t10851,t00850];
          real4 hy0844#1 = EvalKernel<4,bspln3,0>(a084F);
          real fx0845#5 = Index<real2,0>(f081F);
          real t3084A#1 = Add<real>(fx0845,_t0497);
          real t10848#1 = Sub<real>(fx0845,_t0497);
          real t00847#1 = Sub<real>(fx0845,_t0499);
          real4 a0846#1 = <real4>[t3084A,fx0845,t10848,t00847];
          real4 hx0843#4 = EvalKernel<4,bspln3,0>(a0846);
          real t00858#1 = Dot<4>(v00823,hx0843);
          real t10859#1 = Dot<4>(v10824,hx0843);
          real t2085A#1 = Dot<4>(v20825,hx0843);
          real t3085B#1 = Dot<4>(v30826,hx0843);
          real4 tv0857#1 = <real4>[t00858,t10859,t2085A,t3085B];
          real _t081D#1 = Dot<4>(hy0844,tv0857);
          real2 x089B#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v030455);
          real2 nd089D#2 = Floor<2>(x089B);
          real2 f089C#2 = Sub<real2>(x089B,nd089D);
          int{2} n089E#8 = RealToInt<2>(nd089D);
          int t208BB#1 = Index<int{2},0>(n089E);
          int ix08B9#4 = Add<int>(t1083D,t208BB);
          int t208BE#4 = Index<int{2},1>(n089E);
          int iy08BC#1 = Add<int>(t1083D,t208BE);
          addr(IMAGE2D<int>) a08BF#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08BC);
          real4 v008A0#1 = LoadVoxels<IMAGE2D<int>,4>(a08BF);
          int iy08B5#1 = Add<int>(_t04BF,t208BE);
          addr(IMAGE2D<int>) a08B8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08B5);
          real4 v108A1#1 = LoadVoxels<IMAGE2D<int>,4>(a08B8);
          int iy08AE#1 = Add<int>(_t04C3,t208BE);
          addr(IMAGE2D<int>) a08B1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08AE);
          real4 v208A2#1 = LoadVoxels<IMAGE2D<int>,4>(a08B1);
          int iy08A7#1 = Add<int>(_t049B,t208BE);
          addr(IMAGE2D<int>) a08AA#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08A7);
          real4 v308A3#1 = LoadVoxels<IMAGE2D<int>,4>(a08AA);
          real fy08CB#5 = Index<real2,1>(f089C);
          real t308D0#1 = Add<real>(fy08CB,_t0497);
          real t108CE#1 = Sub<real>(fy08CB,_t0497);
          real t008CD#1 = Sub<real>(fy08CB,_t0499);
          real4 a08CC#1 = <real4>[t308D0,fy08CB,t108CE,t008CD];
          real4 hy08C1#1 = EvalKernel<4,bspln3,0>(a08CC);
          real fx08C2#5 = Index<real2,0>(f089C);
          real t308C7#1 = Add<real>(fx08C2,_t0497);
          real t108C5#1 = Sub<real>(fx08C2,_t0497);
          real t008C4#1 = Sub<real>(fx08C2,_t0499);
          real4 a08C3#1 = <real4>[t308C7,fx08C2,t108C5,t008C4];
          real4 hx08C0#4 = EvalKernel<4,bspln3,0>(a08C3);
          real t008D5#1 = Dot<4>(v008A0,hx08C0);
          real t108D6#1 = Dot<4>(v108A1,hx08C0);
          real t208D7#1 = Dot<4>(v208A2,hx08C0);
          real t308D8#1 = Dot<4>(v308A3,hx08C0);
          real4 tv08D4#1 = <real4>[t008D5,t108D6,t208D7,t308D8];
          real _t089A#1 = Dot<4>(hy08C1,tv08D4);
          real _t0917#2 = Sub<real>(_t081D,_t089A);
          real _t0919#1 = Mul<real>(_t0917,_t0917);
          real score091B#1 = Add<real>(score0806,_t0919);
          goto JOIN091E
        JOIN091E:  preds = [ASSIGN091C,COND081C]
          real score091D#2 = phi(score091B,score0806)
          real _t091F#1 = Dot<2>(r004B1,v040457);
          real _t0921#1 = Dot<2>(r104B7,v040457);
          real2 _t0923#1 = <real2>[_t091F,_t0921];
          real2 pos0925#3 = Add<real2>(_t0923,_t04C7);
          real2 x0928#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos0925);
          bool _t0927#1 = Inside<IMAGE2D<float>,2>(x0928,_t0447);
          if _t0927 then goto ASSIGN092E else goto ASSIGN0A3C
        ASSIGN092E:  preds = [COND092B]
          real2 x092D#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v040457);
          bool _t092C#1 = Inside<IMAGE2D<int>,2>(x092D,_t0443);
          goto JOIN0932
        JOIN0932:  preds = [ASSIGN092F,ASSIGN0A3C]
          bool _t0930#1 = phi(_t092C,_t0931)
          if _t0930 then goto ASSIGN0AD7 else goto JOIN0A35
        ASSIGN0AD7:  preds = [COND0933]
          real2 nd0937#2 = Floor<2>(x0928);
          real2 f0936#2 = Sub<real2>(x0928,nd0937);
          int{2} n0938#8 = RealToInt<2>(nd0937);
          int t10954#4 = -1;
          int t20955#1 = Index<int{2},0>(n0938);
          int ix0953#4 = Add<int>(t10954,t20955);
          int t20958#4 = Index<int{2},1>(n0938);
          int iy0956#1 = Add<int>(t10954,t20958);
          addr(IMAGE2D<float>) a0959#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy0956);
          real4 v0093A#1 = LoadVoxels<IMAGE2D<float>,4>(a0959);
          int iy094F#1 = Add<int>(_t04BF,t20958);
          addr(IMAGE2D<float>) a0952#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy094F);
          real4 v1093B#1 = LoadVoxels<IMAGE2D<float>,4>(a0952);
          int iy0948#1 = Add<int>(_t04C3,t20958);
          addr(IMAGE2D<float>) a094B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy0948);
          real4 v2093C#1 = LoadVoxels<IMAGE2D<float>,4>(a094B);
          int iy0941#1 = Add<int>(_t049B,t20958);
          addr(IMAGE2D<float>) a0944#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy0941);
          real4 v3093D#1 = LoadVoxels<IMAGE2D<float>,4>(a0944);
          real fy0965#5 = Index<real2,1>(f0936);
          real t3096A#1 = Add<real>(fy0965,_t0497);
          real t10968#1 = Sub<real>(fy0965,_t0497);
          real t00967#1 = Sub<real>(fy0965,_t0499);
          real4 a0966#1 = <real4>[t3096A,fy0965,t10968,t00967];
          real4 hy095B#1 = EvalKernel<4,bspln3,0>(a0966);
          real fx095C#5 = Index<real2,0>(f0936);
          real t30961#1 = Add<real>(fx095C,_t0497);
          real t1095F#1 = Sub<real>(fx095C,_t0497);
          real t0095E#1 = Sub<real>(fx095C,_t0499);
          real4 a095D#1 = <real4>[t30961,fx095C,t1095F,t0095E];
          real4 hx095A#4 = EvalKernel<4,bspln3,0>(a095D);
          real t0096F#1 = Dot<4>(v0093A,hx095A);
          real t10970#1 = Dot<4>(v1093B,hx095A);
          real t20971#1 = Dot<4>(v2093C,hx095A);
          real t30972#1 = Dot<4>(v3093D,hx095A);
          real4 tv096E#1 = <real4>[t0096F,t10970,t20971,t30972];
          real _t0934#1 = Dot<4>(hy095B,tv096E);
          real2 x09B2#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v040457);
          real2 nd09B4#2 = Floor<2>(x09B2);
          real2 f09B3#2 = Sub<real2>(x09B2,nd09B4);
          int{2} n09B5#8 = RealToInt<2>(nd09B4);
          int t209D2#1 = Index<int{2},0>(n09B5);
          int ix09D0#4 = Add<int>(t10954,t209D2);
          int t209D5#4 = Index<int{2},1>(n09B5);
          int iy09D3#1 = Add<int>(t10954,t209D5);
          addr(IMAGE2D<int>) a09D6#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09D3);
          real4 v009B7#1 = LoadVoxels<IMAGE2D<int>,4>(a09D6);
          int iy09CC#1 = Add<int>(_t04BF,t209D5);
          addr(IMAGE2D<int>) a09CF#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09CC);
          real4 v109B8#1 = LoadVoxels<IMAGE2D<int>,4>(a09CF);
          int iy09C5#1 = Add<int>(_t04C3,t209D5);
          addr(IMAGE2D<int>) a09C8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09C5);
          real4 v209B9#1 = LoadVoxels<IMAGE2D<int>,4>(a09C8);
          int iy09BE#1 = Add<int>(_t049B,t209D5);
          addr(IMAGE2D<int>) a09C1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09BE);
          real4 v309BA#1 = LoadVoxels<IMAGE2D<int>,4>(a09C1);
          real fy09E2#5 = Index<real2,1>(f09B3);
          real t309E7#1 = Add<real>(fy09E2,_t0497);
          real t109E5#1 = Sub<real>(fy09E2,_t0497);
          real t009E4#1 = Sub<real>(fy09E2,_t0499);
          real4 a09E3#1 = <real4>[t309E7,fy09E2,t109E5,t009E4];
          real4 hy09D8#1 = EvalKernel<4,bspln3,0>(a09E3);
          real fx09D9#5 = Index<real2,0>(f09B3);
          real t309DE#1 = Add<real>(fx09D9,_t0497);
          real t109DC#1 = Sub<real>(fx09D9,_t0497);
          real t009DB#1 = Sub<real>(fx09D9,_t0499);
          real4 a09DA#1 = <real4>[t309DE,fx09D9,t109DC,t009DB];
          real4 hx09D7#4 = EvalKernel<4,bspln3,0>(a09DA);
          real t009EC#1 = Dot<4>(v009B7,hx09D7);
          real t109ED#1 = Dot<4>(v109B8,hx09D7);
          real t209EE#1 = Dot<4>(v209B9,hx09D7);
          real t309EF#1 = Dot<4>(v309BA,hx09D7);
          real4 tv09EB#1 = <real4>[t009EC,t109ED,t209EE,t309EF];
          real _t09B1#1 = Dot<4>(hy09D8,tv09EB);
          real _t0A2E#2 = Sub<real>(_t0934,_t09B1);
          real _t0A30#1 = Mul<real>(_t0A2E,_t0A2E);
          real score0A32#1 = Add<real>(score091D,_t0A30);
          goto JOIN0A35
        JOIN0A35:  preds = [ASSIGN0A33,COND0933]
          real score0A34#1 = phi(score0A32,score091D)
          self.t = t0493;
          self.score = score0A34;
          self.r0 = r004B1;
          self.r1 = r104B7;
          self.pos = pos0925;
          stabilize ()
        ASSIGN0A3C:  preds = [COND092B]
          bool _t0931#1 = false;
          goto JOIN0932
        ASSIGN0A3D:  preds = [COND0814]
          bool _t081A#1 = false;
          goto JOIN081B
        ASSIGN0A3E:  preds = [COND06FD]
          bool _t0703#1 = false;
          goto JOIN0704
        ASSIGN0A3F:  preds = [COND05E6]
          bool _t05EC#1 = false;
          goto JOIN05ED
        ASSIGN0A40:  preds = [COND04CF]
          bool _t04D5#1 = false;
          goto JOIN04D6
    end Update
    method Stabilize
        ENTRY0A42:  preds = []
          real3 t0A43#1 = self.t;
          real score0A45#1 = self.score;
          real2 r00A47#1 = self.r0;
          real2 r10A49#1 = self.r1;
          real2 pos0A4B#1 = self.pos;
          self.t = t0A43;
          self.score = score0A45;
          self.r0 = r00A47;
          self.r1 = r10A49;
          self.pos = pos0A4B;
          return ()
    end Stabilize
  end R
#### end program ####
++ mid-opt:unused
##### MidIL after contraction ####
## properties
  none
## globals
  global int T0459#0
  global int F045A#0
  global real2 v00044B#4
  global real2 v010451#4
  global real2 v020453#4
  global real2 v030455#4
  global real2 v040457#4
  global string _t0441#1
  global image(IMAGE2D<int>) _t0443#35
  global int _t043F#0
  global string _t0445#1
  global image(IMAGE2D<float>) _t0447#35
  global real _t0449#2
  global real _t044D#5
  global real _t044F#4
## global initialization
  ENTRY043E:  preds = []
    string _t0441#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0443#35 = LoadImage<IMAGE2D<int>>(_t0441);
    string _t0445#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0447#35 = LoadImage<IMAGE2D<float>>(_t0445);
    real _t0449#2 = 0.0;
    real2 v00044B#4 = <real2>[_t0449,_t0449];
    real _t044D#5 = 0.5e0;
    real _t044F#4 = Neg<real>(_t044D);
    real2 v010451#4 = <real2>[_t044F,_t044D];
    real2 v020453#4 = <real2>[_t044F,_t044F];
    real2 v030455#4 = <real2>[_t044D,_t044D];
    real2 v040457#4 = <real2>[_t044D,_t044F];
    return (T0459,F045A,v00044B,v010451,v020453,v030455,v040457,_t0441,_t0443,_t043F,_t0445,_t0447,_t0449,_t044D,_t044F)
## initially
  ARRAY
    ENTRY0461:  preds = []
      int _t045D#4 = 0;
      int _t045E#4 = 60;
      live vars = (_t045E,_t045D)
    for int i045C#1 = _t045D .. _t045E
      for int j045F#1 = _t045D .. _t045E
        for int k0460#1 = _t045D .. _t045E
          ENTRY0465:  preds = []
            live vars = ()
          new R(i045C,j045F,k0460);
## strands
  strand R (int i0467#1, int j0468#1, int k0469#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY046F:  preds = []
        real _t0470#1 = IntToReal(i0467);
        real _t0472#3 = 0.60e2;
        real _t0474#1 = Div<real>(_t0470,_t0472);
        real _t0476#3 = 0.5e0;
        real _t0478#1 = Sub<real>(_t0474,_t0476);
        real _t047A#1 = IntToReal(j0468);
        real _t047C#1 = Div<real>(_t047A,_t0472);
        real _t047E#1 = Sub<real>(_t047C,_t0476);
        real _t0480#1 = IntToReal(k0469);
        real _t0482#1 = Div<real>(_t0480,_t0472);
        real _t0484#1 = Sub<real>(_t0482,_t0476);
        real3 t0486#1 = <real3>[_t0478,_t047E,_t0484];
        real score0488#3 = 0.0;
        real2 r0048A#3 = <real2>[score0488,score0488];
        self.t = t0486;
        self.score = score0488;
        self.r0 = r0048A;
        self.r1 = r0048A;
        self.pos = r0048A;
        strand_init ()
    method Update
        ENTRY0492:  preds = []
          real3 t0493#4 = self.t;
          real score0495#2 = self.score;
          real _t0497#42 = 0.1e1;
          real _t0499#23 = 0.2e1;
          int _t049B#11 = 2;
          real _t049D#6 = Subscript<real3>(t0493,_t049B);
          real _t049F#1 = Mul<real>(_t0499,_t049D);
          real _t04A1#1 = Mul<real>(_t049F,_t049D);
          real _t04A3#2 = Sub<real>(_t0497,_t04A1);
          real _t04A5#1 = Neg<real>(_t0499);
          real _t04A7#1 = Mul<real>(_t049D,_t049D);
          real _t04A9#1 = Sub<real>(_t0497,_t04A7);
          real _t04AB#2 = sqrt(_t04A9);
          real _t04AD#1 = Mul<real>(_t04A5,_t04AB);
          real _t04AF#1 = Mul<real>(_t04AD,_t049D);
          real2 r004B1#6 = <real2>[_t04A3,_t04AF];
          real _t04B3#1 = Mul<real>(_t0499,_t04AB);
          real _t04B5#1 = Mul<real>(_t04B3,_t049D);
          real2 r104B7#6 = <real2>[_t04B5,_t04A3];
          real _t04B9#1 = Dot<2>(r004B1,v00044B);
          real _t04BB#1 = Dot<2>(r104B7,v00044B);
          real2 _t04BD#1 = <real2>[_t04B9,_t04BB];
          int _t04BF#11 = 0;
          real _t04C1#1 = Subscript<real3>(t0493,_t04BF);
          int _t04C3#11 = 1;
          real _t04C5#1 = Subscript<real3>(t0493,_t04C3);
          real2 _t04C7#5 = <real2>[_t04C1,_t04C5];
          real2 pos04C9#2 = Add<real2>(_t04BD,_t04C7);
          real2 x04CC#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos04C9);
          bool _t04CB#1 = Inside<IMAGE2D<float>,2>(x04CC,_t0447);
          if _t04CB then goto ASSIGN04D2 else goto ASSIGN0A40
        ASSIGN04D2:  preds = [COND04CF]
          real2 x04D1#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v00044B);
          bool _t04D0#1 = Inside<IMAGE2D<int>,2>(x04D1,_t0443);
          goto JOIN04D6
        JOIN04D6:  preds = [ASSIGN04D3,ASSIGN0A40]
          bool _t04D4#1 = phi(_t04D0,_t04D5)
          if _t04D4 then goto ASSIGN0A53 else goto JOIN05D9
        ASSIGN0A53:  preds = [COND04D7]
          real2 nd04DB#2 = Floor<2>(x04CC);
          real2 f04DA#2 = Sub<real2>(x04CC,nd04DB);
          int{2} n04DC#8 = RealToInt<2>(nd04DB);
          int t104F8#4 = -1;
          int t204F9#1 = Index<int{2},0>(n04DC);
          int ix04F7#4 = Add<int>(t104F8,t204F9);
          int t204FC#4 = Index<int{2},1>(n04DC);
          int iy04FA#1 = Add<int>(t104F8,t204FC);
          addr(IMAGE2D<float>) a04FD#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04FA);
          real4 v004DE#1 = LoadVoxels<IMAGE2D<float>,4>(a04FD);
          int iy04F3#1 = Add<int>(_t04BF,t204FC);
          addr(IMAGE2D<float>) a04F6#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04F3);
          real4 v104DF#1 = LoadVoxels<IMAGE2D<float>,4>(a04F6);
          int iy04EC#1 = Add<int>(_t04C3,t204FC);
          addr(IMAGE2D<float>) a04EF#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04EC);
          real4 v204E0#1 = LoadVoxels<IMAGE2D<float>,4>(a04EF);
          int iy04E5#1 = Add<int>(_t049B,t204FC);
          addr(IMAGE2D<float>) a04E8#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix04F7,iy04E5);
          real4 v304E1#1 = LoadVoxels<IMAGE2D<float>,4>(a04E8);
          real fy0509#5 = Index<real2,1>(f04DA);
          real t3050E#1 = Add<real>(fy0509,_t0497);
          real t1050C#1 = Sub<real>(fy0509,_t0497);
          real t0050B#1 = Sub<real>(fy0509,_t0499);
          real4 a050A#1 = <real4>[t3050E,fy0509,t1050C,t0050B];
          real4 hy04FF#1 = EvalKernel<4,bspln3,0>(a050A);
          real fx0500#5 = Index<real2,0>(f04DA);
          real t30505#1 = Add<real>(fx0500,_t0497);
          real t10503#1 = Sub<real>(fx0500,_t0497);
          real t00502#1 = Sub<real>(fx0500,_t0499);
          real4 a0501#1 = <real4>[t30505,fx0500,t10503,t00502];
          real4 hx04FE#4 = EvalKernel<4,bspln3,0>(a0501);
          real t00513#1 = Dot<4>(v004DE,hx04FE);
          real t10514#1 = Dot<4>(v104DF,hx04FE);
          real t20515#1 = Dot<4>(v204E0,hx04FE);
          real t30516#1 = Dot<4>(v304E1,hx04FE);
          real4 tv0512#1 = <real4>[t00513,t10514,t20515,t30516];
          real _t04D8#1 = Dot<4>(hy04FF,tv0512);
          real2 x0556#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v00044B);
          real2 nd0558#2 = Floor<2>(x0556);
          real2 f0557#2 = Sub<real2>(x0556,nd0558);
          int{2} n0559#8 = RealToInt<2>(nd0558);
          int t20576#1 = Index<int{2},0>(n0559);
          int ix0574#4 = Add<int>(t104F8,t20576);
          int t20579#4 = Index<int{2},1>(n0559);
          int iy0577#1 = Add<int>(t104F8,t20579);
          addr(IMAGE2D<int>) a057A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0577);
          real4 v0055B#1 = LoadVoxels<IMAGE2D<int>,4>(a057A);
          int iy0570#1 = Add<int>(_t04BF,t20579);
          addr(IMAGE2D<int>) a0573#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0570);
          real4 v1055C#1 = LoadVoxels<IMAGE2D<int>,4>(a0573);
          int iy0569#1 = Add<int>(_t04C3,t20579);
          addr(IMAGE2D<int>) a056C#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0569);
          real4 v2055D#1 = LoadVoxels<IMAGE2D<int>,4>(a056C);
          int iy0562#1 = Add<int>(_t049B,t20579);
          addr(IMAGE2D<int>) a0565#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix0574,iy0562);
          real4 v3055E#1 = LoadVoxels<IMAGE2D<int>,4>(a0565);
          real fy0586#5 = Index<real2,1>(f0557);
          real t3058B#1 = Add<real>(fy0586,_t0497);
          real t10589#1 = Sub<real>(fy0586,_t0497);
          real t00588#1 = Sub<real>(fy0586,_t0499);
          real4 a0587#1 = <real4>[t3058B,fy0586,t10589,t00588];
          real4 hy057C#1 = EvalKernel<4,bspln3,0>(a0587);
          real fx057D#5 = Index<real2,0>(f0557);
          real t30582#1 = Add<real>(fx057D,_t0497);
          real t10580#1 = Sub<real>(fx057D,_t0497);
          real t0057F#1 = Sub<real>(fx057D,_t0499);
          real4 a057E#1 = <real4>[t30582,fx057D,t10580,t0057F];
          real4 hx057B#4 = EvalKernel<4,bspln3,0>(a057E);
          real t00590#1 = Dot<4>(v0055B,hx057B);
          real t10591#1 = Dot<4>(v1055C,hx057B);
          real t20592#1 = Dot<4>(v2055D,hx057B);
          real t30593#1 = Dot<4>(v3055E,hx057B);
          real4 tv058F#1 = <real4>[t00590,t10591,t20592,t30593];
          real _t0555#1 = Dot<4>(hy057C,tv058F);
          real _t05D2#2 = Sub<real>(_t04D8,_t0555);
          real _t05D4#1 = Mul<real>(_t05D2,_t05D2);
          real score05D6#1 = Add<real>(score0495,_t05D4);
          goto JOIN05D9
        JOIN05D9:  preds = [ASSIGN05D7,COND04D7]
          real score05D8#2 = phi(score05D6,score0495)
          real _t05DA#1 = Dot<2>(r004B1,v010451);
          real _t05DC#1 = Dot<2>(r104B7,v010451);
          real2 _t05DE#1 = <real2>[_t05DA,_t05DC];
          real2 pos05E0#2 = Add<real2>(_t05DE,_t04C7);
          real2 x05E3#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos05E0);
          bool _t05E2#1 = Inside<IMAGE2D<float>,2>(x05E3,_t0447);
          if _t05E2 then goto ASSIGN05E9 else goto ASSIGN0A3F
        ASSIGN05E9:  preds = [COND05E6]
          real2 x05E8#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v010451);
          bool _t05E7#1 = Inside<IMAGE2D<int>,2>(x05E8,_t0443);
          goto JOIN05ED
        JOIN05ED:  preds = [ASSIGN05EA,ASSIGN0A3F]
          bool _t05EB#1 = phi(_t05E7,_t05EC)
          if _t05EB then goto ASSIGN0A74 else goto JOIN06F0
        ASSIGN0A74:  preds = [COND05EE]
          real2 nd05F2#2 = Floor<2>(x05E3);
          real2 f05F1#2 = Sub<real2>(x05E3,nd05F2);
          int{2} n05F3#8 = RealToInt<2>(nd05F2);
          int t1060F#4 = -1;
          int t20610#1 = Index<int{2},0>(n05F3);
          int ix060E#4 = Add<int>(t1060F,t20610);
          int t20613#4 = Index<int{2},1>(n05F3);
          int iy0611#1 = Add<int>(t1060F,t20613);
          addr(IMAGE2D<float>) a0614#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy0611);
          real4 v005F5#1 = LoadVoxels<IMAGE2D<float>,4>(a0614);
          int iy060A#1 = Add<int>(_t04BF,t20613);
          addr(IMAGE2D<float>) a060D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy060A);
          real4 v105F6#1 = LoadVoxels<IMAGE2D<float>,4>(a060D);
          int iy0603#1 = Add<int>(_t04C3,t20613);
          addr(IMAGE2D<float>) a0606#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy0603);
          real4 v205F7#1 = LoadVoxels<IMAGE2D<float>,4>(a0606);
          int iy05FC#1 = Add<int>(_t049B,t20613);
          addr(IMAGE2D<float>) a05FF#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix060E,iy05FC);
          real4 v305F8#1 = LoadVoxels<IMAGE2D<float>,4>(a05FF);
          real fy0620#5 = Index<real2,1>(f05F1);
          real t30625#1 = Add<real>(fy0620,_t0497);
          real t10623#1 = Sub<real>(fy0620,_t0497);
          real t00622#1 = Sub<real>(fy0620,_t0499);
          real4 a0621#1 = <real4>[t30625,fy0620,t10623,t00622];
          real4 hy0616#1 = EvalKernel<4,bspln3,0>(a0621);
          real fx0617#5 = Index<real2,0>(f05F1);
          real t3061C#1 = Add<real>(fx0617,_t0497);
          real t1061A#1 = Sub<real>(fx0617,_t0497);
          real t00619#1 = Sub<real>(fx0617,_t0499);
          real4 a0618#1 = <real4>[t3061C,fx0617,t1061A,t00619];
          real4 hx0615#4 = EvalKernel<4,bspln3,0>(a0618);
          real t0062A#1 = Dot<4>(v005F5,hx0615);
          real t1062B#1 = Dot<4>(v105F6,hx0615);
          real t2062C#1 = Dot<4>(v205F7,hx0615);
          real t3062D#1 = Dot<4>(v305F8,hx0615);
          real4 tv0629#1 = <real4>[t0062A,t1062B,t2062C,t3062D];
          real _t05EF#1 = Dot<4>(hy0616,tv0629);
          real2 x066D#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v010451);
          real2 nd066F#2 = Floor<2>(x066D);
          real2 f066E#2 = Sub<real2>(x066D,nd066F);
          int{2} n0670#8 = RealToInt<2>(nd066F);
          int t2068D#1 = Index<int{2},0>(n0670);
          int ix068B#4 = Add<int>(t1060F,t2068D);
          int t20690#4 = Index<int{2},1>(n0670);
          int iy068E#1 = Add<int>(t1060F,t20690);
          addr(IMAGE2D<int>) a0691#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy068E);
          real4 v00672#1 = LoadVoxels<IMAGE2D<int>,4>(a0691);
          int iy0687#1 = Add<int>(_t04BF,t20690);
          addr(IMAGE2D<int>) a068A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy0687);
          real4 v10673#1 = LoadVoxels<IMAGE2D<int>,4>(a068A);
          int iy0680#1 = Add<int>(_t04C3,t20690);
          addr(IMAGE2D<int>) a0683#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy0680);
          real4 v20674#1 = LoadVoxels<IMAGE2D<int>,4>(a0683);
          int iy0679#1 = Add<int>(_t049B,t20690);
          addr(IMAGE2D<int>) a067C#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix068B,iy0679);
          real4 v30675#1 = LoadVoxels<IMAGE2D<int>,4>(a067C);
          real fy069D#5 = Index<real2,1>(f066E);
          real t306A2#1 = Add<real>(fy069D,_t0497);
          real t106A0#1 = Sub<real>(fy069D,_t0497);
          real t0069F#1 = Sub<real>(fy069D,_t0499);
          real4 a069E#1 = <real4>[t306A2,fy069D,t106A0,t0069F];
          real4 hy0693#1 = EvalKernel<4,bspln3,0>(a069E);
          real fx0694#5 = Index<real2,0>(f066E);
          real t30699#1 = Add<real>(fx0694,_t0497);
          real t10697#1 = Sub<real>(fx0694,_t0497);
          real t00696#1 = Sub<real>(fx0694,_t0499);
          real4 a0695#1 = <real4>[t30699,fx0694,t10697,t00696];
          real4 hx0692#4 = EvalKernel<4,bspln3,0>(a0695);
          real t006A7#1 = Dot<4>(v00672,hx0692);
          real t106A8#1 = Dot<4>(v10673,hx0692);
          real t206A9#1 = Dot<4>(v20674,hx0692);
          real t306AA#1 = Dot<4>(v30675,hx0692);
          real4 tv06A6#1 = <real4>[t006A7,t106A8,t206A9,t306AA];
          real _t066C#1 = Dot<4>(hy0693,tv06A6);
          real _t06E9#2 = Sub<real>(_t05EF,_t066C);
          real _t06EB#1 = Mul<real>(_t06E9,_t06E9);
          real score06ED#1 = Add<real>(score05D8,_t06EB);
          goto JOIN06F0
        JOIN06F0:  preds = [ASSIGN06EE,COND05EE]
          real score06EF#2 = phi(score06ED,score05D8)
          real _t06F1#1 = Dot<2>(r004B1,v020453);
          real _t06F3#1 = Dot<2>(r104B7,v020453);
          real2 _t06F5#1 = <real2>[_t06F1,_t06F3];
          real2 pos06F7#2 = Add<real2>(_t06F5,_t04C7);
          real2 x06FA#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos06F7);
          bool _t06F9#1 = Inside<IMAGE2D<float>,2>(x06FA,_t0447);
          if _t06F9 then goto ASSIGN0700 else goto ASSIGN0A3E
        ASSIGN0700:  preds = [COND06FD]
          real2 x06FF#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v020453);
          bool _t06FE#1 = Inside<IMAGE2D<int>,2>(x06FF,_t0443);
          goto JOIN0704
        JOIN0704:  preds = [ASSIGN0701,ASSIGN0A3E]
          bool _t0702#1 = phi(_t06FE,_t0703)
          if _t0702 then goto ASSIGN0A95 else goto JOIN0807
        ASSIGN0A95:  preds = [COND0705]
          real2 nd0709#2 = Floor<2>(x06FA);
          real2 f0708#2 = Sub<real2>(x06FA,nd0709);
          int{2} n070A#8 = RealToInt<2>(nd0709);
          int t10726#4 = -1;
          int t20727#1 = Index<int{2},0>(n070A);
          int ix0725#4 = Add<int>(t10726,t20727);
          int t2072A#4 = Index<int{2},1>(n070A);
          int iy0728#1 = Add<int>(t10726,t2072A);
          addr(IMAGE2D<float>) a072B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy0728);
          real4 v0070C#1 = LoadVoxels<IMAGE2D<float>,4>(a072B);
          int iy0721#1 = Add<int>(_t04BF,t2072A);
          addr(IMAGE2D<float>) a0724#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy0721);
          real4 v1070D#1 = LoadVoxels<IMAGE2D<float>,4>(a0724);
          int iy071A#1 = Add<int>(_t04C3,t2072A);
          addr(IMAGE2D<float>) a071D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy071A);
          real4 v2070E#1 = LoadVoxels<IMAGE2D<float>,4>(a071D);
          int iy0713#1 = Add<int>(_t049B,t2072A);
          addr(IMAGE2D<float>) a0716#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0725,iy0713);
          real4 v3070F#1 = LoadVoxels<IMAGE2D<float>,4>(a0716);
          real fy0737#5 = Index<real2,1>(f0708);
          real t3073C#1 = Add<real>(fy0737,_t0497);
          real t1073A#1 = Sub<real>(fy0737,_t0497);
          real t00739#1 = Sub<real>(fy0737,_t0499);
          real4 a0738#1 = <real4>[t3073C,fy0737,t1073A,t00739];
          real4 hy072D#1 = EvalKernel<4,bspln3,0>(a0738);
          real fx072E#5 = Index<real2,0>(f0708);
          real t30733#1 = Add<real>(fx072E,_t0497);
          real t10731#1 = Sub<real>(fx072E,_t0497);
          real t00730#1 = Sub<real>(fx072E,_t0499);
          real4 a072F#1 = <real4>[t30733,fx072E,t10731,t00730];
          real4 hx072C#4 = EvalKernel<4,bspln3,0>(a072F);
          real t00741#1 = Dot<4>(v0070C,hx072C);
          real t10742#1 = Dot<4>(v1070D,hx072C);
          real t20743#1 = Dot<4>(v2070E,hx072C);
          real t30744#1 = Dot<4>(v3070F,hx072C);
          real4 tv0740#1 = <real4>[t00741,t10742,t20743,t30744];
          real _t0706#1 = Dot<4>(hy072D,tv0740);
          real2 x0784#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v020453);
          real2 nd0786#2 = Floor<2>(x0784);
          real2 f0785#2 = Sub<real2>(x0784,nd0786);
          int{2} n0787#8 = RealToInt<2>(nd0786);
          int t207A4#1 = Index<int{2},0>(n0787);
          int ix07A2#4 = Add<int>(t10726,t207A4);
          int t207A7#4 = Index<int{2},1>(n0787);
          int iy07A5#1 = Add<int>(t10726,t207A7);
          addr(IMAGE2D<int>) a07A8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy07A5);
          real4 v00789#1 = LoadVoxels<IMAGE2D<int>,4>(a07A8);
          int iy079E#1 = Add<int>(_t04BF,t207A7);
          addr(IMAGE2D<int>) a07A1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy079E);
          real4 v1078A#1 = LoadVoxels<IMAGE2D<int>,4>(a07A1);
          int iy0797#1 = Add<int>(_t04C3,t207A7);
          addr(IMAGE2D<int>) a079A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy0797);
          real4 v2078B#1 = LoadVoxels<IMAGE2D<int>,4>(a079A);
          int iy0790#1 = Add<int>(_t049B,t207A7);
          addr(IMAGE2D<int>) a0793#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix07A2,iy0790);
          real4 v3078C#1 = LoadVoxels<IMAGE2D<int>,4>(a0793);
          real fy07B4#5 = Index<real2,1>(f0785);
          real t307B9#1 = Add<real>(fy07B4,_t0497);
          real t107B7#1 = Sub<real>(fy07B4,_t0497);
          real t007B6#1 = Sub<real>(fy07B4,_t0499);
          real4 a07B5#1 = <real4>[t307B9,fy07B4,t107B7,t007B6];
          real4 hy07AA#1 = EvalKernel<4,bspln3,0>(a07B5);
          real fx07AB#5 = Index<real2,0>(f0785);
          real t307B0#1 = Add<real>(fx07AB,_t0497);
          real t107AE#1 = Sub<real>(fx07AB,_t0497);
          real t007AD#1 = Sub<real>(fx07AB,_t0499);
          real4 a07AC#1 = <real4>[t307B0,fx07AB,t107AE,t007AD];
          real4 hx07A9#4 = EvalKernel<4,bspln3,0>(a07AC);
          real t007BE#1 = Dot<4>(v00789,hx07A9);
          real t107BF#1 = Dot<4>(v1078A,hx07A9);
          real t207C0#1 = Dot<4>(v2078B,hx07A9);
          real t307C1#1 = Dot<4>(v3078C,hx07A9);
          real4 tv07BD#1 = <real4>[t007BE,t107BF,t207C0,t307C1];
          real _t0783#1 = Dot<4>(hy07AA,tv07BD);
          real _t0800#2 = Sub<real>(_t0706,_t0783);
          real _t0802#1 = Mul<real>(_t0800,_t0800);
          real score0804#1 = Add<real>(score06EF,_t0802);
          goto JOIN0807
        JOIN0807:  preds = [ASSIGN0805,COND0705]
          real score0806#2 = phi(score0804,score06EF)
          real _t0808#1 = Dot<2>(r004B1,v030455);
          real _t080A#1 = Dot<2>(r104B7,v030455);
          real2 _t080C#1 = <real2>[_t0808,_t080A];
          real2 pos080E#2 = Add<real2>(_t080C,_t04C7);
          real2 x0811#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos080E);
          bool _t0810#1 = Inside<IMAGE2D<float>,2>(x0811,_t0447);
          if _t0810 then goto ASSIGN0817 else goto ASSIGN0A3D
        ASSIGN0817:  preds = [COND0814]
          real2 x0816#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v030455);
          bool _t0815#1 = Inside<IMAGE2D<int>,2>(x0816,_t0443);
          goto JOIN081B
        JOIN081B:  preds = [ASSIGN0818,ASSIGN0A3D]
          bool _t0819#1 = phi(_t0815,_t081A)
          if _t0819 then goto ASSIGN0AB6 else goto JOIN091E
        ASSIGN0AB6:  preds = [COND081C]
          real2 nd0820#2 = Floor<2>(x0811);
          real2 f081F#2 = Sub<real2>(x0811,nd0820);
          int{2} n0821#8 = RealToInt<2>(nd0820);
          int t1083D#4 = -1;
          int t2083E#1 = Index<int{2},0>(n0821);
          int ix083C#4 = Add<int>(t1083D,t2083E);
          int t20841#4 = Index<int{2},1>(n0821);
          int iy083F#1 = Add<int>(t1083D,t20841);
          addr(IMAGE2D<float>) a0842#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy083F);
          real4 v00823#1 = LoadVoxels<IMAGE2D<float>,4>(a0842);
          int iy0838#1 = Add<int>(_t04BF,t20841);
          addr(IMAGE2D<float>) a083B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy0838);
          real4 v10824#1 = LoadVoxels<IMAGE2D<float>,4>(a083B);
          int iy0831#1 = Add<int>(_t04C3,t20841);
          addr(IMAGE2D<float>) a0834#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy0831);
          real4 v20825#1 = LoadVoxels<IMAGE2D<float>,4>(a0834);
          int iy082A#1 = Add<int>(_t049B,t20841);
          addr(IMAGE2D<float>) a082D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix083C,iy082A);
          real4 v30826#1 = LoadVoxels<IMAGE2D<float>,4>(a082D);
          real fy084E#5 = Index<real2,1>(f081F);
          real t30853#1 = Add<real>(fy084E,_t0497);
          real t10851#1 = Sub<real>(fy084E,_t0497);
          real t00850#1 = Sub<real>(fy084E,_t0499);
          real4 a084F#1 = <real4>[t30853,fy084E,t10851,t00850];
          real4 hy0844#1 = EvalKernel<4,bspln3,0>(a084F);
          real fx0845#5 = Index<real2,0>(f081F);
          real t3084A#1 = Add<real>(fx0845,_t0497);
          real t10848#1 = Sub<real>(fx0845,_t0497);
          real t00847#1 = Sub<real>(fx0845,_t0499);
          real4 a0846#1 = <real4>[t3084A,fx0845,t10848,t00847];
          real4 hx0843#4 = EvalKernel<4,bspln3,0>(a0846);
          real t00858#1 = Dot<4>(v00823,hx0843);
          real t10859#1 = Dot<4>(v10824,hx0843);
          real t2085A#1 = Dot<4>(v20825,hx0843);
          real t3085B#1 = Dot<4>(v30826,hx0843);
          real4 tv0857#1 = <real4>[t00858,t10859,t2085A,t3085B];
          real _t081D#1 = Dot<4>(hy0844,tv0857);
          real2 x089B#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v030455);
          real2 nd089D#2 = Floor<2>(x089B);
          real2 f089C#2 = Sub<real2>(x089B,nd089D);
          int{2} n089E#8 = RealToInt<2>(nd089D);
          int t208BB#1 = Index<int{2},0>(n089E);
          int ix08B9#4 = Add<int>(t1083D,t208BB);
          int t208BE#4 = Index<int{2},1>(n089E);
          int iy08BC#1 = Add<int>(t1083D,t208BE);
          addr(IMAGE2D<int>) a08BF#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08BC);
          real4 v008A0#1 = LoadVoxels<IMAGE2D<int>,4>(a08BF);
          int iy08B5#1 = Add<int>(_t04BF,t208BE);
          addr(IMAGE2D<int>) a08B8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08B5);
          real4 v108A1#1 = LoadVoxels<IMAGE2D<int>,4>(a08B8);
          int iy08AE#1 = Add<int>(_t04C3,t208BE);
          addr(IMAGE2D<int>) a08B1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08AE);
          real4 v208A2#1 = LoadVoxels<IMAGE2D<int>,4>(a08B1);
          int iy08A7#1 = Add<int>(_t049B,t208BE);
          addr(IMAGE2D<int>) a08AA#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix08B9,iy08A7);
          real4 v308A3#1 = LoadVoxels<IMAGE2D<int>,4>(a08AA);
          real fy08CB#5 = Index<real2,1>(f089C);
          real t308D0#1 = Add<real>(fy08CB,_t0497);
          real t108CE#1 = Sub<real>(fy08CB,_t0497);
          real t008CD#1 = Sub<real>(fy08CB,_t0499);
          real4 a08CC#1 = <real4>[t308D0,fy08CB,t108CE,t008CD];
          real4 hy08C1#1 = EvalKernel<4,bspln3,0>(a08CC);
          real fx08C2#5 = Index<real2,0>(f089C);
          real t308C7#1 = Add<real>(fx08C2,_t0497);
          real t108C5#1 = Sub<real>(fx08C2,_t0497);
          real t008C4#1 = Sub<real>(fx08C2,_t0499);
          real4 a08C3#1 = <real4>[t308C7,fx08C2,t108C5,t008C4];
          real4 hx08C0#4 = EvalKernel<4,bspln3,0>(a08C3);
          real t008D5#1 = Dot<4>(v008A0,hx08C0);
          real t108D6#1 = Dot<4>(v108A1,hx08C0);
          real t208D7#1 = Dot<4>(v208A2,hx08C0);
          real t308D8#1 = Dot<4>(v308A3,hx08C0);
          real4 tv08D4#1 = <real4>[t008D5,t108D6,t208D7,t308D8];
          real _t089A#1 = Dot<4>(hy08C1,tv08D4);
          real _t0917#2 = Sub<real>(_t081D,_t089A);
          real _t0919#1 = Mul<real>(_t0917,_t0917);
          real score091B#1 = Add<real>(score0806,_t0919);
          goto JOIN091E
        JOIN091E:  preds = [ASSIGN091C,COND081C]
          real score091D#2 = phi(score091B,score0806)
          real _t091F#1 = Dot<2>(r004B1,v040457);
          real _t0921#1 = Dot<2>(r104B7,v040457);
          real2 _t0923#1 = <real2>[_t091F,_t0921];
          real2 pos0925#3 = Add<real2>(_t0923,_t04C7);
          real2 x0928#3 = PosToImgSpace<IMAGE2D<float>>(_t0447,pos0925);
          bool _t0927#1 = Inside<IMAGE2D<float>,2>(x0928,_t0447);
          if _t0927 then goto ASSIGN092E else goto ASSIGN0A3C
        ASSIGN092E:  preds = [COND092B]
          real2 x092D#1 = PosToImgSpace<IMAGE2D<int>>(_t0443,v040457);
          bool _t092C#1 = Inside<IMAGE2D<int>,2>(x092D,_t0443);
          goto JOIN0932
        JOIN0932:  preds = [ASSIGN092F,ASSIGN0A3C]
          bool _t0930#1 = phi(_t092C,_t0931)
          if _t0930 then goto ASSIGN0AD7 else goto JOIN0A35
        ASSIGN0AD7:  preds = [COND0933]
          real2 nd0937#2 = Floor<2>(x0928);
          real2 f0936#2 = Sub<real2>(x0928,nd0937);
          int{2} n0938#8 = RealToInt<2>(nd0937);
          int t10954#4 = -1;
          int t20955#1 = Index<int{2},0>(n0938);
          int ix0953#4 = Add<int>(t10954,t20955);
          int t20958#4 = Index<int{2},1>(n0938);
          int iy0956#1 = Add<int>(t10954,t20958);
          addr(IMAGE2D<float>) a0959#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy0956);
          real4 v0093A#1 = LoadVoxels<IMAGE2D<float>,4>(a0959);
          int iy094F#1 = Add<int>(_t04BF,t20958);
          addr(IMAGE2D<float>) a0952#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy094F);
          real4 v1093B#1 = LoadVoxels<IMAGE2D<float>,4>(a0952);
          int iy0948#1 = Add<int>(_t04C3,t20958);
          addr(IMAGE2D<float>) a094B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy0948);
          real4 v2093C#1 = LoadVoxels<IMAGE2D<float>,4>(a094B);
          int iy0941#1 = Add<int>(_t049B,t20958);
          addr(IMAGE2D<float>) a0944#1 = VoxelAddress<IMAGE2D<float>,0>(_t0447,ix0953,iy0941);
          real4 v3093D#1 = LoadVoxels<IMAGE2D<float>,4>(a0944);
          real fy0965#5 = Index<real2,1>(f0936);
          real t3096A#1 = Add<real>(fy0965,_t0497);
          real t10968#1 = Sub<real>(fy0965,_t0497);
          real t00967#1 = Sub<real>(fy0965,_t0499);
          real4 a0966#1 = <real4>[t3096A,fy0965,t10968,t00967];
          real4 hy095B#1 = EvalKernel<4,bspln3,0>(a0966);
          real fx095C#5 = Index<real2,0>(f0936);
          real t30961#1 = Add<real>(fx095C,_t0497);
          real t1095F#1 = Sub<real>(fx095C,_t0497);
          real t0095E#1 = Sub<real>(fx095C,_t0499);
          real4 a095D#1 = <real4>[t30961,fx095C,t1095F,t0095E];
          real4 hx095A#4 = EvalKernel<4,bspln3,0>(a095D);
          real t0096F#1 = Dot<4>(v0093A,hx095A);
          real t10970#1 = Dot<4>(v1093B,hx095A);
          real t20971#1 = Dot<4>(v2093C,hx095A);
          real t30972#1 = Dot<4>(v3093D,hx095A);
          real4 tv096E#1 = <real4>[t0096F,t10970,t20971,t30972];
          real _t0934#1 = Dot<4>(hy095B,tv096E);
          real2 x09B2#2 = PosToImgSpace<IMAGE2D<int>>(_t0443,v040457);
          real2 nd09B4#2 = Floor<2>(x09B2);
          real2 f09B3#2 = Sub<real2>(x09B2,nd09B4);
          int{2} n09B5#8 = RealToInt<2>(nd09B4);
          int t209D2#1 = Index<int{2},0>(n09B5);
          int ix09D0#4 = Add<int>(t10954,t209D2);
          int t209D5#4 = Index<int{2},1>(n09B5);
          int iy09D3#1 = Add<int>(t10954,t209D5);
          addr(IMAGE2D<int>) a09D6#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09D3);
          real4 v009B7#1 = LoadVoxels<IMAGE2D<int>,4>(a09D6);
          int iy09CC#1 = Add<int>(_t04BF,t209D5);
          addr(IMAGE2D<int>) a09CF#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09CC);
          real4 v109B8#1 = LoadVoxels<IMAGE2D<int>,4>(a09CF);
          int iy09C5#1 = Add<int>(_t04C3,t209D5);
          addr(IMAGE2D<int>) a09C8#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09C5);
          real4 v209B9#1 = LoadVoxels<IMAGE2D<int>,4>(a09C8);
          int iy09BE#1 = Add<int>(_t049B,t209D5);
          addr(IMAGE2D<int>) a09C1#1 = VoxelAddress<IMAGE2D<int>,0>(_t0443,ix09D0,iy09BE);
          real4 v309BA#1 = LoadVoxels<IMAGE2D<int>,4>(a09C1);
          real fy09E2#5 = Index<real2,1>(f09B3);
          real t309E7#1 = Add<real>(fy09E2,_t0497);
          real t109E5#1 = Sub<real>(fy09E2,_t0497);
          real t009E4#1 = Sub<real>(fy09E2,_t0499);
          real4 a09E3#1 = <real4>[t309E7,fy09E2,t109E5,t009E4];
          real4 hy09D8#1 = EvalKernel<4,bspln3,0>(a09E3);
          real fx09D9#5 = Index<real2,0>(f09B3);
          real t309DE#1 = Add<real>(fx09D9,_t0497);
          real t109DC#1 = Sub<real>(fx09D9,_t0497);
          real t009DB#1 = Sub<real>(fx09D9,_t0499);
          real4 a09DA#1 = <real4>[t309DE,fx09D9,t109DC,t009DB];
          real4 hx09D7#4 = EvalKernel<4,bspln3,0>(a09DA);
          real t009EC#1 = Dot<4>(v009B7,hx09D7);
          real t109ED#1 = Dot<4>(v109B8,hx09D7);
          real t209EE#1 = Dot<4>(v209B9,hx09D7);
          real t309EF#1 = Dot<4>(v309BA,hx09D7);
          real4 tv09EB#1 = <real4>[t009EC,t109ED,t209EE,t309EF];
          real _t09B1#1 = Dot<4>(hy09D8,tv09EB);
          real _t0A2E#2 = Sub<real>(_t0934,_t09B1);
          real _t0A30#1 = Mul<real>(_t0A2E,_t0A2E);
          real score0A32#1 = Add<real>(score091D,_t0A30);
          goto JOIN0A35
        JOIN0A35:  preds = [ASSIGN0A33,COND0933]
          real score0A34#1 = phi(score0A32,score091D)
          self.t = t0493;
          self.score = score0A34;
          self.r0 = r004B1;
          self.r1 = r104B7;
          self.pos = pos0925;
          stabilize ()
        ASSIGN0A3C:  preds = [COND092B]
          bool _t0931#1 = false;
          goto JOIN0932
        ASSIGN0A3D:  preds = [COND0814]
          bool _t081A#1 = false;
          goto JOIN081B
        ASSIGN0A3E:  preds = [COND06FD]
          bool _t0703#1 = false;
          goto JOIN0704
        ASSIGN0A3F:  preds = [COND05E6]
          bool _t05EC#1 = false;
          goto JOIN05ED
        ASSIGN0A40:  preds = [COND04CF]
          bool _t04D5#1 = false;
          goto JOIN04D6
    end Update
    method Stabilize
        ENTRY0A42:  preds = []
          real3 t0A43#1 = self.t;
          real score0A45#1 = self.score;
          real2 r00A47#1 = self.r0;
          real2 r10A49#1 = self.r1;
          real2 pos0A4B#1 = self.pos;
          self.t = t0A43;
          self.score = score0A45;
          self.r0 = r00A47;
          self.r1 = r10A49;
          self.pos = pos0A4B;
          return ()
    end Stabilize
  end R
#### end program ####
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
##### LowIL after value numbering ####
## properties
  none
## globals
  global int T0B11#0
  global int F0B12#0
  global real2 v000B03#4
  global real2 v010B09#4
  global real2 v020B0B#4
  global real2 v030B0D#4
  global real2 v040B0F#4
  global string _t0AF9#1
  global image(IMAGE2D<int>) _t0AFB#35
  global int _t0B13#0
  global string _t0AFD#1
  global image(IMAGE2D<float>) _t0AFF#30
  global real _t0B01#2
  global real _t0B05#5
  global real _t0B07#4
## global initialization
  ENTRY0AF8:  preds = []
    string _t0AF9#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0AFB#35 = LoadImage<IMAGE2D<int>>(_t0AF9);
    string _t0AFD#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0AFF#30 = LoadImage<IMAGE2D<float>>(_t0AFD);
    real _t0B01#2 = 0.0;
    real2 v000B03#4 = <real2>[_t0B01,_t0B01];
    real _t0B05#5 = 0.5e0;
    real _t0B07#4 = Neg<real>(_t0B05);
    real2 v010B09#4 = <real2>[_t0B07,_t0B05];
    real2 v020B0B#4 = <real2>[_t0B07,_t0B07];
    real2 v030B0D#4 = <real2>[_t0B05,_t0B05];
    real2 v040B0F#4 = <real2>[_t0B05,_t0B07];
    return (T0B11,F0B12,v000B03,v010B09,v020B0B,v030B0D,v040B0F,_t0AF9,_t0AFB,_t0B13,_t0AFD,_t0AFF,_t0B01,_t0B05,_t0B07)
## initially
  ARRAY
    ENTRY0B1A:  preds = []
      int _t0B16#4 = 0;
      int _t0B17#4 = 60;
      live vars = (_t0B17,_t0B16)
    for int i0B15#1 = _t0B16 .. _t0B17
      for int j0B18#1 = _t0B16 .. _t0B17
        for int k0B19#1 = _t0B16 .. _t0B17
          ENTRY0B1E:  preds = []
            live vars = ()
          new R(i0B15,j0B18,k0B19);
## strands
  strand R (int i0B20#1, int j0B21#1, int k0B22#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY0B28:  preds = []
        real _t0B29#1 = IntToReal(i0B20);
        real _t0B2B#3 = 0.60e2;
        real _t0B2D#1 = Div<real>(_t0B29,_t0B2B);
        real _t0B2F#3 = 0.5e0;
        real _t0B31#1 = Sub<real>(_t0B2D,_t0B2F);
        real _t0B33#1 = IntToReal(j0B21);
        real _t0B35#1 = Div<real>(_t0B33,_t0B2B);
        real _t0B37#1 = Sub<real>(_t0B35,_t0B2F);
        real _t0B39#1 = IntToReal(k0B22);
        real _t0B3B#1 = Div<real>(_t0B39,_t0B2B);
        real _t0B3D#1 = Sub<real>(_t0B3B,_t0B2F);
        real3 t0B3F#1 = <real3>[_t0B31,_t0B37,_t0B3D];
        real score0B41#3 = 0.0;
        real2 r00B43#3 = <real2>[score0B41,score0B41];
        self.t = t0B3F;
        self.score = score0B41;
        self.r0 = r00B43;
        self.r1 = r00B43;
        self.pos = r00B43;
        strand_init ()
    method Update
        ENTRY0B4B:  preds = []
          real3 t0B4C#4 = self.t;
          real score0B4E#2 = self.score;
          real _t0B50#52 = 0.1e1;
          real _t0B52#28 = 0.2e1;
          int _t0B54#11 = 2;
          real _t0B56#6 = Subscript<real3>(t0B4C,_t0B54);
          real _t0B58#1 = Mul<real>(_t0B52,_t0B56);
          real _t0B5A#1 = Mul<real>(_t0B58,_t0B56);
          real _t0B5C#2 = Sub<real>(_t0B50,_t0B5A);
          real _t0B5E#1 = Neg<real>(_t0B52);
          real _t0B60#1 = Mul<real>(_t0B56,_t0B56);
          real _t0B62#1 = Sub<real>(_t0B50,_t0B60);
          real _t0B64#2 = sqrt(_t0B62);
          real _t0B66#1 = Mul<real>(_t0B5E,_t0B64);
          real _t0B68#1 = Mul<real>(_t0B66,_t0B56);
          real2 r00B6A#6 = <real2>[_t0B5C,_t0B68];
          real _t0B6C#1 = Mul<real>(_t0B52,_t0B64);
          real _t0B6E#1 = Mul<real>(_t0B6C,_t0B56);
          real2 r10B70#6 = <real2>[_t0B6E,_t0B5C];
          real _t0B72#1 = Dot<2>(r00B6A,v000B03);
          real _t0B74#1 = Dot<2>(r10B70,v000B03);
          real2 _t0B76#1 = <real2>[_t0B72,_t0B74];
          int _t0B78#11 = 0;
          real _t0B7A#1 = Subscript<real3>(t0B4C,_t0B78);
          int _t0B7C#11 = 1;
          real _t0B7E#1 = Subscript<real3>(t0B4C,_t0B7C);
          real2 _t0B80#5 = <real2>[_t0B7A,_t0B7E];
          real2 pos0B82#1 = Add<real2>(_t0B76,_t0B80);
          real2 x0B84#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos0B82);
          bool _t0B86#1 = Inside<IMAGE2D<float>,2>(x0B84,_t0AFF);
          if _t0B86 then goto ASSIGN0B8A else goto ASSIGN1423
        ASSIGN0B8A:  preds = [COND0B88]
          real2 x0B89#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v000B03);
          bool _t0B8B#1 = Inside<IMAGE2D<int>,2>(x0B89,_t0AFB);
          goto JOIN0B8F
        JOIN0B8F:  preds = [ASSIGN0B8C,ASSIGN1423]
          bool _t0B8D#1 = phi(_t0B8B,_t0B8E)
          if _t0B8D then goto ASSIGN0B92 else goto JOIN0D34
        ASSIGN0B92:  preds = [COND0B90]
          real2 nd0B91#2 = Floor<2>(x0B84);
          real2 f0B93#2 = Sub<real2>(x0B84,nd0B91);
          int{2} n0B95#2 = RealToInt<2>(nd0B91);
          int t10B97#4 = -1;
          int t20B99#1 = Index<int{2},0>(n0B95);
          int ix0B9B#4 = Add<int>(t10B97,t20B99);
          int t20B9D#4 = Index<int{2},1>(n0B95);
          int iy0B9F#1 = Add<int>(t10B97,t20B9D);
          int n00BA2#8 = 21;
          int t0BA3#1 = Mul<int>(n00BA2,iy0B9F);
          int index0BA4#1 = Add<int>(ix0B9B,t0BA3);
          addr(IMAGE2D<float>) imgBaseAddr0BA5#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a0BA1#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BA4);
          real4 v00BAB#1 = LoadVoxels<IMAGE2D<float>,4>(a0BA1);
          int iy0BAD#1 = Add<int>(_t0B78,t20B9D);
          int t0BB1#1 = Mul<int>(n00BA2,iy0BAD);
          int index0BB2#1 = Add<int>(ix0B9B,t0BB1);
          addr(IMAGE2D<float>) a0BAF#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BB2);
          real4 v10BB9#1 = LoadVoxels<IMAGE2D<float>,4>(a0BAF);
          int iy0BBB#1 = Add<int>(_t0B7C,t20B9D);
          int t0BBF#1 = Mul<int>(n00BA2,iy0BBB);
          int index0BC0#1 = Add<int>(ix0B9B,t0BBF);
          addr(IMAGE2D<float>) a0BBD#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BC0);
          real4 v20BC7#1 = LoadVoxels<IMAGE2D<float>,4>(a0BBD);
          int iy0BC9#1 = Add<int>(_t0B54,t20B9D);
          int t0BCD#1 = Mul<int>(n00BA2,iy0BC9);
          int index0BCE#1 = Add<int>(ix0B9B,t0BCD);
          addr(IMAGE2D<float>) a0BCB#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BCE);
          real4 v30BD5#1 = LoadVoxels<IMAGE2D<float>,4>(a0BCB);
          real fy0BD7#4 = Index<real2,1>(f0B93);
          real t30BD9#1 = Add<real>(fy0BD7,_t0B50);
          real t10BDB#1 = Sub<real>(fy0BD7,_t0B50);
          real t00BDD#1 = Sub<real>(fy0BD7,_t0B52);
          real4 a0BDF#3 = <real4>[t30BD9,fy0BD7,t10BDB,t00BDD];
          real _f0BF2#2 = 0.133333333333e1;
          real _f0BF3#2 = 0.666666666667e0;
          real4 a00BE2#4 = <real4>[_f0BF2,_f0BF3,_f0BF3,_f0BF2];
          real _f0BEE#1 = -0.2e1;
          real _f0BEF#2 = 0.0;
          real4 a10BE3#4 = <real4>[_f0BEE,_f0BEF,_f0BEF,_t0B52];
          real _f0BEB#2 = -0.1e1;
          real4 a20BE4#4 = <real4>[_t0B50,_f0BEB,_f0BEB,_t0B50];
          real _f0BE6#1 = -0.166666666667e0;
          real _f0BE7#1 = 0.5e0;
          real _f0BE8#1 = -0.5e0;
          real _f0BE9#1 = 0.166666666667e0;
          real4 a30BE5#4 = <real4>[_f0BE6,_f0BE7,_f0BE8,_f0BE9];
          real4 prod30BF6#1 = Mul<real4>(a0BDF,a30BE5);
          real4 sum20BF7#1 = Add<real4>(a20BE4,prod30BF6);
          real4 prod20BF8#1 = Mul<real4>(a0BDF,sum20BF7);
          real4 sum10BF9#1 = Add<real4>(a10BE3,prod20BF8);
          real4 prod10BFA#1 = Mul<real4>(a0BDF,sum10BF9);
          real4 hy0BE1#1 = Add<real4>(a00BE2,prod10BFA);
          real fx0C15#4 = Index<real2,0>(f0B93);
          real t30C17#1 = Add<real>(fx0C15,_t0B50);
          real t10C19#1 = Sub<real>(fx0C15,_t0B50);
          real t00C1B#1 = Sub<real>(fx0C15,_t0B52);
          real4 a0C1D#3 = <real4>[t30C17,fx0C15,t10C19,t00C1B];
          real4 prod30C34#1 = Mul<real4>(a0C1D,a30BE5);
          real4 sum20C35#1 = Add<real4>(a20BE4,prod30C34);
          real4 prod20C36#1 = Mul<real4>(a0C1D,sum20C35);
          real4 sum10C37#1 = Add<real4>(a10BE3,prod20C36);
          real4 prod10C38#1 = Mul<real4>(a0C1D,sum10C37);
          real4 hx0C1F#4 = Add<real4>(a00BE2,prod10C38);
          real t00C53#1 = Dot<4>(v00BAB,hx0C1F);
          real t10C55#1 = Dot<4>(v10BB9,hx0C1F);
          real t20C57#1 = Dot<4>(v20BC7,hx0C1F);
          real t30C59#1 = Dot<4>(v30BD5,hx0C1F);
          real4 tv0C5B#1 = <real4>[t00C53,t10C55,t20C57,t30C59];
          real _t0C5D#1 = Dot<4>(hy0BE1,tv0C5B);
          real2 x0C5F#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v000B03);
          real2 nd0C61#2 = Floor<2>(x0C5F);
          real2 f0C63#2 = Sub<real2>(x0C5F,nd0C61);
          int{2} n0C65#2 = RealToInt<2>(nd0C61);
          int t20C67#1 = Index<int{2},0>(n0C65);
          int ix0C69#4 = Add<int>(t10B97,t20C67);
          int t20C6B#4 = Index<int{2},1>(n0C65);
          int iy0C6D#1 = Add<int>(t10B97,t20C6B);
          int t0C71#1 = Mul<int>(n00BA2,iy0C6D);
          int index0C72#1 = Add<int>(ix0C69,t0C71);
          addr(IMAGE2D<int>) imgBaseAddr0C73#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a0C6F#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C72);
          real4 v00C79#1 = LoadVoxels<IMAGE2D<int>,4>(a0C6F);
          int iy0C7B#1 = Add<int>(_t0B78,t20C6B);
          int t0C7F#1 = Mul<int>(n00BA2,iy0C7B);
          int index0C80#1 = Add<int>(ix0C69,t0C7F);
          addr(IMAGE2D<int>) a0C7D#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C80);
          real4 v10C87#1 = LoadVoxels<IMAGE2D<int>,4>(a0C7D);
          int iy0C89#1 = Add<int>(_t0B7C,t20C6B);
          int t0C8D#1 = Mul<int>(n00BA2,iy0C89);
          int index0C8E#1 = Add<int>(ix0C69,t0C8D);
          addr(IMAGE2D<int>) a0C8B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C8E);
          real4 v20C95#1 = LoadVoxels<IMAGE2D<int>,4>(a0C8B);
          int iy0C97#1 = Add<int>(_t0B54,t20C6B);
          int t0C9B#1 = Mul<int>(n00BA2,iy0C97);
          int index0C9C#1 = Add<int>(ix0C69,t0C9B);
          addr(IMAGE2D<int>) a0C99#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C9C);
          real4 v30CA3#1 = LoadVoxels<IMAGE2D<int>,4>(a0C99);
          real fy0CA5#4 = Index<real2,1>(f0C63);
          real t30CA7#1 = Add<real>(fy0CA5,_t0B50);
          real t10CA9#1 = Sub<real>(fy0CA5,_t0B50);
          real t00CAB#1 = Sub<real>(fy0CA5,_t0B52);
          real4 a0CAD#3 = <real4>[t30CA7,fy0CA5,t10CA9,t00CAB];
          real4 prod30CC4#1 = Mul<real4>(a0CAD,a30BE5);
          real4 sum20CC5#1 = Add<real4>(a20BE4,prod30CC4);
          real4 prod20CC6#1 = Mul<real4>(a0CAD,sum20CC5);
          real4 sum10CC7#1 = Add<real4>(a10BE3,prod20CC6);
          real4 prod10CC8#1 = Mul<real4>(a0CAD,sum10CC7);
          real4 hy0CAF#1 = Add<real4>(a00BE2,prod10CC8);
          real fx0CE3#4 = Index<real2,0>(f0C63);
          real t30CE5#1 = Add<real>(fx0CE3,_t0B50);
          real t10CE7#1 = Sub<real>(fx0CE3,_t0B50);
          real t00CE9#1 = Sub<real>(fx0CE3,_t0B52);
          real4 a0CEB#3 = <real4>[t30CE5,fx0CE3,t10CE7,t00CE9];
          real4 prod30D02#1 = Mul<real4>(a0CEB,a30BE5);
          real4 sum20D03#1 = Add<real4>(a20BE4,prod30D02);
          real4 prod20D04#1 = Mul<real4>(a0CEB,sum20D03);
          real4 sum10D05#1 = Add<real4>(a10BE3,prod20D04);
          real4 prod10D06#1 = Mul<real4>(a0CEB,sum10D05);
          real4 hx0CED#4 = Add<real4>(a00BE2,prod10D06);
          real t00D21#1 = Dot<4>(v00C79,hx0CED);
          real t10D23#1 = Dot<4>(v10C87,hx0CED);
          real t20D25#1 = Dot<4>(v20C95,hx0CED);
          real t30D27#1 = Dot<4>(v30CA3,hx0CED);
          real4 tv0D29#1 = <real4>[t00D21,t10D23,t20D25,t30D27];
          real _t0D2B#1 = Dot<4>(hy0CAF,tv0D29);
          real _t0D2D#2 = Sub<real>(_t0C5D,_t0D2B);
          real _t0D2F#1 = Mul<real>(_t0D2D,_t0D2D);
          real score0D31#1 = Add<real>(score0B4E,_t0D2F);
          goto JOIN0D34
        JOIN0D34:  preds = [ASSIGN0D32,COND0B90]
          real score0D33#2 = phi(score0D31,score0B4E)
          real _t0D35#1 = Dot<2>(r00B6A,v010B09);
          real _t0D37#1 = Dot<2>(r10B70,v010B09);
          real2 _t0D39#1 = <real2>[_t0D35,_t0D37];
          real2 pos0D3B#1 = Add<real2>(_t0D39,_t0B80);
          real2 x0D3D#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos0D3B);
          bool _t0D3F#1 = Inside<IMAGE2D<float>,2>(x0D3D,_t0AFF);
          if _t0D3F then goto ASSIGN0D43 else goto ASSIGN1422
        ASSIGN0D43:  preds = [COND0D41]
          real2 x0D42#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v010B09);
          bool _t0D44#1 = Inside<IMAGE2D<int>,2>(x0D42,_t0AFB);
          goto JOIN0D48
        JOIN0D48:  preds = [ASSIGN0D45,ASSIGN1422]
          bool _t0D46#1 = phi(_t0D44,_t0D47)
          if _t0D46 then goto ASSIGN0D4B else goto JOIN0EED
        ASSIGN0D4B:  preds = [COND0D49]
          real2 nd0D4A#2 = Floor<2>(x0D3D);
          real2 f0D4C#2 = Sub<real2>(x0D3D,nd0D4A);
          int{2} n0D4E#2 = RealToInt<2>(nd0D4A);
          int t10D50#4 = -1;
          int t20D52#1 = Index<int{2},0>(n0D4E);
          int ix0D54#4 = Add<int>(t10D50,t20D52);
          int t20D56#4 = Index<int{2},1>(n0D4E);
          int iy0D58#1 = Add<int>(t10D50,t20D56);
          int n00D5B#8 = 21;
          int t0D5C#1 = Mul<int>(n00D5B,iy0D58);
          int index0D5D#1 = Add<int>(ix0D54,t0D5C);
          addr(IMAGE2D<float>) imgBaseAddr0D5E#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a0D5A#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D5D);
          real4 v00D64#1 = LoadVoxels<IMAGE2D<float>,4>(a0D5A);
          int iy0D66#1 = Add<int>(_t0B78,t20D56);
          int t0D6A#1 = Mul<int>(n00D5B,iy0D66);
          int index0D6B#1 = Add<int>(ix0D54,t0D6A);
          addr(IMAGE2D<float>) a0D68#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D6B);
          real4 v10D72#1 = LoadVoxels<IMAGE2D<float>,4>(a0D68);
          int iy0D74#1 = Add<int>(_t0B7C,t20D56);
          int t0D78#1 = Mul<int>(n00D5B,iy0D74);
          int index0D79#1 = Add<int>(ix0D54,t0D78);
          addr(IMAGE2D<float>) a0D76#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D79);
          real4 v20D80#1 = LoadVoxels<IMAGE2D<float>,4>(a0D76);
          int iy0D82#1 = Add<int>(_t0B54,t20D56);
          int t0D86#1 = Mul<int>(n00D5B,iy0D82);
          int index0D87#1 = Add<int>(ix0D54,t0D86);
          addr(IMAGE2D<float>) a0D84#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D87);
          real4 v30D8E#1 = LoadVoxels<IMAGE2D<float>,4>(a0D84);
          real fy0D90#4 = Index<real2,1>(f0D4C);
          real t30D92#1 = Add<real>(fy0D90,_t0B50);
          real t10D94#1 = Sub<real>(fy0D90,_t0B50);
          real t00D96#1 = Sub<real>(fy0D90,_t0B52);
          real4 a0D98#3 = <real4>[t30D92,fy0D90,t10D94,t00D96];
          real _f0DAB#2 = 0.133333333333e1;
          real _f0DAC#2 = 0.666666666667e0;
          real4 a00D9B#4 = <real4>[_f0DAB,_f0DAC,_f0DAC,_f0DAB];
          real _f0DA7#1 = -0.2e1;
          real _f0DA8#2 = 0.0;
          real4 a10D9C#4 = <real4>[_f0DA7,_f0DA8,_f0DA8,_t0B52];
          real _f0DA4#2 = -0.1e1;
          real4 a20D9D#4 = <real4>[_t0B50,_f0DA4,_f0DA4,_t0B50];
          real _f0D9F#1 = -0.166666666667e0;
          real _f0DA0#1 = 0.5e0;
          real _f0DA1#1 = -0.5e0;
          real _f0DA2#1 = 0.166666666667e0;
          real4 a30D9E#4 = <real4>[_f0D9F,_f0DA0,_f0DA1,_f0DA2];
          real4 prod30DAF#1 = Mul<real4>(a0D98,a30D9E);
          real4 sum20DB0#1 = Add<real4>(a20D9D,prod30DAF);
          real4 prod20DB1#1 = Mul<real4>(a0D98,sum20DB0);
          real4 sum10DB2#1 = Add<real4>(a10D9C,prod20DB1);
          real4 prod10DB3#1 = Mul<real4>(a0D98,sum10DB2);
          real4 hy0D9A#1 = Add<real4>(a00D9B,prod10DB3);
          real fx0DCE#4 = Index<real2,0>(f0D4C);
          real t30DD0#1 = Add<real>(fx0DCE,_t0B50);
          real t10DD2#1 = Sub<real>(fx0DCE,_t0B50);
          real t00DD4#1 = Sub<real>(fx0DCE,_t0B52);
          real4 a0DD6#3 = <real4>[t30DD0,fx0DCE,t10DD2,t00DD4];
          real4 prod30DED#1 = Mul<real4>(a0DD6,a30D9E);
          real4 sum20DEE#1 = Add<real4>(a20D9D,prod30DED);
          real4 prod20DEF#1 = Mul<real4>(a0DD6,sum20DEE);
          real4 sum10DF0#1 = Add<real4>(a10D9C,prod20DEF);
          real4 prod10DF1#1 = Mul<real4>(a0DD6,sum10DF0);
          real4 hx0DD8#4 = Add<real4>(a00D9B,prod10DF1);
          real t00E0C#1 = Dot<4>(v00D64,hx0DD8);
          real t10E0E#1 = Dot<4>(v10D72,hx0DD8);
          real t20E10#1 = Dot<4>(v20D80,hx0DD8);
          real t30E12#1 = Dot<4>(v30D8E,hx0DD8);
          real4 tv0E14#1 = <real4>[t00E0C,t10E0E,t20E10,t30E12];
          real _t0E16#1 = Dot<4>(hy0D9A,tv0E14);
          real2 x0E18#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v010B09);
          real2 nd0E1A#2 = Floor<2>(x0E18);
          real2 f0E1C#2 = Sub<real2>(x0E18,nd0E1A);
          int{2} n0E1E#2 = RealToInt<2>(nd0E1A);
          int t20E20#1 = Index<int{2},0>(n0E1E);
          int ix0E22#4 = Add<int>(t10D50,t20E20);
          int t20E24#4 = Index<int{2},1>(n0E1E);
          int iy0E26#1 = Add<int>(t10D50,t20E24);
          int t0E2A#1 = Mul<int>(n00D5B,iy0E26);
          int index0E2B#1 = Add<int>(ix0E22,t0E2A);
          addr(IMAGE2D<int>) imgBaseAddr0E2C#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a0E28#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E2B);
          real4 v00E32#1 = LoadVoxels<IMAGE2D<int>,4>(a0E28);
          int iy0E34#1 = Add<int>(_t0B78,t20E24);
          int t0E38#1 = Mul<int>(n00D5B,iy0E34);
          int index0E39#1 = Add<int>(ix0E22,t0E38);
          addr(IMAGE2D<int>) a0E36#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E39);
          real4 v10E40#1 = LoadVoxels<IMAGE2D<int>,4>(a0E36);
          int iy0E42#1 = Add<int>(_t0B7C,t20E24);
          int t0E46#1 = Mul<int>(n00D5B,iy0E42);
          int index0E47#1 = Add<int>(ix0E22,t0E46);
          addr(IMAGE2D<int>) a0E44#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E47);
          real4 v20E4E#1 = LoadVoxels<IMAGE2D<int>,4>(a0E44);
          int iy0E50#1 = Add<int>(_t0B54,t20E24);
          int t0E54#1 = Mul<int>(n00D5B,iy0E50);
          int index0E55#1 = Add<int>(ix0E22,t0E54);
          addr(IMAGE2D<int>) a0E52#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E55);
          real4 v30E5C#1 = LoadVoxels<IMAGE2D<int>,4>(a0E52);
          real fy0E5E#4 = Index<real2,1>(f0E1C);
          real t30E60#1 = Add<real>(fy0E5E,_t0B50);
          real t10E62#1 = Sub<real>(fy0E5E,_t0B50);
          real t00E64#1 = Sub<real>(fy0E5E,_t0B52);
          real4 a0E66#3 = <real4>[t30E60,fy0E5E,t10E62,t00E64];
          real4 prod30E7D#1 = Mul<real4>(a0E66,a30D9E);
          real4 sum20E7E#1 = Add<real4>(a20D9D,prod30E7D);
          real4 prod20E7F#1 = Mul<real4>(a0E66,sum20E7E);
          real4 sum10E80#1 = Add<real4>(a10D9C,prod20E7F);
          real4 prod10E81#1 = Mul<real4>(a0E66,sum10E80);
          real4 hy0E68#1 = Add<real4>(a00D9B,prod10E81);
          real fx0E9C#4 = Index<real2,0>(f0E1C);
          real t30E9E#1 = Add<real>(fx0E9C,_t0B50);
          real t10EA0#1 = Sub<real>(fx0E9C,_t0B50);
          real t00EA2#1 = Sub<real>(fx0E9C,_t0B52);
          real4 a0EA4#3 = <real4>[t30E9E,fx0E9C,t10EA0,t00EA2];
          real4 prod30EBB#1 = Mul<real4>(a0EA4,a30D9E);
          real4 sum20EBC#1 = Add<real4>(a20D9D,prod30EBB);
          real4 prod20EBD#1 = Mul<real4>(a0EA4,sum20EBC);
          real4 sum10EBE#1 = Add<real4>(a10D9C,prod20EBD);
          real4 prod10EBF#1 = Mul<real4>(a0EA4,sum10EBE);
          real4 hx0EA6#4 = Add<real4>(a00D9B,prod10EBF);
          real t00EDA#1 = Dot<4>(v00E32,hx0EA6);
          real t10EDC#1 = Dot<4>(v10E40,hx0EA6);
          real t20EDE#1 = Dot<4>(v20E4E,hx0EA6);
          real t30EE0#1 = Dot<4>(v30E5C,hx0EA6);
          real4 tv0EE2#1 = <real4>[t00EDA,t10EDC,t20EDE,t30EE0];
          real _t0EE4#1 = Dot<4>(hy0E68,tv0EE2);
          real _t0EE6#2 = Sub<real>(_t0E16,_t0EE4);
          real _t0EE8#1 = Mul<real>(_t0EE6,_t0EE6);
          real score0EEA#1 = Add<real>(score0D33,_t0EE8);
          goto JOIN0EED
        JOIN0EED:  preds = [ASSIGN0EEB,COND0D49]
          real score0EEC#2 = phi(score0EEA,score0D33)
          real _t0EEE#1 = Dot<2>(r00B6A,v020B0B);
          real _t0EF0#1 = Dot<2>(r10B70,v020B0B);
          real2 _t0EF2#1 = <real2>[_t0EEE,_t0EF0];
          real2 pos0EF4#1 = Add<real2>(_t0EF2,_t0B80);
          real2 x0EF6#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos0EF4);
          bool _t0EF8#1 = Inside<IMAGE2D<float>,2>(x0EF6,_t0AFF);
          if _t0EF8 then goto ASSIGN0EFC else goto ASSIGN1421
        ASSIGN0EFC:  preds = [COND0EFA]
          real2 x0EFB#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v020B0B);
          bool _t0EFD#1 = Inside<IMAGE2D<int>,2>(x0EFB,_t0AFB);
          goto JOIN0F01
        JOIN0F01:  preds = [ASSIGN0EFE,ASSIGN1421]
          bool _t0EFF#1 = phi(_t0EFD,_t0F00)
          if _t0EFF then goto ASSIGN0F04 else goto JOIN10A6
        ASSIGN0F04:  preds = [COND0F02]
          real2 nd0F03#2 = Floor<2>(x0EF6);
          real2 f0F05#2 = Sub<real2>(x0EF6,nd0F03);
          int{2} n0F07#2 = RealToInt<2>(nd0F03);
          int t10F09#4 = -1;
          int t20F0B#1 = Index<int{2},0>(n0F07);
          int ix0F0D#4 = Add<int>(t10F09,t20F0B);
          int t20F0F#4 = Index<int{2},1>(n0F07);
          int iy0F11#1 = Add<int>(t10F09,t20F0F);
          int n00F14#8 = 21;
          int t0F15#1 = Mul<int>(n00F14,iy0F11);
          int index0F16#1 = Add<int>(ix0F0D,t0F15);
          addr(IMAGE2D<float>) imgBaseAddr0F17#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a0F13#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F16);
          real4 v00F1D#1 = LoadVoxels<IMAGE2D<float>,4>(a0F13);
          int iy0F1F#1 = Add<int>(_t0B78,t20F0F);
          int t0F23#1 = Mul<int>(n00F14,iy0F1F);
          int index0F24#1 = Add<int>(ix0F0D,t0F23);
          addr(IMAGE2D<float>) a0F21#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F24);
          real4 v10F2B#1 = LoadVoxels<IMAGE2D<float>,4>(a0F21);
          int iy0F2D#1 = Add<int>(_t0B7C,t20F0F);
          int t0F31#1 = Mul<int>(n00F14,iy0F2D);
          int index0F32#1 = Add<int>(ix0F0D,t0F31);
          addr(IMAGE2D<float>) a0F2F#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F32);
          real4 v20F39#1 = LoadVoxels<IMAGE2D<float>,4>(a0F2F);
          int iy0F3B#1 = Add<int>(_t0B54,t20F0F);
          int t0F3F#1 = Mul<int>(n00F14,iy0F3B);
          int index0F40#1 = Add<int>(ix0F0D,t0F3F);
          addr(IMAGE2D<float>) a0F3D#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F40);
          real4 v30F47#1 = LoadVoxels<IMAGE2D<float>,4>(a0F3D);
          real fy0F49#4 = Index<real2,1>(f0F05);
          real t30F4B#1 = Add<real>(fy0F49,_t0B50);
          real t10F4D#1 = Sub<real>(fy0F49,_t0B50);
          real t00F4F#1 = Sub<real>(fy0F49,_t0B52);
          real4 a0F51#3 = <real4>[t30F4B,fy0F49,t10F4D,t00F4F];
          real _f0F64#2 = 0.133333333333e1;
          real _f0F65#2 = 0.666666666667e0;
          real4 a00F54#4 = <real4>[_f0F64,_f0F65,_f0F65,_f0F64];
          real _f0F60#1 = -0.2e1;
          real _f0F61#2 = 0.0;
          real4 a10F55#4 = <real4>[_f0F60,_f0F61,_f0F61,_t0B52];
          real _f0F5D#2 = -0.1e1;
          real4 a20F56#4 = <real4>[_t0B50,_f0F5D,_f0F5D,_t0B50];
          real _f0F58#1 = -0.166666666667e0;
          real _f0F59#1 = 0.5e0;
          real _f0F5A#1 = -0.5e0;
          real _f0F5B#1 = 0.166666666667e0;
          real4 a30F57#4 = <real4>[_f0F58,_f0F59,_f0F5A,_f0F5B];
          real4 prod30F68#1 = Mul<real4>(a0F51,a30F57);
          real4 sum20F69#1 = Add<real4>(a20F56,prod30F68);
          real4 prod20F6A#1 = Mul<real4>(a0F51,sum20F69);
          real4 sum10F6B#1 = Add<real4>(a10F55,prod20F6A);
          real4 prod10F6C#1 = Mul<real4>(a0F51,sum10F6B);
          real4 hy0F53#1 = Add<real4>(a00F54,prod10F6C);
          real fx0F87#4 = Index<real2,0>(f0F05);
          real t30F89#1 = Add<real>(fx0F87,_t0B50);
          real t10F8B#1 = Sub<real>(fx0F87,_t0B50);
          real t00F8D#1 = Sub<real>(fx0F87,_t0B52);
          real4 a0F8F#3 = <real4>[t30F89,fx0F87,t10F8B,t00F8D];
          real4 prod30FA6#1 = Mul<real4>(a0F8F,a30F57);
          real4 sum20FA7#1 = Add<real4>(a20F56,prod30FA6);
          real4 prod20FA8#1 = Mul<real4>(a0F8F,sum20FA7);
          real4 sum10FA9#1 = Add<real4>(a10F55,prod20FA8);
          real4 prod10FAA#1 = Mul<real4>(a0F8F,sum10FA9);
          real4 hx0F91#4 = Add<real4>(a00F54,prod10FAA);
          real t00FC5#1 = Dot<4>(v00F1D,hx0F91);
          real t10FC7#1 = Dot<4>(v10F2B,hx0F91);
          real t20FC9#1 = Dot<4>(v20F39,hx0F91);
          real t30FCB#1 = Dot<4>(v30F47,hx0F91);
          real4 tv0FCD#1 = <real4>[t00FC5,t10FC7,t20FC9,t30FCB];
          real _t0FCF#1 = Dot<4>(hy0F53,tv0FCD);
          real2 x0FD1#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v020B0B);
          real2 nd0FD3#2 = Floor<2>(x0FD1);
          real2 f0FD5#2 = Sub<real2>(x0FD1,nd0FD3);
          int{2} n0FD7#2 = RealToInt<2>(nd0FD3);
          int t20FD9#1 = Index<int{2},0>(n0FD7);
          int ix0FDB#4 = Add<int>(t10F09,t20FD9);
          int t20FDD#4 = Index<int{2},1>(n0FD7);
          int iy0FDF#1 = Add<int>(t10F09,t20FDD);
          int t0FE3#1 = Mul<int>(n00F14,iy0FDF);
          int index0FE4#1 = Add<int>(ix0FDB,t0FE3);
          addr(IMAGE2D<int>) imgBaseAddr0FE5#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a0FE1#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index0FE4);
          real4 v00FEB#1 = LoadVoxels<IMAGE2D<int>,4>(a0FE1);
          int iy0FED#1 = Add<int>(_t0B78,t20FDD);
          int t0FF1#1 = Mul<int>(n00F14,iy0FED);
          int index0FF2#1 = Add<int>(ix0FDB,t0FF1);
          addr(IMAGE2D<int>) a0FEF#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index0FF2);
          real4 v10FF9#1 = LoadVoxels<IMAGE2D<int>,4>(a0FEF);
          int iy0FFB#1 = Add<int>(_t0B7C,t20FDD);
          int t0FFF#1 = Mul<int>(n00F14,iy0FFB);
          int index1000#1 = Add<int>(ix0FDB,t0FFF);
          addr(IMAGE2D<int>) a0FFD#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index1000);
          real4 v21007#1 = LoadVoxels<IMAGE2D<int>,4>(a0FFD);
          int iy1009#1 = Add<int>(_t0B54,t20FDD);
          int t100D#1 = Mul<int>(n00F14,iy1009);
          int index100E#1 = Add<int>(ix0FDB,t100D);
          addr(IMAGE2D<int>) a100B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index100E);
          real4 v31015#1 = LoadVoxels<IMAGE2D<int>,4>(a100B);
          real fy1017#4 = Index<real2,1>(f0FD5);
          real t31019#1 = Add<real>(fy1017,_t0B50);
          real t1101B#1 = Sub<real>(fy1017,_t0B50);
          real t0101D#1 = Sub<real>(fy1017,_t0B52);
          real4 a101F#3 = <real4>[t31019,fy1017,t1101B,t0101D];
          real4 prod31036#1 = Mul<real4>(a101F,a30F57);
          real4 sum21037#1 = Add<real4>(a20F56,prod31036);
          real4 prod21038#1 = Mul<real4>(a101F,sum21037);
          real4 sum11039#1 = Add<real4>(a10F55,prod21038);
          real4 prod1103A#1 = Mul<real4>(a101F,sum11039);
          real4 hy1021#1 = Add<real4>(a00F54,prod1103A);
          real fx1055#4 = Index<real2,0>(f0FD5);
          real t31057#1 = Add<real>(fx1055,_t0B50);
          real t11059#1 = Sub<real>(fx1055,_t0B50);
          real t0105B#1 = Sub<real>(fx1055,_t0B52);
          real4 a105D#3 = <real4>[t31057,fx1055,t11059,t0105B];
          real4 prod31074#1 = Mul<real4>(a105D,a30F57);
          real4 sum21075#1 = Add<real4>(a20F56,prod31074);
          real4 prod21076#1 = Mul<real4>(a105D,sum21075);
          real4 sum11077#1 = Add<real4>(a10F55,prod21076);
          real4 prod11078#1 = Mul<real4>(a105D,sum11077);
          real4 hx105F#4 = Add<real4>(a00F54,prod11078);
          real t01093#1 = Dot<4>(v00FEB,hx105F);
          real t11095#1 = Dot<4>(v10FF9,hx105F);
          real t21097#1 = Dot<4>(v21007,hx105F);
          real t31099#1 = Dot<4>(v31015,hx105F);
          real4 tv109B#1 = <real4>[t01093,t11095,t21097,t31099];
          real _t109D#1 = Dot<4>(hy1021,tv109B);
          real _t109F#2 = Sub<real>(_t0FCF,_t109D);
          real _t10A1#1 = Mul<real>(_t109F,_t109F);
          real score10A3#1 = Add<real>(score0EEC,_t10A1);
          goto JOIN10A6
        JOIN10A6:  preds = [ASSIGN10A4,COND0F02]
          real score10A5#2 = phi(score10A3,score0EEC)
          real _t10A7#1 = Dot<2>(r00B6A,v030B0D);
          real _t10A9#1 = Dot<2>(r10B70,v030B0D);
          real2 _t10AB#1 = <real2>[_t10A7,_t10A9];
          real2 pos10AD#1 = Add<real2>(_t10AB,_t0B80);
          real2 x10AF#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos10AD);
          bool _t10B1#1 = Inside<IMAGE2D<float>,2>(x10AF,_t0AFF);
          if _t10B1 then goto ASSIGN10B5 else goto ASSIGN1420
        ASSIGN10B5:  preds = [COND10B3]
          real2 x10B4#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v030B0D);
          bool _t10B6#1 = Inside<IMAGE2D<int>,2>(x10B4,_t0AFB);
          goto JOIN10BA
        JOIN10BA:  preds = [ASSIGN10B7,ASSIGN1420]
          bool _t10B8#1 = phi(_t10B6,_t10B9)
          if _t10B8 then goto ASSIGN10BD else goto JOIN125F
        ASSIGN10BD:  preds = [COND10BB]
          real2 nd10BC#2 = Floor<2>(x10AF);
          real2 f10BE#2 = Sub<real2>(x10AF,nd10BC);
          int{2} n10C0#2 = RealToInt<2>(nd10BC);
          int t110C2#4 = -1;
          int t210C4#1 = Index<int{2},0>(n10C0);
          int ix10C6#4 = Add<int>(t110C2,t210C4);
          int t210C8#4 = Index<int{2},1>(n10C0);
          int iy10CA#1 = Add<int>(t110C2,t210C8);
          int n010CD#8 = 21;
          int t10CE#1 = Mul<int>(n010CD,iy10CA);
          int index10CF#1 = Add<int>(ix10C6,t10CE);
          addr(IMAGE2D<float>) imgBaseAddr10D0#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a10CC#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10CF);
          real4 v010D6#1 = LoadVoxels<IMAGE2D<float>,4>(a10CC);
          int iy10D8#1 = Add<int>(_t0B78,t210C8);
          int t10DC#1 = Mul<int>(n010CD,iy10D8);
          int index10DD#1 = Add<int>(ix10C6,t10DC);
          addr(IMAGE2D<float>) a10DA#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10DD);
          real4 v110E4#1 = LoadVoxels<IMAGE2D<float>,4>(a10DA);
          int iy10E6#1 = Add<int>(_t0B7C,t210C8);
          int t10EA#1 = Mul<int>(n010CD,iy10E6);
          int index10EB#1 = Add<int>(ix10C6,t10EA);
          addr(IMAGE2D<float>) a10E8#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10EB);
          real4 v210F2#1 = LoadVoxels<IMAGE2D<float>,4>(a10E8);
          int iy10F4#1 = Add<int>(_t0B54,t210C8);
          int t10F8#1 = Mul<int>(n010CD,iy10F4);
          int index10F9#1 = Add<int>(ix10C6,t10F8);
          addr(IMAGE2D<float>) a10F6#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10F9);
          real4 v31100#1 = LoadVoxels<IMAGE2D<float>,4>(a10F6);
          real fy1102#4 = Index<real2,1>(f10BE);
          real t31104#1 = Add<real>(fy1102,_t0B50);
          real t11106#1 = Sub<real>(fy1102,_t0B50);
          real t01108#1 = Sub<real>(fy1102,_t0B52);
          real4 a110A#3 = <real4>[t31104,fy1102,t11106,t01108];
          real _f111D#2 = 0.133333333333e1;
          real _f111E#2 = 0.666666666667e0;
          real4 a0110D#4 = <real4>[_f111D,_f111E,_f111E,_f111D];
          real _f1119#1 = -0.2e1;
          real _f111A#2 = 0.0;
          real4 a1110E#4 = <real4>[_f1119,_f111A,_f111A,_t0B52];
          real _f1116#2 = -0.1e1;
          real4 a2110F#4 = <real4>[_t0B50,_f1116,_f1116,_t0B50];
          real _f1111#1 = -0.166666666667e0;
          real _f1112#1 = 0.5e0;
          real _f1113#1 = -0.5e0;
          real _f1114#1 = 0.166666666667e0;
          real4 a31110#4 = <real4>[_f1111,_f1112,_f1113,_f1114];
          real4 prod31121#1 = Mul<real4>(a110A,a31110);
          real4 sum21122#1 = Add<real4>(a2110F,prod31121);
          real4 prod21123#1 = Mul<real4>(a110A,sum21122);
          real4 sum11124#1 = Add<real4>(a1110E,prod21123);
          real4 prod11125#1 = Mul<real4>(a110A,sum11124);
          real4 hy110C#1 = Add<real4>(a0110D,prod11125);
          real fx1140#4 = Index<real2,0>(f10BE);
          real t31142#1 = Add<real>(fx1140,_t0B50);
          real t11144#1 = Sub<real>(fx1140,_t0B50);
          real t01146#1 = Sub<real>(fx1140,_t0B52);
          real4 a1148#3 = <real4>[t31142,fx1140,t11144,t01146];
          real4 prod3115F#1 = Mul<real4>(a1148,a31110);
          real4 sum21160#1 = Add<real4>(a2110F,prod3115F);
          real4 prod21161#1 = Mul<real4>(a1148,sum21160);
          real4 sum11162#1 = Add<real4>(a1110E,prod21161);
          real4 prod11163#1 = Mul<real4>(a1148,sum11162);
          real4 hx114A#4 = Add<real4>(a0110D,prod11163);
          real t0117E#1 = Dot<4>(v010D6,hx114A);
          real t11180#1 = Dot<4>(v110E4,hx114A);
          real t21182#1 = Dot<4>(v210F2,hx114A);
          real t31184#1 = Dot<4>(v31100,hx114A);
          real4 tv1186#1 = <real4>[t0117E,t11180,t21182,t31184];
          real _t1188#1 = Dot<4>(hy110C,tv1186);
          real2 x118A#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v030B0D);
          real2 nd118C#2 = Floor<2>(x118A);
          real2 f118E#2 = Sub<real2>(x118A,nd118C);
          int{2} n1190#2 = RealToInt<2>(nd118C);
          int t21192#1 = Index<int{2},0>(n1190);
          int ix1194#4 = Add<int>(t110C2,t21192);
          int t21196#4 = Index<int{2},1>(n1190);
          int iy1198#1 = Add<int>(t110C2,t21196);
          int t119C#1 = Mul<int>(n010CD,iy1198);
          int index119D#1 = Add<int>(ix1194,t119C);
          addr(IMAGE2D<int>) imgBaseAddr119E#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a119A#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index119D);
          real4 v011A4#1 = LoadVoxels<IMAGE2D<int>,4>(a119A);
          int iy11A6#1 = Add<int>(_t0B78,t21196);
          int t11AA#1 = Mul<int>(n010CD,iy11A6);
          int index11AB#1 = Add<int>(ix1194,t11AA);
          addr(IMAGE2D<int>) a11A8#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index11AB);
          real4 v111B2#1 = LoadVoxels<IMAGE2D<int>,4>(a11A8);
          int iy11B4#1 = Add<int>(_t0B7C,t21196);
          int t11B8#1 = Mul<int>(n010CD,iy11B4);
          int index11B9#1 = Add<int>(ix1194,t11B8);
          addr(IMAGE2D<int>) a11B6#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index11B9);
          real4 v211C0#1 = LoadVoxels<IMAGE2D<int>,4>(a11B6);
          int iy11C2#1 = Add<int>(_t0B54,t21196);
          int t11C6#1 = Mul<int>(n010CD,iy11C2);
          int index11C7#1 = Add<int>(ix1194,t11C6);
          addr(IMAGE2D<int>) a11C4#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index11C7);
          real4 v311CE#1 = LoadVoxels<IMAGE2D<int>,4>(a11C4);
          real fy11D0#4 = Index<real2,1>(f118E);
          real t311D2#1 = Add<real>(fy11D0,_t0B50);
          real t111D4#1 = Sub<real>(fy11D0,_t0B50);
          real t011D6#1 = Sub<real>(fy11D0,_t0B52);
          real4 a11D8#3 = <real4>[t311D2,fy11D0,t111D4,t011D6];
          real4 prod311EF#1 = Mul<real4>(a11D8,a31110);
          real4 sum211F0#1 = Add<real4>(a2110F,prod311EF);
          real4 prod211F1#1 = Mul<real4>(a11D8,sum211F0);
          real4 sum111F2#1 = Add<real4>(a1110E,prod211F1);
          real4 prod111F3#1 = Mul<real4>(a11D8,sum111F2);
          real4 hy11DA#1 = Add<real4>(a0110D,prod111F3);
          real fx120E#4 = Index<real2,0>(f118E);
          real t31210#1 = Add<real>(fx120E,_t0B50);
          real t11212#1 = Sub<real>(fx120E,_t0B50);
          real t01214#1 = Sub<real>(fx120E,_t0B52);
          real4 a1216#3 = <real4>[t31210,fx120E,t11212,t01214];
          real4 prod3122D#1 = Mul<real4>(a1216,a31110);
          real4 sum2122E#1 = Add<real4>(a2110F,prod3122D);
          real4 prod2122F#1 = Mul<real4>(a1216,sum2122E);
          real4 sum11230#1 = Add<real4>(a1110E,prod2122F);
          real4 prod11231#1 = Mul<real4>(a1216,sum11230);
          real4 hx1218#4 = Add<real4>(a0110D,prod11231);
          real t0124C#1 = Dot<4>(v011A4,hx1218);
          real t1124E#1 = Dot<4>(v111B2,hx1218);
          real t21250#1 = Dot<4>(v211C0,hx1218);
          real t31252#1 = Dot<4>(v311CE,hx1218);
          real4 tv1254#1 = <real4>[t0124C,t1124E,t21250,t31252];
          real _t1256#1 = Dot<4>(hy11DA,tv1254);
          real _t1258#2 = Sub<real>(_t1188,_t1256);
          real _t125A#1 = Mul<real>(_t1258,_t1258);
          real score125C#1 = Add<real>(score10A5,_t125A);
          goto JOIN125F
        JOIN125F:  preds = [ASSIGN125D,COND10BB]
          real score125E#2 = phi(score125C,score10A5)
          real _t1260#1 = Dot<2>(r00B6A,v040B0F);
          real _t1262#1 = Dot<2>(r10B70,v040B0F);
          real2 _t1264#1 = <real2>[_t1260,_t1262];
          real2 pos1266#2 = Add<real2>(_t1264,_t0B80);
          real2 x1268#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos1266);
          bool _t126A#1 = Inside<IMAGE2D<float>,2>(x1268,_t0AFF);
          if _t126A then goto ASSIGN126E else goto ASSIGN141F
        ASSIGN126E:  preds = [COND126C]
          real2 x126D#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v040B0F);
          bool _t126F#1 = Inside<IMAGE2D<int>,2>(x126D,_t0AFB);
          goto JOIN1273
        JOIN1273:  preds = [ASSIGN1270,ASSIGN141F]
          bool _t1271#1 = phi(_t126F,_t1272)
          if _t1271 then goto ASSIGN1276 else goto JOIN1418
        ASSIGN1276:  preds = [COND1274]
          real2 nd1275#2 = Floor<2>(x1268);
          real2 f1277#2 = Sub<real2>(x1268,nd1275);
          int{2} n1279#2 = RealToInt<2>(nd1275);
          int t1127B#4 = -1;
          int t2127D#1 = Index<int{2},0>(n1279);
          int ix127F#4 = Add<int>(t1127B,t2127D);
          int t21281#4 = Index<int{2},1>(n1279);
          int iy1283#1 = Add<int>(t1127B,t21281);
          int n01286#8 = 21;
          int t1287#1 = Mul<int>(n01286,iy1283);
          int index1288#1 = Add<int>(ix127F,t1287);
          addr(IMAGE2D<float>) imgBaseAddr1289#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a1285#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index1288);
          real4 v0128F#1 = LoadVoxels<IMAGE2D<float>,4>(a1285);
          int iy1291#1 = Add<int>(_t0B78,t21281);
          int t1295#1 = Mul<int>(n01286,iy1291);
          int index1296#1 = Add<int>(ix127F,t1295);
          addr(IMAGE2D<float>) a1293#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index1296);
          real4 v1129D#1 = LoadVoxels<IMAGE2D<float>,4>(a1293);
          int iy129F#1 = Add<int>(_t0B7C,t21281);
          int t12A3#1 = Mul<int>(n01286,iy129F);
          int index12A4#1 = Add<int>(ix127F,t12A3);
          addr(IMAGE2D<float>) a12A1#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index12A4);
          real4 v212AB#1 = LoadVoxels<IMAGE2D<float>,4>(a12A1);
          int iy12AD#1 = Add<int>(_t0B54,t21281);
          int t12B1#1 = Mul<int>(n01286,iy12AD);
          int index12B2#1 = Add<int>(ix127F,t12B1);
          addr(IMAGE2D<float>) a12AF#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index12B2);
          real4 v312B9#1 = LoadVoxels<IMAGE2D<float>,4>(a12AF);
          real fy12BB#4 = Index<real2,1>(f1277);
          real t312BD#1 = Add<real>(fy12BB,_t0B50);
          real t112BF#1 = Sub<real>(fy12BB,_t0B50);
          real t012C1#1 = Sub<real>(fy12BB,_t0B52);
          real4 a12C3#3 = <real4>[t312BD,fy12BB,t112BF,t012C1];
          real _f12D6#2 = 0.133333333333e1;
          real _f12D7#2 = 0.666666666667e0;
          real4 a012C6#4 = <real4>[_f12D6,_f12D7,_f12D7,_f12D6];
          real _f12D2#1 = -0.2e1;
          real _f12D3#2 = 0.0;
          real4 a112C7#4 = <real4>[_f12D2,_f12D3,_f12D3,_t0B52];
          real _f12CF#2 = -0.1e1;
          real4 a212C8#4 = <real4>[_t0B50,_f12CF,_f12CF,_t0B50];
          real _f12CA#1 = -0.166666666667e0;
          real _f12CB#1 = 0.5e0;
          real _f12CC#1 = -0.5e0;
          real _f12CD#1 = 0.166666666667e0;
          real4 a312C9#4 = <real4>[_f12CA,_f12CB,_f12CC,_f12CD];
          real4 prod312DA#1 = Mul<real4>(a12C3,a312C9);
          real4 sum212DB#1 = Add<real4>(a212C8,prod312DA);
          real4 prod212DC#1 = Mul<real4>(a12C3,sum212DB);
          real4 sum112DD#1 = Add<real4>(a112C7,prod212DC);
          real4 prod112DE#1 = Mul<real4>(a12C3,sum112DD);
          real4 hy12C5#1 = Add<real4>(a012C6,prod112DE);
          real fx12F9#4 = Index<real2,0>(f1277);
          real t312FB#1 = Add<real>(fx12F9,_t0B50);
          real t112FD#1 = Sub<real>(fx12F9,_t0B50);
          real t012FF#1 = Sub<real>(fx12F9,_t0B52);
          real4 a1301#3 = <real4>[t312FB,fx12F9,t112FD,t012FF];
          real4 prod31318#1 = Mul<real4>(a1301,a312C9);
          real4 sum21319#1 = Add<real4>(a212C8,prod31318);
          real4 prod2131A#1 = Mul<real4>(a1301,sum21319);
          real4 sum1131B#1 = Add<real4>(a112C7,prod2131A);
          real4 prod1131C#1 = Mul<real4>(a1301,sum1131B);
          real4 hx1303#4 = Add<real4>(a012C6,prod1131C);
          real t01337#1 = Dot<4>(v0128F,hx1303);
          real t11339#1 = Dot<4>(v1129D,hx1303);
          real t2133B#1 = Dot<4>(v212AB,hx1303);
          real t3133D#1 = Dot<4>(v312B9,hx1303);
          real4 tv133F#1 = <real4>[t01337,t11339,t2133B,t3133D];
          real _t1341#1 = Dot<4>(hy12C5,tv133F);
          real2 x1343#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v040B0F);
          real2 nd1345#2 = Floor<2>(x1343);
          real2 f1347#2 = Sub<real2>(x1343,nd1345);
          int{2} n1349#2 = RealToInt<2>(nd1345);
          int t2134B#1 = Index<int{2},0>(n1349);
          int ix134D#4 = Add<int>(t1127B,t2134B);
          int t2134F#4 = Index<int{2},1>(n1349);
          int iy1351#1 = Add<int>(t1127B,t2134F);
          int t1355#1 = Mul<int>(n01286,iy1351);
          int index1356#1 = Add<int>(ix134D,t1355);
          addr(IMAGE2D<int>) imgBaseAddr1357#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a1353#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1356);
          real4 v0135D#1 = LoadVoxels<IMAGE2D<int>,4>(a1353);
          int iy135F#1 = Add<int>(_t0B78,t2134F);
          int t1363#1 = Mul<int>(n01286,iy135F);
          int index1364#1 = Add<int>(ix134D,t1363);
          addr(IMAGE2D<int>) a1361#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1364);
          real4 v1136B#1 = LoadVoxels<IMAGE2D<int>,4>(a1361);
          int iy136D#1 = Add<int>(_t0B7C,t2134F);
          int t1371#1 = Mul<int>(n01286,iy136D);
          int index1372#1 = Add<int>(ix134D,t1371);
          addr(IMAGE2D<int>) a136F#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1372);
          real4 v21379#1 = LoadVoxels<IMAGE2D<int>,4>(a136F);
          int iy137B#1 = Add<int>(_t0B54,t2134F);
          int t137F#1 = Mul<int>(n01286,iy137B);
          int index1380#1 = Add<int>(ix134D,t137F);
          addr(IMAGE2D<int>) a137D#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1380);
          real4 v31387#1 = LoadVoxels<IMAGE2D<int>,4>(a137D);
          real fy1389#4 = Index<real2,1>(f1347);
          real t3138B#1 = Add<real>(fy1389,_t0B50);
          real t1138D#1 = Sub<real>(fy1389,_t0B50);
          real t0138F#1 = Sub<real>(fy1389,_t0B52);
          real4 a1391#3 = <real4>[t3138B,fy1389,t1138D,t0138F];
          real4 prod313A8#1 = Mul<real4>(a1391,a312C9);
          real4 sum213A9#1 = Add<real4>(a212C8,prod313A8);
          real4 prod213AA#1 = Mul<real4>(a1391,sum213A9);
          real4 sum113AB#1 = Add<real4>(a112C7,prod213AA);
          real4 prod113AC#1 = Mul<real4>(a1391,sum113AB);
          real4 hy1393#1 = Add<real4>(a012C6,prod113AC);
          real fx13C7#4 = Index<real2,0>(f1347);
          real t313C9#1 = Add<real>(fx13C7,_t0B50);
          real t113CB#1 = Sub<real>(fx13C7,_t0B50);
          real t013CD#1 = Sub<real>(fx13C7,_t0B52);
          real4 a13CF#3 = <real4>[t313C9,fx13C7,t113CB,t013CD];
          real4 prod313E6#1 = Mul<real4>(a13CF,a312C9);
          real4 sum213E7#1 = Add<real4>(a212C8,prod313E6);
          real4 prod213E8#1 = Mul<real4>(a13CF,sum213E7);
          real4 sum113E9#1 = Add<real4>(a112C7,prod213E8);
          real4 prod113EA#1 = Mul<real4>(a13CF,sum113E9);
          real4 hx13D1#4 = Add<real4>(a012C6,prod113EA);
          real t01405#1 = Dot<4>(v0135D,hx13D1);
          real t11407#1 = Dot<4>(v1136B,hx13D1);
          real t21409#1 = Dot<4>(v21379,hx13D1);
          real t3140B#1 = Dot<4>(v31387,hx13D1);
          real4 tv140D#1 = <real4>[t01405,t11407,t21409,t3140B];
          real _t140F#1 = Dot<4>(hy1393,tv140D);
          real _t1411#2 = Sub<real>(_t1341,_t140F);
          real _t1413#1 = Mul<real>(_t1411,_t1411);
          real score1415#1 = Add<real>(score125E,_t1413);
          goto JOIN1418
        JOIN1418:  preds = [ASSIGN1416,COND1274]
          real score1417#1 = phi(score1415,score125E)
          self.t = t0B4C;
          self.score = score1417;
          self.r0 = r00B6A;
          self.r1 = r10B70;
          self.pos = pos1266;
          stabilize ()
        ASSIGN141F:  preds = [COND126C]
          bool _t1272#1 = false;
          goto JOIN1273
        ASSIGN1420:  preds = [COND10B3]
          bool _t10B9#1 = false;
          goto JOIN10BA
        ASSIGN1421:  preds = [COND0EFA]
          bool _t0F00#1 = false;
          goto JOIN0F01
        ASSIGN1422:  preds = [COND0D41]
          bool _t0D47#1 = false;
          goto JOIN0D48
        ASSIGN1423:  preds = [COND0B88]
          bool _t0B8E#1 = false;
          goto JOIN0B8F
    end Update
    method Stabilize
        ENTRY1425:  preds = []
          real3 t1426#1 = self.t;
          real score1428#1 = self.score;
          real2 r0142A#1 = self.r0;
          real2 r1142C#1 = self.r1;
          real2 pos142E#1 = self.pos;
          self.t = t1426;
          self.score = score1428;
          self.r0 = r0142A;
          self.r1 = r1142C;
          self.pos = pos142E;
          return ()
    end Stabilize
  end R
#### end program ####
##### LowIL after variable analysis ####
## properties
  none
## globals
  global real2 v000B03#4
  global real2 v010B09#4
  global real2 v020B0B#4
  global real2 v030B0D#4
  global real2 v040B0F#4
  global image(IMAGE2D<int>) _t0AFB#35
  global image(IMAGE2D<float>) _t0AFF#30
## global initialization
  ENTRY0AF8:  preds = []
    string _t0AF9#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0AFB#35 = LoadImage<IMAGE2D<int>>(_t0AF9);
    string _t0AFD#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0AFF#30 = LoadImage<IMAGE2D<float>>(_t0AFD);
    real _t0B01#2 = 0.0;
    real2 v000B03#4 = <real2>[_t0B01,_t0B01];
    real _t0B05#5 = 0.5e0;
    real _t0B07#4 = Neg<real>(_t0B05);
    real2 v010B09#4 = <real2>[_t0B07,_t0B05];
    real2 v020B0B#4 = <real2>[_t0B07,_t0B07];
    real2 v030B0D#4 = <real2>[_t0B05,_t0B05];
    real2 v040B0F#4 = <real2>[_t0B05,_t0B07];
    return (v000B03,v010B09,v020B0B,v030B0D,v040B0F,_t0AFB,_t0AFF)
## initially
  ARRAY
    ENTRY0B1A:  preds = []
      int _t0B16#4 = 0;
      int _t0B17#4 = 60;
      live vars = (_t0B17,_t0B16)
    for int i0B15#1 = _t0B16 .. _t0B17
      for int j0B18#1 = _t0B16 .. _t0B17
        for int k0B19#1 = _t0B16 .. _t0B17
          ENTRY0B1E:  preds = []
            live vars = ()
          new R(i0B15,j0B18,k0B19);
## strands
  strand R (int i0B20#1, int j0B21#1, int k0B22#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY0B28:  preds = []
        real _t0B29#1 = IntToReal(i0B20);
        real _t0B2B#3 = 0.60e2;
        real _t0B2D#1 = Div<real>(_t0B29,_t0B2B);
        real _t0B2F#3 = 0.5e0;
        real _t0B31#1 = Sub<real>(_t0B2D,_t0B2F);
        real _t0B33#1 = IntToReal(j0B21);
        real _t0B35#1 = Div<real>(_t0B33,_t0B2B);
        real _t0B37#1 = Sub<real>(_t0B35,_t0B2F);
        real _t0B39#1 = IntToReal(k0B22);
        real _t0B3B#1 = Div<real>(_t0B39,_t0B2B);
        real _t0B3D#1 = Sub<real>(_t0B3B,_t0B2F);
        real3 t0B3F#1 = <real3>[_t0B31,_t0B37,_t0B3D];
        real score0B41#3 = 0.0;
        real2 r00B43#3 = <real2>[score0B41,score0B41];
        self.t = t0B3F;
        self.score = score0B41;
        self.r0 = r00B43;
        self.r1 = r00B43;
        self.pos = r00B43;
        strand_init ()
    method Update
        ENTRY0B4B:  preds = []
          real3 t0B4C#4 = self.t;
          real score0B4E#2 = self.score;
          real _t0B50#52 = 0.1e1;
          real _t0B52#28 = 0.2e1;
          int _t0B54#11 = 2;
          real _t0B56#6 = Subscript<real3>(t0B4C,_t0B54);
          real _t0B58#1 = Mul<real>(_t0B52,_t0B56);
          real _t0B5A#1 = Mul<real>(_t0B58,_t0B56);
          real _t0B5C#2 = Sub<real>(_t0B50,_t0B5A);
          real _t0B5E#1 = Neg<real>(_t0B52);
          real _t0B60#1 = Mul<real>(_t0B56,_t0B56);
          real _t0B62#1 = Sub<real>(_t0B50,_t0B60);
          real _t0B64#2 = sqrt(_t0B62);
          real _t0B66#1 = Mul<real>(_t0B5E,_t0B64);
          real _t0B68#1 = Mul<real>(_t0B66,_t0B56);
          real2 r00B6A#6 = <real2>[_t0B5C,_t0B68];
          real _t0B6C#1 = Mul<real>(_t0B52,_t0B64);
          real _t0B6E#1 = Mul<real>(_t0B6C,_t0B56);
          real2 r10B70#6 = <real2>[_t0B6E,_t0B5C];
          real _t0B72#1 = Dot<2>(r00B6A,v000B03);
          real _t0B74#1 = Dot<2>(r10B70,v000B03);
          real2 _t0B76#1 = <real2>[_t0B72,_t0B74];
          int _t0B78#11 = 0;
          real _t0B7A#1 = Subscript<real3>(t0B4C,_t0B78);
          int _t0B7C#11 = 1;
          real _t0B7E#1 = Subscript<real3>(t0B4C,_t0B7C);
          real2 _t0B80#5 = <real2>[_t0B7A,_t0B7E];
          real2 pos0B82#1 = Add<real2>(_t0B76,_t0B80);
          real2 x0B84#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos0B82);
          bool _t0B86#1 = Inside<IMAGE2D<float>,2>(x0B84,_t0AFF);
          if _t0B86 then goto ASSIGN0B8A else goto ASSIGN1423
        ASSIGN0B8A:  preds = [COND0B88]
          real2 x0B89#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v000B03);
          bool _t0B8B#1 = Inside<IMAGE2D<int>,2>(x0B89,_t0AFB);
          goto JOIN0B8F
        JOIN0B8F:  preds = [ASSIGN0B8C,ASSIGN1423]
          bool _t0B8D#1 = phi(_t0B8B,_t0B8E)
          if _t0B8D then goto ASSIGN0B92 else goto JOIN0D34
        ASSIGN0B92:  preds = [COND0B90]
          real2 nd0B91#2 = Floor<2>(x0B84);
          real2 f0B93#2 = Sub<real2>(x0B84,nd0B91);
          int{2} n0B95#2 = RealToInt<2>(nd0B91);
          int t10B97#4 = -1;
          int t20B99#1 = Index<int{2},0>(n0B95);
          int ix0B9B#4 = Add<int>(t10B97,t20B99);
          int t20B9D#4 = Index<int{2},1>(n0B95);
          int iy0B9F#1 = Add<int>(t10B97,t20B9D);
          int n00BA2#8 = 21;
          int t0BA3#1 = Mul<int>(n00BA2,iy0B9F);
          int index0BA4#1 = Add<int>(ix0B9B,t0BA3);
          addr(IMAGE2D<float>) imgBaseAddr0BA5#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a0BA1#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BA4);
          real4 v00BAB#1 = LoadVoxels<IMAGE2D<float>,4>(a0BA1);
          int iy0BAD#1 = Add<int>(_t0B78,t20B9D);
          int t0BB1#1 = Mul<int>(n00BA2,iy0BAD);
          int index0BB2#1 = Add<int>(ix0B9B,t0BB1);
          addr(IMAGE2D<float>) a0BAF#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BB2);
          real4 v10BB9#1 = LoadVoxels<IMAGE2D<float>,4>(a0BAF);
          int iy0BBB#1 = Add<int>(_t0B7C,t20B9D);
          int t0BBF#1 = Mul<int>(n00BA2,iy0BBB);
          int index0BC0#1 = Add<int>(ix0B9B,t0BBF);
          addr(IMAGE2D<float>) a0BBD#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BC0);
          real4 v20BC7#1 = LoadVoxels<IMAGE2D<float>,4>(a0BBD);
          int iy0BC9#1 = Add<int>(_t0B54,t20B9D);
          int t0BCD#1 = Mul<int>(n00BA2,iy0BC9);
          int index0BCE#1 = Add<int>(ix0B9B,t0BCD);
          addr(IMAGE2D<float>) a0BCB#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0BA5,index0BCE);
          real4 v30BD5#1 = LoadVoxels<IMAGE2D<float>,4>(a0BCB);
          real fy0BD7#4 = Index<real2,1>(f0B93);
          real t30BD9#1 = Add<real>(fy0BD7,_t0B50);
          real t10BDB#1 = Sub<real>(fy0BD7,_t0B50);
          real t00BDD#1 = Sub<real>(fy0BD7,_t0B52);
          real4 a0BDF#3 = <real4>[t30BD9,fy0BD7,t10BDB,t00BDD];
          real _f0BF2#2 = 0.133333333333e1;
          real _f0BF3#2 = 0.666666666667e0;
          real4 a00BE2#4 = <real4>[_f0BF2,_f0BF3,_f0BF3,_f0BF2];
          real _f0BEE#1 = -0.2e1;
          real _f0BEF#2 = 0.0;
          real4 a10BE3#4 = <real4>[_f0BEE,_f0BEF,_f0BEF,_t0B52];
          real _f0BEB#2 = -0.1e1;
          real4 a20BE4#4 = <real4>[_t0B50,_f0BEB,_f0BEB,_t0B50];
          real _f0BE6#1 = -0.166666666667e0;
          real _f0BE7#1 = 0.5e0;
          real _f0BE8#1 = -0.5e0;
          real _f0BE9#1 = 0.166666666667e0;
          real4 a30BE5#4 = <real4>[_f0BE6,_f0BE7,_f0BE8,_f0BE9];
          real4 prod30BF6#1 = Mul<real4>(a0BDF,a30BE5);
          real4 sum20BF7#1 = Add<real4>(a20BE4,prod30BF6);
          real4 prod20BF8#1 = Mul<real4>(a0BDF,sum20BF7);
          real4 sum10BF9#1 = Add<real4>(a10BE3,prod20BF8);
          real4 prod10BFA#1 = Mul<real4>(a0BDF,sum10BF9);
          real4 hy0BE1#1 = Add<real4>(a00BE2,prod10BFA);
          real fx0C15#4 = Index<real2,0>(f0B93);
          real t30C17#1 = Add<real>(fx0C15,_t0B50);
          real t10C19#1 = Sub<real>(fx0C15,_t0B50);
          real t00C1B#1 = Sub<real>(fx0C15,_t0B52);
          real4 a0C1D#3 = <real4>[t30C17,fx0C15,t10C19,t00C1B];
          real4 prod30C34#1 = Mul<real4>(a0C1D,a30BE5);
          real4 sum20C35#1 = Add<real4>(a20BE4,prod30C34);
          real4 prod20C36#1 = Mul<real4>(a0C1D,sum20C35);
          real4 sum10C37#1 = Add<real4>(a10BE3,prod20C36);
          real4 prod10C38#1 = Mul<real4>(a0C1D,sum10C37);
          real4 hx0C1F#4 = Add<real4>(a00BE2,prod10C38);
          real t00C53#1 = Dot<4>(v00BAB,hx0C1F);
          real t10C55#1 = Dot<4>(v10BB9,hx0C1F);
          real t20C57#1 = Dot<4>(v20BC7,hx0C1F);
          real t30C59#1 = Dot<4>(v30BD5,hx0C1F);
          real4 tv0C5B#1 = <real4>[t00C53,t10C55,t20C57,t30C59];
          real _t0C5D#1 = Dot<4>(hy0BE1,tv0C5B);
          real2 x0C5F#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v000B03);
          real2 nd0C61#2 = Floor<2>(x0C5F);
          real2 f0C63#2 = Sub<real2>(x0C5F,nd0C61);
          int{2} n0C65#2 = RealToInt<2>(nd0C61);
          int t20C67#1 = Index<int{2},0>(n0C65);
          int ix0C69#4 = Add<int>(t10B97,t20C67);
          int t20C6B#4 = Index<int{2},1>(n0C65);
          int iy0C6D#1 = Add<int>(t10B97,t20C6B);
          int t0C71#1 = Mul<int>(n00BA2,iy0C6D);
          int index0C72#1 = Add<int>(ix0C69,t0C71);
          addr(IMAGE2D<int>) imgBaseAddr0C73#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a0C6F#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C72);
          real4 v00C79#1 = LoadVoxels<IMAGE2D<int>,4>(a0C6F);
          int iy0C7B#1 = Add<int>(_t0B78,t20C6B);
          int t0C7F#1 = Mul<int>(n00BA2,iy0C7B);
          int index0C80#1 = Add<int>(ix0C69,t0C7F);
          addr(IMAGE2D<int>) a0C7D#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C80);
          real4 v10C87#1 = LoadVoxels<IMAGE2D<int>,4>(a0C7D);
          int iy0C89#1 = Add<int>(_t0B7C,t20C6B);
          int t0C8D#1 = Mul<int>(n00BA2,iy0C89);
          int index0C8E#1 = Add<int>(ix0C69,t0C8D);
          addr(IMAGE2D<int>) a0C8B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C8E);
          real4 v20C95#1 = LoadVoxels<IMAGE2D<int>,4>(a0C8B);
          int iy0C97#1 = Add<int>(_t0B54,t20C6B);
          int t0C9B#1 = Mul<int>(n00BA2,iy0C97);
          int index0C9C#1 = Add<int>(ix0C69,t0C9B);
          addr(IMAGE2D<int>) a0C99#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0C73,index0C9C);
          real4 v30CA3#1 = LoadVoxels<IMAGE2D<int>,4>(a0C99);
          real fy0CA5#4 = Index<real2,1>(f0C63);
          real t30CA7#1 = Add<real>(fy0CA5,_t0B50);
          real t10CA9#1 = Sub<real>(fy0CA5,_t0B50);
          real t00CAB#1 = Sub<real>(fy0CA5,_t0B52);
          real4 a0CAD#3 = <real4>[t30CA7,fy0CA5,t10CA9,t00CAB];
          real4 prod30CC4#1 = Mul<real4>(a0CAD,a30BE5);
          real4 sum20CC5#1 = Add<real4>(a20BE4,prod30CC4);
          real4 prod20CC6#1 = Mul<real4>(a0CAD,sum20CC5);
          real4 sum10CC7#1 = Add<real4>(a10BE3,prod20CC6);
          real4 prod10CC8#1 = Mul<real4>(a0CAD,sum10CC7);
          real4 hy0CAF#1 = Add<real4>(a00BE2,prod10CC8);
          real fx0CE3#4 = Index<real2,0>(f0C63);
          real t30CE5#1 = Add<real>(fx0CE3,_t0B50);
          real t10CE7#1 = Sub<real>(fx0CE3,_t0B50);
          real t00CE9#1 = Sub<real>(fx0CE3,_t0B52);
          real4 a0CEB#3 = <real4>[t30CE5,fx0CE3,t10CE7,t00CE9];
          real4 prod30D02#1 = Mul<real4>(a0CEB,a30BE5);
          real4 sum20D03#1 = Add<real4>(a20BE4,prod30D02);
          real4 prod20D04#1 = Mul<real4>(a0CEB,sum20D03);
          real4 sum10D05#1 = Add<real4>(a10BE3,prod20D04);
          real4 prod10D06#1 = Mul<real4>(a0CEB,sum10D05);
          real4 hx0CED#4 = Add<real4>(a00BE2,prod10D06);
          real t00D21#1 = Dot<4>(v00C79,hx0CED);
          real t10D23#1 = Dot<4>(v10C87,hx0CED);
          real t20D25#1 = Dot<4>(v20C95,hx0CED);
          real t30D27#1 = Dot<4>(v30CA3,hx0CED);
          real4 tv0D29#1 = <real4>[t00D21,t10D23,t20D25,t30D27];
          real _t0D2B#1 = Dot<4>(hy0CAF,tv0D29);
          real _t0D2D#2 = Sub<real>(_t0C5D,_t0D2B);
          real _t0D2F#1 = Mul<real>(_t0D2D,_t0D2D);
          real score0D31#1 = Add<real>(score0B4E,_t0D2F);
          goto JOIN0D34
        JOIN0D34:  preds = [ASSIGN0D32,COND0B90]
          real score0D33#2 = phi(score0D31,score0B4E)
          real _t0D35#1 = Dot<2>(r00B6A,v010B09);
          real _t0D37#1 = Dot<2>(r10B70,v010B09);
          real2 _t0D39#1 = <real2>[_t0D35,_t0D37];
          real2 pos0D3B#1 = Add<real2>(_t0D39,_t0B80);
          real2 x0D3D#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos0D3B);
          bool _t0D3F#1 = Inside<IMAGE2D<float>,2>(x0D3D,_t0AFF);
          if _t0D3F then goto ASSIGN0D43 else goto ASSIGN1422
        ASSIGN0D43:  preds = [COND0D41]
          real2 x0D42#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v010B09);
          bool _t0D44#1 = Inside<IMAGE2D<int>,2>(x0D42,_t0AFB);
          goto JOIN0D48
        JOIN0D48:  preds = [ASSIGN0D45,ASSIGN1422]
          bool _t0D46#1 = phi(_t0D44,_t0D47)
          if _t0D46 then goto ASSIGN0D4B else goto JOIN0EED
        ASSIGN0D4B:  preds = [COND0D49]
          real2 nd0D4A#2 = Floor<2>(x0D3D);
          real2 f0D4C#2 = Sub<real2>(x0D3D,nd0D4A);
          int{2} n0D4E#2 = RealToInt<2>(nd0D4A);
          int t10D50#4 = -1;
          int t20D52#1 = Index<int{2},0>(n0D4E);
          int ix0D54#4 = Add<int>(t10D50,t20D52);
          int t20D56#4 = Index<int{2},1>(n0D4E);
          int iy0D58#1 = Add<int>(t10D50,t20D56);
          int n00D5B#8 = 21;
          int t0D5C#1 = Mul<int>(n00D5B,iy0D58);
          int index0D5D#1 = Add<int>(ix0D54,t0D5C);
          addr(IMAGE2D<float>) imgBaseAddr0D5E#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a0D5A#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D5D);
          real4 v00D64#1 = LoadVoxels<IMAGE2D<float>,4>(a0D5A);
          int iy0D66#1 = Add<int>(_t0B78,t20D56);
          int t0D6A#1 = Mul<int>(n00D5B,iy0D66);
          int index0D6B#1 = Add<int>(ix0D54,t0D6A);
          addr(IMAGE2D<float>) a0D68#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D6B);
          real4 v10D72#1 = LoadVoxels<IMAGE2D<float>,4>(a0D68);
          int iy0D74#1 = Add<int>(_t0B7C,t20D56);
          int t0D78#1 = Mul<int>(n00D5B,iy0D74);
          int index0D79#1 = Add<int>(ix0D54,t0D78);
          addr(IMAGE2D<float>) a0D76#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D79);
          real4 v20D80#1 = LoadVoxels<IMAGE2D<float>,4>(a0D76);
          int iy0D82#1 = Add<int>(_t0B54,t20D56);
          int t0D86#1 = Mul<int>(n00D5B,iy0D82);
          int index0D87#1 = Add<int>(ix0D54,t0D86);
          addr(IMAGE2D<float>) a0D84#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0D5E,index0D87);
          real4 v30D8E#1 = LoadVoxels<IMAGE2D<float>,4>(a0D84);
          real fy0D90#4 = Index<real2,1>(f0D4C);
          real t30D92#1 = Add<real>(fy0D90,_t0B50);
          real t10D94#1 = Sub<real>(fy0D90,_t0B50);
          real t00D96#1 = Sub<real>(fy0D90,_t0B52);
          real4 a0D98#3 = <real4>[t30D92,fy0D90,t10D94,t00D96];
          real _f0DAB#2 = 0.133333333333e1;
          real _f0DAC#2 = 0.666666666667e0;
          real4 a00D9B#4 = <real4>[_f0DAB,_f0DAC,_f0DAC,_f0DAB];
          real _f0DA7#1 = -0.2e1;
          real _f0DA8#2 = 0.0;
          real4 a10D9C#4 = <real4>[_f0DA7,_f0DA8,_f0DA8,_t0B52];
          real _f0DA4#2 = -0.1e1;
          real4 a20D9D#4 = <real4>[_t0B50,_f0DA4,_f0DA4,_t0B50];
          real _f0D9F#1 = -0.166666666667e0;
          real _f0DA0#1 = 0.5e0;
          real _f0DA1#1 = -0.5e0;
          real _f0DA2#1 = 0.166666666667e0;
          real4 a30D9E#4 = <real4>[_f0D9F,_f0DA0,_f0DA1,_f0DA2];
          real4 prod30DAF#1 = Mul<real4>(a0D98,a30D9E);
          real4 sum20DB0#1 = Add<real4>(a20D9D,prod30DAF);
          real4 prod20DB1#1 = Mul<real4>(a0D98,sum20DB0);
          real4 sum10DB2#1 = Add<real4>(a10D9C,prod20DB1);
          real4 prod10DB3#1 = Mul<real4>(a0D98,sum10DB2);
          real4 hy0D9A#1 = Add<real4>(a00D9B,prod10DB3);
          real fx0DCE#4 = Index<real2,0>(f0D4C);
          real t30DD0#1 = Add<real>(fx0DCE,_t0B50);
          real t10DD2#1 = Sub<real>(fx0DCE,_t0B50);
          real t00DD4#1 = Sub<real>(fx0DCE,_t0B52);
          real4 a0DD6#3 = <real4>[t30DD0,fx0DCE,t10DD2,t00DD4];
          real4 prod30DED#1 = Mul<real4>(a0DD6,a30D9E);
          real4 sum20DEE#1 = Add<real4>(a20D9D,prod30DED);
          real4 prod20DEF#1 = Mul<real4>(a0DD6,sum20DEE);
          real4 sum10DF0#1 = Add<real4>(a10D9C,prod20DEF);
          real4 prod10DF1#1 = Mul<real4>(a0DD6,sum10DF0);
          real4 hx0DD8#4 = Add<real4>(a00D9B,prod10DF1);
          real t00E0C#1 = Dot<4>(v00D64,hx0DD8);
          real t10E0E#1 = Dot<4>(v10D72,hx0DD8);
          real t20E10#1 = Dot<4>(v20D80,hx0DD8);
          real t30E12#1 = Dot<4>(v30D8E,hx0DD8);
          real4 tv0E14#1 = <real4>[t00E0C,t10E0E,t20E10,t30E12];
          real _t0E16#1 = Dot<4>(hy0D9A,tv0E14);
          real2 x0E18#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v010B09);
          real2 nd0E1A#2 = Floor<2>(x0E18);
          real2 f0E1C#2 = Sub<real2>(x0E18,nd0E1A);
          int{2} n0E1E#2 = RealToInt<2>(nd0E1A);
          int t20E20#1 = Index<int{2},0>(n0E1E);
          int ix0E22#4 = Add<int>(t10D50,t20E20);
          int t20E24#4 = Index<int{2},1>(n0E1E);
          int iy0E26#1 = Add<int>(t10D50,t20E24);
          int t0E2A#1 = Mul<int>(n00D5B,iy0E26);
          int index0E2B#1 = Add<int>(ix0E22,t0E2A);
          addr(IMAGE2D<int>) imgBaseAddr0E2C#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a0E28#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E2B);
          real4 v00E32#1 = LoadVoxels<IMAGE2D<int>,4>(a0E28);
          int iy0E34#1 = Add<int>(_t0B78,t20E24);
          int t0E38#1 = Mul<int>(n00D5B,iy0E34);
          int index0E39#1 = Add<int>(ix0E22,t0E38);
          addr(IMAGE2D<int>) a0E36#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E39);
          real4 v10E40#1 = LoadVoxels<IMAGE2D<int>,4>(a0E36);
          int iy0E42#1 = Add<int>(_t0B7C,t20E24);
          int t0E46#1 = Mul<int>(n00D5B,iy0E42);
          int index0E47#1 = Add<int>(ix0E22,t0E46);
          addr(IMAGE2D<int>) a0E44#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E47);
          real4 v20E4E#1 = LoadVoxels<IMAGE2D<int>,4>(a0E44);
          int iy0E50#1 = Add<int>(_t0B54,t20E24);
          int t0E54#1 = Mul<int>(n00D5B,iy0E50);
          int index0E55#1 = Add<int>(ix0E22,t0E54);
          addr(IMAGE2D<int>) a0E52#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0E2C,index0E55);
          real4 v30E5C#1 = LoadVoxels<IMAGE2D<int>,4>(a0E52);
          real fy0E5E#4 = Index<real2,1>(f0E1C);
          real t30E60#1 = Add<real>(fy0E5E,_t0B50);
          real t10E62#1 = Sub<real>(fy0E5E,_t0B50);
          real t00E64#1 = Sub<real>(fy0E5E,_t0B52);
          real4 a0E66#3 = <real4>[t30E60,fy0E5E,t10E62,t00E64];
          real4 prod30E7D#1 = Mul<real4>(a0E66,a30D9E);
          real4 sum20E7E#1 = Add<real4>(a20D9D,prod30E7D);
          real4 prod20E7F#1 = Mul<real4>(a0E66,sum20E7E);
          real4 sum10E80#1 = Add<real4>(a10D9C,prod20E7F);
          real4 prod10E81#1 = Mul<real4>(a0E66,sum10E80);
          real4 hy0E68#1 = Add<real4>(a00D9B,prod10E81);
          real fx0E9C#4 = Index<real2,0>(f0E1C);
          real t30E9E#1 = Add<real>(fx0E9C,_t0B50);
          real t10EA0#1 = Sub<real>(fx0E9C,_t0B50);
          real t00EA2#1 = Sub<real>(fx0E9C,_t0B52);
          real4 a0EA4#3 = <real4>[t30E9E,fx0E9C,t10EA0,t00EA2];
          real4 prod30EBB#1 = Mul<real4>(a0EA4,a30D9E);
          real4 sum20EBC#1 = Add<real4>(a20D9D,prod30EBB);
          real4 prod20EBD#1 = Mul<real4>(a0EA4,sum20EBC);
          real4 sum10EBE#1 = Add<real4>(a10D9C,prod20EBD);
          real4 prod10EBF#1 = Mul<real4>(a0EA4,sum10EBE);
          real4 hx0EA6#4 = Add<real4>(a00D9B,prod10EBF);
          real t00EDA#1 = Dot<4>(v00E32,hx0EA6);
          real t10EDC#1 = Dot<4>(v10E40,hx0EA6);
          real t20EDE#1 = Dot<4>(v20E4E,hx0EA6);
          real t30EE0#1 = Dot<4>(v30E5C,hx0EA6);
          real4 tv0EE2#1 = <real4>[t00EDA,t10EDC,t20EDE,t30EE0];
          real _t0EE4#1 = Dot<4>(hy0E68,tv0EE2);
          real _t0EE6#2 = Sub<real>(_t0E16,_t0EE4);
          real _t0EE8#1 = Mul<real>(_t0EE6,_t0EE6);
          real score0EEA#1 = Add<real>(score0D33,_t0EE8);
          goto JOIN0EED
        JOIN0EED:  preds = [ASSIGN0EEB,COND0D49]
          real score0EEC#2 = phi(score0EEA,score0D33)
          real _t0EEE#1 = Dot<2>(r00B6A,v020B0B);
          real _t0EF0#1 = Dot<2>(r10B70,v020B0B);
          real2 _t0EF2#1 = <real2>[_t0EEE,_t0EF0];
          real2 pos0EF4#1 = Add<real2>(_t0EF2,_t0B80);
          real2 x0EF6#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos0EF4);
          bool _t0EF8#1 = Inside<IMAGE2D<float>,2>(x0EF6,_t0AFF);
          if _t0EF8 then goto ASSIGN0EFC else goto ASSIGN1421
        ASSIGN0EFC:  preds = [COND0EFA]
          real2 x0EFB#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v020B0B);
          bool _t0EFD#1 = Inside<IMAGE2D<int>,2>(x0EFB,_t0AFB);
          goto JOIN0F01
        JOIN0F01:  preds = [ASSIGN0EFE,ASSIGN1421]
          bool _t0EFF#1 = phi(_t0EFD,_t0F00)
          if _t0EFF then goto ASSIGN0F04 else goto JOIN10A6
        ASSIGN0F04:  preds = [COND0F02]
          real2 nd0F03#2 = Floor<2>(x0EF6);
          real2 f0F05#2 = Sub<real2>(x0EF6,nd0F03);
          int{2} n0F07#2 = RealToInt<2>(nd0F03);
          int t10F09#4 = -1;
          int t20F0B#1 = Index<int{2},0>(n0F07);
          int ix0F0D#4 = Add<int>(t10F09,t20F0B);
          int t20F0F#4 = Index<int{2},1>(n0F07);
          int iy0F11#1 = Add<int>(t10F09,t20F0F);
          int n00F14#8 = 21;
          int t0F15#1 = Mul<int>(n00F14,iy0F11);
          int index0F16#1 = Add<int>(ix0F0D,t0F15);
          addr(IMAGE2D<float>) imgBaseAddr0F17#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a0F13#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F16);
          real4 v00F1D#1 = LoadVoxels<IMAGE2D<float>,4>(a0F13);
          int iy0F1F#1 = Add<int>(_t0B78,t20F0F);
          int t0F23#1 = Mul<int>(n00F14,iy0F1F);
          int index0F24#1 = Add<int>(ix0F0D,t0F23);
          addr(IMAGE2D<float>) a0F21#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F24);
          real4 v10F2B#1 = LoadVoxels<IMAGE2D<float>,4>(a0F21);
          int iy0F2D#1 = Add<int>(_t0B7C,t20F0F);
          int t0F31#1 = Mul<int>(n00F14,iy0F2D);
          int index0F32#1 = Add<int>(ix0F0D,t0F31);
          addr(IMAGE2D<float>) a0F2F#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F32);
          real4 v20F39#1 = LoadVoxels<IMAGE2D<float>,4>(a0F2F);
          int iy0F3B#1 = Add<int>(_t0B54,t20F0F);
          int t0F3F#1 = Mul<int>(n00F14,iy0F3B);
          int index0F40#1 = Add<int>(ix0F0D,t0F3F);
          addr(IMAGE2D<float>) a0F3D#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr0F17,index0F40);
          real4 v30F47#1 = LoadVoxels<IMAGE2D<float>,4>(a0F3D);
          real fy0F49#4 = Index<real2,1>(f0F05);
          real t30F4B#1 = Add<real>(fy0F49,_t0B50);
          real t10F4D#1 = Sub<real>(fy0F49,_t0B50);
          real t00F4F#1 = Sub<real>(fy0F49,_t0B52);
          real4 a0F51#3 = <real4>[t30F4B,fy0F49,t10F4D,t00F4F];
          real _f0F64#2 = 0.133333333333e1;
          real _f0F65#2 = 0.666666666667e0;
          real4 a00F54#4 = <real4>[_f0F64,_f0F65,_f0F65,_f0F64];
          real _f0F60#1 = -0.2e1;
          real _f0F61#2 = 0.0;
          real4 a10F55#4 = <real4>[_f0F60,_f0F61,_f0F61,_t0B52];
          real _f0F5D#2 = -0.1e1;
          real4 a20F56#4 = <real4>[_t0B50,_f0F5D,_f0F5D,_t0B50];
          real _f0F58#1 = -0.166666666667e0;
          real _f0F59#1 = 0.5e0;
          real _f0F5A#1 = -0.5e0;
          real _f0F5B#1 = 0.166666666667e0;
          real4 a30F57#4 = <real4>[_f0F58,_f0F59,_f0F5A,_f0F5B];
          real4 prod30F68#1 = Mul<real4>(a0F51,a30F57);
          real4 sum20F69#1 = Add<real4>(a20F56,prod30F68);
          real4 prod20F6A#1 = Mul<real4>(a0F51,sum20F69);
          real4 sum10F6B#1 = Add<real4>(a10F55,prod20F6A);
          real4 prod10F6C#1 = Mul<real4>(a0F51,sum10F6B);
          real4 hy0F53#1 = Add<real4>(a00F54,prod10F6C);
          real fx0F87#4 = Index<real2,0>(f0F05);
          real t30F89#1 = Add<real>(fx0F87,_t0B50);
          real t10F8B#1 = Sub<real>(fx0F87,_t0B50);
          real t00F8D#1 = Sub<real>(fx0F87,_t0B52);
          real4 a0F8F#3 = <real4>[t30F89,fx0F87,t10F8B,t00F8D];
          real4 prod30FA6#1 = Mul<real4>(a0F8F,a30F57);
          real4 sum20FA7#1 = Add<real4>(a20F56,prod30FA6);
          real4 prod20FA8#1 = Mul<real4>(a0F8F,sum20FA7);
          real4 sum10FA9#1 = Add<real4>(a10F55,prod20FA8);
          real4 prod10FAA#1 = Mul<real4>(a0F8F,sum10FA9);
          real4 hx0F91#4 = Add<real4>(a00F54,prod10FAA);
          real t00FC5#1 = Dot<4>(v00F1D,hx0F91);
          real t10FC7#1 = Dot<4>(v10F2B,hx0F91);
          real t20FC9#1 = Dot<4>(v20F39,hx0F91);
          real t30FCB#1 = Dot<4>(v30F47,hx0F91);
          real4 tv0FCD#1 = <real4>[t00FC5,t10FC7,t20FC9,t30FCB];
          real _t0FCF#1 = Dot<4>(hy0F53,tv0FCD);
          real2 x0FD1#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v020B0B);
          real2 nd0FD3#2 = Floor<2>(x0FD1);
          real2 f0FD5#2 = Sub<real2>(x0FD1,nd0FD3);
          int{2} n0FD7#2 = RealToInt<2>(nd0FD3);
          int t20FD9#1 = Index<int{2},0>(n0FD7);
          int ix0FDB#4 = Add<int>(t10F09,t20FD9);
          int t20FDD#4 = Index<int{2},1>(n0FD7);
          int iy0FDF#1 = Add<int>(t10F09,t20FDD);
          int t0FE3#1 = Mul<int>(n00F14,iy0FDF);
          int index0FE4#1 = Add<int>(ix0FDB,t0FE3);
          addr(IMAGE2D<int>) imgBaseAddr0FE5#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a0FE1#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index0FE4);
          real4 v00FEB#1 = LoadVoxels<IMAGE2D<int>,4>(a0FE1);
          int iy0FED#1 = Add<int>(_t0B78,t20FDD);
          int t0FF1#1 = Mul<int>(n00F14,iy0FED);
          int index0FF2#1 = Add<int>(ix0FDB,t0FF1);
          addr(IMAGE2D<int>) a0FEF#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index0FF2);
          real4 v10FF9#1 = LoadVoxels<IMAGE2D<int>,4>(a0FEF);
          int iy0FFB#1 = Add<int>(_t0B7C,t20FDD);
          int t0FFF#1 = Mul<int>(n00F14,iy0FFB);
          int index1000#1 = Add<int>(ix0FDB,t0FFF);
          addr(IMAGE2D<int>) a0FFD#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index1000);
          real4 v21007#1 = LoadVoxels<IMAGE2D<int>,4>(a0FFD);
          int iy1009#1 = Add<int>(_t0B54,t20FDD);
          int t100D#1 = Mul<int>(n00F14,iy1009);
          int index100E#1 = Add<int>(ix0FDB,t100D);
          addr(IMAGE2D<int>) a100B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr0FE5,index100E);
          real4 v31015#1 = LoadVoxels<IMAGE2D<int>,4>(a100B);
          real fy1017#4 = Index<real2,1>(f0FD5);
          real t31019#1 = Add<real>(fy1017,_t0B50);
          real t1101B#1 = Sub<real>(fy1017,_t0B50);
          real t0101D#1 = Sub<real>(fy1017,_t0B52);
          real4 a101F#3 = <real4>[t31019,fy1017,t1101B,t0101D];
          real4 prod31036#1 = Mul<real4>(a101F,a30F57);
          real4 sum21037#1 = Add<real4>(a20F56,prod31036);
          real4 prod21038#1 = Mul<real4>(a101F,sum21037);
          real4 sum11039#1 = Add<real4>(a10F55,prod21038);
          real4 prod1103A#1 = Mul<real4>(a101F,sum11039);
          real4 hy1021#1 = Add<real4>(a00F54,prod1103A);
          real fx1055#4 = Index<real2,0>(f0FD5);
          real t31057#1 = Add<real>(fx1055,_t0B50);
          real t11059#1 = Sub<real>(fx1055,_t0B50);
          real t0105B#1 = Sub<real>(fx1055,_t0B52);
          real4 a105D#3 = <real4>[t31057,fx1055,t11059,t0105B];
          real4 prod31074#1 = Mul<real4>(a105D,a30F57);
          real4 sum21075#1 = Add<real4>(a20F56,prod31074);
          real4 prod21076#1 = Mul<real4>(a105D,sum21075);
          real4 sum11077#1 = Add<real4>(a10F55,prod21076);
          real4 prod11078#1 = Mul<real4>(a105D,sum11077);
          real4 hx105F#4 = Add<real4>(a00F54,prod11078);
          real t01093#1 = Dot<4>(v00FEB,hx105F);
          real t11095#1 = Dot<4>(v10FF9,hx105F);
          real t21097#1 = Dot<4>(v21007,hx105F);
          real t31099#1 = Dot<4>(v31015,hx105F);
          real4 tv109B#1 = <real4>[t01093,t11095,t21097,t31099];
          real _t109D#1 = Dot<4>(hy1021,tv109B);
          real _t109F#2 = Sub<real>(_t0FCF,_t109D);
          real _t10A1#1 = Mul<real>(_t109F,_t109F);
          real score10A3#1 = Add<real>(score0EEC,_t10A1);
          goto JOIN10A6
        JOIN10A6:  preds = [ASSIGN10A4,COND0F02]
          real score10A5#2 = phi(score10A3,score0EEC)
          real _t10A7#1 = Dot<2>(r00B6A,v030B0D);
          real _t10A9#1 = Dot<2>(r10B70,v030B0D);
          real2 _t10AB#1 = <real2>[_t10A7,_t10A9];
          real2 pos10AD#1 = Add<real2>(_t10AB,_t0B80);
          real2 x10AF#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos10AD);
          bool _t10B1#1 = Inside<IMAGE2D<float>,2>(x10AF,_t0AFF);
          if _t10B1 then goto ASSIGN10B5 else goto ASSIGN1420
        ASSIGN10B5:  preds = [COND10B3]
          real2 x10B4#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v030B0D);
          bool _t10B6#1 = Inside<IMAGE2D<int>,2>(x10B4,_t0AFB);
          goto JOIN10BA
        JOIN10BA:  preds = [ASSIGN10B7,ASSIGN1420]
          bool _t10B8#1 = phi(_t10B6,_t10B9)
          if _t10B8 then goto ASSIGN10BD else goto JOIN125F
        ASSIGN10BD:  preds = [COND10BB]
          real2 nd10BC#2 = Floor<2>(x10AF);
          real2 f10BE#2 = Sub<real2>(x10AF,nd10BC);
          int{2} n10C0#2 = RealToInt<2>(nd10BC);
          int t110C2#4 = -1;
          int t210C4#1 = Index<int{2},0>(n10C0);
          int ix10C6#4 = Add<int>(t110C2,t210C4);
          int t210C8#4 = Index<int{2},1>(n10C0);
          int iy10CA#1 = Add<int>(t110C2,t210C8);
          int n010CD#8 = 21;
          int t10CE#1 = Mul<int>(n010CD,iy10CA);
          int index10CF#1 = Add<int>(ix10C6,t10CE);
          addr(IMAGE2D<float>) imgBaseAddr10D0#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a10CC#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10CF);
          real4 v010D6#1 = LoadVoxels<IMAGE2D<float>,4>(a10CC);
          int iy10D8#1 = Add<int>(_t0B78,t210C8);
          int t10DC#1 = Mul<int>(n010CD,iy10D8);
          int index10DD#1 = Add<int>(ix10C6,t10DC);
          addr(IMAGE2D<float>) a10DA#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10DD);
          real4 v110E4#1 = LoadVoxels<IMAGE2D<float>,4>(a10DA);
          int iy10E6#1 = Add<int>(_t0B7C,t210C8);
          int t10EA#1 = Mul<int>(n010CD,iy10E6);
          int index10EB#1 = Add<int>(ix10C6,t10EA);
          addr(IMAGE2D<float>) a10E8#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10EB);
          real4 v210F2#1 = LoadVoxels<IMAGE2D<float>,4>(a10E8);
          int iy10F4#1 = Add<int>(_t0B54,t210C8);
          int t10F8#1 = Mul<int>(n010CD,iy10F4);
          int index10F9#1 = Add<int>(ix10C6,t10F8);
          addr(IMAGE2D<float>) a10F6#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr10D0,index10F9);
          real4 v31100#1 = LoadVoxels<IMAGE2D<float>,4>(a10F6);
          real fy1102#4 = Index<real2,1>(f10BE);
          real t31104#1 = Add<real>(fy1102,_t0B50);
          real t11106#1 = Sub<real>(fy1102,_t0B50);
          real t01108#1 = Sub<real>(fy1102,_t0B52);
          real4 a110A#3 = <real4>[t31104,fy1102,t11106,t01108];
          real _f111D#2 = 0.133333333333e1;
          real _f111E#2 = 0.666666666667e0;
          real4 a0110D#4 = <real4>[_f111D,_f111E,_f111E,_f111D];
          real _f1119#1 = -0.2e1;
          real _f111A#2 = 0.0;
          real4 a1110E#4 = <real4>[_f1119,_f111A,_f111A,_t0B52];
          real _f1116#2 = -0.1e1;
          real4 a2110F#4 = <real4>[_t0B50,_f1116,_f1116,_t0B50];
          real _f1111#1 = -0.166666666667e0;
          real _f1112#1 = 0.5e0;
          real _f1113#1 = -0.5e0;
          real _f1114#1 = 0.166666666667e0;
          real4 a31110#4 = <real4>[_f1111,_f1112,_f1113,_f1114];
          real4 prod31121#1 = Mul<real4>(a110A,a31110);
          real4 sum21122#1 = Add<real4>(a2110F,prod31121);
          real4 prod21123#1 = Mul<real4>(a110A,sum21122);
          real4 sum11124#1 = Add<real4>(a1110E,prod21123);
          real4 prod11125#1 = Mul<real4>(a110A,sum11124);
          real4 hy110C#1 = Add<real4>(a0110D,prod11125);
          real fx1140#4 = Index<real2,0>(f10BE);
          real t31142#1 = Add<real>(fx1140,_t0B50);
          real t11144#1 = Sub<real>(fx1140,_t0B50);
          real t01146#1 = Sub<real>(fx1140,_t0B52);
          real4 a1148#3 = <real4>[t31142,fx1140,t11144,t01146];
          real4 prod3115F#1 = Mul<real4>(a1148,a31110);
          real4 sum21160#1 = Add<real4>(a2110F,prod3115F);
          real4 prod21161#1 = Mul<real4>(a1148,sum21160);
          real4 sum11162#1 = Add<real4>(a1110E,prod21161);
          real4 prod11163#1 = Mul<real4>(a1148,sum11162);
          real4 hx114A#4 = Add<real4>(a0110D,prod11163);
          real t0117E#1 = Dot<4>(v010D6,hx114A);
          real t11180#1 = Dot<4>(v110E4,hx114A);
          real t21182#1 = Dot<4>(v210F2,hx114A);
          real t31184#1 = Dot<4>(v31100,hx114A);
          real4 tv1186#1 = <real4>[t0117E,t11180,t21182,t31184];
          real _t1188#1 = Dot<4>(hy110C,tv1186);
          real2 x118A#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v030B0D);
          real2 nd118C#2 = Floor<2>(x118A);
          real2 f118E#2 = Sub<real2>(x118A,nd118C);
          int{2} n1190#2 = RealToInt<2>(nd118C);
          int t21192#1 = Index<int{2},0>(n1190);
          int ix1194#4 = Add<int>(t110C2,t21192);
          int t21196#4 = Index<int{2},1>(n1190);
          int iy1198#1 = Add<int>(t110C2,t21196);
          int t119C#1 = Mul<int>(n010CD,iy1198);
          int index119D#1 = Add<int>(ix1194,t119C);
          addr(IMAGE2D<int>) imgBaseAddr119E#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a119A#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index119D);
          real4 v011A4#1 = LoadVoxels<IMAGE2D<int>,4>(a119A);
          int iy11A6#1 = Add<int>(_t0B78,t21196);
          int t11AA#1 = Mul<int>(n010CD,iy11A6);
          int index11AB#1 = Add<int>(ix1194,t11AA);
          addr(IMAGE2D<int>) a11A8#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index11AB);
          real4 v111B2#1 = LoadVoxels<IMAGE2D<int>,4>(a11A8);
          int iy11B4#1 = Add<int>(_t0B7C,t21196);
          int t11B8#1 = Mul<int>(n010CD,iy11B4);
          int index11B9#1 = Add<int>(ix1194,t11B8);
          addr(IMAGE2D<int>) a11B6#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index11B9);
          real4 v211C0#1 = LoadVoxels<IMAGE2D<int>,4>(a11B6);
          int iy11C2#1 = Add<int>(_t0B54,t21196);
          int t11C6#1 = Mul<int>(n010CD,iy11C2);
          int index11C7#1 = Add<int>(ix1194,t11C6);
          addr(IMAGE2D<int>) a11C4#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr119E,index11C7);
          real4 v311CE#1 = LoadVoxels<IMAGE2D<int>,4>(a11C4);
          real fy11D0#4 = Index<real2,1>(f118E);
          real t311D2#1 = Add<real>(fy11D0,_t0B50);
          real t111D4#1 = Sub<real>(fy11D0,_t0B50);
          real t011D6#1 = Sub<real>(fy11D0,_t0B52);
          real4 a11D8#3 = <real4>[t311D2,fy11D0,t111D4,t011D6];
          real4 prod311EF#1 = Mul<real4>(a11D8,a31110);
          real4 sum211F0#1 = Add<real4>(a2110F,prod311EF);
          real4 prod211F1#1 = Mul<real4>(a11D8,sum211F0);
          real4 sum111F2#1 = Add<real4>(a1110E,prod211F1);
          real4 prod111F3#1 = Mul<real4>(a11D8,sum111F2);
          real4 hy11DA#1 = Add<real4>(a0110D,prod111F3);
          real fx120E#4 = Index<real2,0>(f118E);
          real t31210#1 = Add<real>(fx120E,_t0B50);
          real t11212#1 = Sub<real>(fx120E,_t0B50);
          real t01214#1 = Sub<real>(fx120E,_t0B52);
          real4 a1216#3 = <real4>[t31210,fx120E,t11212,t01214];
          real4 prod3122D#1 = Mul<real4>(a1216,a31110);
          real4 sum2122E#1 = Add<real4>(a2110F,prod3122D);
          real4 prod2122F#1 = Mul<real4>(a1216,sum2122E);
          real4 sum11230#1 = Add<real4>(a1110E,prod2122F);
          real4 prod11231#1 = Mul<real4>(a1216,sum11230);
          real4 hx1218#4 = Add<real4>(a0110D,prod11231);
          real t0124C#1 = Dot<4>(v011A4,hx1218);
          real t1124E#1 = Dot<4>(v111B2,hx1218);
          real t21250#1 = Dot<4>(v211C0,hx1218);
          real t31252#1 = Dot<4>(v311CE,hx1218);
          real4 tv1254#1 = <real4>[t0124C,t1124E,t21250,t31252];
          real _t1256#1 = Dot<4>(hy11DA,tv1254);
          real _t1258#2 = Sub<real>(_t1188,_t1256);
          real _t125A#1 = Mul<real>(_t1258,_t1258);
          real score125C#1 = Add<real>(score10A5,_t125A);
          goto JOIN125F
        JOIN125F:  preds = [ASSIGN125D,COND10BB]
          real score125E#2 = phi(score125C,score10A5)
          real _t1260#1 = Dot<2>(r00B6A,v040B0F);
          real _t1262#1 = Dot<2>(r10B70,v040B0F);
          real2 _t1264#1 = <real2>[_t1260,_t1262];
          real2 pos1266#2 = Add<real2>(_t1264,_t0B80);
          real2 x1268#3 = PosToImgSpace<IMAGE2D<float>>(_t0AFF,pos1266);
          bool _t126A#1 = Inside<IMAGE2D<float>,2>(x1268,_t0AFF);
          if _t126A then goto ASSIGN126E else goto ASSIGN141F
        ASSIGN126E:  preds = [COND126C]
          real2 x126D#1 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v040B0F);
          bool _t126F#1 = Inside<IMAGE2D<int>,2>(x126D,_t0AFB);
          goto JOIN1273
        JOIN1273:  preds = [ASSIGN1270,ASSIGN141F]
          bool _t1271#1 = phi(_t126F,_t1272)
          if _t1271 then goto ASSIGN1276 else goto JOIN1418
        ASSIGN1276:  preds = [COND1274]
          real2 nd1275#2 = Floor<2>(x1268);
          real2 f1277#2 = Sub<real2>(x1268,nd1275);
          int{2} n1279#2 = RealToInt<2>(nd1275);
          int t1127B#4 = -1;
          int t2127D#1 = Index<int{2},0>(n1279);
          int ix127F#4 = Add<int>(t1127B,t2127D);
          int t21281#4 = Index<int{2},1>(n1279);
          int iy1283#1 = Add<int>(t1127B,t21281);
          int n01286#8 = 21;
          int t1287#1 = Mul<int>(n01286,iy1283);
          int index1288#1 = Add<int>(ix127F,t1287);
          addr(IMAGE2D<float>) imgBaseAddr1289#4 = ImageAddress<IMAGE2D<float>>(_t0AFF);
          addr(IMAGE2D<float>) a1285#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index1288);
          real4 v0128F#1 = LoadVoxels<IMAGE2D<float>,4>(a1285);
          int iy1291#1 = Add<int>(_t0B78,t21281);
          int t1295#1 = Mul<int>(n01286,iy1291);
          int index1296#1 = Add<int>(ix127F,t1295);
          addr(IMAGE2D<float>) a1293#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index1296);
          real4 v1129D#1 = LoadVoxels<IMAGE2D<float>,4>(a1293);
          int iy129F#1 = Add<int>(_t0B7C,t21281);
          int t12A3#1 = Mul<int>(n01286,iy129F);
          int index12A4#1 = Add<int>(ix127F,t12A3);
          addr(IMAGE2D<float>) a12A1#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index12A4);
          real4 v212AB#1 = LoadVoxels<IMAGE2D<float>,4>(a12A1);
          int iy12AD#1 = Add<int>(_t0B54,t21281);
          int t12B1#1 = Mul<int>(n01286,iy12AD);
          int index12B2#1 = Add<int>(ix127F,t12B1);
          addr(IMAGE2D<float>) a12AF#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1289,index12B2);
          real4 v312B9#1 = LoadVoxels<IMAGE2D<float>,4>(a12AF);
          real fy12BB#4 = Index<real2,1>(f1277);
          real t312BD#1 = Add<real>(fy12BB,_t0B50);
          real t112BF#1 = Sub<real>(fy12BB,_t0B50);
          real t012C1#1 = Sub<real>(fy12BB,_t0B52);
          real4 a12C3#3 = <real4>[t312BD,fy12BB,t112BF,t012C1];
          real _f12D6#2 = 0.133333333333e1;
          real _f12D7#2 = 0.666666666667e0;
          real4 a012C6#4 = <real4>[_f12D6,_f12D7,_f12D7,_f12D6];
          real _f12D2#1 = -0.2e1;
          real _f12D3#2 = 0.0;
          real4 a112C7#4 = <real4>[_f12D2,_f12D3,_f12D3,_t0B52];
          real _f12CF#2 = -0.1e1;
          real4 a212C8#4 = <real4>[_t0B50,_f12CF,_f12CF,_t0B50];
          real _f12CA#1 = -0.166666666667e0;
          real _f12CB#1 = 0.5e0;
          real _f12CC#1 = -0.5e0;
          real _f12CD#1 = 0.166666666667e0;
          real4 a312C9#4 = <real4>[_f12CA,_f12CB,_f12CC,_f12CD];
          real4 prod312DA#1 = Mul<real4>(a12C3,a312C9);
          real4 sum212DB#1 = Add<real4>(a212C8,prod312DA);
          real4 prod212DC#1 = Mul<real4>(a12C3,sum212DB);
          real4 sum112DD#1 = Add<real4>(a112C7,prod212DC);
          real4 prod112DE#1 = Mul<real4>(a12C3,sum112DD);
          real4 hy12C5#1 = Add<real4>(a012C6,prod112DE);
          real fx12F9#4 = Index<real2,0>(f1277);
          real t312FB#1 = Add<real>(fx12F9,_t0B50);
          real t112FD#1 = Sub<real>(fx12F9,_t0B50);
          real t012FF#1 = Sub<real>(fx12F9,_t0B52);
          real4 a1301#3 = <real4>[t312FB,fx12F9,t112FD,t012FF];
          real4 prod31318#1 = Mul<real4>(a1301,a312C9);
          real4 sum21319#1 = Add<real4>(a212C8,prod31318);
          real4 prod2131A#1 = Mul<real4>(a1301,sum21319);
          real4 sum1131B#1 = Add<real4>(a112C7,prod2131A);
          real4 prod1131C#1 = Mul<real4>(a1301,sum1131B);
          real4 hx1303#4 = Add<real4>(a012C6,prod1131C);
          real t01337#1 = Dot<4>(v0128F,hx1303);
          real t11339#1 = Dot<4>(v1129D,hx1303);
          real t2133B#1 = Dot<4>(v212AB,hx1303);
          real t3133D#1 = Dot<4>(v312B9,hx1303);
          real4 tv133F#1 = <real4>[t01337,t11339,t2133B,t3133D];
          real _t1341#1 = Dot<4>(hy12C5,tv133F);
          real2 x1343#2 = PosToImgSpace<IMAGE2D<int>>(_t0AFB,v040B0F);
          real2 nd1345#2 = Floor<2>(x1343);
          real2 f1347#2 = Sub<real2>(x1343,nd1345);
          int{2} n1349#2 = RealToInt<2>(nd1345);
          int t2134B#1 = Index<int{2},0>(n1349);
          int ix134D#4 = Add<int>(t1127B,t2134B);
          int t2134F#4 = Index<int{2},1>(n1349);
          int iy1351#1 = Add<int>(t1127B,t2134F);
          int t1355#1 = Mul<int>(n01286,iy1351);
          int index1356#1 = Add<int>(ix134D,t1355);
          addr(IMAGE2D<int>) imgBaseAddr1357#4 = ImageAddress<IMAGE2D<int>>(_t0AFB);
          addr(IMAGE2D<int>) a1353#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1356);
          real4 v0135D#1 = LoadVoxels<IMAGE2D<int>,4>(a1353);
          int iy135F#1 = Add<int>(_t0B78,t2134F);
          int t1363#1 = Mul<int>(n01286,iy135F);
          int index1364#1 = Add<int>(ix134D,t1363);
          addr(IMAGE2D<int>) a1361#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1364);
          real4 v1136B#1 = LoadVoxels<IMAGE2D<int>,4>(a1361);
          int iy136D#1 = Add<int>(_t0B7C,t2134F);
          int t1371#1 = Mul<int>(n01286,iy136D);
          int index1372#1 = Add<int>(ix134D,t1371);
          addr(IMAGE2D<int>) a136F#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1372);
          real4 v21379#1 = LoadVoxels<IMAGE2D<int>,4>(a136F);
          int iy137B#1 = Add<int>(_t0B54,t2134F);
          int t137F#1 = Mul<int>(n01286,iy137B);
          int index1380#1 = Add<int>(ix134D,t137F);
          addr(IMAGE2D<int>) a137D#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1357,index1380);
          real4 v31387#1 = LoadVoxels<IMAGE2D<int>,4>(a137D);
          real fy1389#4 = Index<real2,1>(f1347);
          real t3138B#1 = Add<real>(fy1389,_t0B50);
          real t1138D#1 = Sub<real>(fy1389,_t0B50);
          real t0138F#1 = Sub<real>(fy1389,_t0B52);
          real4 a1391#3 = <real4>[t3138B,fy1389,t1138D,t0138F];
          real4 prod313A8#1 = Mul<real4>(a1391,a312C9);
          real4 sum213A9#1 = Add<real4>(a212C8,prod313A8);
          real4 prod213AA#1 = Mul<real4>(a1391,sum213A9);
          real4 sum113AB#1 = Add<real4>(a112C7,prod213AA);
          real4 prod113AC#1 = Mul<real4>(a1391,sum113AB);
          real4 hy1393#1 = Add<real4>(a012C6,prod113AC);
          real fx13C7#4 = Index<real2,0>(f1347);
          real t313C9#1 = Add<real>(fx13C7,_t0B50);
          real t113CB#1 = Sub<real>(fx13C7,_t0B50);
          real t013CD#1 = Sub<real>(fx13C7,_t0B52);
          real4 a13CF#3 = <real4>[t313C9,fx13C7,t113CB,t013CD];
          real4 prod313E6#1 = Mul<real4>(a13CF,a312C9);
          real4 sum213E7#1 = Add<real4>(a212C8,prod313E6);
          real4 prod213E8#1 = Mul<real4>(a13CF,sum213E7);
          real4 sum113E9#1 = Add<real4>(a112C7,prod213E8);
          real4 prod113EA#1 = Mul<real4>(a13CF,sum113E9);
          real4 hx13D1#4 = Add<real4>(a012C6,prod113EA);
          real t01405#1 = Dot<4>(v0135D,hx13D1);
          real t11407#1 = Dot<4>(v1136B,hx13D1);
          real t21409#1 = Dot<4>(v21379,hx13D1);
          real t3140B#1 = Dot<4>(v31387,hx13D1);
          real4 tv140D#1 = <real4>[t01405,t11407,t21409,t3140B];
          real _t140F#1 = Dot<4>(hy1393,tv140D);
          real _t1411#2 = Sub<real>(_t1341,_t140F);
          real _t1413#1 = Mul<real>(_t1411,_t1411);
          real score1415#1 = Add<real>(score125E,_t1413);
          goto JOIN1418
        JOIN1418:  preds = [ASSIGN1416,COND1274]
          real score1417#1 = phi(score1415,score125E)
          self.score = score1417;
          self.r0 = r00B6A;
          self.r1 = r10B70;
          self.pos = pos1266;
          stabilize ()
        ASSIGN141F:  preds = [COND126C]
          bool _t1272#1 = false;
          goto JOIN1273
        ASSIGN1420:  preds = [COND10B3]
          bool _t10B9#1 = false;
          goto JOIN10BA
        ASSIGN1421:  preds = [COND0EFA]
          bool _t0F00#1 = false;
          goto JOIN0F01
        ASSIGN1422:  preds = [COND0D41]
          bool _t0D47#1 = false;
          goto JOIN0D48
        ASSIGN1423:  preds = [COND0B88]
          bool _t0B8E#1 = false;
          goto JOIN0B8F
    end Update
    method Stabilize
        ENTRY1425:  preds = []
          real3 t1426#1 = self.t;
          real score1428#1 = self.score;
          real2 r0142A#1 = self.r0;
          real2 r1142C#1 = self.r1;
          real2 pos142E#1 = self.pos;
          self.score = score1428;
          self.r0 = r0142A;
          self.r1 = r1142C;
          self.pos = pos142E;
          return ()
    end Stabilize
  end R
#### end program ####
********** After translation to TreeIL **********
//***** PROPERTIES *****
  none
//***** GLOBALS *****
  real2 v00;
  real2 v01;
  real2 v02;
  real2 v03;
  real2 v04;
  image(IMAGE2D<int>) _t;
  image(IMAGE2D<float>) _t;
//***** INPUT INIT *****
  {
    exit();
  }
//***** GLOBAL INIT *****
  {
    real l__t_216;
    _t = load<2> ("square-template.nrrd");
    _t = load<2> ("square-rotate.nrrd");
    v00 = <real2>{0.0,0.0};
    l__t_216 = Neg<real>(0.5e0);
    v01 = <real2>{l__t_216,0.5e0};
    v02 = <real2>{l__t_216,l__t_216};
    v03 = <real2>{0.5e0,0.5e0};
    v04 = <real2>{0.5e0,l__t_216};
    exit(::v00,::v01,::v02,::v03,::v04,::_t,::_t);
  }
//***** STRANDS *****
strand R (int p_i_0,int p_j_1,int p_k_2) {
  real3 t;
  varying output real score;
  varying real2 r0;
  varying real2 r1;
  varying real2 pos;
  init () {
    real2 l_r0_3;
    l_r0_3 = <real2>{0.0,0.0};
    self.t = <real3>{Sub<real>(Div<real>(IntToReal(p_i_0),0.60e2),0.5e0),Sub<real>(Div<real>(IntToReal(p_j_1),0.60e2),0.5e0),Sub<real>(Div<real>(IntToReal(p_k_2),0.60e2),0.5e0)};
    self.score = 0.0;
    self.r0 = l_r0_3;
    self.r1 = l_r0_3;
    self.pos = l_r0_3;
    exit();
  }
  Update () {
    real l__t_4;
    real l__t_5;
    real l__t_6;
    real2 l_r0_7;
    real2 l_r1_8;
    real2 l__t_9;
    real2 l_x_10;
    bool l__t_11;
    bool l__t_12;
    real2 l_nd_13;
    real2 l_f_14;
    int{2} l_n_15;
    int l_ix_16;
    int l_t2_17;
    addr(IMAGE2D<float>) l_imgBaseAddr_18;
    real4 l_v0_19;
    real4 l_v1_20;
    real4 l_v2_21;
    real4 l_v3_22;
    real l_fy_23;
    real4 l_a_24;
    real4 l_a0_25;
    real4 l_a1_26;
    real4 l_a2_27;
    real4 l_a3_28;
    real l_fx_29;
    real4 l_a_30;
    real4 l_hx_31;
    real2 l_x_32;
    real2 l_nd_33;
    real2 l_f_34;
    int{2} l_n_35;
    int l_ix_36;
    int l_t2_37;
    addr(IMAGE2D<int>) l_imgBaseAddr_38;
    real4 l_v0_39;
    real4 l_v1_40;
    real4 l_v2_41;
    real4 l_v3_42;
    real l_fy_43;
    real4 l_a_44;
    real l_fx_45;
    real4 l_a_46;
    real4 l_hx_47;
    real l__t_48;
    real l_score_49;
    real l_score_50;
    real2 l_x_51;
    bool l__t_52;
    bool l__t_53;
    real2 l_nd_54;
    real2 l_f_55;
    int{2} l_n_56;
    int l_ix_57;
    int l_t2_58;
    addr(IMAGE2D<float>) l_imgBaseAddr_59;
    real4 l_v0_60;
    real4 l_v1_61;
    real4 l_v2_62;
    real4 l_v3_63;
    real l_fy_64;
    real4 l_a_65;
    real4 l_a0_66;
    real4 l_a1_67;
    real4 l_a2_68;
    real4 l_a3_69;
    real l_fx_70;
    real4 l_a_71;
    real4 l_hx_72;
    real2 l_x_73;
    real2 l_nd_74;
    real2 l_f_75;
    int{2} l_n_76;
    int l_ix_77;
    int l_t2_78;
    addr(IMAGE2D<int>) l_imgBaseAddr_79;
    real4 l_v0_80;
    real4 l_v1_81;
    real4 l_v2_82;
    real4 l_v3_83;
    real l_fy_84;
    real4 l_a_85;
    real l_fx_86;
    real4 l_a_87;
    real4 l_hx_88;
    real l__t_89;
    real l_score_90;
    real l_score_91;
    real2 l_x_92;
    bool l__t_93;
    bool l__t_94;
    real2 l_nd_95;
    real2 l_f_96;
    int{2} l_n_97;
    int l_ix_98;
    int l_t2_99;
    addr(IMAGE2D<float>) l_imgBaseAddr_100;
    real4 l_v0_101;
    real4 l_v1_102;
    real4 l_v2_103;
    real4 l_v3_104;
    real l_fy_105;
    real4 l_a_106;
    real4 l_a0_107;
    real4 l_a1_108;
    real4 l_a2_109;
    real4 l_a3_110;
    real l_fx_111;
    real4 l_a_112;
    real4 l_hx_113;
    real2 l_x_114;
    real2 l_nd_115;
    real2 l_f_116;
    int{2} l_n_117;
    int l_ix_118;
    int l_t2_119;
    addr(IMAGE2D<int>) l_imgBaseAddr_120;
    real4 l_v0_121;
    real4 l_v1_122;
    real4 l_v2_123;
    real4 l_v3_124;
    real l_fy_125;
    real4 l_a_126;
    real l_fx_127;
    real4 l_a_128;
    real4 l_hx_129;
    real l__t_130;
    real l_score_131;
    real l_score_132;
    real2 l_x_133;
    bool l__t_134;
    bool l__t_135;
    real2 l_nd_136;
    real2 l_f_137;
    int{2} l_n_138;
    int l_ix_139;
    int l_t2_140;
    addr(IMAGE2D<float>) l_imgBaseAddr_141;
    real4 l_v0_142;
    real4 l_v1_143;
    real4 l_v2_144;
    real4 l_v3_145;
    real l_fy_146;
    real4 l_a_147;
    real4 l_a0_148;
    real4 l_a1_149;
    real4 l_a2_150;
    real4 l_a3_151;
    real l_fx_152;
    real4 l_a_153;
    real4 l_hx_154;
    real2 l_x_155;
    real2 l_nd_156;
    real2 l_f_157;
    int{2} l_n_158;
    int l_ix_159;
    int l_t2_160;
    addr(IMAGE2D<int>) l_imgBaseAddr_161;
    real4 l_v0_162;
    real4 l_v1_163;
    real4 l_v2_164;
    real4 l_v3_165;
    real l_fy_166;
    real4 l_a_167;
    real l_fx_168;
    real4 l_a_169;
    real4 l_hx_170;
    real l__t_171;
    real l_score_172;
    real l_score_173;
    real2 l_pos_174;
    real2 l_x_175;
    bool l__t_176;
    bool l__t_177;
    real2 l_nd_178;
    real2 l_f_179;
    int{2} l_n_180;
    int l_ix_181;
    int l_t2_182;
    addr(IMAGE2D<float>) l_imgBaseAddr_183;
    real4 l_v0_184;
    real4 l_v1_185;
    real4 l_v2_186;
    real4 l_v3_187;
    real l_fy_188;
    real4 l_a_189;
    real4 l_a0_190;
    real4 l_a1_191;
    real4 l_a2_192;
    real4 l_a3_193;
    real l_fx_194;
    real4 l_a_195;
    real4 l_hx_196;
    real2 l_x_197;
    real2 l_nd_198;
    real2 l_f_199;
    int{2} l_n_200;
    int l_ix_201;
    int l_t2_202;
    addr(IMAGE2D<int>) l_imgBaseAddr_203;
    real4 l_v0_204;
    real4 l_v1_205;
    real4 l_v2_206;
    real4 l_v3_207;
    real l_fy_208;
    real4 l_a_209;
    real l_fx_210;
    real4 l_a_211;
    real4 l_hx_212;
    real l__t_213;
    real l_score_214;
    real l_score_215;
    l__t_4 = Subscript<real3>(self.t,2);
    l__t_5 = Sub<real>(0.1e1,Mul<real>(Mul<real>(0.2e1,l__t_4),l__t_4));
    l__t_6 = sqrt(Sub<real>(0.1e1,Mul<real>(l__t_4,l__t_4)));
    l_r0_7 = <real2>{l__t_5,Mul<real>(Mul<real>(Neg<real>(0.2e1),l__t_6),l__t_4)};
    l_r1_8 = <real2>{Mul<real>(Mul<real>(0.2e1,l__t_6),l__t_4),l__t_5};
    l__t_9 = <real2>{Subscript<real3>(self.t,0),Subscript<real3>(self.t,1)};
    l_x_10 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v00),Dot<2>(l_r1_8,::v00)},l__t_9));
    if (Inside<IMAGE2D<float>,2>(l_x_10,::_t)) {
      l__t_11 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v00),::_t);
      l__t_12 = l__t_11;
    } else {
      l__t_12 = false;
    }
    if (l__t_12) {
      l_nd_13 = Floor<2>(l_x_10);
      l_f_14 = Sub<real2>(l_x_10,l_nd_13);
      l_n_15 = RealToInt<2>(l_nd_13);
      l_ix_16 = Add<int>(-1,Index<int{2},0>(l_n_15));
      l_t2_17 = Index<int{2},1>(l_n_15);
      l_imgBaseAddr_18 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_19 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_18,Add<int>(l_ix_16,Mul<int>(21,Add<int>(-1,l_t2_17)))));
      l_v1_20 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_18,Add<int>(l_ix_16,Mul<int>(21,Add<int>(0,l_t2_17)))));
      l_v2_21 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_18,Add<int>(l_ix_16,Mul<int>(21,Add<int>(1,l_t2_17)))));
      l_v3_22 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_18,Add<int>(l_ix_16,Mul<int>(21,Add<int>(2,l_t2_17)))));
      l_fy_23 = Index<real2,1>(l_f_14);
      l_a_24 = <real4>{Add<real>(l_fy_23,0.1e1),l_fy_23,Sub<real>(l_fy_23,0.1e1),Sub<real>(l_fy_23,0.2e1)};
      l_a0_25 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_26 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_27 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_28 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_29 = Index<real2,0>(l_f_14);
      l_a_30 = <real4>{Add<real>(l_fx_29,0.1e1),l_fx_29,Sub<real>(l_fx_29,0.1e1),Sub<real>(l_fx_29,0.2e1)};
      l_hx_31 = Add<real4>(l_a0_25,Mul<real4>(l_a_30,Add<real4>(l_a1_26,Mul<real4>(l_a_30,Add<real4>(l_a2_27,Mul<real4>(l_a_30,l_a3_28))))));
      l_x_32 = PosToImgSpace<IMAGE2D<int>>(::_t,::v00);
      l_nd_33 = Floor<2>(l_x_32);
      l_f_34 = Sub<real2>(l_x_32,l_nd_33);
      l_n_35 = RealToInt<2>(l_nd_33);
      l_ix_36 = Add<int>(-1,Index<int{2},0>(l_n_35));
      l_t2_37 = Index<int{2},1>(l_n_35);
      l_imgBaseAddr_38 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_39 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_38,Add<int>(l_ix_36,Mul<int>(21,Add<int>(-1,l_t2_37)))));
      l_v1_40 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_38,Add<int>(l_ix_36,Mul<int>(21,Add<int>(0,l_t2_37)))));
      l_v2_41 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_38,Add<int>(l_ix_36,Mul<int>(21,Add<int>(1,l_t2_37)))));
      l_v3_42 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_38,Add<int>(l_ix_36,Mul<int>(21,Add<int>(2,l_t2_37)))));
      l_fy_43 = Index<real2,1>(l_f_34);
      l_a_44 = <real4>{Add<real>(l_fy_43,0.1e1),l_fy_43,Sub<real>(l_fy_43,0.1e1),Sub<real>(l_fy_43,0.2e1)};
      l_fx_45 = Index<real2,0>(l_f_34);
      l_a_46 = <real4>{Add<real>(l_fx_45,0.1e1),l_fx_45,Sub<real>(l_fx_45,0.1e1),Sub<real>(l_fx_45,0.2e1)};
      l_hx_47 = Add<real4>(l_a0_25,Mul<real4>(l_a_46,Add<real4>(l_a1_26,Mul<real4>(l_a_46,Add<real4>(l_a2_27,Mul<real4>(l_a_46,l_a3_28))))));
      l__t_48 = Sub<real>(Dot<4>(Add<real4>(l_a0_25,Mul<real4>(l_a_24,Add<real4>(l_a1_26,Mul<real4>(l_a_24,Add<real4>(l_a2_27,Mul<real4>(l_a_24,l_a3_28)))))),<real4>{Dot<4>(l_v0_19,l_hx_31),Dot<4>(l_v1_20,l_hx_31),Dot<4>(l_v2_21,l_hx_31),Dot<4>(l_v3_22,l_hx_31)}),Dot<4>(Add<real4>(l_a0_25,Mul<real4>(l_a_44,Add<real4>(l_a1_26,Mul<real4>(l_a_44,Add<real4>(l_a2_27,Mul<real4>(l_a_44,l_a3_28)))))),<real4>{Dot<4>(l_v0_39,l_hx_47),Dot<4>(l_v1_40,l_hx_47),Dot<4>(l_v2_41,l_hx_47),Dot<4>(l_v3_42,l_hx_47)}));
      l_score_49 = Add<real>(self.score,Mul<real>(l__t_48,l__t_48));
      l_score_50 = l_score_49;
    } else {
      l_score_50 = self.score;
    }
    l_x_51 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v01),Dot<2>(l_r1_8,::v01)},l__t_9));
    if (Inside<IMAGE2D<float>,2>(l_x_51,::_t)) {
      l__t_52 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v01),::_t);
      l__t_53 = l__t_52;
    } else {
      l__t_53 = false;
    }
    if (l__t_53) {
      l_nd_54 = Floor<2>(l_x_51);
      l_f_55 = Sub<real2>(l_x_51,l_nd_54);
      l_n_56 = RealToInt<2>(l_nd_54);
      l_ix_57 = Add<int>(-1,Index<int{2},0>(l_n_56));
      l_t2_58 = Index<int{2},1>(l_n_56);
      l_imgBaseAddr_59 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_60 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_59,Add<int>(l_ix_57,Mul<int>(21,Add<int>(-1,l_t2_58)))));
      l_v1_61 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_59,Add<int>(l_ix_57,Mul<int>(21,Add<int>(0,l_t2_58)))));
      l_v2_62 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_59,Add<int>(l_ix_57,Mul<int>(21,Add<int>(1,l_t2_58)))));
      l_v3_63 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_59,Add<int>(l_ix_57,Mul<int>(21,Add<int>(2,l_t2_58)))));
      l_fy_64 = Index<real2,1>(l_f_55);
      l_a_65 = <real4>{Add<real>(l_fy_64,0.1e1),l_fy_64,Sub<real>(l_fy_64,0.1e1),Sub<real>(l_fy_64,0.2e1)};
      l_a0_66 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_67 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_68 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_69 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_70 = Index<real2,0>(l_f_55);
      l_a_71 = <real4>{Add<real>(l_fx_70,0.1e1),l_fx_70,Sub<real>(l_fx_70,0.1e1),Sub<real>(l_fx_70,0.2e1)};
      l_hx_72 = Add<real4>(l_a0_66,Mul<real4>(l_a_71,Add<real4>(l_a1_67,Mul<real4>(l_a_71,Add<real4>(l_a2_68,Mul<real4>(l_a_71,l_a3_69))))));
      l_x_73 = PosToImgSpace<IMAGE2D<int>>(::_t,::v01);
      l_nd_74 = Floor<2>(l_x_73);
      l_f_75 = Sub<real2>(l_x_73,l_nd_74);
      l_n_76 = RealToInt<2>(l_nd_74);
      l_ix_77 = Add<int>(-1,Index<int{2},0>(l_n_76));
      l_t2_78 = Index<int{2},1>(l_n_76);
      l_imgBaseAddr_79 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_80 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_79,Add<int>(l_ix_77,Mul<int>(21,Add<int>(-1,l_t2_78)))));
      l_v1_81 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_79,Add<int>(l_ix_77,Mul<int>(21,Add<int>(0,l_t2_78)))));
      l_v2_82 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_79,Add<int>(l_ix_77,Mul<int>(21,Add<int>(1,l_t2_78)))));
      l_v3_83 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_79,Add<int>(l_ix_77,Mul<int>(21,Add<int>(2,l_t2_78)))));
      l_fy_84 = Index<real2,1>(l_f_75);
      l_a_85 = <real4>{Add<real>(l_fy_84,0.1e1),l_fy_84,Sub<real>(l_fy_84,0.1e1),Sub<real>(l_fy_84,0.2e1)};
      l_fx_86 = Index<real2,0>(l_f_75);
      l_a_87 = <real4>{Add<real>(l_fx_86,0.1e1),l_fx_86,Sub<real>(l_fx_86,0.1e1),Sub<real>(l_fx_86,0.2e1)};
      l_hx_88 = Add<real4>(l_a0_66,Mul<real4>(l_a_87,Add<real4>(l_a1_67,Mul<real4>(l_a_87,Add<real4>(l_a2_68,Mul<real4>(l_a_87,l_a3_69))))));
      l__t_89 = Sub<real>(Dot<4>(Add<real4>(l_a0_66,Mul<real4>(l_a_65,Add<real4>(l_a1_67,Mul<real4>(l_a_65,Add<real4>(l_a2_68,Mul<real4>(l_a_65,l_a3_69)))))),<real4>{Dot<4>(l_v0_60,l_hx_72),Dot<4>(l_v1_61,l_hx_72),Dot<4>(l_v2_62,l_hx_72),Dot<4>(l_v3_63,l_hx_72)}),Dot<4>(Add<real4>(l_a0_66,Mul<real4>(l_a_85,Add<real4>(l_a1_67,Mul<real4>(l_a_85,Add<real4>(l_a2_68,Mul<real4>(l_a_85,l_a3_69)))))),<real4>{Dot<4>(l_v0_80,l_hx_88),Dot<4>(l_v1_81,l_hx_88),Dot<4>(l_v2_82,l_hx_88),Dot<4>(l_v3_83,l_hx_88)}));
      l_score_90 = Add<real>(l_score_50,Mul<real>(l__t_89,l__t_89));
      l_score_91 = l_score_90;
    } else {
      l_score_91 = l_score_50;
    }
    l_x_92 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v02),Dot<2>(l_r1_8,::v02)},l__t_9));
    if (Inside<IMAGE2D<float>,2>(l_x_92,::_t)) {
      l__t_93 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v02),::_t);
      l__t_94 = l__t_93;
    } else {
      l__t_94 = false;
    }
    if (l__t_94) {
      l_nd_95 = Floor<2>(l_x_92);
      l_f_96 = Sub<real2>(l_x_92,l_nd_95);
      l_n_97 = RealToInt<2>(l_nd_95);
      l_ix_98 = Add<int>(-1,Index<int{2},0>(l_n_97));
      l_t2_99 = Index<int{2},1>(l_n_97);
      l_imgBaseAddr_100 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_101 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_100,Add<int>(l_ix_98,Mul<int>(21,Add<int>(-1,l_t2_99)))));
      l_v1_102 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_100,Add<int>(l_ix_98,Mul<int>(21,Add<int>(0,l_t2_99)))));
      l_v2_103 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_100,Add<int>(l_ix_98,Mul<int>(21,Add<int>(1,l_t2_99)))));
      l_v3_104 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_100,Add<int>(l_ix_98,Mul<int>(21,Add<int>(2,l_t2_99)))));
      l_fy_105 = Index<real2,1>(l_f_96);
      l_a_106 = <real4>{Add<real>(l_fy_105,0.1e1),l_fy_105,Sub<real>(l_fy_105,0.1e1),Sub<real>(l_fy_105,0.2e1)};
      l_a0_107 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_108 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_109 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_110 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_111 = Index<real2,0>(l_f_96);
      l_a_112 = <real4>{Add<real>(l_fx_111,0.1e1),l_fx_111,Sub<real>(l_fx_111,0.1e1),Sub<real>(l_fx_111,0.2e1)};
      l_hx_113 = Add<real4>(l_a0_107,Mul<real4>(l_a_112,Add<real4>(l_a1_108,Mul<real4>(l_a_112,Add<real4>(l_a2_109,Mul<real4>(l_a_112,l_a3_110))))));
      l_x_114 = PosToImgSpace<IMAGE2D<int>>(::_t,::v02);
      l_nd_115 = Floor<2>(l_x_114);
      l_f_116 = Sub<real2>(l_x_114,l_nd_115);
      l_n_117 = RealToInt<2>(l_nd_115);
      l_ix_118 = Add<int>(-1,Index<int{2},0>(l_n_117));
      l_t2_119 = Index<int{2},1>(l_n_117);
      l_imgBaseAddr_120 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_121 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_120,Add<int>(l_ix_118,Mul<int>(21,Add<int>(-1,l_t2_119)))));
      l_v1_122 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_120,Add<int>(l_ix_118,Mul<int>(21,Add<int>(0,l_t2_119)))));
      l_v2_123 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_120,Add<int>(l_ix_118,Mul<int>(21,Add<int>(1,l_t2_119)))));
      l_v3_124 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_120,Add<int>(l_ix_118,Mul<int>(21,Add<int>(2,l_t2_119)))));
      l_fy_125 = Index<real2,1>(l_f_116);
      l_a_126 = <real4>{Add<real>(l_fy_125,0.1e1),l_fy_125,Sub<real>(l_fy_125,0.1e1),Sub<real>(l_fy_125,0.2e1)};
      l_fx_127 = Index<real2,0>(l_f_116);
      l_a_128 = <real4>{Add<real>(l_fx_127,0.1e1),l_fx_127,Sub<real>(l_fx_127,0.1e1),Sub<real>(l_fx_127,0.2e1)};
      l_hx_129 = Add<real4>(l_a0_107,Mul<real4>(l_a_128,Add<real4>(l_a1_108,Mul<real4>(l_a_128,Add<real4>(l_a2_109,Mul<real4>(l_a_128,l_a3_110))))));
      l__t_130 = Sub<real>(Dot<4>(Add<real4>(l_a0_107,Mul<real4>(l_a_106,Add<real4>(l_a1_108,Mul<real4>(l_a_106,Add<real4>(l_a2_109,Mul<real4>(l_a_106,l_a3_110)))))),<real4>{Dot<4>(l_v0_101,l_hx_113),Dot<4>(l_v1_102,l_hx_113),Dot<4>(l_v2_103,l_hx_113),Dot<4>(l_v3_104,l_hx_113)}),Dot<4>(Add<real4>(l_a0_107,Mul<real4>(l_a_126,Add<real4>(l_a1_108,Mul<real4>(l_a_126,Add<real4>(l_a2_109,Mul<real4>(l_a_126,l_a3_110)))))),<real4>{Dot<4>(l_v0_121,l_hx_129),Dot<4>(l_v1_122,l_hx_129),Dot<4>(l_v2_123,l_hx_129),Dot<4>(l_v3_124,l_hx_129)}));
      l_score_131 = Add<real>(l_score_91,Mul<real>(l__t_130,l__t_130));
      l_score_132 = l_score_131;
    } else {
      l_score_132 = l_score_91;
    }
    l_x_133 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v03),Dot<2>(l_r1_8,::v03)},l__t_9));
    if (Inside<IMAGE2D<float>,2>(l_x_133,::_t)) {
      l__t_134 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v03),::_t);
      l__t_135 = l__t_134;
    } else {
      l__t_135 = false;
    }
    if (l__t_135) {
      l_nd_136 = Floor<2>(l_x_133);
      l_f_137 = Sub<real2>(l_x_133,l_nd_136);
      l_n_138 = RealToInt<2>(l_nd_136);
      l_ix_139 = Add<int>(-1,Index<int{2},0>(l_n_138));
      l_t2_140 = Index<int{2},1>(l_n_138);
      l_imgBaseAddr_141 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_142 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_141,Add<int>(l_ix_139,Mul<int>(21,Add<int>(-1,l_t2_140)))));
      l_v1_143 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_141,Add<int>(l_ix_139,Mul<int>(21,Add<int>(0,l_t2_140)))));
      l_v2_144 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_141,Add<int>(l_ix_139,Mul<int>(21,Add<int>(1,l_t2_140)))));
      l_v3_145 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_141,Add<int>(l_ix_139,Mul<int>(21,Add<int>(2,l_t2_140)))));
      l_fy_146 = Index<real2,1>(l_f_137);
      l_a_147 = <real4>{Add<real>(l_fy_146,0.1e1),l_fy_146,Sub<real>(l_fy_146,0.1e1),Sub<real>(l_fy_146,0.2e1)};
      l_a0_148 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_149 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_150 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_151 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_152 = Index<real2,0>(l_f_137);
      l_a_153 = <real4>{Add<real>(l_fx_152,0.1e1),l_fx_152,Sub<real>(l_fx_152,0.1e1),Sub<real>(l_fx_152,0.2e1)};
      l_hx_154 = Add<real4>(l_a0_148,Mul<real4>(l_a_153,Add<real4>(l_a1_149,Mul<real4>(l_a_153,Add<real4>(l_a2_150,Mul<real4>(l_a_153,l_a3_151))))));
      l_x_155 = PosToImgSpace<IMAGE2D<int>>(::_t,::v03);
      l_nd_156 = Floor<2>(l_x_155);
      l_f_157 = Sub<real2>(l_x_155,l_nd_156);
      l_n_158 = RealToInt<2>(l_nd_156);
      l_ix_159 = Add<int>(-1,Index<int{2},0>(l_n_158));
      l_t2_160 = Index<int{2},1>(l_n_158);
      l_imgBaseAddr_161 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_162 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_161,Add<int>(l_ix_159,Mul<int>(21,Add<int>(-1,l_t2_160)))));
      l_v1_163 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_161,Add<int>(l_ix_159,Mul<int>(21,Add<int>(0,l_t2_160)))));
      l_v2_164 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_161,Add<int>(l_ix_159,Mul<int>(21,Add<int>(1,l_t2_160)))));
      l_v3_165 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_161,Add<int>(l_ix_159,Mul<int>(21,Add<int>(2,l_t2_160)))));
      l_fy_166 = Index<real2,1>(l_f_157);
      l_a_167 = <real4>{Add<real>(l_fy_166,0.1e1),l_fy_166,Sub<real>(l_fy_166,0.1e1),Sub<real>(l_fy_166,0.2e1)};
      l_fx_168 = Index<real2,0>(l_f_157);
      l_a_169 = <real4>{Add<real>(l_fx_168,0.1e1),l_fx_168,Sub<real>(l_fx_168,0.1e1),Sub<real>(l_fx_168,0.2e1)};
      l_hx_170 = Add<real4>(l_a0_148,Mul<real4>(l_a_169,Add<real4>(l_a1_149,Mul<real4>(l_a_169,Add<real4>(l_a2_150,Mul<real4>(l_a_169,l_a3_151))))));
      l__t_171 = Sub<real>(Dot<4>(Add<real4>(l_a0_148,Mul<real4>(l_a_147,Add<real4>(l_a1_149,Mul<real4>(l_a_147,Add<real4>(l_a2_150,Mul<real4>(l_a_147,l_a3_151)))))),<real4>{Dot<4>(l_v0_142,l_hx_154),Dot<4>(l_v1_143,l_hx_154),Dot<4>(l_v2_144,l_hx_154),Dot<4>(l_v3_145,l_hx_154)}),Dot<4>(Add<real4>(l_a0_148,Mul<real4>(l_a_167,Add<real4>(l_a1_149,Mul<real4>(l_a_167,Add<real4>(l_a2_150,Mul<real4>(l_a_167,l_a3_151)))))),<real4>{Dot<4>(l_v0_162,l_hx_170),Dot<4>(l_v1_163,l_hx_170),Dot<4>(l_v2_164,l_hx_170),Dot<4>(l_v3_165,l_hx_170)}));
      l_score_172 = Add<real>(l_score_132,Mul<real>(l__t_171,l__t_171));
      l_score_173 = l_score_172;
    } else {
      l_score_173 = l_score_132;
    }
    l_pos_174 = Add<real2>(<real2>{Dot<2>(l_r0_7,::v04),Dot<2>(l_r1_8,::v04)},l__t_9);
    l_x_175 = PosToImgSpace<IMAGE2D<float>>(::_t,l_pos_174);
    if (Inside<IMAGE2D<float>,2>(l_x_175,::_t)) {
      l__t_176 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v04),::_t);
      l__t_177 = l__t_176;
    } else {
      l__t_177 = false;
    }
    if (l__t_177) {
      l_nd_178 = Floor<2>(l_x_175);
      l_f_179 = Sub<real2>(l_x_175,l_nd_178);
      l_n_180 = RealToInt<2>(l_nd_178);
      l_ix_181 = Add<int>(-1,Index<int{2},0>(l_n_180));
      l_t2_182 = Index<int{2},1>(l_n_180);
      l_imgBaseAddr_183 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_184 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_183,Add<int>(l_ix_181,Mul<int>(21,Add<int>(-1,l_t2_182)))));
      l_v1_185 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_183,Add<int>(l_ix_181,Mul<int>(21,Add<int>(0,l_t2_182)))));
      l_v2_186 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_183,Add<int>(l_ix_181,Mul<int>(21,Add<int>(1,l_t2_182)))));
      l_v3_187 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_183,Add<int>(l_ix_181,Mul<int>(21,Add<int>(2,l_t2_182)))));
      l_fy_188 = Index<real2,1>(l_f_179);
      l_a_189 = <real4>{Add<real>(l_fy_188,0.1e1),l_fy_188,Sub<real>(l_fy_188,0.1e1),Sub<real>(l_fy_188,0.2e1)};
      l_a0_190 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_191 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_192 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_193 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_194 = Index<real2,0>(l_f_179);
      l_a_195 = <real4>{Add<real>(l_fx_194,0.1e1),l_fx_194,Sub<real>(l_fx_194,0.1e1),Sub<real>(l_fx_194,0.2e1)};
      l_hx_196 = Add<real4>(l_a0_190,Mul<real4>(l_a_195,Add<real4>(l_a1_191,Mul<real4>(l_a_195,Add<real4>(l_a2_192,Mul<real4>(l_a_195,l_a3_193))))));
      l_x_197 = PosToImgSpace<IMAGE2D<int>>(::_t,::v04);
      l_nd_198 = Floor<2>(l_x_197);
      l_f_199 = Sub<real2>(l_x_197,l_nd_198);
      l_n_200 = RealToInt<2>(l_nd_198);
      l_ix_201 = Add<int>(-1,Index<int{2},0>(l_n_200));
      l_t2_202 = Index<int{2},1>(l_n_200);
      l_imgBaseAddr_203 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_204 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_203,Add<int>(l_ix_201,Mul<int>(21,Add<int>(-1,l_t2_202)))));
      l_v1_205 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_203,Add<int>(l_ix_201,Mul<int>(21,Add<int>(0,l_t2_202)))));
      l_v2_206 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_203,Add<int>(l_ix_201,Mul<int>(21,Add<int>(1,l_t2_202)))));
      l_v3_207 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_203,Add<int>(l_ix_201,Mul<int>(21,Add<int>(2,l_t2_202)))));
      l_fy_208 = Index<real2,1>(l_f_199);
      l_a_209 = <real4>{Add<real>(l_fy_208,0.1e1),l_fy_208,Sub<real>(l_fy_208,0.1e1),Sub<real>(l_fy_208,0.2e1)};
      l_fx_210 = Index<real2,0>(l_f_199);
      l_a_211 = <real4>{Add<real>(l_fx_210,0.1e1),l_fx_210,Sub<real>(l_fx_210,0.1e1),Sub<real>(l_fx_210,0.2e1)};
      l_hx_212 = Add<real4>(l_a0_190,Mul<real4>(l_a_211,Add<real4>(l_a1_191,Mul<real4>(l_a_211,Add<real4>(l_a2_192,Mul<real4>(l_a_211,l_a3_193))))));
      l__t_213 = Sub<real>(Dot<4>(Add<real4>(l_a0_190,Mul<real4>(l_a_189,Add<real4>(l_a1_191,Mul<real4>(l_a_189,Add<real4>(l_a2_192,Mul<real4>(l_a_189,l_a3_193)))))),<real4>{Dot<4>(l_v0_184,l_hx_196),Dot<4>(l_v1_185,l_hx_196),Dot<4>(l_v2_186,l_hx_196),Dot<4>(l_v3_187,l_hx_196)}),Dot<4>(Add<real4>(l_a0_190,Mul<real4>(l_a_209,Add<real4>(l_a1_191,Mul<real4>(l_a_209,Add<real4>(l_a2_192,Mul<real4>(l_a_209,l_a3_193)))))),<real4>{Dot<4>(l_v0_204,l_hx_212),Dot<4>(l_v1_205,l_hx_212),Dot<4>(l_v2_206,l_hx_212),Dot<4>(l_v3_207,l_hx_212)}));
      l_score_214 = Add<real>(l_score_173,Mul<real>(l__t_213,l__t_213));
      l_score_215 = l_score_214;
    } else {
      l_score_215 = l_score_173;
    }
    self.score = l_score_215;
    self.r0 = l_r0_7;
    self.r1 = l_r1_8;
    self.pos = l_pos_174;
    stabilize;
  }
  Stabilize () {
    self.score = self.score;
    self.r0 = self.r0;
    self.r1 = self.r1;
    self.pos = self.pos;
    exit();
  }
}
//***** INITIALLY *****
  ARRAY {
    for i_i_219 = 0 .. 60
      for i_j_218 = 0 .. 60
        for i_k_217 = 0 .. 60
          {
            new R(i_i_219,i_j_218,i_k_217);
          }
  }
/usr/bin/clang -m64 -c -Wformat -Wreturn-type -Wuninitialized -O3 -DNDEBUG -I/Users/jhr/Work/Diderot/vis12/src/include -I/usr/local/teem/include square_score-5.c
/usr/bin/ld -r -o /var/tmp/tmp.0.8ixWam.o square_score-5.o /Users/jhr/Work/Diderot/vis12/lib/diderot-rt-c-f.o
rename /var/tmp/tmp.0.8ixWam.o to square_score-5.o
                                Phase                                  Exclusive    Total  
  compiler ............................................................   0.000     0.816
    front end .........................................................   0.013     0.050
      parser ..........................................................   0.013     0.013
      typechecker .....................................................   0.003     0.003
      simplify ........................................................   0.020     0.020
    translate .........................................................   0.004     0.004
    High IL optimization ..............................................   0.035     0.041
      High IL value numbering .........................................   0.005     0.005
      High IL normalization ...........................................   0.001     0.001
      High IL checking ................................................   0.000     0.000
    Mid IL optimization ...............................................   0.032     0.347
      Mid IL contraction ..............................................   0.000     0.000
      Mid IL value numbering ..........................................   0.016     0.016
      Mid IL checking .................................................   0.299     0.299
    Low IL optimization ...............................................   0.024     0.196
      Low IL value numbering ..........................................   0.023     0.023
      Low IL checking .................................................   0.149     0.149
    code generation ...................................................   0.018     0.178
      Low IL to Tree IL ...............................................   0.021     0.021
      C compiler ......................................................   0.140     0.140

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0