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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1817 - (download) (annotate)
Tue Apr 10 16:12:03 2012 UTC (7 years, 7 months ago) by nseltzer
File size: 563224 byte(s)
Performance issue examples.
/* 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 = [0.5e0, 0.5e0];
vec2 v02 = [0.5e0, 0.0];
vec2 v03 = [0.5e0, unary -<$[]> (0.5e0)];
vec2 v04 = [0.0, 0.5e0];
vec2 v05 = [0.0, 0.0];
vec2 v06 = [0.0, unary -<$[]> (0.5e0)];
vec2 v07 = [unary -<$[]> (0.5e0), 0.5e0];
vec2 v08 = [unary -<$[]> (0.5e0), 0.0];
vec2 v09 = [unary -<$[]> (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))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v05), •<$[2]; $[2]; $[]> (r1, v05)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v05, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v05)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v05))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v06), •<$[2]; $[2]; $[]> (r1, v06)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v06, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v06)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v06))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v07), •<$[2]; $[2]; $[]> (r1, v07)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v07, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v07)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v07))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v08), •<$[2]; $[2]; $[]> (r1, v08)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v08, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v08)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v08))));
      }
    pos = +<$[2]> ([•<$[2]; $[2]; $[]> (r0, v09), •<$[2]; $[2]; $[]> (r1, v09)], [t[0], t[1]]);
    if inside<#2; %2; $[]> (v09, T) if inside<#2; %2; $[]> (pos, F) else false {
    score = +<$[]> (score, * (-<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v09)), -<$[]> (@<#2; %2; $[]> (F, pos), @<#2; %2; $[]> (T, v09))));
      }
    stabilize;
    }
  
  Stabilize
  {
  }
  
}
/* Program end */
/* Simplified Program start */
{
  field#2(2)[] T00A3;
  field#2(2)[] F00AC;
  vec2 v0000B5;
  vec2 v0100B6;
  vec2 v0200B7;
  vec2 v0300B8;
  vec2 v0400BA;
  vec2 v0500BB;
  vec2 v0600BC;
  vec2 v0700BE;
  vec2 v0800C0;
  vec2 v0900C2;
  _t020E = bspln30095 ();
  _t020F = "square-template.nrrd";
  _t0210 = load0080<%2; $[]> (_t020F);
  T00A3 = ⊛003A<#2; %2; $[]> (_t020E, _t0210);
  _t0211 = bspln30095 ();
  _t0212 = "square-rotate.nrrd";
  _t0213 = load0080<%2; $[]> (_t0212);
  F00AC = ⊛003A<#2; %2; $[]> (_t0211, _t0213);
  _t0214 = 0.0;
  _t0215 = 0.0;
  v0000B5 = [_t0214, _t0215];
  _t0216 = 0.5e0;
  _t0217 = 0.5e0;
  v0100B6 = [_t0216, _t0217];
  _t0218 = 0.5e0;
  _t0219 = 0.0;
  v0200B7 = [_t0218, _t0219];
  _t021A = 0.5e0;
  _t021B = 0.5e0;
  _t021C = unary -004D<$[]> (_t021B);
  v0300B8 = [_t021A, _t021C];
  _t021D = 0.0;
  _t021E = 0.5e0;
  v0400BA = [_t021D, _t021E];
  _t021F = 0.0;
  _t0220 = 0.0;
  v0500BB = [_t021F, _t0220];
  _t0221 = 0.0;
  _t0222 = 0.5e0;
  _t0223 = unary -004D<$[]> (_t0222);
  v0600BC = [_t0221, _t0223];
  _t0224 = 0.5e0;
  _t0225 = unary -004D<$[]> (_t0224);
  _t0226 = 0.5e0;
  v0700BE = [_t0225, _t0226];
  _t0227 = 0.5e0;
  _t0228 = unary -004D<$[]> (_t0227);
  _t0229 = 0.0;
  v0800C0 = [_t0228, _t0229];
  _t022A = 0.5e0;
  _t022B = unary -004D<$[]> (_t022A);
  _t022C = 0.5e0;
  _t022D = unary -004D<$[]> (_t022C);
  v0900C2 = [_t022B, _t022D];
}
Array
  {
    _t031A = 0;
    _t031B = 60;
    _t031C = 0;
    _t031D = 60;
    _t031E = 0;
    _t031F = 60;
  }
  for int i020B = _t031A .. _t031B
    for int j020C = _t031C .. _t031D
      for int k020D = _t031E .. _t031F
        { }
        new R(i020B, j020C, k020D);
strand R (int i00C7, int j00C6, int k00C5)
{{
    vec3 t00C8;
    output real score00CC;
    vec2 r000CD;
    vec2 r100CE;
    vec2 pos00CF;
    _t022E = $i2r009B (i00C7);
    _t022F = 0.60e2;
    _t0230 = /002A (_t022E, _t022F);
    _t0231 = 0.5e0;
    _t0232 = -0016<$[]> (_t0230, _t0231);
    _t0233 = $i2r009B (j00C6);
    _t0234 = 0.60e2;
    _t0235 = /002A (_t0233, _t0234);
    _t0236 = 0.5e0;
    _t0237 = -0016<$[]> (_t0235, _t0236);
    _t0238 = $i2r009B (k00C5);
    _t0239 = 0.60e2;
    _t023A = /002A (_t0238, _t0239);
    _t023B = 0.5e0;
    _t023C = -0016<$[]> (_t023A, _t023B);
    t00C8 = [_t0232, _t0237, _t023C];
    score00CC = 0.0;
    _t023D = 0.0;
    _t023E = 0.0;
    r000CD = [_t023D, _t023E];
    _t023F = 0.0;
    _t0240 = 0.0;
    r100CE = [_t023F, _t0240];
    _t0241 = 0.0;
    _t0242 = 0.0;
    pos00CF = [_t0241, _t0242];
  }
  Update
  {
    _t0243 = 0.1e1;
    _t0244 = 0.2e1;
    _t0245 = 2;
    _t0246 = t00C8[_t0245];
    _t0247 = *001C (_t0244, _t0246);
    _t0248 = 2;
    _t0249 = t00C8[_t0248];
    _t024A = *001C (_t0247, _t0249);
    _t024B = -0016<$[]> (_t0243, _t024A);
    _t024C = 0.2e1;
    _t024D = unary -004D<$[]> (_t024C);
    _t024E = 0.1e1;
    _t024F = 2;
    _t0250 = t00C8[_t024F];
    _t0251 = 2;
    _t0252 = t00C8[_t0251];
    _t0253 = *001C (_t0250, _t0252);
    _t0254 = -0016<$[]> (_t024E, _t0253);
    _t0255 = sqrt0091 (_t0254);
    _t0256 = *001C (_t024D, _t0255);
    _t0257 = 2;
    _t0258 = t00C8[_t0257];
    _t0259 = *001C (_t0256, _t0258);
    r000CD = [_t024B, _t0259];
    _t025A = 0.2e1;
    _t025B = 0.1e1;
    _t025C = 2;
    _t025D = t00C8[_t025C];
    _t025E = 2;
    _t025F = t00C8[_t025E];
    _t0260 = *001C (_t025D, _t025F);
    _t0261 = -0016<$[]> (_t025B, _t0260);
    _t0262 = sqrt0091 (_t0261);
    _t0263 = *001C (_t025A, _t0262);
    _t0264 = 2;
    _t0265 = t00C8[_t0264];
    _t0266 = *001C (_t0263, _t0265);
    _t0267 = 0.1e1;
    _t0268 = 0.2e1;
    _t0269 = 2;
    _t026A = t00C8[_t0269];
    _t026B = *001C (_t0268, _t026A);
    _t026C = 2;
    _t026D = t00C8[_t026C];
    _t026E = *001C (_t026B, _t026D);
    _t026F = -0016<$[]> (_t0267, _t026E);
    r100CE = [_t0266, _t026F];
    _t0270 = •0079<$[2]; $[2]; $[]> (r000CD, v0000B5);
    _t0271 = •0079<$[2]; $[2]; $[]> (r100CE, v0000B5);
    _t0272 = [_t0270, _t0271];
    _t0273 = 0;
    _t0274 = t00C8[_t0273];
    _t0275 = 1;
    _t0276 = t00C8[_t0275];
    _t0277 = [_t0274, _t0276];
    pos00CF = +000F<$[2]> (_t0272, _t0277);
    bool _t0278;
    _t0279 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t0279
      _t0278 = inside007D<#2; %2; $[]> (v0000B5, T00A3);
    else
      _t0278 = false;
    if _t0278 {
      _t027A = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t027B = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t027C = -0016<$[]> (_t027A, _t027B);
      _t027D = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t027E = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t027F = -0016<$[]> (_t027D, _t027E);
      _t0280 = *001C (_t027C, _t027F);
      score00CC = +000F<$[]> (score00CC, _t0280);
    }
    _t0281 = •0079<$[2]; $[2]; $[]> (r000CD, v0100B6);
    _t0282 = •0079<$[2]; $[2]; $[]> (r100CE, v0100B6);
    _t0283 = [_t0281, _t0282];
    _t0284 = 0;
    _t0285 = t00C8[_t0284];
    _t0286 = 1;
    _t0287 = t00C8[_t0286];
    _t0288 = [_t0285, _t0287];
    pos00CF = +000F<$[2]> (_t0283, _t0288);
    bool _t0289;
    _t028A = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t028A
      _t0289 = inside007D<#2; %2; $[]> (v0100B6, T00A3);
    else
      _t0289 = false;
    if _t0289 {
      _t028B = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t028C = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t028D = -0016<$[]> (_t028B, _t028C);
      _t028E = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t028F = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t0290 = -0016<$[]> (_t028E, _t028F);
      _t0291 = *001C (_t028D, _t0290);
      score00CC = +000F<$[]> (score00CC, _t0291);
    }
    _t0292 = •0079<$[2]; $[2]; $[]> (r000CD, v0200B7);
    _t0293 = •0079<$[2]; $[2]; $[]> (r100CE, v0200B7);
    _t0294 = [_t0292, _t0293];
    _t0295 = 0;
    _t0296 = t00C8[_t0295];
    _t0297 = 1;
    _t0298 = t00C8[_t0297];
    _t0299 = [_t0296, _t0298];
    pos00CF = +000F<$[2]> (_t0294, _t0299);
    bool _t029A;
    _t029B = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t029B
      _t029A = inside007D<#2; %2; $[]> (v0200B7, T00A3);
    else
      _t029A = false;
    if _t029A {
      _t029C = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t029D = @0060<#2; %2; $[]> (T00A3, v0200B7);
      _t029E = -0016<$[]> (_t029C, _t029D);
      _t029F = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02A0 = @0060<#2; %2; $[]> (T00A3, v0200B7);
      _t02A1 = -0016<$[]> (_t029F, _t02A0);
      _t02A2 = *001C (_t029E, _t02A1);
      score00CC = +000F<$[]> (score00CC, _t02A2);
    }
    _t02A3 = •0079<$[2]; $[2]; $[]> (r000CD, v0300B8);
    _t02A4 = •0079<$[2]; $[2]; $[]> (r100CE, v0300B8);
    _t02A5 = [_t02A3, _t02A4];
    _t02A6 = 0;
    _t02A7 = t00C8[_t02A6];
    _t02A8 = 1;
    _t02A9 = t00C8[_t02A8];
    _t02AA = [_t02A7, _t02A9];
    pos00CF = +000F<$[2]> (_t02A5, _t02AA);
    bool _t02AB;
    _t02AC = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02AC
      _t02AB = inside007D<#2; %2; $[]> (v0300B8, T00A3);
    else
      _t02AB = false;
    if _t02AB {
      _t02AD = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02AE = @0060<#2; %2; $[]> (T00A3, v0300B8);
      _t02AF = -0016<$[]> (_t02AD, _t02AE);
      _t02B0 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02B1 = @0060<#2; %2; $[]> (T00A3, v0300B8);
      _t02B2 = -0016<$[]> (_t02B0, _t02B1);
      _t02B3 = *001C (_t02AF, _t02B2);
      score00CC = +000F<$[]> (score00CC, _t02B3);
    }
    _t02B4 = •0079<$[2]; $[2]; $[]> (r000CD, v0400BA);
    _t02B5 = •0079<$[2]; $[2]; $[]> (r100CE, v0400BA);
    _t02B6 = [_t02B4, _t02B5];
    _t02B7 = 0;
    _t02B8 = t00C8[_t02B7];
    _t02B9 = 1;
    _t02BA = t00C8[_t02B9];
    _t02BB = [_t02B8, _t02BA];
    pos00CF = +000F<$[2]> (_t02B6, _t02BB);
    bool _t02BC;
    _t02BD = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02BD
      _t02BC = inside007D<#2; %2; $[]> (v0400BA, T00A3);
    else
      _t02BC = false;
    if _t02BC {
      _t02BE = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02BF = @0060<#2; %2; $[]> (T00A3, v0400BA);
      _t02C0 = -0016<$[]> (_t02BE, _t02BF);
      _t02C1 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02C2 = @0060<#2; %2; $[]> (T00A3, v0400BA);
      _t02C3 = -0016<$[]> (_t02C1, _t02C2);
      _t02C4 = *001C (_t02C0, _t02C3);
      score00CC = +000F<$[]> (score00CC, _t02C4);
    }
    _t02C5 = •0079<$[2]; $[2]; $[]> (r000CD, v0500BB);
    _t02C6 = •0079<$[2]; $[2]; $[]> (r100CE, v0500BB);
    _t02C7 = [_t02C5, _t02C6];
    _t02C8 = 0;
    _t02C9 = t00C8[_t02C8];
    _t02CA = 1;
    _t02CB = t00C8[_t02CA];
    _t02CC = [_t02C9, _t02CB];
    pos00CF = +000F<$[2]> (_t02C7, _t02CC);
    bool _t02CD;
    _t02CE = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02CE
      _t02CD = inside007D<#2; %2; $[]> (v0500BB, T00A3);
    else
      _t02CD = false;
    if _t02CD {
      _t02CF = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02D0 = @0060<#2; %2; $[]> (T00A3, v0500BB);
      _t02D1 = -0016<$[]> (_t02CF, _t02D0);
      _t02D2 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02D3 = @0060<#2; %2; $[]> (T00A3, v0500BB);
      _t02D4 = -0016<$[]> (_t02D2, _t02D3);
      _t02D5 = *001C (_t02D1, _t02D4);
      score00CC = +000F<$[]> (score00CC, _t02D5);
    }
    _t02D6 = •0079<$[2]; $[2]; $[]> (r000CD, v0600BC);
    _t02D7 = •0079<$[2]; $[2]; $[]> (r100CE, v0600BC);
    _t02D8 = [_t02D6, _t02D7];
    _t02D9 = 0;
    _t02DA = t00C8[_t02D9];
    _t02DB = 1;
    _t02DC = t00C8[_t02DB];
    _t02DD = [_t02DA, _t02DC];
    pos00CF = +000F<$[2]> (_t02D8, _t02DD);
    bool _t02DE;
    _t02DF = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02DF
      _t02DE = inside007D<#2; %2; $[]> (v0600BC, T00A3);
    else
      _t02DE = false;
    if _t02DE {
      _t02E0 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02E1 = @0060<#2; %2; $[]> (T00A3, v0600BC);
      _t02E2 = -0016<$[]> (_t02E0, _t02E1);
      _t02E3 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02E4 = @0060<#2; %2; $[]> (T00A3, v0600BC);
      _t02E5 = -0016<$[]> (_t02E3, _t02E4);
      _t02E6 = *001C (_t02E2, _t02E5);
      score00CC = +000F<$[]> (score00CC, _t02E6);
    }
    _t02E7 = •0079<$[2]; $[2]; $[]> (r000CD, v0700BE);
    _t02E8 = •0079<$[2]; $[2]; $[]> (r100CE, v0700BE);
    _t02E9 = [_t02E7, _t02E8];
    _t02EA = 0;
    _t02EB = t00C8[_t02EA];
    _t02EC = 1;
    _t02ED = t00C8[_t02EC];
    _t02EE = [_t02EB, _t02ED];
    pos00CF = +000F<$[2]> (_t02E9, _t02EE);
    bool _t02EF;
    _t02F0 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02F0
      _t02EF = inside007D<#2; %2; $[]> (v0700BE, T00A3);
    else
      _t02EF = false;
    if _t02EF {
      _t02F1 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02F2 = @0060<#2; %2; $[]> (T00A3, v0700BE);
      _t02F3 = -0016<$[]> (_t02F1, _t02F2);
      _t02F4 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02F5 = @0060<#2; %2; $[]> (T00A3, v0700BE);
      _t02F6 = -0016<$[]> (_t02F4, _t02F5);
      _t02F7 = *001C (_t02F3, _t02F6);
      score00CC = +000F<$[]> (score00CC, _t02F7);
    }
    _t02F8 = •0079<$[2]; $[2]; $[]> (r000CD, v0800C0);
    _t02F9 = •0079<$[2]; $[2]; $[]> (r100CE, v0800C0);
    _t02FA = [_t02F8, _t02F9];
    _t02FB = 0;
    _t02FC = t00C8[_t02FB];
    _t02FD = 1;
    _t02FE = t00C8[_t02FD];
    _t02FF = [_t02FC, _t02FE];
    pos00CF = +000F<$[2]> (_t02FA, _t02FF);
    bool _t0300;
    _t0301 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t0301
      _t0300 = inside007D<#2; %2; $[]> (v0800C0, T00A3);
    else
      _t0300 = false;
    if _t0300 {
      _t0302 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0303 = @0060<#2; %2; $[]> (T00A3, v0800C0);
      _t0304 = -0016<$[]> (_t0302, _t0303);
      _t0305 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0306 = @0060<#2; %2; $[]> (T00A3, v0800C0);
      _t0307 = -0016<$[]> (_t0305, _t0306);
      _t0308 = *001C (_t0304, _t0307);
      score00CC = +000F<$[]> (score00CC, _t0308);
    }
    _t0309 = •0079<$[2]; $[2]; $[]> (r000CD, v0900C2);
    _t030A = •0079<$[2]; $[2]; $[]> (r100CE, v0900C2);
    _t030B = [_t0309, _t030A];
    _t030C = 0;
    _t030D = t00C8[_t030C];
    _t030E = 1;
    _t030F = t00C8[_t030E];
    _t0310 = [_t030D, _t030F];
    pos00CF = +000F<$[2]> (_t030B, _t0310);
    bool _t0311;
    _t0312 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t0312
      _t0311 = inside007D<#2; %2; $[]> (v0900C2, T00A3);
    else
      _t0311 = false;
    if _t0311 {
      _t0313 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0314 = @0060<#2; %2; $[]> (T00A3, v0900C2);
      _t0315 = -0016<$[]> (_t0313, _t0314);
      _t0316 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0317 = @0060<#2; %2; $[]> (T00A3, v0900C2);
      _t0318 = -0016<$[]> (_t0316, _t0317);
      _t0319 = *001C (_t0315, _t0318);
      score00CC = +000F<$[]> (score00CC, _t0319);
    }
    stabilize;
  }
  Stabilize
  { }
}
/* Program end */
**** static variables:  _t020F _t0210 _t0212 _t0213
eval assignment: _t020F = "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: _t0210 = IMAGE2D<int>
eval assignment: _t0212 = "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: _t0213 = IMAGE2D<float>
eval assignment: _t0214 = 0.0
eval assignment: _t0215 = 0.0
eval assignment: v0000B5 = tensor
eval assignment: _t0216 = 0.5
eval assignment: _t0217 = 0.5
eval assignment: v0100B6 = tensor
eval assignment: _t0218 = 0.5
eval assignment: _t0219 = 0.0
eval assignment: v0200B7 = tensor
eval assignment: _t021A = 0.5
eval assignment: _t021B = 0.5
eval assignment: _t021D = 0.0
eval assignment: _t021E = 0.5
eval assignment: v0400BA = tensor
eval assignment: _t021F = 0.0
eval assignment: _t0220 = 0.0
eval assignment: v0500BB = tensor
eval assignment: _t0221 = 0.0
eval assignment: _t0222 = 0.5
eval assignment: _t0224 = 0.5
eval assignment: _t0226 = 0.5
eval assignment: _t0227 = 0.5
eval assignment: _t0229 = 0.0
eval assignment: _t022A = 0.5
eval assignment: _t022C = 0.5
/* Simplified Program start */
{
  field#2(2)[] T00A3;
  field#2(2)[] F00AC;
  vec2 v0000B5;
  vec2 v0100B6;
  vec2 v0200B7;
  vec2 v0300B8;
  vec2 v0400BA;
  vec2 v0500BB;
  vec2 v0600BC;
  vec2 v0700BE;
  vec2 v0800C0;
  vec2 v0900C2;
  _t020E = bspln30095 ();
  _t020F = "square-template.nrrd";
  _t0210 = load (IMAGE2D<int> ,_t020F);
  T00A3 = ⊛003A<#2; %2; $[]> (_t020E, _t0210);
  _t0211 = bspln30095 ();
  _t0212 = "square-rotate.nrrd";
  _t0213 = load (IMAGE2D<float> ,_t0212);
  F00AC = ⊛003A<#2; %2; $[]> (_t0211, _t0213);
  _t0214 = 0.0;
  _t0215 = 0.0;
  v0000B5 = [_t0214, _t0215];
  _t0216 = 0.5e0;
  _t0217 = 0.5e0;
  v0100B6 = [_t0216, _t0217];
  _t0218 = 0.5e0;
  _t0219 = 0.0;
  v0200B7 = [_t0218, _t0219];
  _t021A = 0.5e0;
  _t021B = 0.5e0;
  _t021C = unary -004D<$[]> (_t021B);
  v0300B8 = [_t021A, _t021C];
  _t021D = 0.0;
  _t021E = 0.5e0;
  v0400BA = [_t021D, _t021E];
  _t021F = 0.0;
  _t0220 = 0.0;
  v0500BB = [_t021F, _t0220];
  _t0221 = 0.0;
  _t0222 = 0.5e0;
  _t0223 = unary -004D<$[]> (_t0222);
  v0600BC = [_t0221, _t0223];
  _t0224 = 0.5e0;
  _t0225 = unary -004D<$[]> (_t0224);
  _t0226 = 0.5e0;
  v0700BE = [_t0225, _t0226];
  _t0227 = 0.5e0;
  _t0228 = unary -004D<$[]> (_t0227);
  _t0229 = 0.0;
  v0800C0 = [_t0228, _t0229];
  _t022A = 0.5e0;
  _t022B = unary -004D<$[]> (_t022A);
  _t022C = 0.5e0;
  _t022D = unary -004D<$[]> (_t022C);
  v0900C2 = [_t022B, _t022D];
}
Array
  {
    _t031A = 0;
    _t031B = 60;
    _t031C = 0;
    _t031D = 60;
    _t031E = 0;
    _t031F = 60;
  }
  for int i020B = _t031A .. _t031B
    for int j020C = _t031C .. _t031D
      for int k020D = _t031E .. _t031F
        { }
        new R(i020B, j020C, k020D);
strand R (int i00C7, int j00C6, int k00C5)
{{
    vec3 t00C8;
    output real score00CC;
    vec2 r000CD;
    vec2 r100CE;
    vec2 pos00CF;
    _t022E = $i2r009B (i00C7);
    _t022F = 0.60e2;
    _t0230 = /002A (_t022E, _t022F);
    _t0231 = 0.5e0;
    _t0232 = -0016<$[]> (_t0230, _t0231);
    _t0233 = $i2r009B (j00C6);
    _t0234 = 0.60e2;
    _t0235 = /002A (_t0233, _t0234);
    _t0236 = 0.5e0;
    _t0237 = -0016<$[]> (_t0235, _t0236);
    _t0238 = $i2r009B (k00C5);
    _t0239 = 0.60e2;
    _t023A = /002A (_t0238, _t0239);
    _t023B = 0.5e0;
    _t023C = -0016<$[]> (_t023A, _t023B);
    t00C8 = [_t0232, _t0237, _t023C];
    score00CC = 0.0;
    _t023D = 0.0;
    _t023E = 0.0;
    r000CD = [_t023D, _t023E];
    _t023F = 0.0;
    _t0240 = 0.0;
    r100CE = [_t023F, _t0240];
    _t0241 = 0.0;
    _t0242 = 0.0;
    pos00CF = [_t0241, _t0242];
  }
  Update
  {
    _t0243 = 0.1e1;
    _t0244 = 0.2e1;
    _t0245 = 2;
    _t0246 = t00C8[_t0245];
    _t0247 = *001C (_t0244, _t0246);
    _t0248 = 2;
    _t0249 = t00C8[_t0248];
    _t024A = *001C (_t0247, _t0249);
    _t024B = -0016<$[]> (_t0243, _t024A);
    _t024C = 0.2e1;
    _t024D = unary -004D<$[]> (_t024C);
    _t024E = 0.1e1;
    _t024F = 2;
    _t0250 = t00C8[_t024F];
    _t0251 = 2;
    _t0252 = t00C8[_t0251];
    _t0253 = *001C (_t0250, _t0252);
    _t0254 = -0016<$[]> (_t024E, _t0253);
    _t0255 = sqrt0091 (_t0254);
    _t0256 = *001C (_t024D, _t0255);
    _t0257 = 2;
    _t0258 = t00C8[_t0257];
    _t0259 = *001C (_t0256, _t0258);
    r000CD = [_t024B, _t0259];
    _t025A = 0.2e1;
    _t025B = 0.1e1;
    _t025C = 2;
    _t025D = t00C8[_t025C];
    _t025E = 2;
    _t025F = t00C8[_t025E];
    _t0260 = *001C (_t025D, _t025F);
    _t0261 = -0016<$[]> (_t025B, _t0260);
    _t0262 = sqrt0091 (_t0261);
    _t0263 = *001C (_t025A, _t0262);
    _t0264 = 2;
    _t0265 = t00C8[_t0264];
    _t0266 = *001C (_t0263, _t0265);
    _t0267 = 0.1e1;
    _t0268 = 0.2e1;
    _t0269 = 2;
    _t026A = t00C8[_t0269];
    _t026B = *001C (_t0268, _t026A);
    _t026C = 2;
    _t026D = t00C8[_t026C];
    _t026E = *001C (_t026B, _t026D);
    _t026F = -0016<$[]> (_t0267, _t026E);
    r100CE = [_t0266, _t026F];
    _t0270 = •0079<$[2]; $[2]; $[]> (r000CD, v0000B5);
    _t0271 = •0079<$[2]; $[2]; $[]> (r100CE, v0000B5);
    _t0272 = [_t0270, _t0271];
    _t0273 = 0;
    _t0274 = t00C8[_t0273];
    _t0275 = 1;
    _t0276 = t00C8[_t0275];
    _t0277 = [_t0274, _t0276];
    pos00CF = +000F<$[2]> (_t0272, _t0277);
    bool _t0278;
    _t0279 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t0279
      _t0278 = inside007D<#2; %2; $[]> (v0000B5, T00A3);
    else
      _t0278 = false;
    if _t0278 {
      _t027A = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t027B = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t027C = -0016<$[]> (_t027A, _t027B);
      _t027D = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t027E = @0060<#2; %2; $[]> (T00A3, v0000B5);
      _t027F = -0016<$[]> (_t027D, _t027E);
      _t0280 = *001C (_t027C, _t027F);
      score00CC = +000F<$[]> (score00CC, _t0280);
    }
    _t0281 = •0079<$[2]; $[2]; $[]> (r000CD, v0100B6);
    _t0282 = •0079<$[2]; $[2]; $[]> (r100CE, v0100B6);
    _t0283 = [_t0281, _t0282];
    _t0284 = 0;
    _t0285 = t00C8[_t0284];
    _t0286 = 1;
    _t0287 = t00C8[_t0286];
    _t0288 = [_t0285, _t0287];
    pos00CF = +000F<$[2]> (_t0283, _t0288);
    bool _t0289;
    _t028A = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t028A
      _t0289 = inside007D<#2; %2; $[]> (v0100B6, T00A3);
    else
      _t0289 = false;
    if _t0289 {
      _t028B = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t028C = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t028D = -0016<$[]> (_t028B, _t028C);
      _t028E = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t028F = @0060<#2; %2; $[]> (T00A3, v0100B6);
      _t0290 = -0016<$[]> (_t028E, _t028F);
      _t0291 = *001C (_t028D, _t0290);
      score00CC = +000F<$[]> (score00CC, _t0291);
    }
    _t0292 = •0079<$[2]; $[2]; $[]> (r000CD, v0200B7);
    _t0293 = •0079<$[2]; $[2]; $[]> (r100CE, v0200B7);
    _t0294 = [_t0292, _t0293];
    _t0295 = 0;
    _t0296 = t00C8[_t0295];
    _t0297 = 1;
    _t0298 = t00C8[_t0297];
    _t0299 = [_t0296, _t0298];
    pos00CF = +000F<$[2]> (_t0294, _t0299);
    bool _t029A;
    _t029B = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t029B
      _t029A = inside007D<#2; %2; $[]> (v0200B7, T00A3);
    else
      _t029A = false;
    if _t029A {
      _t029C = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t029D = @0060<#2; %2; $[]> (T00A3, v0200B7);
      _t029E = -0016<$[]> (_t029C, _t029D);
      _t029F = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02A0 = @0060<#2; %2; $[]> (T00A3, v0200B7);
      _t02A1 = -0016<$[]> (_t029F, _t02A0);
      _t02A2 = *001C (_t029E, _t02A1);
      score00CC = +000F<$[]> (score00CC, _t02A2);
    }
    _t02A3 = •0079<$[2]; $[2]; $[]> (r000CD, v0300B8);
    _t02A4 = •0079<$[2]; $[2]; $[]> (r100CE, v0300B8);
    _t02A5 = [_t02A3, _t02A4];
    _t02A6 = 0;
    _t02A7 = t00C8[_t02A6];
    _t02A8 = 1;
    _t02A9 = t00C8[_t02A8];
    _t02AA = [_t02A7, _t02A9];
    pos00CF = +000F<$[2]> (_t02A5, _t02AA);
    bool _t02AB;
    _t02AC = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02AC
      _t02AB = inside007D<#2; %2; $[]> (v0300B8, T00A3);
    else
      _t02AB = false;
    if _t02AB {
      _t02AD = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02AE = @0060<#2; %2; $[]> (T00A3, v0300B8);
      _t02AF = -0016<$[]> (_t02AD, _t02AE);
      _t02B0 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02B1 = @0060<#2; %2; $[]> (T00A3, v0300B8);
      _t02B2 = -0016<$[]> (_t02B0, _t02B1);
      _t02B3 = *001C (_t02AF, _t02B2);
      score00CC = +000F<$[]> (score00CC, _t02B3);
    }
    _t02B4 = •0079<$[2]; $[2]; $[]> (r000CD, v0400BA);
    _t02B5 = •0079<$[2]; $[2]; $[]> (r100CE, v0400BA);
    _t02B6 = [_t02B4, _t02B5];
    _t02B7 = 0;
    _t02B8 = t00C8[_t02B7];
    _t02B9 = 1;
    _t02BA = t00C8[_t02B9];
    _t02BB = [_t02B8, _t02BA];
    pos00CF = +000F<$[2]> (_t02B6, _t02BB);
    bool _t02BC;
    _t02BD = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02BD
      _t02BC = inside007D<#2; %2; $[]> (v0400BA, T00A3);
    else
      _t02BC = false;
    if _t02BC {
      _t02BE = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02BF = @0060<#2; %2; $[]> (T00A3, v0400BA);
      _t02C0 = -0016<$[]> (_t02BE, _t02BF);
      _t02C1 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02C2 = @0060<#2; %2; $[]> (T00A3, v0400BA);
      _t02C3 = -0016<$[]> (_t02C1, _t02C2);
      _t02C4 = *001C (_t02C0, _t02C3);
      score00CC = +000F<$[]> (score00CC, _t02C4);
    }
    _t02C5 = •0079<$[2]; $[2]; $[]> (r000CD, v0500BB);
    _t02C6 = •0079<$[2]; $[2]; $[]> (r100CE, v0500BB);
    _t02C7 = [_t02C5, _t02C6];
    _t02C8 = 0;
    _t02C9 = t00C8[_t02C8];
    _t02CA = 1;
    _t02CB = t00C8[_t02CA];
    _t02CC = [_t02C9, _t02CB];
    pos00CF = +000F<$[2]> (_t02C7, _t02CC);
    bool _t02CD;
    _t02CE = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02CE
      _t02CD = inside007D<#2; %2; $[]> (v0500BB, T00A3);
    else
      _t02CD = false;
    if _t02CD {
      _t02CF = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02D0 = @0060<#2; %2; $[]> (T00A3, v0500BB);
      _t02D1 = -0016<$[]> (_t02CF, _t02D0);
      _t02D2 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02D3 = @0060<#2; %2; $[]> (T00A3, v0500BB);
      _t02D4 = -0016<$[]> (_t02D2, _t02D3);
      _t02D5 = *001C (_t02D1, _t02D4);
      score00CC = +000F<$[]> (score00CC, _t02D5);
    }
    _t02D6 = •0079<$[2]; $[2]; $[]> (r000CD, v0600BC);
    _t02D7 = •0079<$[2]; $[2]; $[]> (r100CE, v0600BC);
    _t02D8 = [_t02D6, _t02D7];
    _t02D9 = 0;
    _t02DA = t00C8[_t02D9];
    _t02DB = 1;
    _t02DC = t00C8[_t02DB];
    _t02DD = [_t02DA, _t02DC];
    pos00CF = +000F<$[2]> (_t02D8, _t02DD);
    bool _t02DE;
    _t02DF = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02DF
      _t02DE = inside007D<#2; %2; $[]> (v0600BC, T00A3);
    else
      _t02DE = false;
    if _t02DE {
      _t02E0 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02E1 = @0060<#2; %2; $[]> (T00A3, v0600BC);
      _t02E2 = -0016<$[]> (_t02E0, _t02E1);
      _t02E3 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02E4 = @0060<#2; %2; $[]> (T00A3, v0600BC);
      _t02E5 = -0016<$[]> (_t02E3, _t02E4);
      _t02E6 = *001C (_t02E2, _t02E5);
      score00CC = +000F<$[]> (score00CC, _t02E6);
    }
    _t02E7 = •0079<$[2]; $[2]; $[]> (r000CD, v0700BE);
    _t02E8 = •0079<$[2]; $[2]; $[]> (r100CE, v0700BE);
    _t02E9 = [_t02E7, _t02E8];
    _t02EA = 0;
    _t02EB = t00C8[_t02EA];
    _t02EC = 1;
    _t02ED = t00C8[_t02EC];
    _t02EE = [_t02EB, _t02ED];
    pos00CF = +000F<$[2]> (_t02E9, _t02EE);
    bool _t02EF;
    _t02F0 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t02F0
      _t02EF = inside007D<#2; %2; $[]> (v0700BE, T00A3);
    else
      _t02EF = false;
    if _t02EF {
      _t02F1 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02F2 = @0060<#2; %2; $[]> (T00A3, v0700BE);
      _t02F3 = -0016<$[]> (_t02F1, _t02F2);
      _t02F4 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t02F5 = @0060<#2; %2; $[]> (T00A3, v0700BE);
      _t02F6 = -0016<$[]> (_t02F4, _t02F5);
      _t02F7 = *001C (_t02F3, _t02F6);
      score00CC = +000F<$[]> (score00CC, _t02F7);
    }
    _t02F8 = •0079<$[2]; $[2]; $[]> (r000CD, v0800C0);
    _t02F9 = •0079<$[2]; $[2]; $[]> (r100CE, v0800C0);
    _t02FA = [_t02F8, _t02F9];
    _t02FB = 0;
    _t02FC = t00C8[_t02FB];
    _t02FD = 1;
    _t02FE = t00C8[_t02FD];
    _t02FF = [_t02FC, _t02FE];
    pos00CF = +000F<$[2]> (_t02FA, _t02FF);
    bool _t0300;
    _t0301 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t0301
      _t0300 = inside007D<#2; %2; $[]> (v0800C0, T00A3);
    else
      _t0300 = false;
    if _t0300 {
      _t0302 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0303 = @0060<#2; %2; $[]> (T00A3, v0800C0);
      _t0304 = -0016<$[]> (_t0302, _t0303);
      _t0305 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0306 = @0060<#2; %2; $[]> (T00A3, v0800C0);
      _t0307 = -0016<$[]> (_t0305, _t0306);
      _t0308 = *001C (_t0304, _t0307);
      score00CC = +000F<$[]> (score00CC, _t0308);
    }
    _t0309 = •0079<$[2]; $[2]; $[]> (r000CD, v0900C2);
    _t030A = •0079<$[2]; $[2]; $[]> (r100CE, v0900C2);
    _t030B = [_t0309, _t030A];
    _t030C = 0;
    _t030D = t00C8[_t030C];
    _t030E = 1;
    _t030F = t00C8[_t030E];
    _t0310 = [_t030D, _t030F];
    pos00CF = +000F<$[2]> (_t030B, _t0310);
    bool _t0311;
    _t0312 = inside007D<#2; %2; $[]> (pos00CF, F00AC);
    if _t0312
      _t0311 = inside007D<#2; %2; $[]> (v0900C2, T00A3);
    else
      _t0311 = false;
    if _t0311 {
      _t0313 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0314 = @0060<#2; %2; $[]> (T00A3, v0900C2);
      _t0315 = -0016<$[]> (_t0313, _t0314);
      _t0316 = @0060<#2; %2; $[]> (F00AC, pos00CF);
      _t0317 = @0060<#2; %2; $[]> (T00A3, v0900C2);
      _t0318 = -0016<$[]> (_t0316, _t0317);
      _t0319 = *001C (_t0315, _t0318);
      score00CC = +000F<$[]> (score00CC, _t0319);
    }
    stabilize;
  }
  Stabilize
  { }
}
/* Program end */
##### HighIL after translation to HighIL ####
## properties
  none
## globals
  global field T0326#30
  global field F032E#30
  global tensor[2] v000334#5
  global tensor[2] v01033A#5
  global tensor[2] v020340#5
  global tensor[2] v030348#5
  global tensor[2] v04034E#5
  global tensor[2] v050354#5
  global tensor[2] v06035C#5
  global tensor[2] v070364#5
  global tensor[2] v08036C#5
  global tensor[2] v090376#5
  global kernel _t0320#1
  global string _t0322#1
  global image2D _t0324#1
  global kernel _t0328#1
  global string _t032A#1
  global image2D _t032C#1
  global real _t0330#1
  global real _t0332#1
  global real _t0336#1
  global real _t0338#1
  global real _t033C#1
  global real _t033E#1
  global real _t0342#1
  global real _t0344#1
  global real _t0346#1
  global real _t034A#1
  global real _t034C#1
  global real _t0350#1
  global real _t0352#1
  global real _t0356#1
  global real _t0358#1
  global real _t035A#1
  global real _t035E#1
  global real _t0360#1
  global real _t0362#1
  global real _t0366#1
  global real _t0368#1
  global real _t036A#1
  global real _t036E#1
  global real _t0370#1
  global real _t0372#1
  global real _t0374#1
## global initialization
  ENTRY0378:  preds = []
    kernel _t0320#1 = Kernel<bspln3,0>;
    string _t0322#1 = "square-template.nrrd";
    image2D _t0324#1 = LoadImage<IMAGE2D<int>>(_t0322);
    field T0326#30 = Field<2>(_t0324,_t0320);
    kernel _t0328#1 = Kernel<bspln3,0>;
    string _t032A#1 = "square-rotate.nrrd";
    image2D _t032C#1 = LoadImage<IMAGE2D<float>>(_t032A);
    field F032E#30 = Field<2>(_t032C,_t0328);
    real _t0330#1 = 0.0;
    real _t0332#1 = 0.0;
    tensor[2] v000334#5 = <tensor[2]>[_t0330,_t0332];
    real _t0336#1 = 0.5e0;
    real _t0338#1 = 0.5e0;
    tensor[2] v01033A#5 = <tensor[2]>[_t0336,_t0338];
    real _t033C#1 = 0.5e0;
    real _t033E#1 = 0.0;
    tensor[2] v020340#5 = <tensor[2]>[_t033C,_t033E];
    real _t0342#1 = 0.5e0;
    real _t0344#1 = 0.5e0;
    real _t0346#1 = Neg<real>(_t0344);
    tensor[2] v030348#5 = <tensor[2]>[_t0342,_t0346];
    real _t034A#1 = 0.0;
    real _t034C#1 = 0.5e0;
    tensor[2] v04034E#5 = <tensor[2]>[_t034A,_t034C];
    real _t0350#1 = 0.0;
    real _t0352#1 = 0.0;
    tensor[2] v050354#5 = <tensor[2]>[_t0350,_t0352];
    real _t0356#1 = 0.0;
    real _t0358#1 = 0.5e0;
    real _t035A#1 = Neg<real>(_t0358);
    tensor[2] v06035C#5 = <tensor[2]>[_t0356,_t035A];
    real _t035E#1 = 0.5e0;
    real _t0360#1 = Neg<real>(_t035E);
    real _t0362#1 = 0.5e0;
    tensor[2] v070364#5 = <tensor[2]>[_t0360,_t0362];
    real _t0366#1 = 0.5e0;
    real _t0368#1 = Neg<real>(_t0366);
    real _t036A#1 = 0.0;
    tensor[2] v08036C#5 = <tensor[2]>[_t0368,_t036A];
    real _t036E#1 = 0.5e0;
    real _t0370#1 = Neg<real>(_t036E);
    real _t0372#1 = 0.5e0;
    real _t0374#1 = Neg<real>(_t0372);
    tensor[2] v090376#5 = <tensor[2]>[_t0370,_t0374];
    return (T0326,F032E,v000334,v01033A,v020340,v030348,v04034E,v050354,v06035C,v070364,v08036C,v090376,_t0320,_t0322,_t0324,_t0328,_t032A,_t032C,_t0330,_t0332,_t0336,_t0338,_t033C,_t033E,_t0342,_t0344,_t0346,_t034A,_t034C,_t0350,_t0352,_t0356,_t0358,_t035A,_t035E,_t0360,_t0362,_t0366,_t0368,_t036A,_t036E,_t0370,_t0372,_t0374)
## initially
  ARRAY
    ENTRY0386:  preds = []
      int _t037A#2 = 0;
      int _t037C#2 = 60;
      int _t037E#2 = 0;
      int _t0380#2 = 60;
      int _t0382#2 = 0;
      int _t0384#2 = 60;
      live vars = (_t0384,_t0382,_t0380,_t037E,_t037C,_t037A)
    for int i0388#1 = _t037A .. _t037C
      for int j0389#1 = _t037E .. _t0380
        for int k038A#1 = _t0382 .. _t0384
          ENTRY038B:  preds = []
            live vars = ()
          new R(i0388,j0389,k038A);
## strands
  strand R (int i038D#1, int j038E#1, int k038F#1)
    state: tensor[3] self.t;output real self.score;tensor[2] self.r0;tensor[2] self.r1;tensor[2] self.pos;
      ENTRY03C9:  preds = []
        real _t0395#1 = IntToReal(i038D);
        real _t0397#1 = 0.60e2;
        real _t0399#1 = Div<real>(_t0395,_t0397);
        real _t039B#1 = 0.5e0;
        real _t039D#1 = Sub<real>(_t0399,_t039B);
        real _t039F#1 = IntToReal(j038E);
        real _t03A1#1 = 0.60e2;
        real _t03A3#1 = Div<real>(_t039F,_t03A1);
        real _t03A5#1 = 0.5e0;
        real _t03A7#1 = Sub<real>(_t03A3,_t03A5);
        real _t03A9#1 = IntToReal(k038F);
        real _t03AB#1 = 0.60e2;
        real _t03AD#1 = Div<real>(_t03A9,_t03AB);
        real _t03AF#1 = 0.5e0;
        real _t03B1#1 = Sub<real>(_t03AD,_t03AF);
        tensor[3] t03B3#1 = <tensor[3]>[_t039D,_t03A7,_t03B1];
        real score03B5#1 = 0.0;
        real _t03B7#1 = 0.0;
        real _t03B9#1 = 0.0;
        tensor[2] r003BB#1 = <tensor[2]>[_t03B7,_t03B9];
        real _t03BD#1 = 0.0;
        real _t03BF#1 = 0.0;
        tensor[2] r103C1#1 = <tensor[2]>[_t03BD,_t03BF];
        real _t03C3#1 = 0.0;
        real _t03C5#1 = 0.0;
        tensor[2] pos03C7#1 = <tensor[2]>[_t03C3,_t03C5];
        self.t = t03B3;
        self.score = score03B5;
        self.r0 = r003BB;
        self.r1 = r103C1;
        self.pos = pos03C7;
        strand_init ()
    method Update
        ENTRY0614:  preds = []
          tensor[3] t03D0#31 = self.t;
          real score03D1#2 = self.score;
          tensor[2] r003D2#0 = self.r0;
          tensor[2] r103D3#0 = self.r1;
          tensor[2] pos03D4#0 = self.pos;
          real _t03DA#1 = 0.1e1;
          real _t03DC#1 = 0.2e1;
          int _t03DE#1 = 2;
          real _t03E0#1 = TensorSub<tensor[3]>(t03D0,_t03DE);
          real _t03E2#1 = Mul<real>(_t03DC,_t03E0);
          int _t03E4#1 = 2;
          real _t03E6#1 = TensorSub<tensor[3]>(t03D0,_t03E4);
          real _t03E8#1 = Mul<real>(_t03E2,_t03E6);
          real _t03EA#1 = Sub<real>(_t03DA,_t03E8);
          real _t03EC#1 = 0.2e1;
          real _t03EE#1 = Neg<real>(_t03EC);
          real _t03F0#1 = 0.1e1;
          int _t03F2#1 = 2;
          real _t03F4#1 = TensorSub<tensor[3]>(t03D0,_t03F2);
          int _t03F6#1 = 2;
          real _t03F8#1 = TensorSub<tensor[3]>(t03D0,_t03F6);
          real _t03FA#1 = Mul<real>(_t03F4,_t03F8);
          real _t03FC#1 = Sub<real>(_t03F0,_t03FA);
          real _t03FE#1 = sqrt(_t03FC);
          real _t0400#1 = Mul<real>(_t03EE,_t03FE);
          int _t0402#1 = 2;
          real _t0404#1 = TensorSub<tensor[3]>(t03D0,_t0402);
          real _t0406#1 = Mul<real>(_t0400,_t0404);
          tensor[2] r00408#11 = <tensor[2]>[_t03EA,_t0406];
          real _t040A#1 = 0.2e1;
          real _t040C#1 = 0.1e1;
          int _t040E#1 = 2;
          real _t0410#1 = TensorSub<tensor[3]>(t03D0,_t040E);
          int _t0412#1 = 2;
          real _t0414#1 = TensorSub<tensor[3]>(t03D0,_t0412);
          real _t0416#1 = Mul<real>(_t0410,_t0414);
          real _t0418#1 = Sub<real>(_t040C,_t0416);
          real _t041A#1 = sqrt(_t0418);
          real _t041C#1 = Mul<real>(_t040A,_t041A);
          int _t041E#1 = 2;
          real _t0420#1 = TensorSub<tensor[3]>(t03D0,_t041E);
          real _t0422#1 = Mul<real>(_t041C,_t0420);
          real _t0424#1 = 0.1e1;
          real _t0426#1 = 0.2e1;
          int _t0428#1 = 2;
          real _t042A#1 = TensorSub<tensor[3]>(t03D0,_t0428);
          real _t042C#1 = Mul<real>(_t0426,_t042A);
          int _t042E#1 = 2;
          real _t0430#1 = TensorSub<tensor[3]>(t03D0,_t042E);
          real _t0432#1 = Mul<real>(_t042C,_t0430);
          real _t0434#1 = Sub<real>(_t0424,_t0432);
          tensor[2] r10436#11 = <tensor[2]>[_t0422,_t0434];
          real _t0438#1 = Dot<tensor[2]>(r00408,v000334);
          real _t043A#1 = Dot<tensor[2]>(r10436,v000334);
          tensor[2] _t043C#1 = <tensor[2]>[_t0438,_t043A];
          int _t043E#1 = 0;
          real _t0440#1 = TensorSub<tensor[3]>(t03D0,_t043E);
          int _t0442#1 = 1;
          real _t0444#1 = TensorSub<tensor[3]>(t03D0,_t0442);
          tensor[2] _t0446#1 = <tensor[2]>[_t0440,_t0444];
          tensor[2] pos0448#3 = Add<tensor[2]>(_t043C,_t0446);
          bool _t044B#1 = Inside<2>(pos0448,F032E);
          if _t044B then goto ASSIGN0450 else goto ASSIGN0452
        ASSIGN0450:  preds = [COND0453]
          bool _t044E#1 = Inside<2>(v000334,T0326);
          goto JOIN044D
        JOIN044D:  preds = [ASSIGN0450,ASSIGN0452]
          bool _t044F#1 = phi(_t044E,_t0451)
          if _t044F then goto ASSIGN0456 else goto JOIN0454
        ASSIGN0456:  preds = [COND0466]
          real _t0455#1 = Probe<tensor[2],real>(F032E,pos0448);
          real _t0457#1 = Probe<tensor[2],real>(T0326,v000334);
          real _t0459#1 = Sub<real>(_t0455,_t0457);
          real _t045B#1 = Probe<tensor[2],real>(F032E,pos0448);
          real _t045D#1 = Probe<tensor[2],real>(T0326,v000334);
          real _t045F#1 = Sub<real>(_t045B,_t045D);
          real _t0461#1 = Mul<real>(_t0459,_t045F);
          real score0463#1 = Add<real>(score03D1,_t0461);
          goto JOIN0454
        JOIN0454:  preds = [ASSIGN0465,COND0466]
          real score0464#2 = phi(score0463,score03D1)
          real _t0467#1 = Dot<tensor[2]>(r00408,v01033A);
          real _t0469#1 = Dot<tensor[2]>(r10436,v01033A);
          tensor[2] _t046B#1 = <tensor[2]>[_t0467,_t0469];
          int _t046D#1 = 0;
          real _t046F#1 = TensorSub<tensor[3]>(t03D0,_t046D);
          int _t0471#1 = 1;
          real _t0473#1 = TensorSub<tensor[3]>(t03D0,_t0471);
          tensor[2] _t0475#1 = <tensor[2]>[_t046F,_t0473];
          tensor[2] pos0477#3 = Add<tensor[2]>(_t046B,_t0475);
          bool _t047A#1 = Inside<2>(pos0477,F032E);
          if _t047A then goto ASSIGN047F else goto ASSIGN0481
        ASSIGN047F:  preds = [COND0482]
          bool _t047D#1 = Inside<2>(v01033A,T0326);
          goto JOIN047C
        JOIN047C:  preds = [ASSIGN047F,ASSIGN0481]
          bool _t047E#1 = phi(_t047D,_t0480)
          if _t047E then goto ASSIGN0485 else goto JOIN0483
        ASSIGN0485:  preds = [COND0495]
          real _t0484#1 = Probe<tensor[2],real>(F032E,pos0477);
          real _t0486#1 = Probe<tensor[2],real>(T0326,v01033A);
          real _t0488#1 = Sub<real>(_t0484,_t0486);
          real _t048A#1 = Probe<tensor[2],real>(F032E,pos0477);
          real _t048C#1 = Probe<tensor[2],real>(T0326,v01033A);
          real _t048E#1 = Sub<real>(_t048A,_t048C);
          real _t0490#1 = Mul<real>(_t0488,_t048E);
          real score0492#1 = Add<real>(score0464,_t0490);
          goto JOIN0483
        JOIN0483:  preds = [ASSIGN0494,COND0495]
          real score0493#2 = phi(score0492,score0464)
          real _t0496#1 = Dot<tensor[2]>(r00408,v020340);
          real _t0498#1 = Dot<tensor[2]>(r10436,v020340);
          tensor[2] _t049A#1 = <tensor[2]>[_t0496,_t0498];
          int _t049C#1 = 0;
          real _t049E#1 = TensorSub<tensor[3]>(t03D0,_t049C);
          int _t04A0#1 = 1;
          real _t04A2#1 = TensorSub<tensor[3]>(t03D0,_t04A0);
          tensor[2] _t04A4#1 = <tensor[2]>[_t049E,_t04A2];
          tensor[2] pos04A6#3 = Add<tensor[2]>(_t049A,_t04A4);
          bool _t04A9#1 = Inside<2>(pos04A6,F032E);
          if _t04A9 then goto ASSIGN04AE else goto ASSIGN04B0
        ASSIGN04AE:  preds = [COND04B1]
          bool _t04AC#1 = Inside<2>(v020340,T0326);
          goto JOIN04AB
        JOIN04AB:  preds = [ASSIGN04AE,ASSIGN04B0]
          bool _t04AD#1 = phi(_t04AC,_t04AF)
          if _t04AD then goto ASSIGN04B4 else goto JOIN04B2
        ASSIGN04B4:  preds = [COND04C4]
          real _t04B3#1 = Probe<tensor[2],real>(F032E,pos04A6);
          real _t04B5#1 = Probe<tensor[2],real>(T0326,v020340);
          real _t04B7#1 = Sub<real>(_t04B3,_t04B5);
          real _t04B9#1 = Probe<tensor[2],real>(F032E,pos04A6);
          real _t04BB#1 = Probe<tensor[2],real>(T0326,v020340);
          real _t04BD#1 = Sub<real>(_t04B9,_t04BB);
          real _t04BF#1 = Mul<real>(_t04B7,_t04BD);
          real score04C1#1 = Add<real>(score0493,_t04BF);
          goto JOIN04B2
        JOIN04B2:  preds = [ASSIGN04C3,COND04C4]
          real score04C2#2 = phi(score04C1,score0493)
          real _t04C5#1 = Dot<tensor[2]>(r00408,v030348);
          real _t04C7#1 = Dot<tensor[2]>(r10436,v030348);
          tensor[2] _t04C9#1 = <tensor[2]>[_t04C5,_t04C7];
          int _t04CB#1 = 0;
          real _t04CD#1 = TensorSub<tensor[3]>(t03D0,_t04CB);
          int _t04CF#1 = 1;
          real _t04D1#1 = TensorSub<tensor[3]>(t03D0,_t04CF);
          tensor[2] _t04D3#1 = <tensor[2]>[_t04CD,_t04D1];
          tensor[2] pos04D5#3 = Add<tensor[2]>(_t04C9,_t04D3);
          bool _t04D8#1 = Inside<2>(pos04D5,F032E);
          if _t04D8 then goto ASSIGN04DD else goto ASSIGN04DF
        ASSIGN04DD:  preds = [COND04E0]
          bool _t04DB#1 = Inside<2>(v030348,T0326);
          goto JOIN04DA
        JOIN04DA:  preds = [ASSIGN04DD,ASSIGN04DF]
          bool _t04DC#1 = phi(_t04DB,_t04DE)
          if _t04DC then goto ASSIGN04E3 else goto JOIN04E1
        ASSIGN04E3:  preds = [COND04F3]
          real _t04E2#1 = Probe<tensor[2],real>(F032E,pos04D5);
          real _t04E4#1 = Probe<tensor[2],real>(T0326,v030348);
          real _t04E6#1 = Sub<real>(_t04E2,_t04E4);
          real _t04E8#1 = Probe<tensor[2],real>(F032E,pos04D5);
          real _t04EA#1 = Probe<tensor[2],real>(T0326,v030348);
          real _t04EC#1 = Sub<real>(_t04E8,_t04EA);
          real _t04EE#1 = Mul<real>(_t04E6,_t04EC);
          real score04F0#1 = Add<real>(score04C2,_t04EE);
          goto JOIN04E1
        JOIN04E1:  preds = [ASSIGN04F2,COND04F3]
          real score04F1#2 = phi(score04F0,score04C2)
          real _t04F4#1 = Dot<tensor[2]>(r00408,v04034E);
          real _t04F6#1 = Dot<tensor[2]>(r10436,v04034E);
          tensor[2] _t04F8#1 = <tensor[2]>[_t04F4,_t04F6];
          int _t04FA#1 = 0;
          real _t04FC#1 = TensorSub<tensor[3]>(t03D0,_t04FA);
          int _t04FE#1 = 1;
          real _t0500#1 = TensorSub<tensor[3]>(t03D0,_t04FE);
          tensor[2] _t0502#1 = <tensor[2]>[_t04FC,_t0500];
          tensor[2] pos0504#3 = Add<tensor[2]>(_t04F8,_t0502);
          bool _t0507#1 = Inside<2>(pos0504,F032E);
          if _t0507 then goto ASSIGN050C else goto ASSIGN050E
        ASSIGN050C:  preds = [COND050F]
          bool _t050A#1 = Inside<2>(v04034E,T0326);
          goto JOIN0509
        JOIN0509:  preds = [ASSIGN050C,ASSIGN050E]
          bool _t050B#1 = phi(_t050A,_t050D)
          if _t050B then goto ASSIGN0512 else goto JOIN0510
        ASSIGN0512:  preds = [COND0522]
          real _t0511#1 = Probe<tensor[2],real>(F032E,pos0504);
          real _t0513#1 = Probe<tensor[2],real>(T0326,v04034E);
          real _t0515#1 = Sub<real>(_t0511,_t0513);
          real _t0517#1 = Probe<tensor[2],real>(F032E,pos0504);
          real _t0519#1 = Probe<tensor[2],real>(T0326,v04034E);
          real _t051B#1 = Sub<real>(_t0517,_t0519);
          real _t051D#1 = Mul<real>(_t0515,_t051B);
          real score051F#1 = Add<real>(score04F1,_t051D);
          goto JOIN0510
        JOIN0510:  preds = [ASSIGN0521,COND0522]
          real score0520#2 = phi(score051F,score04F1)
          real _t0523#1 = Dot<tensor[2]>(r00408,v050354);
          real _t0525#1 = Dot<tensor[2]>(r10436,v050354);
          tensor[2] _t0527#1 = <tensor[2]>[_t0523,_t0525];
          int _t0529#1 = 0;
          real _t052B#1 = TensorSub<tensor[3]>(t03D0,_t0529);
          int _t052D#1 = 1;
          real _t052F#1 = TensorSub<tensor[3]>(t03D0,_t052D);
          tensor[2] _t0531#1 = <tensor[2]>[_t052B,_t052F];
          tensor[2] pos0533#3 = Add<tensor[2]>(_t0527,_t0531);
          bool _t0536#1 = Inside<2>(pos0533,F032E);
          if _t0536 then goto ASSIGN053B else goto ASSIGN053D
        ASSIGN053B:  preds = [COND053E]
          bool _t0539#1 = Inside<2>(v050354,T0326);
          goto JOIN0538
        JOIN0538:  preds = [ASSIGN053B,ASSIGN053D]
          bool _t053A#1 = phi(_t0539,_t053C)
          if _t053A then goto ASSIGN0541 else goto JOIN053F
        ASSIGN0541:  preds = [COND0551]
          real _t0540#1 = Probe<tensor[2],real>(F032E,pos0533);
          real _t0542#1 = Probe<tensor[2],real>(T0326,v050354);
          real _t0544#1 = Sub<real>(_t0540,_t0542);
          real _t0546#1 = Probe<tensor[2],real>(F032E,pos0533);
          real _t0548#1 = Probe<tensor[2],real>(T0326,v050354);
          real _t054A#1 = Sub<real>(_t0546,_t0548);
          real _t054C#1 = Mul<real>(_t0544,_t054A);
          real score054E#1 = Add<real>(score0520,_t054C);
          goto JOIN053F
        JOIN053F:  preds = [ASSIGN0550,COND0551]
          real score054F#2 = phi(score054E,score0520)
          real _t0552#1 = Dot<tensor[2]>(r00408,v06035C);
          real _t0554#1 = Dot<tensor[2]>(r10436,v06035C);
          tensor[2] _t0556#1 = <tensor[2]>[_t0552,_t0554];
          int _t0558#1 = 0;
          real _t055A#1 = TensorSub<tensor[3]>(t03D0,_t0558);
          int _t055C#1 = 1;
          real _t055E#1 = TensorSub<tensor[3]>(t03D0,_t055C);
          tensor[2] _t0560#1 = <tensor[2]>[_t055A,_t055E];
          tensor[2] pos0562#3 = Add<tensor[2]>(_t0556,_t0560);
          bool _t0565#1 = Inside<2>(pos0562,F032E);
          if _t0565 then goto ASSIGN056A else goto ASSIGN056C
        ASSIGN056A:  preds = [COND056D]
          bool _t0568#1 = Inside<2>(v06035C,T0326);
          goto JOIN0567
        JOIN0567:  preds = [ASSIGN056A,ASSIGN056C]
          bool _t0569#1 = phi(_t0568,_t056B)
          if _t0569 then goto ASSIGN0570 else goto JOIN056E
        ASSIGN0570:  preds = [COND0580]
          real _t056F#1 = Probe<tensor[2],real>(F032E,pos0562);
          real _t0571#1 = Probe<tensor[2],real>(T0326,v06035C);
          real _t0573#1 = Sub<real>(_t056F,_t0571);
          real _t0575#1 = Probe<tensor[2],real>(F032E,pos0562);
          real _t0577#1 = Probe<tensor[2],real>(T0326,v06035C);
          real _t0579#1 = Sub<real>(_t0575,_t0577);
          real _t057B#1 = Mul<real>(_t0573,_t0579);
          real score057D#1 = Add<real>(score054F,_t057B);
          goto JOIN056E
        JOIN056E:  preds = [ASSIGN057F,COND0580]
          real score057E#2 = phi(score057D,score054F)
          real _t0581#1 = Dot<tensor[2]>(r00408,v070364);
          real _t0583#1 = Dot<tensor[2]>(r10436,v070364);
          tensor[2] _t0585#1 = <tensor[2]>[_t0581,_t0583];
          int _t0587#1 = 0;
          real _t0589#1 = TensorSub<tensor[3]>(t03D0,_t0587);
          int _t058B#1 = 1;
          real _t058D#1 = TensorSub<tensor[3]>(t03D0,_t058B);
          tensor[2] _t058F#1 = <tensor[2]>[_t0589,_t058D];
          tensor[2] pos0591#3 = Add<tensor[2]>(_t0585,_t058F);
          bool _t0594#1 = Inside<2>(pos0591,F032E);
          if _t0594 then goto ASSIGN0599 else goto ASSIGN059B
        ASSIGN0599:  preds = [COND059C]
          bool _t0597#1 = Inside<2>(v070364,T0326);
          goto JOIN0596
        JOIN0596:  preds = [ASSIGN0599,ASSIGN059B]
          bool _t0598#1 = phi(_t0597,_t059A)
          if _t0598 then goto ASSIGN059F else goto JOIN059D
        ASSIGN059F:  preds = [COND05AF]
          real _t059E#1 = Probe<tensor[2],real>(F032E,pos0591);
          real _t05A0#1 = Probe<tensor[2],real>(T0326,v070364);
          real _t05A2#1 = Sub<real>(_t059E,_t05A0);
          real _t05A4#1 = Probe<tensor[2],real>(F032E,pos0591);
          real _t05A6#1 = Probe<tensor[2],real>(T0326,v070364);
          real _t05A8#1 = Sub<real>(_t05A4,_t05A6);
          real _t05AA#1 = Mul<real>(_t05A2,_t05A8);
          real score05AC#1 = Add<real>(score057E,_t05AA);
          goto JOIN059D
        JOIN059D:  preds = [ASSIGN05AE,COND05AF]
          real score05AD#2 = phi(score05AC,score057E)
          real _t05B0#1 = Dot<tensor[2]>(r00408,v08036C);
          real _t05B2#1 = Dot<tensor[2]>(r10436,v08036C);
          tensor[2] _t05B4#1 = <tensor[2]>[_t05B0,_t05B2];
          int _t05B6#1 = 0;
          real _t05B8#1 = TensorSub<tensor[3]>(t03D0,_t05B6);
          int _t05BA#1 = 1;
          real _t05BC#1 = TensorSub<tensor[3]>(t03D0,_t05BA);
          tensor[2] _t05BE#1 = <tensor[2]>[_t05B8,_t05BC];
          tensor[2] pos05C0#3 = Add<tensor[2]>(_t05B4,_t05BE);
          bool _t05C3#1 = Inside<2>(pos05C0,F032E);
          if _t05C3 then goto ASSIGN05C8 else goto ASSIGN05CA
        ASSIGN05C8:  preds = [COND05CB]
          bool _t05C6#1 = Inside<2>(v08036C,T0326);
          goto JOIN05C5
        JOIN05C5:  preds = [ASSIGN05C8,ASSIGN05CA]
          bool _t05C7#1 = phi(_t05C6,_t05C9)
          if _t05C7 then goto ASSIGN05CE else goto JOIN05CC
        ASSIGN05CE:  preds = [COND05DE]
          real _t05CD#1 = Probe<tensor[2],real>(F032E,pos05C0);
          real _t05CF#1 = Probe<tensor[2],real>(T0326,v08036C);
          real _t05D1#1 = Sub<real>(_t05CD,_t05CF);
          real _t05D3#1 = Probe<tensor[2],real>(F032E,pos05C0);
          real _t05D5#1 = Probe<tensor[2],real>(T0326,v08036C);
          real _t05D7#1 = Sub<real>(_t05D3,_t05D5);
          real _t05D9#1 = Mul<real>(_t05D1,_t05D7);
          real score05DB#1 = Add<real>(score05AD,_t05D9);
          goto JOIN05CC
        JOIN05CC:  preds = [ASSIGN05DD,COND05DE]
          real score05DC#2 = phi(score05DB,score05AD)
          real _t05DF#1 = Dot<tensor[2]>(r00408,v090376);
          real _t05E1#1 = Dot<tensor[2]>(r10436,v090376);
          tensor[2] _t05E3#1 = <tensor[2]>[_t05DF,_t05E1];
          int _t05E5#1 = 0;
          real _t05E7#1 = TensorSub<tensor[3]>(t03D0,_t05E5);
          int _t05E9#1 = 1;
          real _t05EB#1 = TensorSub<tensor[3]>(t03D0,_t05E9);
          tensor[2] _t05ED#1 = <tensor[2]>[_t05E7,_t05EB];
          tensor[2] pos05EF#4 = Add<tensor[2]>(_t05E3,_t05ED);
          bool _t05F2#1 = Inside<2>(pos05EF,F032E);
          if _t05F2 then goto ASSIGN05F7 else goto ASSIGN05F9
        ASSIGN05F7:  preds = [COND05FA]
          bool _t05F5#1 = Inside<2>(v090376,T0326);
          goto JOIN05F4
        JOIN05F4:  preds = [ASSIGN05F7,ASSIGN05F9]
          bool _t05F6#1 = phi(_t05F5,_t05F8)
          if _t05F6 then goto ASSIGN05FD else goto JOIN05FB
        ASSIGN05FD:  preds = [COND060D]
          real _t05FC#1 = Probe<tensor[2],real>(F032E,pos05EF);
          real _t05FE#1 = Probe<tensor[2],real>(T0326,v090376);
          real _t0600#1 = Sub<real>(_t05FC,_t05FE);
          real _t0602#1 = Probe<tensor[2],real>(F032E,pos05EF);
          real _t0604#1 = Probe<tensor[2],real>(T0326,v090376);
          real _t0606#1 = Sub<real>(_t0602,_t0604);
          real _t0608#1 = Mul<real>(_t0600,_t0606);
          real score060A#1 = Add<real>(score05DC,_t0608);
          goto JOIN05FB
        JOIN05FB:  preds = [ASSIGN060C,COND060D]
          real score060B#1 = phi(score060A,score05DC)
          self.t = t03D0;
          self.score = score060B;
          self.r0 = r00408;
          self.r1 = r10436;
          self.pos = pos05EF;
          stabilize ()
        ASSIGN05F9:  preds = [COND05FA]
          bool _t05F8#1 = false;
          goto JOIN05F4
        ASSIGN05CA:  preds = [COND05CB]
          bool _t05C9#1 = false;
          goto JOIN05C5
        ASSIGN059B:  preds = [COND059C]
          bool _t059A#1 = false;
          goto JOIN0596
        ASSIGN056C:  preds = [COND056D]
          bool _t056B#1 = false;
          goto JOIN0567
        ASSIGN053D:  preds = [COND053E]
          bool _t053C#1 = false;
          goto JOIN0538
        ASSIGN050E:  preds = [COND050F]
          bool _t050D#1 = false;
          goto JOIN0509
        ASSIGN04DF:  preds = [COND04E0]
          bool _t04DE#1 = false;
          goto JOIN04DA
        ASSIGN04B0:  preds = [COND04B1]
          bool _t04AF#1 = false;
          goto JOIN04AB
        ASSIGN0481:  preds = [COND0482]
          bool _t0480#1 = false;
          goto JOIN047C
        ASSIGN0452:  preds = [COND0453]
          bool _t0451#1 = false;
          goto JOIN044D
    end Update
    method Stabilize
        ENTRY0620:  preds = []
          tensor[3] t0616#1 = self.t;
          real score0617#1 = self.score;
          tensor[2] r00618#1 = self.r0;
          tensor[2] r10619#1 = self.r1;
          tensor[2] pos061A#1 = self.pos;
          self.t = t0616;
          self.score = score0617;
          self.r0 = r00618;
          self.r1 = r10619;
          self.pos = pos061A;
          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
++ 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-phi
++ 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 T0326#30
  global field F032E#30
  global tensor[2] v01033A#5
  global tensor[2] v020340#5
  global tensor[2] v030348#5
  global tensor[2] v04034E#5
  global tensor[2] v000334#8
  global tensor[2] v06035C#5
  global tensor[2] v070364#5
  global tensor[2] v08036C#5
  global tensor[2] v090376#5
  global string _t0322#1
  global image2D _t0324#1
  global kernel _t0320#3
  global string _t032A#1
  global image2D _t032C#1
  global real _t0330#13
  global real _t0336#18
  global real _t0346#11
## global initialization
  ENTRY0378:  preds = []
    kernel _t0320#3 = Kernel<bspln3,0>;
    string _t0322#1 = "square-template.nrrd";
    image2D _t0324#1 = LoadImage<IMAGE2D<int>>(_t0322);
    field T0326#30 = Field<2>(_t0324,_t0320);
    string _t032A#1 = "square-rotate.nrrd";
    image2D _t032C#1 = LoadImage<IMAGE2D<float>>(_t032A);
    field F032E#30 = Field<2>(_t032C,_t0320);
    real _t0330#13 = 0.0;
    tensor[2] v000334#8 = <tensor[2]>[_t0330,_t0330];
    real _t0336#18 = 0.5e0;
    tensor[2] v01033A#5 = <tensor[2]>[_t0336,_t0336];
    tensor[2] v020340#5 = <tensor[2]>[_t0336,_t0330];
    real _t0346#11 = Neg<real>(_t0336);
    tensor[2] v030348#5 = <tensor[2]>[_t0336,_t0346];
    tensor[2] v04034E#5 = <tensor[2]>[_t0330,_t0336];
    tensor[2] v06035C#5 = <tensor[2]>[_t0330,_t0346];
    tensor[2] v070364#5 = <tensor[2]>[_t0346,_t0336];
    tensor[2] v08036C#5 = <tensor[2]>[_t0346,_t0330];
    tensor[2] v090376#5 = <tensor[2]>[_t0346,_t0346];
    return (T0326,F032E,v01033A,v020340,v030348,v04034E,v000334,v06035C,v070364,v08036C,v090376,_t0322,_t0324,_t0320,_t032A,_t032C,_t0330,_t0336,_t0346)
## initially
  ARRAY
    ENTRY0386:  preds = []
      int _t037A#4 = 0;
      int _t037C#4 = 60;
      live vars = (_t037C,_t037A)
    for int i0388#1 = _t037A .. _t037C
      for int j0389#1 = _t037A .. _t037C
        for int k038A#1 = _t037A .. _t037C
          ENTRY038B:  preds = []
            live vars = ()
          new R(i0388,j0389,k038A);
## strands
  strand R (int i038D#1, int j038E#1, int k038F#1)
    state: tensor[3] self.t;output real self.score;tensor[2] self.r0;tensor[2] self.r1;tensor[2] self.pos;
      ENTRY03C9:  preds = []
        real _t0395#1 = IntToReal(i038D);
        real _t0397#3 = 0.60e2;
        real _t0399#1 = Div<real>(_t0395,_t0397);
        real _t039B#3 = 0.5e0;
        real _t039D#1 = Sub<real>(_t0399,_t039B);
        real _t039F#1 = IntToReal(j038E);
        real _t03A3#1 = Div<real>(_t039F,_t0397);
        real _t03A7#1 = Sub<real>(_t03A3,_t039B);
        real _t03A9#1 = IntToReal(k038F);
        real _t03AD#1 = Div<real>(_t03A9,_t0397);
        real _t03B1#1 = Sub<real>(_t03AD,_t039B);
        tensor[3] t03B3#1 = <tensor[3]>[_t039D,_t03A7,_t03B1];
        real score03B5#3 = 0.0;
        tensor[2] r003BB#3 = <tensor[2]>[score03B5,score03B5];
        self.t = t03B3;
        self.score = score03B5;
        self.r0 = r003BB;
        self.r1 = r003BB;
        self.pos = r003BB;
        strand_init ()
    method Update
        ENTRY0614:  preds = []
          tensor[3] t03D0#31 = self.t;
          real score03D1#2 = self.score;
          tensor[2] r003D2#0 = self.r0;
          tensor[2] r103D3#0 = self.r1;
          tensor[2] pos03D4#0 = self.pos;
          real _t03DA#2 = 0.1e1;
          real _t03DC#3 = 0.2e1;
          int _t03DE#1 = 2;
          real _t03E0#6 = TensorSub<tensor[3]>(t03D0,_t03DE);
          real _t03E2#1 = Mul<real>(_t03DC,_t03E0);
          real _t03E8#1 = Mul<real>(_t03E2,_t03E0);
          real _t03EA#2 = Sub<real>(_t03DA,_t03E8);
          real _t03EE#1 = Neg<real>(_t03DC);
          real _t03FA#1 = Mul<real>(_t03E0,_t03E0);
          real _t03FC#1 = Sub<real>(_t03DA,_t03FA);
          real _t03FE#2 = sqrt(_t03FC);
          real _t0400#1 = Mul<real>(_t03EE,_t03FE);
          real _t0406#1 = Mul<real>(_t0400,_t03E0);
          tensor[2] r00408#11 = <tensor[2]>[_t03EA,_t0406];
          real _t041C#1 = Mul<real>(_t03DC,_t03FE);
          real _t0422#1 = Mul<real>(_t041C,_t03E0);
          tensor[2] r10436#11 = <tensor[2]>[_t0422,_t03EA];
          real _t0438#1 = Dot<tensor[2]>(r00408,v000334);
          real _t043A#1 = Dot<tensor[2]>(r10436,v000334);
          tensor[2] _t043C#1 = <tensor[2]>[_t0438,_t043A];
          int _t043E#1 = 0;
          real _t0440#1 = TensorSub<tensor[3]>(t03D0,_t043E);
          int _t0442#1 = 1;
          real _t0444#1 = TensorSub<tensor[3]>(t03D0,_t0442);
          tensor[2] _t0446#9 = <tensor[2]>[_t0440,_t0444];
          tensor[2] pos0448#4 = Add<tensor[2]>(_t043C,_t0446);
          bool _t044B#2 = Inside<2>(pos0448,F032E);
          if _t044B then goto ASSIGN0450 else goto ASSIGN0452
        ASSIGN0450:  preds = [COND0453]
          bool _t044E#1 = Inside<2>(v000334,T0326);
          goto JOIN044D
        JOIN044D:  preds = [ASSIGN0450,ASSIGN0452]
          bool _t044F#2 = phi(_t044E,_t0451)
          if _t044F then goto ASSIGN0456 else goto JOIN0454
        ASSIGN0456:  preds = [COND0466]
          real _t0455#1 = Probe<tensor[2],real>(F032E,pos0448);
          real _t0457#1 = Probe<tensor[2],real>(T0326,v000334);
          real _t0459#2 = Sub<real>(_t0455,_t0457);
          real _t0461#1 = Mul<real>(_t0459,_t0459);
          real score0463#1 = Add<real>(score03D1,_t0461);
          goto JOIN0454
        JOIN0454:  preds = [ASSIGN0465,COND0466]
          real score0464#2 = phi(score0463,score03D1)
          real _t0467#1 = Dot<tensor[2]>(r00408,v01033A);
          real _t0469#1 = Dot<tensor[2]>(r10436,v01033A);
          tensor[2] _t046B#1 = <tensor[2]>[_t0467,_t0469];
          tensor[2] pos0477#3 = Add<tensor[2]>(_t046B,_t0446);
          bool _t047A#1 = Inside<2>(pos0477,F032E);
          if _t047A then goto ASSIGN047F else goto ASSIGN0481
        ASSIGN047F:  preds = [COND0482]
          bool _t047D#1 = Inside<2>(v01033A,T0326);
          goto JOIN047C
        JOIN047C:  preds = [ASSIGN047F,ASSIGN0481]
          bool _t047E#1 = phi(_t047D,_t0480)
          if _t047E then goto ASSIGN0485 else goto JOIN0483
        ASSIGN0485:  preds = [COND0495]
          real _t0484#1 = Probe<tensor[2],real>(F032E,pos0477);
          real _t0486#1 = Probe<tensor[2],real>(T0326,v01033A);
          real _t0488#2 = Sub<real>(_t0484,_t0486);
          real _t0490#1 = Mul<real>(_t0488,_t0488);
          real score0492#1 = Add<real>(score0464,_t0490);
          goto JOIN0483
        JOIN0483:  preds = [ASSIGN0494,COND0495]
          real score0493#2 = phi(score0492,score0464)
          real _t0496#1 = Dot<tensor[2]>(r00408,v020340);
          real _t0498#1 = Dot<tensor[2]>(r10436,v020340);
          tensor[2] _t049A#1 = <tensor[2]>[_t0496,_t0498];
          tensor[2] pos04A6#3 = Add<tensor[2]>(_t049A,_t0446);
          bool _t04A9#1 = Inside<2>(pos04A6,F032E);
          if _t04A9 then goto ASSIGN04AE else goto ASSIGN04B0
        ASSIGN04AE:  preds = [COND04B1]
          bool _t04AC#1 = Inside<2>(v020340,T0326);
          goto JOIN04AB
        JOIN04AB:  preds = [ASSIGN04AE,ASSIGN04B0]
          bool _t04AD#1 = phi(_t04AC,_t04AF)
          if _t04AD then goto ASSIGN04B4 else goto JOIN04B2
        ASSIGN04B4:  preds = [COND04C4]
          real _t04B3#1 = Probe<tensor[2],real>(F032E,pos04A6);
          real _t04B5#1 = Probe<tensor[2],real>(T0326,v020340);
          real _t04B7#2 = Sub<real>(_t04B3,_t04B5);
          real _t04BF#1 = Mul<real>(_t04B7,_t04B7);
          real score04C1#1 = Add<real>(score0493,_t04BF);
          goto JOIN04B2
        JOIN04B2:  preds = [ASSIGN04C3,COND04C4]
          real score04C2#2 = phi(score04C1,score0493)
          real _t04C5#1 = Dot<tensor[2]>(r00408,v030348);
          real _t04C7#1 = Dot<tensor[2]>(r10436,v030348);
          tensor[2] _t04C9#1 = <tensor[2]>[_t04C5,_t04C7];
          tensor[2] pos04D5#3 = Add<tensor[2]>(_t04C9,_t0446);
          bool _t04D8#1 = Inside<2>(pos04D5,F032E);
          if _t04D8 then goto ASSIGN04DD else goto ASSIGN04DF
        ASSIGN04DD:  preds = [COND04E0]
          bool _t04DB#1 = Inside<2>(v030348,T0326);
          goto JOIN04DA
        JOIN04DA:  preds = [ASSIGN04DD,ASSIGN04DF]
          bool _t04DC#1 = phi(_t04DB,_t04DE)
          if _t04DC then goto ASSIGN04E3 else goto JOIN04E1
        ASSIGN04E3:  preds = [COND04F3]
          real _t04E2#1 = Probe<tensor[2],real>(F032E,pos04D5);
          real _t04E4#1 = Probe<tensor[2],real>(T0326,v030348);
          real _t04E6#2 = Sub<real>(_t04E2,_t04E4);
          real _t04EE#1 = Mul<real>(_t04E6,_t04E6);
          real score04F0#1 = Add<real>(score04C2,_t04EE);
          goto JOIN04E1
        JOIN04E1:  preds = [ASSIGN04F2,COND04F3]
          real score04F1#2 = phi(score04F0,score04C2)
          real _t04F4#1 = Dot<tensor[2]>(r00408,v04034E);
          real _t04F6#1 = Dot<tensor[2]>(r10436,v04034E);
          tensor[2] _t04F8#1 = <tensor[2]>[_t04F4,_t04F6];
          tensor[2] pos0504#3 = Add<tensor[2]>(_t04F8,_t0446);
          bool _t0507#1 = Inside<2>(pos0504,F032E);
          if _t0507 then goto ASSIGN050C else goto ASSIGN050E
        ASSIGN050C:  preds = [COND050F]
          bool _t050A#1 = Inside<2>(v04034E,T0326);
          goto JOIN0509
        JOIN0509:  preds = [ASSIGN050C,ASSIGN050E]
          bool _t050B#1 = phi(_t050A,_t050D)
          if _t050B then goto ASSIGN0512 else goto JOIN0510
        ASSIGN0512:  preds = [COND0522]
          real _t0511#1 = Probe<tensor[2],real>(F032E,pos0504);
          real _t0513#1 = Probe<tensor[2],real>(T0326,v04034E);
          real _t0515#2 = Sub<real>(_t0511,_t0513);
          real _t051D#1 = Mul<real>(_t0515,_t0515);
          real score051F#1 = Add<real>(score04F1,_t051D);
          goto JOIN0510
        JOIN0510:  preds = [ASSIGN0521,COND0522]
          real score0520#2 = phi(score051F,score04F1)
          if _t044B then goto ASSIGN064F else goto ASSIGN053D
        ASSIGN064F:  preds = [COND064E]
          bool _t0539#0 = Inside<2>(v000334,T0326);
          goto JOIN0538
        JOIN0538:  preds = [ASSIGN064F,ASSIGN053D]
          if _t044F then goto ASSIGN0651 else goto JOIN053F
        ASSIGN0651:  preds = [COND0650]
          real _t0540#1 = Probe<tensor[2],real>(F032E,pos0448);
          real _t0542#1 = Probe<tensor[2],real>(T0326,v000334);
          real _t0544#2 = Sub<real>(_t0540,_t0542);
          real _t054C#1 = Mul<real>(_t0544,_t0544);
          real score054E#1 = Add<real>(score0520,_t054C);
          goto JOIN053F
        JOIN053F:  preds = [ASSIGN0550,COND0650]
          real score054F#2 = phi(score054E,score0520)
          real _t0552#1 = Dot<tensor[2]>(r00408,v06035C);
          real _t0554#1 = Dot<tensor[2]>(r10436,v06035C);
          tensor[2] _t0556#1 = <tensor[2]>[_t0552,_t0554];
          tensor[2] pos0562#3 = Add<tensor[2]>(_t0556,_t0446);
          bool _t0565#1 = Inside<2>(pos0562,F032E);
          if _t0565 then goto ASSIGN056A else goto ASSIGN056C
        ASSIGN056A:  preds = [COND056D]
          bool _t0568#1 = Inside<2>(v06035C,T0326);
          goto JOIN0567
        JOIN0567:  preds = [ASSIGN056A,ASSIGN056C]
          bool _t0569#1 = phi(_t0568,_t056B)
          if _t0569 then goto ASSIGN0570 else goto JOIN056E
        ASSIGN0570:  preds = [COND0580]
          real _t056F#1 = Probe<tensor[2],real>(F032E,pos0562);
          real _t0571#1 = Probe<tensor[2],real>(T0326,v06035C);
          real _t0573#2 = Sub<real>(_t056F,_t0571);
          real _t057B#1 = Mul<real>(_t0573,_t0573);
          real score057D#1 = Add<real>(score054F,_t057B);
          goto JOIN056E
        JOIN056E:  preds = [ASSIGN057F,COND0580]
          real score057E#2 = phi(score057D,score054F)
          real _t0581#1 = Dot<tensor[2]>(r00408,v070364);
          real _t0583#1 = Dot<tensor[2]>(r10436,v070364);
          tensor[2] _t0585#1 = <tensor[2]>[_t0581,_t0583];
          tensor[2] pos0591#3 = Add<tensor[2]>(_t0585,_t0446);
          bool _t0594#1 = Inside<2>(pos0591,F032E);
          if _t0594 then goto ASSIGN0599 else goto ASSIGN059B
        ASSIGN0599:  preds = [COND059C]
          bool _t0597#1 = Inside<2>(v070364,T0326);
          goto JOIN0596
        JOIN0596:  preds = [ASSIGN0599,ASSIGN059B]
          bool _t0598#1 = phi(_t0597,_t059A)
          if _t0598 then goto ASSIGN059F else goto JOIN059D
        ASSIGN059F:  preds = [COND05AF]
          real _t059E#1 = Probe<tensor[2],real>(F032E,pos0591);
          real _t05A0#1 = Probe<tensor[2],real>(T0326,v070364);
          real _t05A2#2 = Sub<real>(_t059E,_t05A0);
          real _t05AA#1 = Mul<real>(_t05A2,_t05A2);
          real score05AC#1 = Add<real>(score057E,_t05AA);
          goto JOIN059D
        JOIN059D:  preds = [ASSIGN05AE,COND05AF]
          real score05AD#2 = phi(score05AC,score057E)
          real _t05B0#1 = Dot<tensor[2]>(r00408,v08036C);
          real _t05B2#1 = Dot<tensor[2]>(r10436,v08036C);
          tensor[2] _t05B4#1 = <tensor[2]>[_t05B0,_t05B2];
          tensor[2] pos05C0#3 = Add<tensor[2]>(_t05B4,_t0446);
          bool _t05C3#1 = Inside<2>(pos05C0,F032E);
          if _t05C3 then goto ASSIGN05C8 else goto ASSIGN05CA
        ASSIGN05C8:  preds = [COND05CB]
          bool _t05C6#1 = Inside<2>(v08036C,T0326);
          goto JOIN05C5
        JOIN05C5:  preds = [ASSIGN05C8,ASSIGN05CA]
          bool _t05C7#1 = phi(_t05C6,_t05C9)
          if _t05C7 then goto ASSIGN05CE else goto JOIN05CC
        ASSIGN05CE:  preds = [COND05DE]
          real _t05CD#1 = Probe<tensor[2],real>(F032E,pos05C0);
          real _t05CF#1 = Probe<tensor[2],real>(T0326,v08036C);
          real _t05D1#2 = Sub<real>(_t05CD,_t05CF);
          real _t05D9#1 = Mul<real>(_t05D1,_t05D1);
          real score05DB#1 = Add<real>(score05AD,_t05D9);
          goto JOIN05CC
        JOIN05CC:  preds = [ASSIGN05DD,COND05DE]
          real score05DC#2 = phi(score05DB,score05AD)
          real _t05DF#1 = Dot<tensor[2]>(r00408,v090376);
          real _t05E1#1 = Dot<tensor[2]>(r10436,v090376);
          tensor[2] _t05E3#1 = <tensor[2]>[_t05DF,_t05E1];
          tensor[2] pos05EF#4 = Add<tensor[2]>(_t05E3,_t0446);
          bool _t05F2#1 = Inside<2>(pos05EF,F032E);
          if _t05F2 then goto ASSIGN05F7 else goto ASSIGN05F9
        ASSIGN05F7:  preds = [COND05FA]
          bool _t05F5#1 = Inside<2>(v090376,T0326);
          goto JOIN05F4
        JOIN05F4:  preds = [ASSIGN05F7,ASSIGN05F9]
          bool _t05F6#1 = phi(_t05F5,_t05F8)
          if _t05F6 then goto ASSIGN05FD else goto JOIN05FB
        ASSIGN05FD:  preds = [COND060D]
          real _t05FC#1 = Probe<tensor[2],real>(F032E,pos05EF);
          real _t05FE#1 = Probe<tensor[2],real>(T0326,v090376);
          real _t0600#2 = Sub<real>(_t05FC,_t05FE);
          real _t0608#1 = Mul<real>(_t0600,_t0600);
          real score060A#1 = Add<real>(score05DC,_t0608);
          goto JOIN05FB
        JOIN05FB:  preds = [ASSIGN060C,COND060D]
          real score060B#1 = phi(score060A,score05DC)
          self.t = t03D0;
          self.score = score060B;
          self.r0 = r00408;
          self.r1 = r10436;
          self.pos = pos05EF;
          stabilize ()
        ASSIGN05F9:  preds = [COND05FA]
          bool _t05F8#1 = false;
          goto JOIN05F4
        ASSIGN05CA:  preds = [COND05CB]
          bool _t05C9#1 = false;
          goto JOIN05C5
        ASSIGN059B:  preds = [COND059C]
          bool _t059A#1 = false;
          goto JOIN0596
        ASSIGN056C:  preds = [COND056D]
          bool _t056B#1 = false;
          goto JOIN0567
        ASSIGN053D:  preds = [COND064E]
          bool _t053C#0 = false;
          goto JOIN0538
        ASSIGN050E:  preds = [COND050F]
          bool _t050D#1 = false;
          goto JOIN0509
        ASSIGN04DF:  preds = [COND04E0]
          bool _t04DE#1 = false;
          goto JOIN04DA
        ASSIGN04B0:  preds = [COND04B1]
          bool _t04AF#1 = false;
          goto JOIN04AB
        ASSIGN0481:  preds = [COND0482]
          bool _t0480#1 = false;
          goto JOIN047C
        ASSIGN0452:  preds = [COND0453]
          bool _t0451#1 = false;
          goto JOIN044D
    end Update
    method Stabilize
        ENTRY0620:  preds = []
          tensor[3] t0616#1 = self.t;
          real score0617#1 = self.score;
          tensor[2] r00618#1 = self.r0;
          tensor[2] r10619#1 = self.r1;
          tensor[2] pos061A#1 = self.pos;
          self.t = t0616;
          self.score = score0617;
          self.r0 = r00618;
          self.r1 = r10619;
          self.pos = pos061A;
          return ()
    end Stabilize
  end R
#### end program ####
++ high-opt:unused
++ high-opt:unused
++ high-opt:unused
++ high-opt:unused
++ high-opt:unused
##### HighIL after normalization ####
## properties
  none
## globals
  global field T0326#29
  global field F032E#30
  global tensor[2] v01033A#5
  global tensor[2] v020340#5
  global tensor[2] v030348#5
  global tensor[2] v04034E#5
  global tensor[2] v000334#7
  global tensor[2] v06035C#5
  global tensor[2] v070364#5
  global tensor[2] v08036C#5
  global tensor[2] v090376#5
  global string _t0322#1
  global image2D _t0324#1
  global kernel _t0320#3
  global string _t032A#1
  global image2D _t032C#1
  global real _t0330#13
  global real _t0336#18
  global real _t0346#11
## global initialization
  ENTRY0378:  preds = []
    kernel _t0320#3 = Kernel<bspln3,0>;
    string _t0322#1 = "square-template.nrrd";
    image2D _t0324#1 = LoadImage<IMAGE2D<int>>(_t0322);
    field T0326#29 = Field<2>(_t0324,_t0320);
    string _t032A#1 = "square-rotate.nrrd";
    image2D _t032C#1 = LoadImage<IMAGE2D<float>>(_t032A);
    field F032E#30 = Field<2>(_t032C,_t0320);
    real _t0330#13 = 0.0;
    tensor[2] v000334#7 = <tensor[2]>[_t0330,_t0330];
    real _t0336#18 = 0.5e0;
    tensor[2] v01033A#5 = <tensor[2]>[_t0336,_t0336];
    tensor[2] v020340#5 = <tensor[2]>[_t0336,_t0330];
    real _t0346#11 = Neg<real>(_t0336);
    tensor[2] v030348#5 = <tensor[2]>[_t0336,_t0346];
    tensor[2] v04034E#5 = <tensor[2]>[_t0330,_t0336];
    tensor[2] v06035C#5 = <tensor[2]>[_t0330,_t0346];
    tensor[2] v070364#5 = <tensor[2]>[_t0346,_t0336];
    tensor[2] v08036C#5 = <tensor[2]>[_t0346,_t0330];
    tensor[2] v090376#5 = <tensor[2]>[_t0346,_t0346];
    return (T0326,F032E,v01033A,v020340,v030348,v04034E,v000334,v06035C,v070364,v08036C,v090376,_t0322,_t0324,_t0320,_t032A,_t032C,_t0330,_t0336,_t0346)
## initially
  ARRAY
    ENTRY0386:  preds = []
      int _t037A#4 = 0;
      int _t037C#4 = 60;
      live vars = (_t037C,_t037A)
    for int i0388#1 = _t037A .. _t037C
      for int j0389#1 = _t037A .. _t037C
        for int k038A#1 = _t037A .. _t037C
          ENTRY038B:  preds = []
            live vars = ()
          new R(i0388,j0389,k038A);
## strands
  strand R (int i038D#1, int j038E#1, int k038F#1)
    state: tensor[3] self.t;output real self.score;tensor[2] self.r0;tensor[2] self.r1;tensor[2] self.pos;
      ENTRY03C9:  preds = []
        real _t0395#1 = IntToReal(i038D);
        real _t0397#3 = 0.60e2;
        real _t0399#1 = Div<real>(_t0395,_t0397);
        real _t039B#3 = 0.5e0;
        real _t039D#1 = Sub<real>(_t0399,_t039B);
        real _t039F#1 = IntToReal(j038E);
        real _t03A3#1 = Div<real>(_t039F,_t0397);
        real _t03A7#1 = Sub<real>(_t03A3,_t039B);
        real _t03A9#1 = IntToReal(k038F);
        real _t03AD#1 = Div<real>(_t03A9,_t0397);
        real _t03B1#1 = Sub<real>(_t03AD,_t039B);
        tensor[3] t03B3#1 = <tensor[3]>[_t039D,_t03A7,_t03B1];
        real score03B5#3 = 0.0;
        tensor[2] r003BB#3 = <tensor[2]>[score03B5,score03B5];
        self.t = t03B3;
        self.score = score03B5;
        self.r0 = r003BB;
        self.r1 = r003BB;
        self.pos = r003BB;
        strand_init ()
    method Update
        ENTRY0614:  preds = []
          tensor[3] t03D0#31 = self.t;
          real score03D1#2 = self.score;
          real _t03DA#2 = 0.1e1;
          real _t03DC#3 = 0.2e1;
          int _t03DE#1 = 2;
          real _t03E0#6 = TensorSub<tensor[3]>(t03D0,_t03DE);
          real _t03E2#1 = Mul<real>(_t03DC,_t03E0);
          real _t03E8#1 = Mul<real>(_t03E2,_t03E0);
          real _t03EA#2 = Sub<real>(_t03DA,_t03E8);
          real _t03EE#1 = Neg<real>(_t03DC);
          real _t03FA#1 = Mul<real>(_t03E0,_t03E0);
          real _t03FC#1 = Sub<real>(_t03DA,_t03FA);
          real _t03FE#2 = sqrt(_t03FC);
          real _t0400#1 = Mul<real>(_t03EE,_t03FE);
          real _t0406#1 = Mul<real>(_t0400,_t03E0);
          tensor[2] r00408#11 = <tensor[2]>[_t03EA,_t0406];
          real _t041C#1 = Mul<real>(_t03DC,_t03FE);
          real _t0422#1 = Mul<real>(_t041C,_t03E0);
          tensor[2] r10436#11 = <tensor[2]>[_t0422,_t03EA];
          real _t0438#1 = Dot<tensor[2]>(r00408,v000334);
          real _t043A#1 = Dot<tensor[2]>(r10436,v000334);
          tensor[2] _t043C#1 = <tensor[2]>[_t0438,_t043A];
          int _t043E#1 = 0;
          real _t0440#1 = TensorSub<tensor[3]>(t03D0,_t043E);
          int _t0442#1 = 1;
          real _t0444#1 = TensorSub<tensor[3]>(t03D0,_t0442);
          tensor[2] _t0446#9 = <tensor[2]>[_t0440,_t0444];
          tensor[2] pos0448#4 = Add<tensor[2]>(_t043C,_t0446);
          bool _t044B#2 = Inside<2>(pos0448,F032E);
          if _t044B then goto ASSIGN0450 else goto ASSIGN0452
        ASSIGN0450:  preds = [COND0453]
          bool _t044E#1 = Inside<2>(v000334,T0326);
          goto JOIN044D
        JOIN044D:  preds = [ASSIGN0450,ASSIGN0452]
          bool _t044F#2 = phi(_t044E,_t0451)
          if _t044F then goto ASSIGN0456 else goto JOIN0454
        ASSIGN0456:  preds = [COND0466]
          real _t0455#1 = Probe<tensor[2],real>(F032E,pos0448);
          real _t0457#1 = Probe<tensor[2],real>(T0326,v000334);
          real _t0459#2 = Sub<real>(_t0455,_t0457);
          real _t0461#1 = Mul<real>(_t0459,_t0459);
          real score0463#1 = Add<real>(score03D1,_t0461);
          goto JOIN0454
        JOIN0454:  preds = [ASSIGN0465,COND0466]
          real score0464#2 = phi(score0463,score03D1)
          real _t0467#1 = Dot<tensor[2]>(r00408,v01033A);
          real _t0469#1 = Dot<tensor[2]>(r10436,v01033A);
          tensor[2] _t046B#1 = <tensor[2]>[_t0467,_t0469];
          tensor[2] pos0477#3 = Add<tensor[2]>(_t046B,_t0446);
          bool _t047A#1 = Inside<2>(pos0477,F032E);
          if _t047A then goto ASSIGN047F else goto ASSIGN0481
        ASSIGN047F:  preds = [COND0482]
          bool _t047D#1 = Inside<2>(v01033A,T0326);
          goto JOIN047C
        JOIN047C:  preds = [ASSIGN047F,ASSIGN0481]
          bool _t047E#1 = phi(_t047D,_t0480)
          if _t047E then goto ASSIGN0485 else goto JOIN0483
        ASSIGN0485:  preds = [COND0495]
          real _t0484#1 = Probe<tensor[2],real>(F032E,pos0477);
          real _t0486#1 = Probe<tensor[2],real>(T0326,v01033A);
          real _t0488#2 = Sub<real>(_t0484,_t0486);
          real _t0490#1 = Mul<real>(_t0488,_t0488);
          real score0492#1 = Add<real>(score0464,_t0490);
          goto JOIN0483
        JOIN0483:  preds = [ASSIGN0494,COND0495]
          real score0493#2 = phi(score0492,score0464)
          real _t0496#1 = Dot<tensor[2]>(r00408,v020340);
          real _t0498#1 = Dot<tensor[2]>(r10436,v020340);
          tensor[2] _t049A#1 = <tensor[2]>[_t0496,_t0498];
          tensor[2] pos04A6#3 = Add<tensor[2]>(_t049A,_t0446);
          bool _t04A9#1 = Inside<2>(pos04A6,F032E);
          if _t04A9 then goto ASSIGN04AE else goto ASSIGN04B0
        ASSIGN04AE:  preds = [COND04B1]
          bool _t04AC#1 = Inside<2>(v020340,T0326);
          goto JOIN04AB
        JOIN04AB:  preds = [ASSIGN04AE,ASSIGN04B0]
          bool _t04AD#1 = phi(_t04AC,_t04AF)
          if _t04AD then goto ASSIGN04B4 else goto JOIN04B2
        ASSIGN04B4:  preds = [COND04C4]
          real _t04B3#1 = Probe<tensor[2],real>(F032E,pos04A6);
          real _t04B5#1 = Probe<tensor[2],real>(T0326,v020340);
          real _t04B7#2 = Sub<real>(_t04B3,_t04B5);
          real _t04BF#1 = Mul<real>(_t04B7,_t04B7);
          real score04C1#1 = Add<real>(score0493,_t04BF);
          goto JOIN04B2
        JOIN04B2:  preds = [ASSIGN04C3,COND04C4]
          real score04C2#2 = phi(score04C1,score0493)
          real _t04C5#1 = Dot<tensor[2]>(r00408,v030348);
          real _t04C7#1 = Dot<tensor[2]>(r10436,v030348);
          tensor[2] _t04C9#1 = <tensor[2]>[_t04C5,_t04C7];
          tensor[2] pos04D5#3 = Add<tensor[2]>(_t04C9,_t0446);
          bool _t04D8#1 = Inside<2>(pos04D5,F032E);
          if _t04D8 then goto ASSIGN04DD else goto ASSIGN04DF
        ASSIGN04DD:  preds = [COND04E0]
          bool _t04DB#1 = Inside<2>(v030348,T0326);
          goto JOIN04DA
        JOIN04DA:  preds = [ASSIGN04DD,ASSIGN04DF]
          bool _t04DC#1 = phi(_t04DB,_t04DE)
          if _t04DC then goto ASSIGN04E3 else goto JOIN04E1
        ASSIGN04E3:  preds = [COND04F3]
          real _t04E2#1 = Probe<tensor[2],real>(F032E,pos04D5);
          real _t04E4#1 = Probe<tensor[2],real>(T0326,v030348);
          real _t04E6#2 = Sub<real>(_t04E2,_t04E4);
          real _t04EE#1 = Mul<real>(_t04E6,_t04E6);
          real score04F0#1 = Add<real>(score04C2,_t04EE);
          goto JOIN04E1
        JOIN04E1:  preds = [ASSIGN04F2,COND04F3]
          real score04F1#2 = phi(score04F0,score04C2)
          real _t04F4#1 = Dot<tensor[2]>(r00408,v04034E);
          real _t04F6#1 = Dot<tensor[2]>(r10436,v04034E);
          tensor[2] _t04F8#1 = <tensor[2]>[_t04F4,_t04F6];
          tensor[2] pos0504#3 = Add<tensor[2]>(_t04F8,_t0446);
          bool _t0507#1 = Inside<2>(pos0504,F032E);
          if _t0507 then goto ASSIGN050C else goto ASSIGN050E
        ASSIGN050C:  preds = [COND050F]
          bool _t050A#1 = Inside<2>(v04034E,T0326);
          goto JOIN0509
        JOIN0509:  preds = [ASSIGN050C,ASSIGN050E]
          bool _t050B#1 = phi(_t050A,_t050D)
          if _t050B then goto ASSIGN0512 else goto JOIN0510
        ASSIGN0512:  preds = [COND0522]
          real _t0511#1 = Probe<tensor[2],real>(F032E,pos0504);
          real _t0513#1 = Probe<tensor[2],real>(T0326,v04034E);
          real _t0515#2 = Sub<real>(_t0511,_t0513);
          real _t051D#1 = Mul<real>(_t0515,_t0515);
          real score051F#1 = Add<real>(score04F1,_t051D);
          goto JOIN0510
        JOIN0510:  preds = [ASSIGN0521,COND0522]
          real score0520#2 = phi(score051F,score04F1)
          if _t044B then goto JOIN0538 else goto JOIN0538
        JOIN0538:  preds = [ASSIGN064F,ASSIGN053D,COND064E]
          if _t044F then goto ASSIGN0651 else goto JOIN053F
        ASSIGN0651:  preds = [COND0650]
          real _t0540#1 = Probe<tensor[2],real>(F032E,pos0448);
          real _t0542#1 = Probe<tensor[2],real>(T0326,v000334);
          real _t0544#2 = Sub<real>(_t0540,_t0542);
          real _t054C#1 = Mul<real>(_t0544,_t0544);
          real score054E#1 = Add<real>(score0520,_t054C);
          goto JOIN053F
        JOIN053F:  preds = [ASSIGN0550,COND0650]
          real score054F#2 = phi(score054E,score0520)
          real _t0552#1 = Dot<tensor[2]>(r00408,v06035C);
          real _t0554#1 = Dot<tensor[2]>(r10436,v06035C);
          tensor[2] _t0556#1 = <tensor[2]>[_t0552,_t0554];
          tensor[2] pos0562#3 = Add<tensor[2]>(_t0556,_t0446);
          bool _t0565#1 = Inside<2>(pos0562,F032E);
          if _t0565 then goto ASSIGN056A else goto ASSIGN056C
        ASSIGN056A:  preds = [COND056D]
          bool _t0568#1 = Inside<2>(v06035C,T0326);
          goto JOIN0567
        JOIN0567:  preds = [ASSIGN056A,ASSIGN056C]
          bool _t0569#1 = phi(_t0568,_t056B)
          if _t0569 then goto ASSIGN0570 else goto JOIN056E
        ASSIGN0570:  preds = [COND0580]
          real _t056F#1 = Probe<tensor[2],real>(F032E,pos0562);
          real _t0571#1 = Probe<tensor[2],real>(T0326,v06035C);
          real _t0573#2 = Sub<real>(_t056F,_t0571);
          real _t057B#1 = Mul<real>(_t0573,_t0573);
          real score057D#1 = Add<real>(score054F,_t057B);
          goto JOIN056E
        JOIN056E:  preds = [ASSIGN057F,COND0580]
          real score057E#2 = phi(score057D,score054F)
          real _t0581#1 = Dot<tensor[2]>(r00408,v070364);
          real _t0583#1 = Dot<tensor[2]>(r10436,v070364);
          tensor[2] _t0585#1 = <tensor[2]>[_t0581,_t0583];
          tensor[2] pos0591#3 = Add<tensor[2]>(_t0585,_t0446);
          bool _t0594#1 = Inside<2>(pos0591,F032E);
          if _t0594 then goto ASSIGN0599 else goto ASSIGN059B
        ASSIGN0599:  preds = [COND059C]
          bool _t0597#1 = Inside<2>(v070364,T0326);
          goto JOIN0596
        JOIN0596:  preds = [ASSIGN0599,ASSIGN059B]
          bool _t0598#1 = phi(_t0597,_t059A)
          if _t0598 then goto ASSIGN059F else goto JOIN059D
        ASSIGN059F:  preds = [COND05AF]
          real _t059E#1 = Probe<tensor[2],real>(F032E,pos0591);
          real _t05A0#1 = Probe<tensor[2],real>(T0326,v070364);
          real _t05A2#2 = Sub<real>(_t059E,_t05A0);
          real _t05AA#1 = Mul<real>(_t05A2,_t05A2);
          real score05AC#1 = Add<real>(score057E,_t05AA);
          goto JOIN059D
        JOIN059D:  preds = [ASSIGN05AE,COND05AF]
          real score05AD#2 = phi(score05AC,score057E)
          real _t05B0#1 = Dot<tensor[2]>(r00408,v08036C);
          real _t05B2#1 = Dot<tensor[2]>(r10436,v08036C);
          tensor[2] _t05B4#1 = <tensor[2]>[_t05B0,_t05B2];
          tensor[2] pos05C0#3 = Add<tensor[2]>(_t05B4,_t0446);
          bool _t05C3#1 = Inside<2>(pos05C0,F032E);
          if _t05C3 then goto ASSIGN05C8 else goto ASSIGN05CA
        ASSIGN05C8:  preds = [COND05CB]
          bool _t05C6#1 = Inside<2>(v08036C,T0326);
          goto JOIN05C5
        JOIN05C5:  preds = [ASSIGN05C8,ASSIGN05CA]
          bool _t05C7#1 = phi(_t05C6,_t05C9)
          if _t05C7 then goto ASSIGN05CE else goto JOIN05CC
        ASSIGN05CE:  preds = [COND05DE]
          real _t05CD#1 = Probe<tensor[2],real>(F032E,pos05C0);
          real _t05CF#1 = Probe<tensor[2],real>(T0326,v08036C);
          real _t05D1#2 = Sub<real>(_t05CD,_t05CF);
          real _t05D9#1 = Mul<real>(_t05D1,_t05D1);
          real score05DB#1 = Add<real>(score05AD,_t05D9);
          goto JOIN05CC
        JOIN05CC:  preds = [ASSIGN05DD,COND05DE]
          real score05DC#2 = phi(score05DB,score05AD)
          real _t05DF#1 = Dot<tensor[2]>(r00408,v090376);
          real _t05E1#1 = Dot<tensor[2]>(r10436,v090376);
          tensor[2] _t05E3#1 = <tensor[2]>[_t05DF,_t05E1];
          tensor[2] pos05EF#4 = Add<tensor[2]>(_t05E3,_t0446);
          bool _t05F2#1 = Inside<2>(pos05EF,F032E);
          if _t05F2 then goto ASSIGN05F7 else goto ASSIGN05F9
        ASSIGN05F7:  preds = [COND05FA]
          bool _t05F5#1 = Inside<2>(v090376,T0326);
          goto JOIN05F4
        JOIN05F4:  preds = [ASSIGN05F7,ASSIGN05F9]
          bool _t05F6#1 = phi(_t05F5,_t05F8)
          if _t05F6 then goto ASSIGN05FD else goto JOIN05FB
        ASSIGN05FD:  preds = [COND060D]
          real _t05FC#1 = Probe<tensor[2],real>(F032E,pos05EF);
          real _t05FE#1 = Probe<tensor[2],real>(T0326,v090376);
          real _t0600#2 = Sub<real>(_t05FC,_t05FE);
          real _t0608#1 = Mul<real>(_t0600,_t0600);
          real score060A#1 = Add<real>(score05DC,_t0608);
          goto JOIN05FB
        JOIN05FB:  preds = [ASSIGN060C,COND060D]
          real score060B#1 = phi(score060A,score05DC)
          self.t = t03D0;
          self.score = score060B;
          self.r0 = r00408;
          self.r1 = r10436;
          self.pos = pos05EF;
          stabilize ()
        ASSIGN05F9:  preds = [COND05FA]
          bool _t05F8#1 = false;
          goto JOIN05F4
        ASSIGN05CA:  preds = [COND05CB]
          bool _t05C9#1 = false;
          goto JOIN05C5
        ASSIGN059B:  preds = [COND059C]
          bool _t059A#1 = false;
          goto JOIN0596
        ASSIGN056C:  preds = [COND056D]
          bool _t056B#1 = false;
          goto JOIN0567
        ASSIGN050E:  preds = [COND050F]
          bool _t050D#1 = false;
          goto JOIN0509
        ASSIGN04DF:  preds = [COND04E0]
          bool _t04DE#1 = false;
          goto JOIN04DA
        ASSIGN04B0:  preds = [COND04B1]
          bool _t04AF#1 = false;
          goto JOIN04AB
        ASSIGN0481:  preds = [COND0482]
          bool _t0480#1 = false;
          goto JOIN047C
        ASSIGN0452:  preds = [COND0453]
          bool _t0451#1 = false;
          goto JOIN044D
    end Update
    method Stabilize
        ENTRY0620:  preds = []
          tensor[3] t0616#1 = self.t;
          real score0617#1 = self.score;
          tensor[2] r00618#1 = self.r0;
          tensor[2] r10619#1 = self.r1;
          tensor[2] pos061A#1 = self.pos;
          self.t = t0616;
          self.score = score0617;
          self.r0 = r00618;
          self.r1 = r10619;
          self.pos = pos061A;
          return ()
    end Stabilize
  end R
#### end program ####
##### MidIL after translation to MidIL ####
## properties
  none
## globals
  global int T067F#0
  global int F0680#0
  global real2 v01066D#4
  global real2 v02066F#4
  global real2 v030673#4
  global real2 v040675#4
  global real2 v000669#5
  global real2 v060677#4
  global real2 v070679#4
  global real2 v08067B#4
  global real2 v09067D#4
  global string _t065F#1
  global image(IMAGE2D<int>) _t0661#68
  global int _t065D#0
  global string _t0663#1
  global image(IMAGE2D<float>) _t0665#68
  global real _t0667#6
  global real _t066B#7
  global real _t0671#6
## global initialization
  ENTRY065C:  preds = []
    int _t065D#0 = 0;
    string _t065F#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0661#68 = LoadImage<IMAGE2D<int>>(_t065F);
    string _t0663#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0665#68 = LoadImage<IMAGE2D<float>>(_t0663);
    real _t0667#6 = 0.0;
    real2 v000669#5 = <real2>[_t0667,_t0667];
    real _t066B#7 = 0.5e0;
    real2 v01066D#4 = <real2>[_t066B,_t066B];
    real2 v02066F#4 = <real2>[_t066B,_t0667];
    real _t0671#6 = Neg<real>(_t066B);
    real2 v030673#4 = <real2>[_t066B,_t0671];
    real2 v040675#4 = <real2>[_t0667,_t066B];
    real2 v060677#4 = <real2>[_t0667,_t0671];
    real2 v070679#4 = <real2>[_t0671,_t066B];
    real2 v08067B#4 = <real2>[_t0671,_t0667];
    real2 v09067D#4 = <real2>[_t0671,_t0671];
    return (T067F,F0680,v01066D,v02066F,v030673,v040675,v000669,v060677,v070679,v08067B,v09067D,_t065F,_t0661,_t065D,_t0663,_t0665,_t0667,_t066B,_t0671)
## initially
  ARRAY
    ENTRY0687:  preds = []
      int _t0683#4 = 0;
      int _t0684#4 = 60;
      live vars = (_t0684,_t0683)
    for int i0682#1 = _t0683 .. _t0684
      for int j0685#1 = _t0683 .. _t0684
        for int k0686#1 = _t0683 .. _t0684
          ENTRY068B:  preds = []
            live vars = ()
          new R(i0682,j0685,k0686);
## strands
  strand R (int i068D#1, int j068E#1, int k068F#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY0695:  preds = []
        real _t0696#1 = IntToReal(i068D);
        real _t0698#3 = 0.60e2;
        real _t069A#1 = Div<real>(_t0696,_t0698);
        real _t069C#3 = 0.5e0;
        real _t069E#1 = Sub<real>(_t069A,_t069C);
        real _t06A0#1 = IntToReal(j068E);
        real _t06A2#1 = Div<real>(_t06A0,_t0698);
        real _t06A4#1 = Sub<real>(_t06A2,_t069C);
        real _t06A6#1 = IntToReal(k068F);
        real _t06A8#1 = Div<real>(_t06A6,_t0698);
        real _t06AA#1 = Sub<real>(_t06A8,_t069C);
        real3 t06AC#1 = <real3>[_t069E,_t06A4,_t06AA];
        real score06AE#3 = 0.0;
        real2 r006B0#3 = <real2>[score06AE,score06AE];
        self.t = t06AC;
        self.score = score06AE;
        self.r0 = r006B0;
        self.r1 = r006B0;
        self.pos = r006B0;
        strand_init ()
    method Update
        ENTRY06B8:  preds = []
          real3 t06B9#4 = self.t;
          real score06BB#2 = self.score;
          real _t06BD#2 = 0.1e1;
          real _t06BF#3 = 0.2e1;
          int _t06C1#1 = 2;
          real _t06C3#6 = Subscript<real3>(t06B9,_t06C1);
          real _t06C5#1 = Mul<real>(_t06BF,_t06C3);
          real _t06C7#1 = Mul<real>(_t06C5,_t06C3);
          real _t06C9#2 = Sub<real>(_t06BD,_t06C7);
          real _t06CB#1 = Neg<real>(_t06BF);
          real _t06CD#1 = Mul<real>(_t06C3,_t06C3);
          real _t06CF#1 = Sub<real>(_t06BD,_t06CD);
          real _t06D1#2 = sqrt(_t06CF);
          real _t06D3#1 = Mul<real>(_t06CB,_t06D1);
          real _t06D5#1 = Mul<real>(_t06D3,_t06C3);
          real2 r006D7#10 = <real2>[_t06C9,_t06D5];
          real _t06D9#1 = Mul<real>(_t06BF,_t06D1);
          real _t06DB#1 = Mul<real>(_t06D9,_t06C3);
          real2 r106DD#10 = <real2>[_t06DB,_t06C9];
          real _t06DF#1 = Dot<2>(r006D7,v000669);
          real _t06E1#1 = Dot<2>(r106DD,v000669);
          real2 _t06E3#1 = <real2>[_t06DF,_t06E1];
          int _t06E5#1 = 0;
          real _t06E7#1 = Subscript<real3>(t06B9,_t06E5);
          int _t06E9#1 = 1;
          real _t06EB#1 = Subscript<real3>(t06B9,_t06E9);
          real2 _t06ED#9 = <real2>[_t06E7,_t06EB];
          real2 pos06EF#3 = Add<real2>(_t06E3,_t06ED);
          real2 x06F2#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos06EF);
          bool _t06F1#2 = Inside<IMAGE2D<float>,2>(x06F2,_t0665);
          if _t06F1 then goto ASSIGN06F8 else goto ASSIGN11CB
        ASSIGN06F8:  preds = [COND06F5]
          real2 x06F7#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          bool _t06F6#1 = Inside<IMAGE2D<int>,2>(x06F7,_t0661);
          goto JOIN06FC
        JOIN06FC:  preds = [ASSIGN06F9,ASSIGN11CB]
          bool _t06FA#2 = phi(_t06F6,_t06FB)
          if _t06FA then goto ASSIGN073D else goto JOIN07FF
        ASSIGN073D:  preds = [COND06FD]
          real2 x06FF#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos06EF);
          real2 nd0701#2 = Floor<2>(x06FF);
          real2 f0700#2 = Sub<real2>(x06FF,nd0701);
          int{2} n0702#8 = RealToInt<2>(nd0701);
          int t1071E#1 = -1;
          int t2071F#1 = Index<int{2},0>(n0702);
          int ix071D#1 = Add<int>(t1071E,t2071F);
          int t10721#1 = -1;
          int t20722#1 = Index<int{2},1>(n0702);
          int iy0720#1 = Add<int>(t10721,t20722);
          addr(IMAGE2D<float>) a0723#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy0720);
          real4 v00704#1 = LoadVoxels<IMAGE2D<float>,4>(a0723);
          int t10717#1 = -1;
          int t20718#1 = Index<int{2},0>(n0702);
          int ix0716#1 = Add<int>(t10717,t20718);
          int t1071A#1 = 0;
          int t2071B#1 = Index<int{2},1>(n0702);
          int iy0719#1 = Add<int>(t1071A,t2071B);
          addr(IMAGE2D<float>) a071C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0716,iy0719);
          real4 v10705#1 = LoadVoxels<IMAGE2D<float>,4>(a071C);
          int t10710#1 = -1;
          int t20711#1 = Index<int{2},0>(n0702);
          int ix070F#1 = Add<int>(t10710,t20711);
          int t10713#1 = 1;
          int t20714#1 = Index<int{2},1>(n0702);
          int iy0712#1 = Add<int>(t10713,t20714);
          addr(IMAGE2D<float>) a0715#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix070F,iy0712);
          real4 v20706#1 = LoadVoxels<IMAGE2D<float>,4>(a0715);
          int t10709#1 = -1;
          int t2070A#1 = Index<int{2},0>(n0702);
          int ix0708#1 = Add<int>(t10709,t2070A);
          int t1070C#1 = 2;
          int t2070D#1 = Index<int{2},1>(n0702);
          int iy070B#1 = Add<int>(t1070C,t2070D);
          addr(IMAGE2D<float>) a070E#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0708,iy070B);
          real4 v30707#1 = LoadVoxels<IMAGE2D<float>,4>(a070E);
          real fy072F#4 = Index<real2,1>(f0700);
          real r0737#1 = 0.1e1;
          real t30734#1 = Add<real>(fy072F,r0737);
          real t20733#1 = fy072F;
          real r0736#1 = 0.1e1;
          real t10732#1 = Sub<real>(fy072F,r0736);
          real r0735#1 = 0.2e1;
          real t00731#1 = Sub<real>(fy072F,r0735);
          real4 a0730#1 = <real4>[t30734,t20733,t10732,t00731];
          real4 hy0725#1 = EvalKernel<4,bspln3,0>(a0730);
          real fx0726#4 = Index<real2,0>(f0700);
          real r072E#1 = 0.1e1;
          real t3072B#1 = Add<real>(fx0726,r072E);
          real t2072A#1 = fx0726;
          real r072D#1 = 0.1e1;
          real t10729#1 = Sub<real>(fx0726,r072D);
          real r072C#1 = 0.2e1;
          real t00728#1 = Sub<real>(fx0726,r072C);
          real4 a0727#1 = <real4>[t3072B,t2072A,t10729,t00728];
          real4 hx0724#4 = EvalKernel<4,bspln3,0>(a0727);
          real t00739#1 = Dot<4>(v00704,hx0724);
          real t1073A#1 = Dot<4>(v10705,hx0724);
          real t2073B#1 = Dot<4>(v20706,hx0724);
          real t3073C#1 = Dot<4>(v30707,hx0724);
          real4 tv0738#1 = <real4>[t00739,t1073A,t2073B,t3073C];
          real _t06FE#1 = Dot<4>(hy0725,tv0738);
          real2 x077C#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          real2 nd077E#2 = Floor<2>(x077C);
          real2 f077D#2 = Sub<real2>(x077C,nd077E);
          int{2} n077F#8 = RealToInt<2>(nd077E);
          int t1079B#1 = -1;
          int t2079C#1 = Index<int{2},0>(n077F);
          int ix079A#1 = Add<int>(t1079B,t2079C);
          int t1079E#1 = -1;
          int t2079F#1 = Index<int{2},1>(n077F);
          int iy079D#1 = Add<int>(t1079E,t2079F);
          addr(IMAGE2D<int>) a07A0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy079D);
          real4 v00781#1 = LoadVoxels<IMAGE2D<int>,4>(a07A0);
          int t10794#1 = -1;
          int t20795#1 = Index<int{2},0>(n077F);
          int ix0793#1 = Add<int>(t10794,t20795);
          int t10797#1 = 0;
          int t20798#1 = Index<int{2},1>(n077F);
          int iy0796#1 = Add<int>(t10797,t20798);
          addr(IMAGE2D<int>) a0799#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0793,iy0796);
          real4 v10782#1 = LoadVoxels<IMAGE2D<int>,4>(a0799);
          int t1078D#1 = -1;
          int t2078E#1 = Index<int{2},0>(n077F);
          int ix078C#1 = Add<int>(t1078D,t2078E);
          int t10790#1 = 1;
          int t20791#1 = Index<int{2},1>(n077F);
          int iy078F#1 = Add<int>(t10790,t20791);
          addr(IMAGE2D<int>) a0792#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix078C,iy078F);
          real4 v20783#1 = LoadVoxels<IMAGE2D<int>,4>(a0792);
          int t10786#1 = -1;
          int t20787#1 = Index<int{2},0>(n077F);
          int ix0785#1 = Add<int>(t10786,t20787);
          int t10789#1 = 2;
          int t2078A#1 = Index<int{2},1>(n077F);
          int iy0788#1 = Add<int>(t10789,t2078A);
          addr(IMAGE2D<int>) a078B#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0785,iy0788);
          real4 v30784#1 = LoadVoxels<IMAGE2D<int>,4>(a078B);
          real fy07AC#4 = Index<real2,1>(f077D);
          real r07B4#1 = 0.1e1;
          real t307B1#1 = Add<real>(fy07AC,r07B4);
          real t207B0#1 = fy07AC;
          real r07B3#1 = 0.1e1;
          real t107AF#1 = Sub<real>(fy07AC,r07B3);
          real r07B2#1 = 0.2e1;
          real t007AE#1 = Sub<real>(fy07AC,r07B2);
          real4 a07AD#1 = <real4>[t307B1,t207B0,t107AF,t007AE];
          real4 hy07A2#1 = EvalKernel<4,bspln3,0>(a07AD);
          real fx07A3#4 = Index<real2,0>(f077D);
          real r07AB#1 = 0.1e1;
          real t307A8#1 = Add<real>(fx07A3,r07AB);
          real t207A7#1 = fx07A3;
          real r07AA#1 = 0.1e1;
          real t107A6#1 = Sub<real>(fx07A3,r07AA);
          real r07A9#1 = 0.2e1;
          real t007A5#1 = Sub<real>(fx07A3,r07A9);
          real4 a07A4#1 = <real4>[t307A8,t207A7,t107A6,t007A5];
          real4 hx07A1#4 = EvalKernel<4,bspln3,0>(a07A4);
          real t007B6#1 = Dot<4>(v00781,hx07A1);
          real t107B7#1 = Dot<4>(v10782,hx07A1);
          real t207B8#1 = Dot<4>(v20783,hx07A1);
          real t307B9#1 = Dot<4>(v30784,hx07A1);
          real4 tv07B5#1 = <real4>[t007B6,t107B7,t207B8,t307B9];
          real _t077B#1 = Dot<4>(hy07A2,tv07B5);
          real _t07F8#2 = Sub<real>(_t06FE,_t077B);
          real _t07FA#1 = Mul<real>(_t07F8,_t07F8);
          real score07FC#1 = Add<real>(score06BB,_t07FA);
          goto JOIN07FF
        JOIN07FF:  preds = [ASSIGN07FD,COND06FD]
          real score07FE#2 = phi(score07FC,score06BB)
          real _t0800#1 = Dot<2>(r006D7,v01066D);
          real _t0802#1 = Dot<2>(r106DD,v01066D);
          real2 _t0804#1 = <real2>[_t0800,_t0802];
          real2 pos0806#2 = Add<real2>(_t0804,_t06ED);
          real2 x0809#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0806);
          bool _t0808#1 = Inside<IMAGE2D<float>,2>(x0809,_t0665);
          if _t0808 then goto ASSIGN080F else goto ASSIGN11CA
        ASSIGN080F:  preds = [COND080C]
          real2 x080E#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v01066D);
          bool _t080D#1 = Inside<IMAGE2D<int>,2>(x080E,_t0661);
          goto JOIN0813
        JOIN0813:  preds = [ASSIGN0810,ASSIGN11CA]
          bool _t0811#1 = phi(_t080D,_t0812)
          if _t0811 then goto ASSIGN0854 else goto JOIN0916
        ASSIGN0854:  preds = [COND0814]
          real2 x0816#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0806);
          real2 nd0818#2 = Floor<2>(x0816);
          real2 f0817#2 = Sub<real2>(x0816,nd0818);
          int{2} n0819#8 = RealToInt<2>(nd0818);
          int t10835#1 = -1;
          int t20836#1 = Index<int{2},0>(n0819);
          int ix0834#1 = Add<int>(t10835,t20836);
          int t10838#1 = -1;
          int t20839#1 = Index<int{2},1>(n0819);
          int iy0837#1 = Add<int>(t10838,t20839);
          addr(IMAGE2D<float>) a083A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0837);
          real4 v0081B#1 = LoadVoxels<IMAGE2D<float>,4>(a083A);
          int t1082E#1 = -1;
          int t2082F#1 = Index<int{2},0>(n0819);
          int ix082D#1 = Add<int>(t1082E,t2082F);
          int t10831#1 = 0;
          int t20832#1 = Index<int{2},1>(n0819);
          int iy0830#1 = Add<int>(t10831,t20832);
          addr(IMAGE2D<float>) a0833#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix082D,iy0830);
          real4 v1081C#1 = LoadVoxels<IMAGE2D<float>,4>(a0833);
          int t10827#1 = -1;
          int t20828#1 = Index<int{2},0>(n0819);
          int ix0826#1 = Add<int>(t10827,t20828);
          int t1082A#1 = 1;
          int t2082B#1 = Index<int{2},1>(n0819);
          int iy0829#1 = Add<int>(t1082A,t2082B);
          addr(IMAGE2D<float>) a082C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0826,iy0829);
          real4 v2081D#1 = LoadVoxels<IMAGE2D<float>,4>(a082C);
          int t10820#1 = -1;
          int t20821#1 = Index<int{2},0>(n0819);
          int ix081F#1 = Add<int>(t10820,t20821);
          int t10823#1 = 2;
          int t20824#1 = Index<int{2},1>(n0819);
          int iy0822#1 = Add<int>(t10823,t20824);
          addr(IMAGE2D<float>) a0825#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix081F,iy0822);
          real4 v3081E#1 = LoadVoxels<IMAGE2D<float>,4>(a0825);
          real fy0846#4 = Index<real2,1>(f0817);
          real r084E#1 = 0.1e1;
          real t3084B#1 = Add<real>(fy0846,r084E);
          real t2084A#1 = fy0846;
          real r084D#1 = 0.1e1;
          real t10849#1 = Sub<real>(fy0846,r084D);
          real r084C#1 = 0.2e1;
          real t00848#1 = Sub<real>(fy0846,r084C);
          real4 a0847#1 = <real4>[t3084B,t2084A,t10849,t00848];
          real4 hy083C#1 = EvalKernel<4,bspln3,0>(a0847);
          real fx083D#4 = Index<real2,0>(f0817);
          real r0845#1 = 0.1e1;
          real t30842#1 = Add<real>(fx083D,r0845);
          real t20841#1 = fx083D;
          real r0844#1 = 0.1e1;
          real t10840#1 = Sub<real>(fx083D,r0844);
          real r0843#1 = 0.2e1;
          real t0083F#1 = Sub<real>(fx083D,r0843);
          real4 a083E#1 = <real4>[t30842,t20841,t10840,t0083F];
          real4 hx083B#4 = EvalKernel<4,bspln3,0>(a083E);
          real t00850#1 = Dot<4>(v0081B,hx083B);
          real t10851#1 = Dot<4>(v1081C,hx083B);
          real t20852#1 = Dot<4>(v2081D,hx083B);
          real t30853#1 = Dot<4>(v3081E,hx083B);
          real4 tv084F#1 = <real4>[t00850,t10851,t20852,t30853];
          real _t0815#1 = Dot<4>(hy083C,tv084F);
          real2 x0893#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v01066D);
          real2 nd0895#2 = Floor<2>(x0893);
          real2 f0894#2 = Sub<real2>(x0893,nd0895);
          int{2} n0896#8 = RealToInt<2>(nd0895);
          int t108B2#1 = -1;
          int t208B3#1 = Index<int{2},0>(n0896);
          int ix08B1#1 = Add<int>(t108B2,t208B3);
          int t108B5#1 = -1;
          int t208B6#1 = Index<int{2},1>(n0896);
          int iy08B4#1 = Add<int>(t108B5,t208B6);
          addr(IMAGE2D<int>) a08B7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy08B4);
          real4 v00898#1 = LoadVoxels<IMAGE2D<int>,4>(a08B7);
          int t108AB#1 = -1;
          int t208AC#1 = Index<int{2},0>(n0896);
          int ix08AA#1 = Add<int>(t108AB,t208AC);
          int t108AE#1 = 0;
          int t208AF#1 = Index<int{2},1>(n0896);
          int iy08AD#1 = Add<int>(t108AE,t208AF);
          addr(IMAGE2D<int>) a08B0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08AA,iy08AD);
          real4 v10899#1 = LoadVoxels<IMAGE2D<int>,4>(a08B0);
          int t108A4#1 = -1;
          int t208A5#1 = Index<int{2},0>(n0896);
          int ix08A3#1 = Add<int>(t108A4,t208A5);
          int t108A7#1 = 1;
          int t208A8#1 = Index<int{2},1>(n0896);
          int iy08A6#1 = Add<int>(t108A7,t208A8);
          addr(IMAGE2D<int>) a08A9#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08A3,iy08A6);
          real4 v2089A#1 = LoadVoxels<IMAGE2D<int>,4>(a08A9);
          int t1089D#1 = -1;
          int t2089E#1 = Index<int{2},0>(n0896);
          int ix089C#1 = Add<int>(t1089D,t2089E);
          int t108A0#1 = 2;
          int t208A1#1 = Index<int{2},1>(n0896);
          int iy089F#1 = Add<int>(t108A0,t208A1);
          addr(IMAGE2D<int>) a08A2#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix089C,iy089F);
          real4 v3089B#1 = LoadVoxels<IMAGE2D<int>,4>(a08A2);
          real fy08C3#4 = Index<real2,1>(f0894);
          real r08CB#1 = 0.1e1;
          real t308C8#1 = Add<real>(fy08C3,r08CB);
          real t208C7#1 = fy08C3;
          real r08CA#1 = 0.1e1;
          real t108C6#1 = Sub<real>(fy08C3,r08CA);
          real r08C9#1 = 0.2e1;
          real t008C5#1 = Sub<real>(fy08C3,r08C9);
          real4 a08C4#1 = <real4>[t308C8,t208C7,t108C6,t008C5];
          real4 hy08B9#1 = EvalKernel<4,bspln3,0>(a08C4);
          real fx08BA#4 = Index<real2,0>(f0894);
          real r08C2#1 = 0.1e1;
          real t308BF#1 = Add<real>(fx08BA,r08C2);
          real t208BE#1 = fx08BA;
          real r08C1#1 = 0.1e1;
          real t108BD#1 = Sub<real>(fx08BA,r08C1);
          real r08C0#1 = 0.2e1;
          real t008BC#1 = Sub<real>(fx08BA,r08C0);
          real4 a08BB#1 = <real4>[t308BF,t208BE,t108BD,t008BC];
          real4 hx08B8#4 = EvalKernel<4,bspln3,0>(a08BB);
          real t008CD#1 = Dot<4>(v00898,hx08B8);
          real t108CE#1 = Dot<4>(v10899,hx08B8);
          real t208CF#1 = Dot<4>(v2089A,hx08B8);
          real t308D0#1 = Dot<4>(v3089B,hx08B8);
          real4 tv08CC#1 = <real4>[t008CD,t108CE,t208CF,t308D0];
          real _t0892#1 = Dot<4>(hy08B9,tv08CC);
          real _t090F#2 = Sub<real>(_t0815,_t0892);
          real _t0911#1 = Mul<real>(_t090F,_t090F);
          real score0913#1 = Add<real>(score07FE,_t0911);
          goto JOIN0916
        JOIN0916:  preds = [ASSIGN0914,COND0814]
          real score0915#2 = phi(score0913,score07FE)
          real _t0917#1 = Dot<2>(r006D7,v02066F);
          real _t0919#1 = Dot<2>(r106DD,v02066F);
          real2 _t091B#1 = <real2>[_t0917,_t0919];
          real2 pos091D#2 = Add<real2>(_t091B,_t06ED);
          real2 x0920#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos091D);
          bool _t091F#1 = Inside<IMAGE2D<float>,2>(x0920,_t0665);
          if _t091F then goto ASSIGN0926 else goto ASSIGN11C9
        ASSIGN0926:  preds = [COND0923]
          real2 x0925#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v02066F);
          bool _t0924#1 = Inside<IMAGE2D<int>,2>(x0925,_t0661);
          goto JOIN092A
        JOIN092A:  preds = [ASSIGN0927,ASSIGN11C9]
          bool _t0928#1 = phi(_t0924,_t0929)
          if _t0928 then goto ASSIGN096B else goto JOIN0A2D
        ASSIGN096B:  preds = [COND092B]
          real2 x092D#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos091D);
          real2 nd092F#2 = Floor<2>(x092D);
          real2 f092E#2 = Sub<real2>(x092D,nd092F);
          int{2} n0930#8 = RealToInt<2>(nd092F);
          int t1094C#1 = -1;
          int t2094D#1 = Index<int{2},0>(n0930);
          int ix094B#1 = Add<int>(t1094C,t2094D);
          int t1094F#1 = -1;
          int t20950#1 = Index<int{2},1>(n0930);
          int iy094E#1 = Add<int>(t1094F,t20950);
          addr(IMAGE2D<float>) a0951#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy094E);
          real4 v00932#1 = LoadVoxels<IMAGE2D<float>,4>(a0951);
          int t10945#1 = -1;
          int t20946#1 = Index<int{2},0>(n0930);
          int ix0944#1 = Add<int>(t10945,t20946);
          int t10948#1 = 0;
          int t20949#1 = Index<int{2},1>(n0930);
          int iy0947#1 = Add<int>(t10948,t20949);
          addr(IMAGE2D<float>) a094A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0944,iy0947);
          real4 v10933#1 = LoadVoxels<IMAGE2D<float>,4>(a094A);
          int t1093E#1 = -1;
          int t2093F#1 = Index<int{2},0>(n0930);
          int ix093D#1 = Add<int>(t1093E,t2093F);
          int t10941#1 = 1;
          int t20942#1 = Index<int{2},1>(n0930);
          int iy0940#1 = Add<int>(t10941,t20942);
          addr(IMAGE2D<float>) a0943#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix093D,iy0940);
          real4 v20934#1 = LoadVoxels<IMAGE2D<float>,4>(a0943);
          int t10937#1 = -1;
          int t20938#1 = Index<int{2},0>(n0930);
          int ix0936#1 = Add<int>(t10937,t20938);
          int t1093A#1 = 2;
          int t2093B#1 = Index<int{2},1>(n0930);
          int iy0939#1 = Add<int>(t1093A,t2093B);
          addr(IMAGE2D<float>) a093C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0936,iy0939);
          real4 v30935#1 = LoadVoxels<IMAGE2D<float>,4>(a093C);
          real fy095D#4 = Index<real2,1>(f092E);
          real r0965#1 = 0.1e1;
          real t30962#1 = Add<real>(fy095D,r0965);
          real t20961#1 = fy095D;
          real r0964#1 = 0.1e1;
          real t10960#1 = Sub<real>(fy095D,r0964);
          real r0963#1 = 0.2e1;
          real t0095F#1 = Sub<real>(fy095D,r0963);
          real4 a095E#1 = <real4>[t30962,t20961,t10960,t0095F];
          real4 hy0953#1 = EvalKernel<4,bspln3,0>(a095E);
          real fx0954#4 = Index<real2,0>(f092E);
          real r095C#1 = 0.1e1;
          real t30959#1 = Add<real>(fx0954,r095C);
          real t20958#1 = fx0954;
          real r095B#1 = 0.1e1;
          real t10957#1 = Sub<real>(fx0954,r095B);
          real r095A#1 = 0.2e1;
          real t00956#1 = Sub<real>(fx0954,r095A);
          real4 a0955#1 = <real4>[t30959,t20958,t10957,t00956];
          real4 hx0952#4 = EvalKernel<4,bspln3,0>(a0955);
          real t00967#1 = Dot<4>(v00932,hx0952);
          real t10968#1 = Dot<4>(v10933,hx0952);
          real t20969#1 = Dot<4>(v20934,hx0952);
          real t3096A#1 = Dot<4>(v30935,hx0952);
          real4 tv0966#1 = <real4>[t00967,t10968,t20969,t3096A];
          real _t092C#1 = Dot<4>(hy0953,tv0966);
          real2 x09AA#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v02066F);
          real2 nd09AC#2 = Floor<2>(x09AA);
          real2 f09AB#2 = Sub<real2>(x09AA,nd09AC);
          int{2} n09AD#8 = RealToInt<2>(nd09AC);
          int t109C9#1 = -1;
          int t209CA#1 = Index<int{2},0>(n09AD);
          int ix09C8#1 = Add<int>(t109C9,t209CA);
          int t109CC#1 = -1;
          int t209CD#1 = Index<int{2},1>(n09AD);
          int iy09CB#1 = Add<int>(t109CC,t209CD);
          addr(IMAGE2D<int>) a09CE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09CB);
          real4 v009AF#1 = LoadVoxels<IMAGE2D<int>,4>(a09CE);
          int t109C2#1 = -1;
          int t209C3#1 = Index<int{2},0>(n09AD);
          int ix09C1#1 = Add<int>(t109C2,t209C3);
          int t109C5#1 = 0;
          int t209C6#1 = Index<int{2},1>(n09AD);
          int iy09C4#1 = Add<int>(t109C5,t209C6);
          addr(IMAGE2D<int>) a09C7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C1,iy09C4);
          real4 v109B0#1 = LoadVoxels<IMAGE2D<int>,4>(a09C7);
          int t109BB#1 = -1;
          int t209BC#1 = Index<int{2},0>(n09AD);
          int ix09BA#1 = Add<int>(t109BB,t209BC);
          int t109BE#1 = 1;
          int t209BF#1 = Index<int{2},1>(n09AD);
          int iy09BD#1 = Add<int>(t109BE,t209BF);
          addr(IMAGE2D<int>) a09C0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09BA,iy09BD);
          real4 v209B1#1 = LoadVoxels<IMAGE2D<int>,4>(a09C0);
          int t109B4#1 = -1;
          int t209B5#1 = Index<int{2},0>(n09AD);
          int ix09B3#1 = Add<int>(t109B4,t209B5);
          int t109B7#1 = 2;
          int t209B8#1 = Index<int{2},1>(n09AD);
          int iy09B6#1 = Add<int>(t109B7,t209B8);
          addr(IMAGE2D<int>) a09B9#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09B3,iy09B6);
          real4 v309B2#1 = LoadVoxels<IMAGE2D<int>,4>(a09B9);
          real fy09DA#4 = Index<real2,1>(f09AB);
          real r09E2#1 = 0.1e1;
          real t309DF#1 = Add<real>(fy09DA,r09E2);
          real t209DE#1 = fy09DA;
          real r09E1#1 = 0.1e1;
          real t109DD#1 = Sub<real>(fy09DA,r09E1);
          real r09E0#1 = 0.2e1;
          real t009DC#1 = Sub<real>(fy09DA,r09E0);
          real4 a09DB#1 = <real4>[t309DF,t209DE,t109DD,t009DC];
          real4 hy09D0#1 = EvalKernel<4,bspln3,0>(a09DB);
          real fx09D1#4 = Index<real2,0>(f09AB);
          real r09D9#1 = 0.1e1;
          real t309D6#1 = Add<real>(fx09D1,r09D9);
          real t209D5#1 = fx09D1;
          real r09D8#1 = 0.1e1;
          real t109D4#1 = Sub<real>(fx09D1,r09D8);
          real r09D7#1 = 0.2e1;
          real t009D3#1 = Sub<real>(fx09D1,r09D7);
          real4 a09D2#1 = <real4>[t309D6,t209D5,t109D4,t009D3];
          real4 hx09CF#4 = EvalKernel<4,bspln3,0>(a09D2);
          real t009E4#1 = Dot<4>(v009AF,hx09CF);
          real t109E5#1 = Dot<4>(v109B0,hx09CF);
          real t209E6#1 = Dot<4>(v209B1,hx09CF);
          real t309E7#1 = Dot<4>(v309B2,hx09CF);
          real4 tv09E3#1 = <real4>[t009E4,t109E5,t209E6,t309E7];
          real _t09A9#1 = Dot<4>(hy09D0,tv09E3);
          real _t0A26#2 = Sub<real>(_t092C,_t09A9);
          real _t0A28#1 = Mul<real>(_t0A26,_t0A26);
          real score0A2A#1 = Add<real>(score0915,_t0A28);
          goto JOIN0A2D
        JOIN0A2D:  preds = [ASSIGN0A2B,COND092B]
          real score0A2C#2 = phi(score0A2A,score0915)
          real _t0A2E#1 = Dot<2>(r006D7,v030673);
          real _t0A30#1 = Dot<2>(r106DD,v030673);
          real2 _t0A32#1 = <real2>[_t0A2E,_t0A30];
          real2 pos0A34#2 = Add<real2>(_t0A32,_t06ED);
          real2 x0A37#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0A34);
          bool _t0A36#1 = Inside<IMAGE2D<float>,2>(x0A37,_t0665);
          if _t0A36 then goto ASSIGN0A3D else goto ASSIGN11C8
        ASSIGN0A3D:  preds = [COND0A3A]
          real2 x0A3C#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v030673);
          bool _t0A3B#1 = Inside<IMAGE2D<int>,2>(x0A3C,_t0661);
          goto JOIN0A41
        JOIN0A41:  preds = [ASSIGN0A3E,ASSIGN11C8]
          bool _t0A3F#1 = phi(_t0A3B,_t0A40)
          if _t0A3F then goto ASSIGN0A82 else goto JOIN0B44
        ASSIGN0A82:  preds = [COND0A42]
          real2 x0A44#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0A34);
          real2 nd0A46#2 = Floor<2>(x0A44);
          real2 f0A45#2 = Sub<real2>(x0A44,nd0A46);
          int{2} n0A47#8 = RealToInt<2>(nd0A46);
          int t10A63#1 = -1;
          int t20A64#1 = Index<int{2},0>(n0A47);
          int ix0A62#1 = Add<int>(t10A63,t20A64);
          int t10A66#1 = -1;
          int t20A67#1 = Index<int{2},1>(n0A47);
          int iy0A65#1 = Add<int>(t10A66,t20A67);
          addr(IMAGE2D<float>) a0A68#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A65);
          real4 v00A49#1 = LoadVoxels<IMAGE2D<float>,4>(a0A68);
          int t10A5C#1 = -1;
          int t20A5D#1 = Index<int{2},0>(n0A47);
          int ix0A5B#1 = Add<int>(t10A5C,t20A5D);
          int t10A5F#1 = 0;
          int t20A60#1 = Index<int{2},1>(n0A47);
          int iy0A5E#1 = Add<int>(t10A5F,t20A60);
          addr(IMAGE2D<float>) a0A61#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A5B,iy0A5E);
          real4 v10A4A#1 = LoadVoxels<IMAGE2D<float>,4>(a0A61);
          int t10A55#1 = -1;
          int t20A56#1 = Index<int{2},0>(n0A47);
          int ix0A54#1 = Add<int>(t10A55,t20A56);
          int t10A58#1 = 1;
          int t20A59#1 = Index<int{2},1>(n0A47);
          int iy0A57#1 = Add<int>(t10A58,t20A59);
          addr(IMAGE2D<float>) a0A5A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A54,iy0A57);
          real4 v20A4B#1 = LoadVoxels<IMAGE2D<float>,4>(a0A5A);
          int t10A4E#1 = -1;
          int t20A4F#1 = Index<int{2},0>(n0A47);
          int ix0A4D#1 = Add<int>(t10A4E,t20A4F);
          int t10A51#1 = 2;
          int t20A52#1 = Index<int{2},1>(n0A47);
          int iy0A50#1 = Add<int>(t10A51,t20A52);
          addr(IMAGE2D<float>) a0A53#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A4D,iy0A50);
          real4 v30A4C#1 = LoadVoxels<IMAGE2D<float>,4>(a0A53);
          real fy0A74#4 = Index<real2,1>(f0A45);
          real r0A7C#1 = 0.1e1;
          real t30A79#1 = Add<real>(fy0A74,r0A7C);
          real t20A78#1 = fy0A74;
          real r0A7B#1 = 0.1e1;
          real t10A77#1 = Sub<real>(fy0A74,r0A7B);
          real r0A7A#1 = 0.2e1;
          real t00A76#1 = Sub<real>(fy0A74,r0A7A);
          real4 a0A75#1 = <real4>[t30A79,t20A78,t10A77,t00A76];
          real4 hy0A6A#1 = EvalKernel<4,bspln3,0>(a0A75);
          real fx0A6B#4 = Index<real2,0>(f0A45);
          real r0A73#1 = 0.1e1;
          real t30A70#1 = Add<real>(fx0A6B,r0A73);
          real t20A6F#1 = fx0A6B;
          real r0A72#1 = 0.1e1;
          real t10A6E#1 = Sub<real>(fx0A6B,r0A72);
          real r0A71#1 = 0.2e1;
          real t00A6D#1 = Sub<real>(fx0A6B,r0A71);
          real4 a0A6C#1 = <real4>[t30A70,t20A6F,t10A6E,t00A6D];
          real4 hx0A69#4 = EvalKernel<4,bspln3,0>(a0A6C);
          real t00A7E#1 = Dot<4>(v00A49,hx0A69);
          real t10A7F#1 = Dot<4>(v10A4A,hx0A69);
          real t20A80#1 = Dot<4>(v20A4B,hx0A69);
          real t30A81#1 = Dot<4>(v30A4C,hx0A69);
          real4 tv0A7D#1 = <real4>[t00A7E,t10A7F,t20A80,t30A81];
          real _t0A43#1 = Dot<4>(hy0A6A,tv0A7D);
          real2 x0AC1#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v030673);
          real2 nd0AC3#2 = Floor<2>(x0AC1);
          real2 f0AC2#2 = Sub<real2>(x0AC1,nd0AC3);
          int{2} n0AC4#8 = RealToInt<2>(nd0AC3);
          int t10AE0#1 = -1;
          int t20AE1#1 = Index<int{2},0>(n0AC4);
          int ix0ADF#1 = Add<int>(t10AE0,t20AE1);
          int t10AE3#1 = -1;
          int t20AE4#1 = Index<int{2},1>(n0AC4);
          int iy0AE2#1 = Add<int>(t10AE3,t20AE4);
          addr(IMAGE2D<int>) a0AE5#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0AE2);
          real4 v00AC6#1 = LoadVoxels<IMAGE2D<int>,4>(a0AE5);
          int t10AD9#1 = -1;
          int t20ADA#1 = Index<int{2},0>(n0AC4);
          int ix0AD8#1 = Add<int>(t10AD9,t20ADA);
          int t10ADC#1 = 0;
          int t20ADD#1 = Index<int{2},1>(n0AC4);
          int iy0ADB#1 = Add<int>(t10ADC,t20ADD);
          addr(IMAGE2D<int>) a0ADE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0AD8,iy0ADB);
          real4 v10AC7#1 = LoadVoxels<IMAGE2D<int>,4>(a0ADE);
          int t10AD2#1 = -1;
          int t20AD3#1 = Index<int{2},0>(n0AC4);
          int ix0AD1#1 = Add<int>(t10AD2,t20AD3);
          int t10AD5#1 = 1;
          int t20AD6#1 = Index<int{2},1>(n0AC4);
          int iy0AD4#1 = Add<int>(t10AD5,t20AD6);
          addr(IMAGE2D<int>) a0AD7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0AD1,iy0AD4);
          real4 v20AC8#1 = LoadVoxels<IMAGE2D<int>,4>(a0AD7);
          int t10ACB#1 = -1;
          int t20ACC#1 = Index<int{2},0>(n0AC4);
          int ix0ACA#1 = Add<int>(t10ACB,t20ACC);
          int t10ACE#1 = 2;
          int t20ACF#1 = Index<int{2},1>(n0AC4);
          int iy0ACD#1 = Add<int>(t10ACE,t20ACF);
          addr(IMAGE2D<int>) a0AD0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ACA,iy0ACD);
          real4 v30AC9#1 = LoadVoxels<IMAGE2D<int>,4>(a0AD0);
          real fy0AF1#4 = Index<real2,1>(f0AC2);
          real r0AF9#1 = 0.1e1;
          real t30AF6#1 = Add<real>(fy0AF1,r0AF9);
          real t20AF5#1 = fy0AF1;
          real r0AF8#1 = 0.1e1;
          real t10AF4#1 = Sub<real>(fy0AF1,r0AF8);
          real r0AF7#1 = 0.2e1;
          real t00AF3#1 = Sub<real>(fy0AF1,r0AF7);
          real4 a0AF2#1 = <real4>[t30AF6,t20AF5,t10AF4,t00AF3];
          real4 hy0AE7#1 = EvalKernel<4,bspln3,0>(a0AF2);
          real fx0AE8#4 = Index<real2,0>(f0AC2);
          real r0AF0#1 = 0.1e1;
          real t30AED#1 = Add<real>(fx0AE8,r0AF0);
          real t20AEC#1 = fx0AE8;
          real r0AEF#1 = 0.1e1;
          real t10AEB#1 = Sub<real>(fx0AE8,r0AEF);
          real r0AEE#1 = 0.2e1;
          real t00AEA#1 = Sub<real>(fx0AE8,r0AEE);
          real4 a0AE9#1 = <real4>[t30AED,t20AEC,t10AEB,t00AEA];
          real4 hx0AE6#4 = EvalKernel<4,bspln3,0>(a0AE9);
          real t00AFB#1 = Dot<4>(v00AC6,hx0AE6);
          real t10AFC#1 = Dot<4>(v10AC7,hx0AE6);
          real t20AFD#1 = Dot<4>(v20AC8,hx0AE6);
          real t30AFE#1 = Dot<4>(v30AC9,hx0AE6);
          real4 tv0AFA#1 = <real4>[t00AFB,t10AFC,t20AFD,t30AFE];
          real _t0AC0#1 = Dot<4>(hy0AE7,tv0AFA);
          real _t0B3D#2 = Sub<real>(_t0A43,_t0AC0);
          real _t0B3F#1 = Mul<real>(_t0B3D,_t0B3D);
          real score0B41#1 = Add<real>(score0A2C,_t0B3F);
          goto JOIN0B44
        JOIN0B44:  preds = [ASSIGN0B42,COND0A42]
          real score0B43#2 = phi(score0B41,score0A2C)
          real _t0B45#1 = Dot<2>(r006D7,v040675);
          real _t0B47#1 = Dot<2>(r106DD,v040675);
          real2 _t0B49#1 = <real2>[_t0B45,_t0B47];
          real2 pos0B4B#2 = Add<real2>(_t0B49,_t06ED);
          real2 x0B4E#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0B4B);
          bool _t0B4D#1 = Inside<IMAGE2D<float>,2>(x0B4E,_t0665);
          if _t0B4D then goto ASSIGN0B54 else goto ASSIGN11C7
        ASSIGN0B54:  preds = [COND0B51]
          real2 x0B53#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v040675);
          bool _t0B52#1 = Inside<IMAGE2D<int>,2>(x0B53,_t0661);
          goto JOIN0B58
        JOIN0B58:  preds = [ASSIGN0B55,ASSIGN11C7]
          bool _t0B56#1 = phi(_t0B52,_t0B57)
          if _t0B56 then goto ASSIGN0B99 else goto JOIN0C5B
        ASSIGN0B99:  preds = [COND0B59]
          real2 x0B5B#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0B4B);
          real2 nd0B5D#2 = Floor<2>(x0B5B);
          real2 f0B5C#2 = Sub<real2>(x0B5B,nd0B5D);
          int{2} n0B5E#8 = RealToInt<2>(nd0B5D);
          int t10B7A#1 = -1;
          int t20B7B#1 = Index<int{2},0>(n0B5E);
          int ix0B79#1 = Add<int>(t10B7A,t20B7B);
          int t10B7D#1 = -1;
          int t20B7E#1 = Index<int{2},1>(n0B5E);
          int iy0B7C#1 = Add<int>(t10B7D,t20B7E);
          addr(IMAGE2D<float>) a0B7F#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B7C);
          real4 v00B60#1 = LoadVoxels<IMAGE2D<float>,4>(a0B7F);
          int t10B73#1 = -1;
          int t20B74#1 = Index<int{2},0>(n0B5E);
          int ix0B72#1 = Add<int>(t10B73,t20B74);
          int t10B76#1 = 0;
          int t20B77#1 = Index<int{2},1>(n0B5E);
          int iy0B75#1 = Add<int>(t10B76,t20B77);
          addr(IMAGE2D<float>) a0B78#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B72,iy0B75);
          real4 v10B61#1 = LoadVoxels<IMAGE2D<float>,4>(a0B78);
          int t10B6C#1 = -1;
          int t20B6D#1 = Index<int{2},0>(n0B5E);
          int ix0B6B#1 = Add<int>(t10B6C,t20B6D);
          int t10B6F#1 = 1;
          int t20B70#1 = Index<int{2},1>(n0B5E);
          int iy0B6E#1 = Add<int>(t10B6F,t20B70);
          addr(IMAGE2D<float>) a0B71#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B6B,iy0B6E);
          real4 v20B62#1 = LoadVoxels<IMAGE2D<float>,4>(a0B71);
          int t10B65#1 = -1;
          int t20B66#1 = Index<int{2},0>(n0B5E);
          int ix0B64#1 = Add<int>(t10B65,t20B66);
          int t10B68#1 = 2;
          int t20B69#1 = Index<int{2},1>(n0B5E);
          int iy0B67#1 = Add<int>(t10B68,t20B69);
          addr(IMAGE2D<float>) a0B6A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B64,iy0B67);
          real4 v30B63#1 = LoadVoxels<IMAGE2D<float>,4>(a0B6A);
          real fy0B8B#4 = Index<real2,1>(f0B5C);
          real r0B93#1 = 0.1e1;
          real t30B90#1 = Add<real>(fy0B8B,r0B93);
          real t20B8F#1 = fy0B8B;
          real r0B92#1 = 0.1e1;
          real t10B8E#1 = Sub<real>(fy0B8B,r0B92);
          real r0B91#1 = 0.2e1;
          real t00B8D#1 = Sub<real>(fy0B8B,r0B91);
          real4 a0B8C#1 = <real4>[t30B90,t20B8F,t10B8E,t00B8D];
          real4 hy0B81#1 = EvalKernel<4,bspln3,0>(a0B8C);
          real fx0B82#4 = Index<real2,0>(f0B5C);
          real r0B8A#1 = 0.1e1;
          real t30B87#1 = Add<real>(fx0B82,r0B8A);
          real t20B86#1 = fx0B82;
          real r0B89#1 = 0.1e1;
          real t10B85#1 = Sub<real>(fx0B82,r0B89);
          real r0B88#1 = 0.2e1;
          real t00B84#1 = Sub<real>(fx0B82,r0B88);
          real4 a0B83#1 = <real4>[t30B87,t20B86,t10B85,t00B84];
          real4 hx0B80#4 = EvalKernel<4,bspln3,0>(a0B83);
          real t00B95#1 = Dot<4>(v00B60,hx0B80);
          real t10B96#1 = Dot<4>(v10B61,hx0B80);
          real t20B97#1 = Dot<4>(v20B62,hx0B80);
          real t30B98#1 = Dot<4>(v30B63,hx0B80);
          real4 tv0B94#1 = <real4>[t00B95,t10B96,t20B97,t30B98];
          real _t0B5A#1 = Dot<4>(hy0B81,tv0B94);
          real2 x0BD8#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v040675);
          real2 nd0BDA#2 = Floor<2>(x0BD8);
          real2 f0BD9#2 = Sub<real2>(x0BD8,nd0BDA);
          int{2} n0BDB#8 = RealToInt<2>(nd0BDA);
          int t10BF7#1 = -1;
          int t20BF8#1 = Index<int{2},0>(n0BDB);
          int ix0BF6#1 = Add<int>(t10BF7,t20BF8);
          int t10BFA#1 = -1;
          int t20BFB#1 = Index<int{2},1>(n0BDB);
          int iy0BF9#1 = Add<int>(t10BFA,t20BFB);
          addr(IMAGE2D<int>) a0BFC#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BF9);
          real4 v00BDD#1 = LoadVoxels<IMAGE2D<int>,4>(a0BFC);
          int t10BF0#1 = -1;
          int t20BF1#1 = Index<int{2},0>(n0BDB);
          int ix0BEF#1 = Add<int>(t10BF0,t20BF1);
          int t10BF3#1 = 0;
          int t20BF4#1 = Index<int{2},1>(n0BDB);
          int iy0BF2#1 = Add<int>(t10BF3,t20BF4);
          addr(IMAGE2D<int>) a0BF5#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BEF,iy0BF2);
          real4 v10BDE#1 = LoadVoxels<IMAGE2D<int>,4>(a0BF5);
          int t10BE9#1 = -1;
          int t20BEA#1 = Index<int{2},0>(n0BDB);
          int ix0BE8#1 = Add<int>(t10BE9,t20BEA);
          int t10BEC#1 = 1;
          int t20BED#1 = Index<int{2},1>(n0BDB);
          int iy0BEB#1 = Add<int>(t10BEC,t20BED);
          addr(IMAGE2D<int>) a0BEE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BE8,iy0BEB);
          real4 v20BDF#1 = LoadVoxels<IMAGE2D<int>,4>(a0BEE);
          int t10BE2#1 = -1;
          int t20BE3#1 = Index<int{2},0>(n0BDB);
          int ix0BE1#1 = Add<int>(t10BE2,t20BE3);
          int t10BE5#1 = 2;
          int t20BE6#1 = Index<int{2},1>(n0BDB);
          int iy0BE4#1 = Add<int>(t10BE5,t20BE6);
          addr(IMAGE2D<int>) a0BE7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BE1,iy0BE4);
          real4 v30BE0#1 = LoadVoxels<IMAGE2D<int>,4>(a0BE7);
          real fy0C08#4 = Index<real2,1>(f0BD9);
          real r0C10#1 = 0.1e1;
          real t30C0D#1 = Add<real>(fy0C08,r0C10);
          real t20C0C#1 = fy0C08;
          real r0C0F#1 = 0.1e1;
          real t10C0B#1 = Sub<real>(fy0C08,r0C0F);
          real r0C0E#1 = 0.2e1;
          real t00C0A#1 = Sub<real>(fy0C08,r0C0E);
          real4 a0C09#1 = <real4>[t30C0D,t20C0C,t10C0B,t00C0A];
          real4 hy0BFE#1 = EvalKernel<4,bspln3,0>(a0C09);
          real fx0BFF#4 = Index<real2,0>(f0BD9);
          real r0C07#1 = 0.1e1;
          real t30C04#1 = Add<real>(fx0BFF,r0C07);
          real t20C03#1 = fx0BFF;
          real r0C06#1 = 0.1e1;
          real t10C02#1 = Sub<real>(fx0BFF,r0C06);
          real r0C05#1 = 0.2e1;
          real t00C01#1 = Sub<real>(fx0BFF,r0C05);
          real4 a0C00#1 = <real4>[t30C04,t20C03,t10C02,t00C01];
          real4 hx0BFD#4 = EvalKernel<4,bspln3,0>(a0C00);
          real t00C12#1 = Dot<4>(v00BDD,hx0BFD);
          real t10C13#1 = Dot<4>(v10BDE,hx0BFD);
          real t20C14#1 = Dot<4>(v20BDF,hx0BFD);
          real t30C15#1 = Dot<4>(v30BE0,hx0BFD);
          real4 tv0C11#1 = <real4>[t00C12,t10C13,t20C14,t30C15];
          real _t0BD7#1 = Dot<4>(hy0BFE,tv0C11);
          real _t0C54#2 = Sub<real>(_t0B5A,_t0BD7);
          real _t0C56#1 = Mul<real>(_t0C54,_t0C54);
          real score0C58#1 = Add<real>(score0B43,_t0C56);
          goto JOIN0C5B
        JOIN0C5B:  preds = [ASSIGN0C59,COND0B59]
          real score0C5A#2 = phi(score0C58,score0B43)
          if _t06F1 then goto JOIN0C5D else goto JOIN0C5D
        JOIN0C5D:  preds = [COND0C5C]
          if _t06FA then goto ASSIGN0C9E else goto JOIN0D60
        ASSIGN0C9E:  preds = [COND0C5E]
          real2 x0C60#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos06EF);
          real2 nd0C62#2 = Floor<2>(x0C60);
          real2 f0C61#2 = Sub<real2>(x0C60,nd0C62);
          int{2} n0C63#8 = RealToInt<2>(nd0C62);
          int t10C7F#1 = -1;
          int t20C80#1 = Index<int{2},0>(n0C63);
          int ix0C7E#1 = Add<int>(t10C7F,t20C80);
          int t10C82#1 = -1;
          int t20C83#1 = Index<int{2},1>(n0C63);
          int iy0C81#1 = Add<int>(t10C82,t20C83);
          addr(IMAGE2D<float>) a0C84#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C81);
          real4 v00C65#1 = LoadVoxels<IMAGE2D<float>,4>(a0C84);
          int t10C78#1 = -1;
          int t20C79#1 = Index<int{2},0>(n0C63);
          int ix0C77#1 = Add<int>(t10C78,t20C79);
          int t10C7B#1 = 0;
          int t20C7C#1 = Index<int{2},1>(n0C63);
          int iy0C7A#1 = Add<int>(t10C7B,t20C7C);
          addr(IMAGE2D<float>) a0C7D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C77,iy0C7A);
          real4 v10C66#1 = LoadVoxels<IMAGE2D<float>,4>(a0C7D);
          int t10C71#1 = -1;
          int t20C72#1 = Index<int{2},0>(n0C63);
          int ix0C70#1 = Add<int>(t10C71,t20C72);
          int t10C74#1 = 1;
          int t20C75#1 = Index<int{2},1>(n0C63);
          int iy0C73#1 = Add<int>(t10C74,t20C75);
          addr(IMAGE2D<float>) a0C76#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C70,iy0C73);
          real4 v20C67#1 = LoadVoxels<IMAGE2D<float>,4>(a0C76);
          int t10C6A#1 = -1;
          int t20C6B#1 = Index<int{2},0>(n0C63);
          int ix0C69#1 = Add<int>(t10C6A,t20C6B);
          int t10C6D#1 = 2;
          int t20C6E#1 = Index<int{2},1>(n0C63);
          int iy0C6C#1 = Add<int>(t10C6D,t20C6E);
          addr(IMAGE2D<float>) a0C6F#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C69,iy0C6C);
          real4 v30C68#1 = LoadVoxels<IMAGE2D<float>,4>(a0C6F);
          real fy0C90#4 = Index<real2,1>(f0C61);
          real r0C98#1 = 0.1e1;
          real t30C95#1 = Add<real>(fy0C90,r0C98);
          real t20C94#1 = fy0C90;
          real r0C97#1 = 0.1e1;
          real t10C93#1 = Sub<real>(fy0C90,r0C97);
          real r0C96#1 = 0.2e1;
          real t00C92#1 = Sub<real>(fy0C90,r0C96);
          real4 a0C91#1 = <real4>[t30C95,t20C94,t10C93,t00C92];
          real4 hy0C86#1 = EvalKernel<4,bspln3,0>(a0C91);
          real fx0C87#4 = Index<real2,0>(f0C61);
          real r0C8F#1 = 0.1e1;
          real t30C8C#1 = Add<real>(fx0C87,r0C8F);
          real t20C8B#1 = fx0C87;
          real r0C8E#1 = 0.1e1;
          real t10C8A#1 = Sub<real>(fx0C87,r0C8E);
          real r0C8D#1 = 0.2e1;
          real t00C89#1 = Sub<real>(fx0C87,r0C8D);
          real4 a0C88#1 = <real4>[t30C8C,t20C8B,t10C8A,t00C89];
          real4 hx0C85#4 = EvalKernel<4,bspln3,0>(a0C88);
          real t00C9A#1 = Dot<4>(v00C65,hx0C85);
          real t10C9B#1 = Dot<4>(v10C66,hx0C85);
          real t20C9C#1 = Dot<4>(v20C67,hx0C85);
          real t30C9D#1 = Dot<4>(v30C68,hx0C85);
          real4 tv0C99#1 = <real4>[t00C9A,t10C9B,t20C9C,t30C9D];
          real _t0C5F#1 = Dot<4>(hy0C86,tv0C99);
          real2 x0CDD#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          real2 nd0CDF#2 = Floor<2>(x0CDD);
          real2 f0CDE#2 = Sub<real2>(x0CDD,nd0CDF);
          int{2} n0CE0#8 = RealToInt<2>(nd0CDF);
          int t10CFC#1 = -1;
          int t20CFD#1 = Index<int{2},0>(n0CE0);
          int ix0CFB#1 = Add<int>(t10CFC,t20CFD);
          int t10CFF#1 = -1;
          int t20D00#1 = Index<int{2},1>(n0CE0);
          int iy0CFE#1 = Add<int>(t10CFF,t20D00);
          addr(IMAGE2D<int>) a0D01#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CFE);
          real4 v00CE2#1 = LoadVoxels<IMAGE2D<int>,4>(a0D01);
          int t10CF5#1 = -1;
          int t20CF6#1 = Index<int{2},0>(n0CE0);
          int ix0CF4#1 = Add<int>(t10CF5,t20CF6);
          int t10CF8#1 = 0;
          int t20CF9#1 = Index<int{2},1>(n0CE0);
          int iy0CF7#1 = Add<int>(t10CF8,t20CF9);
          addr(IMAGE2D<int>) a0CFA#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CF4,iy0CF7);
          real4 v10CE3#1 = LoadVoxels<IMAGE2D<int>,4>(a0CFA);
          int t10CEE#1 = -1;
          int t20CEF#1 = Index<int{2},0>(n0CE0);
          int ix0CED#1 = Add<int>(t10CEE,t20CEF);
          int t10CF1#1 = 1;
          int t20CF2#1 = Index<int{2},1>(n0CE0);
          int iy0CF0#1 = Add<int>(t10CF1,t20CF2);
          addr(IMAGE2D<int>) a0CF3#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CED,iy0CF0);
          real4 v20CE4#1 = LoadVoxels<IMAGE2D<int>,4>(a0CF3);
          int t10CE7#1 = -1;
          int t20CE8#1 = Index<int{2},0>(n0CE0);
          int ix0CE6#1 = Add<int>(t10CE7,t20CE8);
          int t10CEA#1 = 2;
          int t20CEB#1 = Index<int{2},1>(n0CE0);
          int iy0CE9#1 = Add<int>(t10CEA,t20CEB);
          addr(IMAGE2D<int>) a0CEC#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CE6,iy0CE9);
          real4 v30CE5#1 = LoadVoxels<IMAGE2D<int>,4>(a0CEC);
          real fy0D0D#4 = Index<real2,1>(f0CDE);
          real r0D15#1 = 0.1e1;
          real t30D12#1 = Add<real>(fy0D0D,r0D15);
          real t20D11#1 = fy0D0D;
          real r0D14#1 = 0.1e1;
          real t10D10#1 = Sub<real>(fy0D0D,r0D14);
          real r0D13#1 = 0.2e1;
          real t00D0F#1 = Sub<real>(fy0D0D,r0D13);
          real4 a0D0E#1 = <real4>[t30D12,t20D11,t10D10,t00D0F];
          real4 hy0D03#1 = EvalKernel<4,bspln3,0>(a0D0E);
          real fx0D04#4 = Index<real2,0>(f0CDE);
          real r0D0C#1 = 0.1e1;
          real t30D09#1 = Add<real>(fx0D04,r0D0C);
          real t20D08#1 = fx0D04;
          real r0D0B#1 = 0.1e1;
          real t10D07#1 = Sub<real>(fx0D04,r0D0B);
          real r0D0A#1 = 0.2e1;
          real t00D06#1 = Sub<real>(fx0D04,r0D0A);
          real4 a0D05#1 = <real4>[t30D09,t20D08,t10D07,t00D06];
          real4 hx0D02#4 = EvalKernel<4,bspln3,0>(a0D05);
          real t00D17#1 = Dot<4>(v00CE2,hx0D02);
          real t10D18#1 = Dot<4>(v10CE3,hx0D02);
          real t20D19#1 = Dot<4>(v20CE4,hx0D02);
          real t30D1A#1 = Dot<4>(v30CE5,hx0D02);
          real4 tv0D16#1 = <real4>[t00D17,t10D18,t20D19,t30D1A];
          real _t0CDC#1 = Dot<4>(hy0D03,tv0D16);
          real _t0D59#2 = Sub<real>(_t0C5F,_t0CDC);
          real _t0D5B#1 = Mul<real>(_t0D59,_t0D59);
          real score0D5D#1 = Add<real>(score0C5A,_t0D5B);
          goto JOIN0D60
        JOIN0D60:  preds = [ASSIGN0D5E,COND0C5E]
          real score0D5F#2 = phi(score0D5D,score0C5A)
          real _t0D61#1 = Dot<2>(r006D7,v060677);
          real _t0D63#1 = Dot<2>(r106DD,v060677);
          real2 _t0D65#1 = <real2>[_t0D61,_t0D63];
          real2 pos0D67#2 = Add<real2>(_t0D65,_t06ED);
          real2 x0D6A#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0D67);
          bool _t0D69#1 = Inside<IMAGE2D<float>,2>(x0D6A,_t0665);
          if _t0D69 then goto ASSIGN0D70 else goto ASSIGN11C6
        ASSIGN0D70:  preds = [COND0D6D]
          real2 x0D6F#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v060677);
          bool _t0D6E#1 = Inside<IMAGE2D<int>,2>(x0D6F,_t0661);
          goto JOIN0D74
        JOIN0D74:  preds = [ASSIGN0D71,ASSIGN11C6]
          bool _t0D72#1 = phi(_t0D6E,_t0D73)
          if _t0D72 then goto ASSIGN0DB5 else goto JOIN0E77
        ASSIGN0DB5:  preds = [COND0D75]
          real2 x0D77#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0D67);
          real2 nd0D79#2 = Floor<2>(x0D77);
          real2 f0D78#2 = Sub<real2>(x0D77,nd0D79);
          int{2} n0D7A#8 = RealToInt<2>(nd0D79);
          int t10D96#1 = -1;
          int t20D97#1 = Index<int{2},0>(n0D7A);
          int ix0D95#1 = Add<int>(t10D96,t20D97);
          int t10D99#1 = -1;
          int t20D9A#1 = Index<int{2},1>(n0D7A);
          int iy0D98#1 = Add<int>(t10D99,t20D9A);
          addr(IMAGE2D<float>) a0D9B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D98);
          real4 v00D7C#1 = LoadVoxels<IMAGE2D<float>,4>(a0D9B);
          int t10D8F#1 = -1;
          int t20D90#1 = Index<int{2},0>(n0D7A);
          int ix0D8E#1 = Add<int>(t10D8F,t20D90);
          int t10D92#1 = 0;
          int t20D93#1 = Index<int{2},1>(n0D7A);
          int iy0D91#1 = Add<int>(t10D92,t20D93);
          addr(IMAGE2D<float>) a0D94#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D8E,iy0D91);
          real4 v10D7D#1 = LoadVoxels<IMAGE2D<float>,4>(a0D94);
          int t10D88#1 = -1;
          int t20D89#1 = Index<int{2},0>(n0D7A);
          int ix0D87#1 = Add<int>(t10D88,t20D89);
          int t10D8B#1 = 1;
          int t20D8C#1 = Index<int{2},1>(n0D7A);
          int iy0D8A#1 = Add<int>(t10D8B,t20D8C);
          addr(IMAGE2D<float>) a0D8D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D87,iy0D8A);
          real4 v20D7E#1 = LoadVoxels<IMAGE2D<float>,4>(a0D8D);
          int t10D81#1 = -1;
          int t20D82#1 = Index<int{2},0>(n0D7A);
          int ix0D80#1 = Add<int>(t10D81,t20D82);
          int t10D84#1 = 2;
          int t20D85#1 = Index<int{2},1>(n0D7A);
          int iy0D83#1 = Add<int>(t10D84,t20D85);
          addr(IMAGE2D<float>) a0D86#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D80,iy0D83);
          real4 v30D7F#1 = LoadVoxels<IMAGE2D<float>,4>(a0D86);
          real fy0DA7#4 = Index<real2,1>(f0D78);
          real r0DAF#1 = 0.1e1;
          real t30DAC#1 = Add<real>(fy0DA7,r0DAF);
          real t20DAB#1 = fy0DA7;
          real r0DAE#1 = 0.1e1;
          real t10DAA#1 = Sub<real>(fy0DA7,r0DAE);
          real r0DAD#1 = 0.2e1;
          real t00DA9#1 = Sub<real>(fy0DA7,r0DAD);
          real4 a0DA8#1 = <real4>[t30DAC,t20DAB,t10DAA,t00DA9];
          real4 hy0D9D#1 = EvalKernel<4,bspln3,0>(a0DA8);
          real fx0D9E#4 = Index<real2,0>(f0D78);
          real r0DA6#1 = 0.1e1;
          real t30DA3#1 = Add<real>(fx0D9E,r0DA6);
          real t20DA2#1 = fx0D9E;
          real r0DA5#1 = 0.1e1;
          real t10DA1#1 = Sub<real>(fx0D9E,r0DA5);
          real r0DA4#1 = 0.2e1;
          real t00DA0#1 = Sub<real>(fx0D9E,r0DA4);
          real4 a0D9F#1 = <real4>[t30DA3,t20DA2,t10DA1,t00DA0];
          real4 hx0D9C#4 = EvalKernel<4,bspln3,0>(a0D9F);
          real t00DB1#1 = Dot<4>(v00D7C,hx0D9C);
          real t10DB2#1 = Dot<4>(v10D7D,hx0D9C);
          real t20DB3#1 = Dot<4>(v20D7E,hx0D9C);
          real t30DB4#1 = Dot<4>(v30D7F,hx0D9C);
          real4 tv0DB0#1 = <real4>[t00DB1,t10DB2,t20DB3,t30DB4];
          real _t0D76#1 = Dot<4>(hy0D9D,tv0DB0);
          real2 x0DF4#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v060677);
          real2 nd0DF6#2 = Floor<2>(x0DF4);
          real2 f0DF5#2 = Sub<real2>(x0DF4,nd0DF6);
          int{2} n0DF7#8 = RealToInt<2>(nd0DF6);
          int t10E13#1 = -1;
          int t20E14#1 = Index<int{2},0>(n0DF7);
          int ix0E12#1 = Add<int>(t10E13,t20E14);
          int t10E16#1 = -1;
          int t20E17#1 = Index<int{2},1>(n0DF7);
          int iy0E15#1 = Add<int>(t10E16,t20E17);
          addr(IMAGE2D<int>) a0E18#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E15);
          real4 v00DF9#1 = LoadVoxels<IMAGE2D<int>,4>(a0E18);
          int t10E0C#1 = -1;
          int t20E0D#1 = Index<int{2},0>(n0DF7);
          int ix0E0B#1 = Add<int>(t10E0C,t20E0D);
          int t10E0F#1 = 0;
          int t20E10#1 = Index<int{2},1>(n0DF7);
          int iy0E0E#1 = Add<int>(t10E0F,t20E10);
          addr(IMAGE2D<int>) a0E11#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E0B,iy0E0E);
          real4 v10DFA#1 = LoadVoxels<IMAGE2D<int>,4>(a0E11);
          int t10E05#1 = -1;
          int t20E06#1 = Index<int{2},0>(n0DF7);
          int ix0E04#1 = Add<int>(t10E05,t20E06);
          int t10E08#1 = 1;
          int t20E09#1 = Index<int{2},1>(n0DF7);
          int iy0E07#1 = Add<int>(t10E08,t20E09);
          addr(IMAGE2D<int>) a0E0A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E04,iy0E07);
          real4 v20DFB#1 = LoadVoxels<IMAGE2D<int>,4>(a0E0A);
          int t10DFE#1 = -1;
          int t20DFF#1 = Index<int{2},0>(n0DF7);
          int ix0DFD#1 = Add<int>(t10DFE,t20DFF);
          int t10E01#1 = 2;
          int t20E02#1 = Index<int{2},1>(n0DF7);
          int iy0E00#1 = Add<int>(t10E01,t20E02);
          addr(IMAGE2D<int>) a0E03#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0DFD,iy0E00);
          real4 v30DFC#1 = LoadVoxels<IMAGE2D<int>,4>(a0E03);
          real fy0E24#4 = Index<real2,1>(f0DF5);
          real r0E2C#1 = 0.1e1;
          real t30E29#1 = Add<real>(fy0E24,r0E2C);
          real t20E28#1 = fy0E24;
          real r0E2B#1 = 0.1e1;
          real t10E27#1 = Sub<real>(fy0E24,r0E2B);
          real r0E2A#1 = 0.2e1;
          real t00E26#1 = Sub<real>(fy0E24,r0E2A);
          real4 a0E25#1 = <real4>[t30E29,t20E28,t10E27,t00E26];
          real4 hy0E1A#1 = EvalKernel<4,bspln3,0>(a0E25);
          real fx0E1B#4 = Index<real2,0>(f0DF5);
          real r0E23#1 = 0.1e1;
          real t30E20#1 = Add<real>(fx0E1B,r0E23);
          real t20E1F#1 = fx0E1B;
          real r0E22#1 = 0.1e1;
          real t10E1E#1 = Sub<real>(fx0E1B,r0E22);
          real r0E21#1 = 0.2e1;
          real t00E1D#1 = Sub<real>(fx0E1B,r0E21);
          real4 a0E1C#1 = <real4>[t30E20,t20E1F,t10E1E,t00E1D];
          real4 hx0E19#4 = EvalKernel<4,bspln3,0>(a0E1C);
          real t00E2E#1 = Dot<4>(v00DF9,hx0E19);
          real t10E2F#1 = Dot<4>(v10DFA,hx0E19);
          real t20E30#1 = Dot<4>(v20DFB,hx0E19);
          real t30E31#1 = Dot<4>(v30DFC,hx0E19);
          real4 tv0E2D#1 = <real4>[t00E2E,t10E2F,t20E30,t30E31];
          real _t0DF3#1 = Dot<4>(hy0E1A,tv0E2D);
          real _t0E70#2 = Sub<real>(_t0D76,_t0DF3);
          real _t0E72#1 = Mul<real>(_t0E70,_t0E70);
          real score0E74#1 = Add<real>(score0D5F,_t0E72);
          goto JOIN0E77
        JOIN0E77:  preds = [ASSIGN0E75,COND0D75]
          real score0E76#2 = phi(score0E74,score0D5F)
          real _t0E78#1 = Dot<2>(r006D7,v070679);
          real _t0E7A#1 = Dot<2>(r106DD,v070679);
          real2 _t0E7C#1 = <real2>[_t0E78,_t0E7A];
          real2 pos0E7E#2 = Add<real2>(_t0E7C,_t06ED);
          real2 x0E81#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0E7E);
          bool _t0E80#1 = Inside<IMAGE2D<float>,2>(x0E81,_t0665);
          if _t0E80 then goto ASSIGN0E87 else goto ASSIGN11C5
        ASSIGN0E87:  preds = [COND0E84]
          real2 x0E86#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v070679);
          bool _t0E85#1 = Inside<IMAGE2D<int>,2>(x0E86,_t0661);
          goto JOIN0E8B
        JOIN0E8B:  preds = [ASSIGN0E88,ASSIGN11C5]
          bool _t0E89#1 = phi(_t0E85,_t0E8A)
          if _t0E89 then goto ASSIGN0ECC else goto JOIN0F8E
        ASSIGN0ECC:  preds = [COND0E8C]
          real2 x0E8E#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0E7E);
          real2 nd0E90#2 = Floor<2>(x0E8E);
          real2 f0E8F#2 = Sub<real2>(x0E8E,nd0E90);
          int{2} n0E91#8 = RealToInt<2>(nd0E90);
          int t10EAD#1 = -1;
          int t20EAE#1 = Index<int{2},0>(n0E91);
          int ix0EAC#1 = Add<int>(t10EAD,t20EAE);
          int t10EB0#1 = -1;
          int t20EB1#1 = Index<int{2},1>(n0E91);
          int iy0EAF#1 = Add<int>(t10EB0,t20EB1);
          addr(IMAGE2D<float>) a0EB2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0EAF);
          real4 v00E93#1 = LoadVoxels<IMAGE2D<float>,4>(a0EB2);
          int t10EA6#1 = -1;
          int t20EA7#1 = Index<int{2},0>(n0E91);
          int ix0EA5#1 = Add<int>(t10EA6,t20EA7);
          int t10EA9#1 = 0;
          int t20EAA#1 = Index<int{2},1>(n0E91);
          int iy0EA8#1 = Add<int>(t10EA9,t20EAA);
          addr(IMAGE2D<float>) a0EAB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EA5,iy0EA8);
          real4 v10E94#1 = LoadVoxels<IMAGE2D<float>,4>(a0EAB);
          int t10E9F#1 = -1;
          int t20EA0#1 = Index<int{2},0>(n0E91);
          int ix0E9E#1 = Add<int>(t10E9F,t20EA0);
          int t10EA2#1 = 1;
          int t20EA3#1 = Index<int{2},1>(n0E91);
          int iy0EA1#1 = Add<int>(t10EA2,t20EA3);
          addr(IMAGE2D<float>) a0EA4#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0E9E,iy0EA1);
          real4 v20E95#1 = LoadVoxels<IMAGE2D<float>,4>(a0EA4);
          int t10E98#1 = -1;
          int t20E99#1 = Index<int{2},0>(n0E91);
          int ix0E97#1 = Add<int>(t10E98,t20E99);
          int t10E9B#1 = 2;
          int t20E9C#1 = Index<int{2},1>(n0E91);
          int iy0E9A#1 = Add<int>(t10E9B,t20E9C);
          addr(IMAGE2D<float>) a0E9D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0E97,iy0E9A);
          real4 v30E96#1 = LoadVoxels<IMAGE2D<float>,4>(a0E9D);
          real fy0EBE#4 = Index<real2,1>(f0E8F);
          real r0EC6#1 = 0.1e1;
          real t30EC3#1 = Add<real>(fy0EBE,r0EC6);
          real t20EC2#1 = fy0EBE;
          real r0EC5#1 = 0.1e1;
          real t10EC1#1 = Sub<real>(fy0EBE,r0EC5);
          real r0EC4#1 = 0.2e1;
          real t00EC0#1 = Sub<real>(fy0EBE,r0EC4);
          real4 a0EBF#1 = <real4>[t30EC3,t20EC2,t10EC1,t00EC0];
          real4 hy0EB4#1 = EvalKernel<4,bspln3,0>(a0EBF);
          real fx0EB5#4 = Index<real2,0>(f0E8F);
          real r0EBD#1 = 0.1e1;
          real t30EBA#1 = Add<real>(fx0EB5,r0EBD);
          real t20EB9#1 = fx0EB5;
          real r0EBC#1 = 0.1e1;
          real t10EB8#1 = Sub<real>(fx0EB5,r0EBC);
          real r0EBB#1 = 0.2e1;
          real t00EB7#1 = Sub<real>(fx0EB5,r0EBB);
          real4 a0EB6#1 = <real4>[t30EBA,t20EB9,t10EB8,t00EB7];
          real4 hx0EB3#4 = EvalKernel<4,bspln3,0>(a0EB6);
          real t00EC8#1 = Dot<4>(v00E93,hx0EB3);
          real t10EC9#1 = Dot<4>(v10E94,hx0EB3);
          real t20ECA#1 = Dot<4>(v20E95,hx0EB3);
          real t30ECB#1 = Dot<4>(v30E96,hx0EB3);
          real4 tv0EC7#1 = <real4>[t00EC8,t10EC9,t20ECA,t30ECB];
          real _t0E8D#1 = Dot<4>(hy0EB4,tv0EC7);
          real2 x0F0B#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v070679);
          real2 nd0F0D#2 = Floor<2>(x0F0B);
          real2 f0F0C#2 = Sub<real2>(x0F0B,nd0F0D);
          int{2} n0F0E#8 = RealToInt<2>(nd0F0D);
          int t10F2A#1 = -1;
          int t20F2B#1 = Index<int{2},0>(n0F0E);
          int ix0F29#1 = Add<int>(t10F2A,t20F2B);
          int t10F2D#1 = -1;
          int t20F2E#1 = Index<int{2},1>(n0F0E);
          int iy0F2C#1 = Add<int>(t10F2D,t20F2E);
          addr(IMAGE2D<int>) a0F2F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F2C);
          real4 v00F10#1 = LoadVoxels<IMAGE2D<int>,4>(a0F2F);
          int t10F23#1 = -1;
          int t20F24#1 = Index<int{2},0>(n0F0E);
          int ix0F22#1 = Add<int>(t10F23,t20F24);
          int t10F26#1 = 0;
          int t20F27#1 = Index<int{2},1>(n0F0E);
          int iy0F25#1 = Add<int>(t10F26,t20F27);
          addr(IMAGE2D<int>) a0F28#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F22,iy0F25);
          real4 v10F11#1 = LoadVoxels<IMAGE2D<int>,4>(a0F28);
          int t10F1C#1 = -1;
          int t20F1D#1 = Index<int{2},0>(n0F0E);
          int ix0F1B#1 = Add<int>(t10F1C,t20F1D);
          int t10F1F#1 = 1;
          int t20F20#1 = Index<int{2},1>(n0F0E);
          int iy0F1E#1 = Add<int>(t10F1F,t20F20);
          addr(IMAGE2D<int>) a0F21#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F1B,iy0F1E);
          real4 v20F12#1 = LoadVoxels<IMAGE2D<int>,4>(a0F21);
          int t10F15#1 = -1;
          int t20F16#1 = Index<int{2},0>(n0F0E);
          int ix0F14#1 = Add<int>(t10F15,t20F16);
          int t10F18#1 = 2;
          int t20F19#1 = Index<int{2},1>(n0F0E);
          int iy0F17#1 = Add<int>(t10F18,t20F19);
          addr(IMAGE2D<int>) a0F1A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F14,iy0F17);
          real4 v30F13#1 = LoadVoxels<IMAGE2D<int>,4>(a0F1A);
          real fy0F3B#4 = Index<real2,1>(f0F0C);
          real r0F43#1 = 0.1e1;
          real t30F40#1 = Add<real>(fy0F3B,r0F43);
          real t20F3F#1 = fy0F3B;
          real r0F42#1 = 0.1e1;
          real t10F3E#1 = Sub<real>(fy0F3B,r0F42);
          real r0F41#1 = 0.2e1;
          real t00F3D#1 = Sub<real>(fy0F3B,r0F41);
          real4 a0F3C#1 = <real4>[t30F40,t20F3F,t10F3E,t00F3D];
          real4 hy0F31#1 = EvalKernel<4,bspln3,0>(a0F3C);
          real fx0F32#4 = Index<real2,0>(f0F0C);
          real r0F3A#1 = 0.1e1;
          real t30F37#1 = Add<real>(fx0F32,r0F3A);
          real t20F36#1 = fx0F32;
          real r0F39#1 = 0.1e1;
          real t10F35#1 = Sub<real>(fx0F32,r0F39);
          real r0F38#1 = 0.2e1;
          real t00F34#1 = Sub<real>(fx0F32,r0F38);
          real4 a0F33#1 = <real4>[t30F37,t20F36,t10F35,t00F34];
          real4 hx0F30#4 = EvalKernel<4,bspln3,0>(a0F33);
          real t00F45#1 = Dot<4>(v00F10,hx0F30);
          real t10F46#1 = Dot<4>(v10F11,hx0F30);
          real t20F47#1 = Dot<4>(v20F12,hx0F30);
          real t30F48#1 = Dot<4>(v30F13,hx0F30);
          real4 tv0F44#1 = <real4>[t00F45,t10F46,t20F47,t30F48];
          real _t0F0A#1 = Dot<4>(hy0F31,tv0F44);
          real _t0F87#2 = Sub<real>(_t0E8D,_t0F0A);
          real _t0F89#1 = Mul<real>(_t0F87,_t0F87);
          real score0F8B#1 = Add<real>(score0E76,_t0F89);
          goto JOIN0F8E
        JOIN0F8E:  preds = [ASSIGN0F8C,COND0E8C]
          real score0F8D#2 = phi(score0F8B,score0E76)
          real _t0F8F#1 = Dot<2>(r006D7,v08067B);
          real _t0F91#1 = Dot<2>(r106DD,v08067B);
          real2 _t0F93#1 = <real2>[_t0F8F,_t0F91];
          real2 pos0F95#2 = Add<real2>(_t0F93,_t06ED);
          real2 x0F98#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0F95);
          bool _t0F97#1 = Inside<IMAGE2D<float>,2>(x0F98,_t0665);
          if _t0F97 then goto ASSIGN0F9E else goto ASSIGN11C4
        ASSIGN0F9E:  preds = [COND0F9B]
          real2 x0F9D#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v08067B);
          bool _t0F9C#1 = Inside<IMAGE2D<int>,2>(x0F9D,_t0661);
          goto JOIN0FA2
        JOIN0FA2:  preds = [ASSIGN0F9F,ASSIGN11C4]
          bool _t0FA0#1 = phi(_t0F9C,_t0FA1)
          if _t0FA0 then goto ASSIGN0FE3 else goto JOIN10A5
        ASSIGN0FE3:  preds = [COND0FA3]
          real2 x0FA5#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0F95);
          real2 nd0FA7#2 = Floor<2>(x0FA5);
          real2 f0FA6#2 = Sub<real2>(x0FA5,nd0FA7);
          int{2} n0FA8#8 = RealToInt<2>(nd0FA7);
          int t10FC4#1 = -1;
          int t20FC5#1 = Index<int{2},0>(n0FA8);
          int ix0FC3#1 = Add<int>(t10FC4,t20FC5);
          int t10FC7#1 = -1;
          int t20FC8#1 = Index<int{2},1>(n0FA8);
          int iy0FC6#1 = Add<int>(t10FC7,t20FC8);
          addr(IMAGE2D<float>) a0FC9#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FC6);
          real4 v00FAA#1 = LoadVoxels<IMAGE2D<float>,4>(a0FC9);
          int t10FBD#1 = -1;
          int t20FBE#1 = Index<int{2},0>(n0FA8);
          int ix0FBC#1 = Add<int>(t10FBD,t20FBE);
          int t10FC0#1 = 0;
          int t20FC1#1 = Index<int{2},1>(n0FA8);
          int iy0FBF#1 = Add<int>(t10FC0,t20FC1);
          addr(IMAGE2D<float>) a0FC2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FBC,iy0FBF);
          real4 v10FAB#1 = LoadVoxels<IMAGE2D<float>,4>(a0FC2);
          int t10FB6#1 = -1;
          int t20FB7#1 = Index<int{2},0>(n0FA8);
          int ix0FB5#1 = Add<int>(t10FB6,t20FB7);
          int t10FB9#1 = 1;
          int t20FBA#1 = Index<int{2},1>(n0FA8);
          int iy0FB8#1 = Add<int>(t10FB9,t20FBA);
          addr(IMAGE2D<float>) a0FBB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FB5,iy0FB8);
          real4 v20FAC#1 = LoadVoxels<IMAGE2D<float>,4>(a0FBB);
          int t10FAF#1 = -1;
          int t20FB0#1 = Index<int{2},0>(n0FA8);
          int ix0FAE#1 = Add<int>(t10FAF,t20FB0);
          int t10FB2#1 = 2;
          int t20FB3#1 = Index<int{2},1>(n0FA8);
          int iy0FB1#1 = Add<int>(t10FB2,t20FB3);
          addr(IMAGE2D<float>) a0FB4#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FAE,iy0FB1);
          real4 v30FAD#1 = LoadVoxels<IMAGE2D<float>,4>(a0FB4);
          real fy0FD5#4 = Index<real2,1>(f0FA6);
          real r0FDD#1 = 0.1e1;
          real t30FDA#1 = Add<real>(fy0FD5,r0FDD);
          real t20FD9#1 = fy0FD5;
          real r0FDC#1 = 0.1e1;
          real t10FD8#1 = Sub<real>(fy0FD5,r0FDC);
          real r0FDB#1 = 0.2e1;
          real t00FD7#1 = Sub<real>(fy0FD5,r0FDB);
          real4 a0FD6#1 = <real4>[t30FDA,t20FD9,t10FD8,t00FD7];
          real4 hy0FCB#1 = EvalKernel<4,bspln3,0>(a0FD6);
          real fx0FCC#4 = Index<real2,0>(f0FA6);
          real r0FD4#1 = 0.1e1;
          real t30FD1#1 = Add<real>(fx0FCC,r0FD4);
          real t20FD0#1 = fx0FCC;
          real r0FD3#1 = 0.1e1;
          real t10FCF#1 = Sub<real>(fx0FCC,r0FD3);
          real r0FD2#1 = 0.2e1;
          real t00FCE#1 = Sub<real>(fx0FCC,r0FD2);
          real4 a0FCD#1 = <real4>[t30FD1,t20FD0,t10FCF,t00FCE];
          real4 hx0FCA#4 = EvalKernel<4,bspln3,0>(a0FCD);
          real t00FDF#1 = Dot<4>(v00FAA,hx0FCA);
          real t10FE0#1 = Dot<4>(v10FAB,hx0FCA);
          real t20FE1#1 = Dot<4>(v20FAC,hx0FCA);
          real t30FE2#1 = Dot<4>(v30FAD,hx0FCA);
          real4 tv0FDE#1 = <real4>[t00FDF,t10FE0,t20FE1,t30FE2];
          real _t0FA4#1 = Dot<4>(hy0FCB,tv0FDE);
          real2 x1022#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v08067B);
          real2 nd1024#2 = Floor<2>(x1022);
          real2 f1023#2 = Sub<real2>(x1022,nd1024);
          int{2} n1025#8 = RealToInt<2>(nd1024);
          int t11041#1 = -1;
          int t21042#1 = Index<int{2},0>(n1025);
          int ix1040#1 = Add<int>(t11041,t21042);
          int t11044#1 = -1;
          int t21045#1 = Index<int{2},1>(n1025);
          int iy1043#1 = Add<int>(t11044,t21045);
          addr(IMAGE2D<int>) a1046#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy1043);
          real4 v01027#1 = LoadVoxels<IMAGE2D<int>,4>(a1046);
          int t1103A#1 = -1;
          int t2103B#1 = Index<int{2},0>(n1025);
          int ix1039#1 = Add<int>(t1103A,t2103B);
          int t1103D#1 = 0;
          int t2103E#1 = Index<int{2},1>(n1025);
          int iy103C#1 = Add<int>(t1103D,t2103E);
          addr(IMAGE2D<int>) a103F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1039,iy103C);
          real4 v11028#1 = LoadVoxels<IMAGE2D<int>,4>(a103F);
          int t11033#1 = -1;
          int t21034#1 = Index<int{2},0>(n1025);
          int ix1032#1 = Add<int>(t11033,t21034);
          int t11036#1 = 1;
          int t21037#1 = Index<int{2},1>(n1025);
          int iy1035#1 = Add<int>(t11036,t21037);
          addr(IMAGE2D<int>) a1038#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1032,iy1035);
          real4 v21029#1 = LoadVoxels<IMAGE2D<int>,4>(a1038);
          int t1102C#1 = -1;
          int t2102D#1 = Index<int{2},0>(n1025);
          int ix102B#1 = Add<int>(t1102C,t2102D);
          int t1102F#1 = 2;
          int t21030#1 = Index<int{2},1>(n1025);
          int iy102E#1 = Add<int>(t1102F,t21030);
          addr(IMAGE2D<int>) a1031#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix102B,iy102E);
          real4 v3102A#1 = LoadVoxels<IMAGE2D<int>,4>(a1031);
          real fy1052#4 = Index<real2,1>(f1023);
          real r105A#1 = 0.1e1;
          real t31057#1 = Add<real>(fy1052,r105A);
          real t21056#1 = fy1052;
          real r1059#1 = 0.1e1;
          real t11055#1 = Sub<real>(fy1052,r1059);
          real r1058#1 = 0.2e1;
          real t01054#1 = Sub<real>(fy1052,r1058);
          real4 a1053#1 = <real4>[t31057,t21056,t11055,t01054];
          real4 hy1048#1 = EvalKernel<4,bspln3,0>(a1053);
          real fx1049#4 = Index<real2,0>(f1023);
          real r1051#1 = 0.1e1;
          real t3104E#1 = Add<real>(fx1049,r1051);
          real t2104D#1 = fx1049;
          real r1050#1 = 0.1e1;
          real t1104C#1 = Sub<real>(fx1049,r1050);
          real r104F#1 = 0.2e1;
          real t0104B#1 = Sub<real>(fx1049,r104F);
          real4 a104A#1 = <real4>[t3104E,t2104D,t1104C,t0104B];
          real4 hx1047#4 = EvalKernel<4,bspln3,0>(a104A);
          real t0105C#1 = Dot<4>(v01027,hx1047);
          real t1105D#1 = Dot<4>(v11028,hx1047);
          real t2105E#1 = Dot<4>(v21029,hx1047);
          real t3105F#1 = Dot<4>(v3102A,hx1047);
          real4 tv105B#1 = <real4>[t0105C,t1105D,t2105E,t3105F];
          real _t1021#1 = Dot<4>(hy1048,tv105B);
          real _t109E#2 = Sub<real>(_t0FA4,_t1021);
          real _t10A0#1 = Mul<real>(_t109E,_t109E);
          real score10A2#1 = Add<real>(score0F8D,_t10A0);
          goto JOIN10A5
        JOIN10A5:  preds = [ASSIGN10A3,COND0FA3]
          real score10A4#2 = phi(score10A2,score0F8D)
          real _t10A6#1 = Dot<2>(r006D7,v09067D);
          real _t10A8#1 = Dot<2>(r106DD,v09067D);
          real2 _t10AA#1 = <real2>[_t10A6,_t10A8];
          real2 pos10AC#3 = Add<real2>(_t10AA,_t06ED);
          real2 x10AF#1 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos10AC);
          bool _t10AE#1 = Inside<IMAGE2D<float>,2>(x10AF,_t0665);
          if _t10AE then goto ASSIGN10B5 else goto ASSIGN11C3
        ASSIGN10B5:  preds = [COND10B2]
          real2 x10B4#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v09067D);
          bool _t10B3#1 = Inside<IMAGE2D<int>,2>(x10B4,_t0661);
          goto JOIN10B9
        JOIN10B9:  preds = [ASSIGN10B6,ASSIGN11C3]
          bool _t10B7#1 = phi(_t10B3,_t10B8)
          if _t10B7 then goto ASSIGN10FA else goto JOIN11BC
        ASSIGN10FA:  preds = [COND10BA]
          real2 x10BC#2 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos10AC);
          real2 nd10BE#2 = Floor<2>(x10BC);
          real2 f10BD#2 = Sub<real2>(x10BC,nd10BE);
          int{2} n10BF#8 = RealToInt<2>(nd10BE);
          int t110DB#1 = -1;
          int t210DC#1 = Index<int{2},0>(n10BF);
          int ix10DA#1 = Add<int>(t110DB,t210DC);
          int t110DE#1 = -1;
          int t210DF#1 = Index<int{2},1>(n10BF);
          int iy10DD#1 = Add<int>(t110DE,t210DF);
          addr(IMAGE2D<float>) a10E0#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10DD);
          real4 v010C1#1 = LoadVoxels<IMAGE2D<float>,4>(a10E0);
          int t110D4#1 = -1;
          int t210D5#1 = Index<int{2},0>(n10BF);
          int ix10D3#1 = Add<int>(t110D4,t210D5);
          int t110D7#1 = 0;
          int t210D8#1 = Index<int{2},1>(n10BF);
          int iy10D6#1 = Add<int>(t110D7,t210D8);
          addr(IMAGE2D<float>) a10D9#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10D3,iy10D6);
          real4 v110C2#1 = LoadVoxels<IMAGE2D<float>,4>(a10D9);
          int t110CD#1 = -1;
          int t210CE#1 = Index<int{2},0>(n10BF);
          int ix10CC#1 = Add<int>(t110CD,t210CE);
          int t110D0#1 = 1;
          int t210D1#1 = Index<int{2},1>(n10BF);
          int iy10CF#1 = Add<int>(t110D0,t210D1);
          addr(IMAGE2D<float>) a10D2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10CC,iy10CF);
          real4 v210C3#1 = LoadVoxels<IMAGE2D<float>,4>(a10D2);
          int t110C6#1 = -1;
          int t210C7#1 = Index<int{2},0>(n10BF);
          int ix10C5#1 = Add<int>(t110C6,t210C7);
          int t110C9#1 = 2;
          int t210CA#1 = Index<int{2},1>(n10BF);
          int iy10C8#1 = Add<int>(t110C9,t210CA);
          addr(IMAGE2D<float>) a10CB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10C5,iy10C8);
          real4 v310C4#1 = LoadVoxels<IMAGE2D<float>,4>(a10CB);
          real fy10EC#4 = Index<real2,1>(f10BD);
          real r10F4#1 = 0.1e1;
          real t310F1#1 = Add<real>(fy10EC,r10F4);
          real t210F0#1 = fy10EC;
          real r10F3#1 = 0.1e1;
          real t110EF#1 = Sub<real>(fy10EC,r10F3);
          real r10F2#1 = 0.2e1;
          real t010EE#1 = Sub<real>(fy10EC,r10F2);
          real4 a10ED#1 = <real4>[t310F1,t210F0,t110EF,t010EE];
          real4 hy10E2#1 = EvalKernel<4,bspln3,0>(a10ED);
          real fx10E3#4 = Index<real2,0>(f10BD);
          real r10EB#1 = 0.1e1;
          real t310E8#1 = Add<real>(fx10E3,r10EB);
          real t210E7#1 = fx10E3;
          real r10EA#1 = 0.1e1;
          real t110E6#1 = Sub<real>(fx10E3,r10EA);
          real r10E9#1 = 0.2e1;
          real t010E5#1 = Sub<real>(fx10E3,r10E9);
          real4 a10E4#1 = <real4>[t310E8,t210E7,t110E6,t010E5];
          real4 hx10E1#4 = EvalKernel<4,bspln3,0>(a10E4);
          real t010F6#1 = Dot<4>(v010C1,hx10E1);
          real t110F7#1 = Dot<4>(v110C2,hx10E1);
          real t210F8#1 = Dot<4>(v210C3,hx10E1);
          real t310F9#1 = Dot<4>(v310C4,hx10E1);
          real4 tv10F5#1 = <real4>[t010F6,t110F7,t210F8,t310F9];
          real _t10BB#1 = Dot<4>(hy10E2,tv10F5);
          real2 x1139#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v09067D);
          real2 nd113B#2 = Floor<2>(x1139);
          real2 f113A#2 = Sub<real2>(x1139,nd113B);
          int{2} n113C#8 = RealToInt<2>(nd113B);
          int t11158#1 = -1;
          int t21159#1 = Index<int{2},0>(n113C);
          int ix1157#1 = Add<int>(t11158,t21159);
          int t1115B#1 = -1;
          int t2115C#1 = Index<int{2},1>(n113C);
          int iy115A#1 = Add<int>(t1115B,t2115C);
          addr(IMAGE2D<int>) a115D#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy115A);
          real4 v0113E#1 = LoadVoxels<IMAGE2D<int>,4>(a115D);
          int t11151#1 = -1;
          int t21152#1 = Index<int{2},0>(n113C);
          int ix1150#1 = Add<int>(t11151,t21152);
          int t11154#1 = 0;
          int t21155#1 = Index<int{2},1>(n113C);
          int iy1153#1 = Add<int>(t11154,t21155);
          addr(IMAGE2D<int>) a1156#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1150,iy1153);
          real4 v1113F#1 = LoadVoxels<IMAGE2D<int>,4>(a1156);
          int t1114A#1 = -1;
          int t2114B#1 = Index<int{2},0>(n113C);
          int ix1149#1 = Add<int>(t1114A,t2114B);
          int t1114D#1 = 1;
          int t2114E#1 = Index<int{2},1>(n113C);
          int iy114C#1 = Add<int>(t1114D,t2114E);
          addr(IMAGE2D<int>) a114F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1149,iy114C);
          real4 v21140#1 = LoadVoxels<IMAGE2D<int>,4>(a114F);
          int t11143#1 = -1;
          int t21144#1 = Index<int{2},0>(n113C);
          int ix1142#1 = Add<int>(t11143,t21144);
          int t11146#1 = 2;
          int t21147#1 = Index<int{2},1>(n113C);
          int iy1145#1 = Add<int>(t11146,t21147);
          addr(IMAGE2D<int>) a1148#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1142,iy1145);
          real4 v31141#1 = LoadVoxels<IMAGE2D<int>,4>(a1148);
          real fy1169#4 = Index<real2,1>(f113A);
          real r1171#1 = 0.1e1;
          real t3116E#1 = Add<real>(fy1169,r1171);
          real t2116D#1 = fy1169;
          real r1170#1 = 0.1e1;
          real t1116C#1 = Sub<real>(fy1169,r1170);
          real r116F#1 = 0.2e1;
          real t0116B#1 = Sub<real>(fy1169,r116F);
          real4 a116A#1 = <real4>[t3116E,t2116D,t1116C,t0116B];
          real4 hy115F#1 = EvalKernel<4,bspln3,0>(a116A);
          real fx1160#4 = Index<real2,0>(f113A);
          real r1168#1 = 0.1e1;
          real t31165#1 = Add<real>(fx1160,r1168);
          real t21164#1 = fx1160;
          real r1167#1 = 0.1e1;
          real t11163#1 = Sub<real>(fx1160,r1167);
          real r1166#1 = 0.2e1;
          real t01162#1 = Sub<real>(fx1160,r1166);
          real4 a1161#1 = <real4>[t31165,t21164,t11163,t01162];
          real4 hx115E#4 = EvalKernel<4,bspln3,0>(a1161);
          real t01173#1 = Dot<4>(v0113E,hx115E);
          real t11174#1 = Dot<4>(v1113F,hx115E);
          real t21175#1 = Dot<4>(v21140,hx115E);
          real t31176#1 = Dot<4>(v31141,hx115E);
          real4 tv1172#1 = <real4>[t01173,t11174,t21175,t31176];
          real _t1138#1 = Dot<4>(hy115F,tv1172);
          real _t11B5#2 = Sub<real>(_t10BB,_t1138);
          real _t11B7#1 = Mul<real>(_t11B5,_t11B5);
          real score11B9#1 = Add<real>(score10A4,_t11B7);
          goto JOIN11BC
        JOIN11BC:  preds = [ASSIGN11BA,COND10BA]
          real score11BB#1 = phi(score11B9,score10A4)
          self.t = t06B9;
          self.score = score11BB;
          self.r0 = r006D7;
          self.r1 = r106DD;
          self.pos = pos10AC;
          stabilize ()
        ASSIGN11C3:  preds = [COND10B2]
          bool _t10B8#1 = false;
          goto JOIN10B9
        ASSIGN11C4:  preds = [COND0F9B]
          bool _t0FA1#1 = false;
          goto JOIN0FA2
        ASSIGN11C5:  preds = [COND0E84]
          bool _t0E8A#1 = false;
          goto JOIN0E8B
        ASSIGN11C6:  preds = [COND0D6D]
          bool _t0D73#1 = false;
          goto JOIN0D74
        ASSIGN11C7:  preds = [COND0B51]
          bool _t0B57#1 = false;
          goto JOIN0B58
        ASSIGN11C8:  preds = [COND0A3A]
          bool _t0A40#1 = false;
          goto JOIN0A41
        ASSIGN11C9:  preds = [COND0923]
          bool _t0929#1 = false;
          goto JOIN092A
        ASSIGN11CA:  preds = [COND080C]
          bool _t0812#1 = false;
          goto JOIN0813
        ASSIGN11CB:  preds = [COND06F5]
          bool _t06FB#1 = false;
          goto JOIN06FC
    end Update
    method Stabilize
        ENTRY11CD:  preds = []
          real3 t11CE#1 = self.t;
          real score11D0#1 = self.score;
          real2 r011D2#1 = self.r0;
          real2 r111D4#1 = self.r1;
          real2 pos11D6#1 = self.pos;
          self.t = t11CE;
          self.score = score11D0;
          self.r0 = r011D2;
          self.r1 = r111D4;
          self.pos = pos11D6;
          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
++ 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
++ 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 T067F#0
  global int F0680#0
  global real2 v01066D#4
  global real2 v02066F#4
  global real2 v030673#4
  global real2 v040675#4
  global real2 v000669#5
  global real2 v060677#4
  global real2 v070679#4
  global real2 v08067B#4
  global real2 v09067D#4
  global string _t065F#1
  global image(IMAGE2D<int>) _t0661#68
  global int _t065D#0
  global string _t0663#1
  global image(IMAGE2D<float>) _t0665#68
  global real _t0667#6
  global real _t066B#7
  global real _t0671#6
## global initialization
  ENTRY065C:  preds = []
    int _t065D#0 = 0;
    string _t065F#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0661#68 = LoadImage<IMAGE2D<int>>(_t065F);
    string _t0663#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0665#68 = LoadImage<IMAGE2D<float>>(_t0663);
    real _t0667#6 = 0.0;
    real2 v000669#5 = <real2>[_t0667,_t0667];
    real _t066B#7 = 0.5e0;
    real2 v01066D#4 = <real2>[_t066B,_t066B];
    real2 v02066F#4 = <real2>[_t066B,_t0667];
    real _t0671#6 = Neg<real>(_t066B);
    real2 v030673#4 = <real2>[_t066B,_t0671];
    real2 v040675#4 = <real2>[_t0667,_t066B];
    real2 v060677#4 = <real2>[_t0667,_t0671];
    real2 v070679#4 = <real2>[_t0671,_t066B];
    real2 v08067B#4 = <real2>[_t0671,_t0667];
    real2 v09067D#4 = <real2>[_t0671,_t0671];
    return (T067F,F0680,v01066D,v02066F,v030673,v040675,v000669,v060677,v070679,v08067B,v09067D,_t065F,_t0661,_t065D,_t0663,_t0665,_t0667,_t066B,_t0671)
## initially
  ARRAY
    ENTRY0687:  preds = []
      int _t0683#4 = 0;
      int _t0684#4 = 60;
      live vars = (_t0684,_t0683)
    for int i0682#1 = _t0683 .. _t0684
      for int j0685#1 = _t0683 .. _t0684
        for int k0686#1 = _t0683 .. _t0684
          ENTRY068B:  preds = []
            live vars = ()
          new R(i0682,j0685,k0686);
## strands
  strand R (int i068D#1, int j068E#1, int k068F#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY0695:  preds = []
        real _t0696#1 = IntToReal(i068D);
        real _t0698#3 = 0.60e2;
        real _t069A#1 = Div<real>(_t0696,_t0698);
        real _t069C#3 = 0.5e0;
        real _t069E#1 = Sub<real>(_t069A,_t069C);
        real _t06A0#1 = IntToReal(j068E);
        real _t06A2#1 = Div<real>(_t06A0,_t0698);
        real _t06A4#1 = Sub<real>(_t06A2,_t069C);
        real _t06A6#1 = IntToReal(k068F);
        real _t06A8#1 = Div<real>(_t06A6,_t0698);
        real _t06AA#1 = Sub<real>(_t06A8,_t069C);
        real3 t06AC#1 = <real3>[_t069E,_t06A4,_t06AA];
        real score06AE#3 = 0.0;
        real2 r006B0#3 = <real2>[score06AE,score06AE];
        self.t = t06AC;
        self.score = score06AE;
        self.r0 = r006B0;
        self.r1 = r006B0;
        self.pos = r006B0;
        strand_init ()
    method Update
        ENTRY06B8:  preds = []
          real3 t06B9#4 = self.t;
          real score06BB#2 = self.score;
          real _t06BD#82 = 0.1e1;
          real _t06BF#43 = 0.2e1;
          int _t06C1#21 = 2;
          real _t06C3#6 = Subscript<real3>(t06B9,_t06C1);
          real _t06C5#1 = Mul<real>(_t06BF,_t06C3);
          real _t06C7#1 = Mul<real>(_t06C5,_t06C3);
          real _t06C9#2 = Sub<real>(_t06BD,_t06C7);
          real _t06CB#1 = Neg<real>(_t06BF);
          real _t06CD#1 = Mul<real>(_t06C3,_t06C3);
          real _t06CF#1 = Sub<real>(_t06BD,_t06CD);
          real _t06D1#2 = sqrt(_t06CF);
          real _t06D3#1 = Mul<real>(_t06CB,_t06D1);
          real _t06D5#1 = Mul<real>(_t06D3,_t06C3);
          real2 r006D7#10 = <real2>[_t06C9,_t06D5];
          real _t06D9#1 = Mul<real>(_t06BF,_t06D1);
          real _t06DB#1 = Mul<real>(_t06D9,_t06C3);
          real2 r106DD#10 = <real2>[_t06DB,_t06C9];
          real _t06DF#1 = Dot<2>(r006D7,v000669);
          real _t06E1#1 = Dot<2>(r106DD,v000669);
          real2 _t06E3#1 = <real2>[_t06DF,_t06E1];
          int _t06E5#21 = 0;
          real _t06E7#1 = Subscript<real3>(t06B9,_t06E5);
          int _t06E9#21 = 1;
          real _t06EB#1 = Subscript<real3>(t06B9,_t06E9);
          real2 _t06ED#9 = <real2>[_t06E7,_t06EB];
          real2 pos06EF#3 = Add<real2>(_t06E3,_t06ED);
          real2 x06F2#5 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos06EF);
          bool _t06F1#2 = Inside<IMAGE2D<float>,2>(x06F2,_t0665);
          if _t06F1 then goto ASSIGN06F8 else goto ASSIGN11CB
        ASSIGN06F8:  preds = [COND06F5]
          real2 x06F7#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          bool _t06F6#1 = Inside<IMAGE2D<int>,2>(x06F7,_t0661);
          goto JOIN06FC
        JOIN06FC:  preds = [ASSIGN06F9,ASSIGN11CB]
          bool _t06FA#2 = phi(_t06F6,_t06FB)
          if _t06FA then goto ASSIGN11DE else goto JOIN07FF
        ASSIGN11DE:  preds = [COND06FD]
          real2 nd0701#2 = Floor<2>(x06F2);
          real2 f0700#2 = Sub<real2>(x06F2,nd0701);
          int{2} n0702#8 = RealToInt<2>(nd0701);
          int t1071E#4 = -1;
          int t2071F#1 = Index<int{2},0>(n0702);
          int ix071D#4 = Add<int>(t1071E,t2071F);
          int t20722#4 = Index<int{2},1>(n0702);
          int iy0720#1 = Add<int>(t1071E,t20722);
          addr(IMAGE2D<float>) a0723#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy0720);
          real4 v00704#1 = LoadVoxels<IMAGE2D<float>,4>(a0723);
          int iy0719#1 = Add<int>(_t06E5,t20722);
          addr(IMAGE2D<float>) a071C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy0719);
          real4 v10705#1 = LoadVoxels<IMAGE2D<float>,4>(a071C);
          int iy0712#1 = Add<int>(_t06E9,t20722);
          addr(IMAGE2D<float>) a0715#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy0712);
          real4 v20706#1 = LoadVoxels<IMAGE2D<float>,4>(a0715);
          int iy070B#1 = Add<int>(_t06C1,t20722);
          addr(IMAGE2D<float>) a070E#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy070B);
          real4 v30707#1 = LoadVoxels<IMAGE2D<float>,4>(a070E);
          real fy072F#5 = Index<real2,1>(f0700);
          real t30734#1 = Add<real>(fy072F,_t06BD);
          real t10732#1 = Sub<real>(fy072F,_t06BD);
          real t00731#1 = Sub<real>(fy072F,_t06BF);
          real4 a0730#1 = <real4>[t30734,fy072F,t10732,t00731];
          real4 hy0725#1 = EvalKernel<4,bspln3,0>(a0730);
          real fx0726#5 = Index<real2,0>(f0700);
          real t3072B#1 = Add<real>(fx0726,_t06BD);
          real t10729#1 = Sub<real>(fx0726,_t06BD);
          real t00728#1 = Sub<real>(fx0726,_t06BF);
          real4 a0727#1 = <real4>[t3072B,fx0726,t10729,t00728];
          real4 hx0724#4 = EvalKernel<4,bspln3,0>(a0727);
          real t00739#1 = Dot<4>(v00704,hx0724);
          real t1073A#1 = Dot<4>(v10705,hx0724);
          real t2073B#1 = Dot<4>(v20706,hx0724);
          real t3073C#1 = Dot<4>(v30707,hx0724);
          real4 tv0738#1 = <real4>[t00739,t1073A,t2073B,t3073C];
          real _t06FE#1 = Dot<4>(hy0725,tv0738);
          real2 x077C#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          real2 nd077E#2 = Floor<2>(x077C);
          real2 f077D#2 = Sub<real2>(x077C,nd077E);
          int{2} n077F#8 = RealToInt<2>(nd077E);
          int t2079C#1 = Index<int{2},0>(n077F);
          int ix079A#4 = Add<int>(t1071E,t2079C);
          int t2079F#4 = Index<int{2},1>(n077F);
          int iy079D#1 = Add<int>(t1071E,t2079F);
          addr(IMAGE2D<int>) a07A0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy079D);
          real4 v00781#1 = LoadVoxels<IMAGE2D<int>,4>(a07A0);
          int iy0796#1 = Add<int>(_t06E5,t2079F);
          addr(IMAGE2D<int>) a0799#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy0796);
          real4 v10782#1 = LoadVoxels<IMAGE2D<int>,4>(a0799);
          int iy078F#1 = Add<int>(_t06E9,t2079F);
          addr(IMAGE2D<int>) a0792#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy078F);
          real4 v20783#1 = LoadVoxels<IMAGE2D<int>,4>(a0792);
          int iy0788#1 = Add<int>(_t06C1,t2079F);
          addr(IMAGE2D<int>) a078B#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy0788);
          real4 v30784#1 = LoadVoxels<IMAGE2D<int>,4>(a078B);
          real fy07AC#5 = Index<real2,1>(f077D);
          real t307B1#1 = Add<real>(fy07AC,_t06BD);
          real t107AF#1 = Sub<real>(fy07AC,_t06BD);
          real t007AE#1 = Sub<real>(fy07AC,_t06BF);
          real4 a07AD#1 = <real4>[t307B1,fy07AC,t107AF,t007AE];
          real4 hy07A2#1 = EvalKernel<4,bspln3,0>(a07AD);
          real fx07A3#5 = Index<real2,0>(f077D);
          real t307A8#1 = Add<real>(fx07A3,_t06BD);
          real t107A6#1 = Sub<real>(fx07A3,_t06BD);
          real t007A5#1 = Sub<real>(fx07A3,_t06BF);
          real4 a07A4#1 = <real4>[t307A8,fx07A3,t107A6,t007A5];
          real4 hx07A1#4 = EvalKernel<4,bspln3,0>(a07A4);
          real t007B6#1 = Dot<4>(v00781,hx07A1);
          real t107B7#1 = Dot<4>(v10782,hx07A1);
          real t207B8#1 = Dot<4>(v20783,hx07A1);
          real t307B9#1 = Dot<4>(v30784,hx07A1);
          real4 tv07B5#1 = <real4>[t007B6,t107B7,t207B8,t307B9];
          real _t077B#1 = Dot<4>(hy07A2,tv07B5);
          real _t07F8#2 = Sub<real>(_t06FE,_t077B);
          real _t07FA#1 = Mul<real>(_t07F8,_t07F8);
          real score07FC#1 = Add<real>(score06BB,_t07FA);
          goto JOIN07FF
        JOIN07FF:  preds = [ASSIGN07FD,COND06FD]
          real score07FE#2 = phi(score07FC,score06BB)
          real _t0800#1 = Dot<2>(r006D7,v01066D);
          real _t0802#1 = Dot<2>(r106DD,v01066D);
          real2 _t0804#1 = <real2>[_t0800,_t0802];
          real2 pos0806#2 = Add<real2>(_t0804,_t06ED);
          real2 x0809#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0806);
          bool _t0808#1 = Inside<IMAGE2D<float>,2>(x0809,_t0665);
          if _t0808 then goto ASSIGN080F else goto ASSIGN11CA
        ASSIGN080F:  preds = [COND080C]
          real2 x080E#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v01066D);
          bool _t080D#1 = Inside<IMAGE2D<int>,2>(x080E,_t0661);
          goto JOIN0813
        JOIN0813:  preds = [ASSIGN0810,ASSIGN11CA]
          bool _t0811#1 = phi(_t080D,_t0812)
          if _t0811 then goto ASSIGN11FF else goto JOIN0916
        ASSIGN11FF:  preds = [COND0814]
          real2 nd0818#2 = Floor<2>(x0809);
          real2 f0817#2 = Sub<real2>(x0809,nd0818);
          int{2} n0819#8 = RealToInt<2>(nd0818);
          int t10835#4 = -1;
          int t20836#1 = Index<int{2},0>(n0819);
          int ix0834#4 = Add<int>(t10835,t20836);
          int t20839#4 = Index<int{2},1>(n0819);
          int iy0837#1 = Add<int>(t10835,t20839);
          addr(IMAGE2D<float>) a083A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0837);
          real4 v0081B#1 = LoadVoxels<IMAGE2D<float>,4>(a083A);
          int iy0830#1 = Add<int>(_t06E5,t20839);
          addr(IMAGE2D<float>) a0833#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0830);
          real4 v1081C#1 = LoadVoxels<IMAGE2D<float>,4>(a0833);
          int iy0829#1 = Add<int>(_t06E9,t20839);
          addr(IMAGE2D<float>) a082C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0829);
          real4 v2081D#1 = LoadVoxels<IMAGE2D<float>,4>(a082C);
          int iy0822#1 = Add<int>(_t06C1,t20839);
          addr(IMAGE2D<float>) a0825#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0822);
          real4 v3081E#1 = LoadVoxels<IMAGE2D<float>,4>(a0825);
          real fy0846#5 = Index<real2,1>(f0817);
          real t3084B#1 = Add<real>(fy0846,_t06BD);
          real t10849#1 = Sub<real>(fy0846,_t06BD);
          real t00848#1 = Sub<real>(fy0846,_t06BF);
          real4 a0847#1 = <real4>[t3084B,fy0846,t10849,t00848];
          real4 hy083C#1 = EvalKernel<4,bspln3,0>(a0847);
          real fx083D#5 = Index<real2,0>(f0817);
          real t30842#1 = Add<real>(fx083D,_t06BD);
          real t10840#1 = Sub<real>(fx083D,_t06BD);
          real t0083F#1 = Sub<real>(fx083D,_t06BF);
          real4 a083E#1 = <real4>[t30842,fx083D,t10840,t0083F];
          real4 hx083B#4 = EvalKernel<4,bspln3,0>(a083E);
          real t00850#1 = Dot<4>(v0081B,hx083B);
          real t10851#1 = Dot<4>(v1081C,hx083B);
          real t20852#1 = Dot<4>(v2081D,hx083B);
          real t30853#1 = Dot<4>(v3081E,hx083B);
          real4 tv084F#1 = <real4>[t00850,t10851,t20852,t30853];
          real _t0815#1 = Dot<4>(hy083C,tv084F);
          real2 x0893#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v01066D);
          real2 nd0895#2 = Floor<2>(x0893);
          real2 f0894#2 = Sub<real2>(x0893,nd0895);
          int{2} n0896#8 = RealToInt<2>(nd0895);
          int t208B3#1 = Index<int{2},0>(n0896);
          int ix08B1#4 = Add<int>(t10835,t208B3);
          int t208B6#4 = Index<int{2},1>(n0896);
          int iy08B4#1 = Add<int>(t10835,t208B6);
          addr(IMAGE2D<int>) a08B7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy08B4);
          real4 v00898#1 = LoadVoxels<IMAGE2D<int>,4>(a08B7);
          int iy08AD#1 = Add<int>(_t06E5,t208B6);
          addr(IMAGE2D<int>) a08B0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy08AD);
          real4 v10899#1 = LoadVoxels<IMAGE2D<int>,4>(a08B0);
          int iy08A6#1 = Add<int>(_t06E9,t208B6);
          addr(IMAGE2D<int>) a08A9#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy08A6);
          real4 v2089A#1 = LoadVoxels<IMAGE2D<int>,4>(a08A9);
          int iy089F#1 = Add<int>(_t06C1,t208B6);
          addr(IMAGE2D<int>) a08A2#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy089F);
          real4 v3089B#1 = LoadVoxels<IMAGE2D<int>,4>(a08A2);
          real fy08C3#5 = Index<real2,1>(f0894);
          real t308C8#1 = Add<real>(fy08C3,_t06BD);
          real t108C6#1 = Sub<real>(fy08C3,_t06BD);
          real t008C5#1 = Sub<real>(fy08C3,_t06BF);
          real4 a08C4#1 = <real4>[t308C8,fy08C3,t108C6,t008C5];
          real4 hy08B9#1 = EvalKernel<4,bspln3,0>(a08C4);
          real fx08BA#5 = Index<real2,0>(f0894);
          real t308BF#1 = Add<real>(fx08BA,_t06BD);
          real t108BD#1 = Sub<real>(fx08BA,_t06BD);
          real t008BC#1 = Sub<real>(fx08BA,_t06BF);
          real4 a08BB#1 = <real4>[t308BF,fx08BA,t108BD,t008BC];
          real4 hx08B8#4 = EvalKernel<4,bspln3,0>(a08BB);
          real t008CD#1 = Dot<4>(v00898,hx08B8);
          real t108CE#1 = Dot<4>(v10899,hx08B8);
          real t208CF#1 = Dot<4>(v2089A,hx08B8);
          real t308D0#1 = Dot<4>(v3089B,hx08B8);
          real4 tv08CC#1 = <real4>[t008CD,t108CE,t208CF,t308D0];
          real _t0892#1 = Dot<4>(hy08B9,tv08CC);
          real _t090F#2 = Sub<real>(_t0815,_t0892);
          real _t0911#1 = Mul<real>(_t090F,_t090F);
          real score0913#1 = Add<real>(score07FE,_t0911);
          goto JOIN0916
        JOIN0916:  preds = [ASSIGN0914,COND0814]
          real score0915#2 = phi(score0913,score07FE)
          real _t0917#1 = Dot<2>(r006D7,v02066F);
          real _t0919#1 = Dot<2>(r106DD,v02066F);
          real2 _t091B#1 = <real2>[_t0917,_t0919];
          real2 pos091D#2 = Add<real2>(_t091B,_t06ED);
          real2 x0920#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos091D);
          bool _t091F#1 = Inside<IMAGE2D<float>,2>(x0920,_t0665);
          if _t091F then goto ASSIGN0926 else goto ASSIGN11C9
        ASSIGN0926:  preds = [COND0923]
          real2 x0925#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v02066F);
          bool _t0924#1 = Inside<IMAGE2D<int>,2>(x0925,_t0661);
          goto JOIN092A
        JOIN092A:  preds = [ASSIGN0927,ASSIGN11C9]
          bool _t0928#1 = phi(_t0924,_t0929)
          if _t0928 then goto ASSIGN1220 else goto JOIN0A2D
        ASSIGN1220:  preds = [COND092B]
          real2 nd092F#2 = Floor<2>(x0920);
          real2 f092E#2 = Sub<real2>(x0920,nd092F);
          int{2} n0930#8 = RealToInt<2>(nd092F);
          int t1094C#4 = -1;
          int t2094D#1 = Index<int{2},0>(n0930);
          int ix094B#4 = Add<int>(t1094C,t2094D);
          int t20950#4 = Index<int{2},1>(n0930);
          int iy094E#1 = Add<int>(t1094C,t20950);
          addr(IMAGE2D<float>) a0951#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy094E);
          real4 v00932#1 = LoadVoxels<IMAGE2D<float>,4>(a0951);
          int iy0947#1 = Add<int>(_t06E5,t20950);
          addr(IMAGE2D<float>) a094A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy0947);
          real4 v10933#1 = LoadVoxels<IMAGE2D<float>,4>(a094A);
          int iy0940#1 = Add<int>(_t06E9,t20950);
          addr(IMAGE2D<float>) a0943#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy0940);
          real4 v20934#1 = LoadVoxels<IMAGE2D<float>,4>(a0943);
          int iy0939#1 = Add<int>(_t06C1,t20950);
          addr(IMAGE2D<float>) a093C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy0939);
          real4 v30935#1 = LoadVoxels<IMAGE2D<float>,4>(a093C);
          real fy095D#5 = Index<real2,1>(f092E);
          real t30962#1 = Add<real>(fy095D,_t06BD);
          real t10960#1 = Sub<real>(fy095D,_t06BD);
          real t0095F#1 = Sub<real>(fy095D,_t06BF);
          real4 a095E#1 = <real4>[t30962,fy095D,t10960,t0095F];
          real4 hy0953#1 = EvalKernel<4,bspln3,0>(a095E);
          real fx0954#5 = Index<real2,0>(f092E);
          real t30959#1 = Add<real>(fx0954,_t06BD);
          real t10957#1 = Sub<real>(fx0954,_t06BD);
          real t00956#1 = Sub<real>(fx0954,_t06BF);
          real4 a0955#1 = <real4>[t30959,fx0954,t10957,t00956];
          real4 hx0952#4 = EvalKernel<4,bspln3,0>(a0955);
          real t00967#1 = Dot<4>(v00932,hx0952);
          real t10968#1 = Dot<4>(v10933,hx0952);
          real t20969#1 = Dot<4>(v20934,hx0952);
          real t3096A#1 = Dot<4>(v30935,hx0952);
          real4 tv0966#1 = <real4>[t00967,t10968,t20969,t3096A];
          real _t092C#1 = Dot<4>(hy0953,tv0966);
          real2 x09AA#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v02066F);
          real2 nd09AC#2 = Floor<2>(x09AA);
          real2 f09AB#2 = Sub<real2>(x09AA,nd09AC);
          int{2} n09AD#8 = RealToInt<2>(nd09AC);
          int t209CA#1 = Index<int{2},0>(n09AD);
          int ix09C8#4 = Add<int>(t1094C,t209CA);
          int t209CD#4 = Index<int{2},1>(n09AD);
          int iy09CB#1 = Add<int>(t1094C,t209CD);
          addr(IMAGE2D<int>) a09CE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09CB);
          real4 v009AF#1 = LoadVoxels<IMAGE2D<int>,4>(a09CE);
          int iy09C4#1 = Add<int>(_t06E5,t209CD);
          addr(IMAGE2D<int>) a09C7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09C4);
          real4 v109B0#1 = LoadVoxels<IMAGE2D<int>,4>(a09C7);
          int iy09BD#1 = Add<int>(_t06E9,t209CD);
          addr(IMAGE2D<int>) a09C0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09BD);
          real4 v209B1#1 = LoadVoxels<IMAGE2D<int>,4>(a09C0);
          int iy09B6#1 = Add<int>(_t06C1,t209CD);
          addr(IMAGE2D<int>) a09B9#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09B6);
          real4 v309B2#1 = LoadVoxels<IMAGE2D<int>,4>(a09B9);
          real fy09DA#5 = Index<real2,1>(f09AB);
          real t309DF#1 = Add<real>(fy09DA,_t06BD);
          real t109DD#1 = Sub<real>(fy09DA,_t06BD);
          real t009DC#1 = Sub<real>(fy09DA,_t06BF);
          real4 a09DB#1 = <real4>[t309DF,fy09DA,t109DD,t009DC];
          real4 hy09D0#1 = EvalKernel<4,bspln3,0>(a09DB);
          real fx09D1#5 = Index<real2,0>(f09AB);
          real t309D6#1 = Add<real>(fx09D1,_t06BD);
          real t109D4#1 = Sub<real>(fx09D1,_t06BD);
          real t009D3#1 = Sub<real>(fx09D1,_t06BF);
          real4 a09D2#1 = <real4>[t309D6,fx09D1,t109D4,t009D3];
          real4 hx09CF#4 = EvalKernel<4,bspln3,0>(a09D2);
          real t009E4#1 = Dot<4>(v009AF,hx09CF);
          real t109E5#1 = Dot<4>(v109B0,hx09CF);
          real t209E6#1 = Dot<4>(v209B1,hx09CF);
          real t309E7#1 = Dot<4>(v309B2,hx09CF);
          real4 tv09E3#1 = <real4>[t009E4,t109E5,t209E6,t309E7];
          real _t09A9#1 = Dot<4>(hy09D0,tv09E3);
          real _t0A26#2 = Sub<real>(_t092C,_t09A9);
          real _t0A28#1 = Mul<real>(_t0A26,_t0A26);
          real score0A2A#1 = Add<real>(score0915,_t0A28);
          goto JOIN0A2D
        JOIN0A2D:  preds = [ASSIGN0A2B,COND092B]
          real score0A2C#2 = phi(score0A2A,score0915)
          real _t0A2E#1 = Dot<2>(r006D7,v030673);
          real _t0A30#1 = Dot<2>(r106DD,v030673);
          real2 _t0A32#1 = <real2>[_t0A2E,_t0A30];
          real2 pos0A34#2 = Add<real2>(_t0A32,_t06ED);
          real2 x0A37#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0A34);
          bool _t0A36#1 = Inside<IMAGE2D<float>,2>(x0A37,_t0665);
          if _t0A36 then goto ASSIGN0A3D else goto ASSIGN11C8
        ASSIGN0A3D:  preds = [COND0A3A]
          real2 x0A3C#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v030673);
          bool _t0A3B#1 = Inside<IMAGE2D<int>,2>(x0A3C,_t0661);
          goto JOIN0A41
        JOIN0A41:  preds = [ASSIGN0A3E,ASSIGN11C8]
          bool _t0A3F#1 = phi(_t0A3B,_t0A40)
          if _t0A3F then goto ASSIGN1241 else goto JOIN0B44
        ASSIGN1241:  preds = [COND0A42]
          real2 nd0A46#2 = Floor<2>(x0A37);
          real2 f0A45#2 = Sub<real2>(x0A37,nd0A46);
          int{2} n0A47#8 = RealToInt<2>(nd0A46);
          int t10A63#4 = -1;
          int t20A64#1 = Index<int{2},0>(n0A47);
          int ix0A62#4 = Add<int>(t10A63,t20A64);
          int t20A67#4 = Index<int{2},1>(n0A47);
          int iy0A65#1 = Add<int>(t10A63,t20A67);
          addr(IMAGE2D<float>) a0A68#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A65);
          real4 v00A49#1 = LoadVoxels<IMAGE2D<float>,4>(a0A68);
          int iy0A5E#1 = Add<int>(_t06E5,t20A67);
          addr(IMAGE2D<float>) a0A61#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A5E);
          real4 v10A4A#1 = LoadVoxels<IMAGE2D<float>,4>(a0A61);
          int iy0A57#1 = Add<int>(_t06E9,t20A67);
          addr(IMAGE2D<float>) a0A5A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A57);
          real4 v20A4B#1 = LoadVoxels<IMAGE2D<float>,4>(a0A5A);
          int iy0A50#1 = Add<int>(_t06C1,t20A67);
          addr(IMAGE2D<float>) a0A53#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A50);
          real4 v30A4C#1 = LoadVoxels<IMAGE2D<float>,4>(a0A53);
          real fy0A74#5 = Index<real2,1>(f0A45);
          real t30A79#1 = Add<real>(fy0A74,_t06BD);
          real t10A77#1 = Sub<real>(fy0A74,_t06BD);
          real t00A76#1 = Sub<real>(fy0A74,_t06BF);
          real4 a0A75#1 = <real4>[t30A79,fy0A74,t10A77,t00A76];
          real4 hy0A6A#1 = EvalKernel<4,bspln3,0>(a0A75);
          real fx0A6B#5 = Index<real2,0>(f0A45);
          real t30A70#1 = Add<real>(fx0A6B,_t06BD);
          real t10A6E#1 = Sub<real>(fx0A6B,_t06BD);
          real t00A6D#1 = Sub<real>(fx0A6B,_t06BF);
          real4 a0A6C#1 = <real4>[t30A70,fx0A6B,t10A6E,t00A6D];
          real4 hx0A69#4 = EvalKernel<4,bspln3,0>(a0A6C);
          real t00A7E#1 = Dot<4>(v00A49,hx0A69);
          real t10A7F#1 = Dot<4>(v10A4A,hx0A69);
          real t20A80#1 = Dot<4>(v20A4B,hx0A69);
          real t30A81#1 = Dot<4>(v30A4C,hx0A69);
          real4 tv0A7D#1 = <real4>[t00A7E,t10A7F,t20A80,t30A81];
          real _t0A43#1 = Dot<4>(hy0A6A,tv0A7D);
          real2 x0AC1#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v030673);
          real2 nd0AC3#2 = Floor<2>(x0AC1);
          real2 f0AC2#2 = Sub<real2>(x0AC1,nd0AC3);
          int{2} n0AC4#8 = RealToInt<2>(nd0AC3);
          int t20AE1#1 = Index<int{2},0>(n0AC4);
          int ix0ADF#4 = Add<int>(t10A63,t20AE1);
          int t20AE4#4 = Index<int{2},1>(n0AC4);
          int iy0AE2#1 = Add<int>(t10A63,t20AE4);
          addr(IMAGE2D<int>) a0AE5#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0AE2);
          real4 v00AC6#1 = LoadVoxels<IMAGE2D<int>,4>(a0AE5);
          int iy0ADB#1 = Add<int>(_t06E5,t20AE4);
          addr(IMAGE2D<int>) a0ADE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0ADB);
          real4 v10AC7#1 = LoadVoxels<IMAGE2D<int>,4>(a0ADE);
          int iy0AD4#1 = Add<int>(_t06E9,t20AE4);
          addr(IMAGE2D<int>) a0AD7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0AD4);
          real4 v20AC8#1 = LoadVoxels<IMAGE2D<int>,4>(a0AD7);
          int iy0ACD#1 = Add<int>(_t06C1,t20AE4);
          addr(IMAGE2D<int>) a0AD0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0ACD);
          real4 v30AC9#1 = LoadVoxels<IMAGE2D<int>,4>(a0AD0);
          real fy0AF1#5 = Index<real2,1>(f0AC2);
          real t30AF6#1 = Add<real>(fy0AF1,_t06BD);
          real t10AF4#1 = Sub<real>(fy0AF1,_t06BD);
          real t00AF3#1 = Sub<real>(fy0AF1,_t06BF);
          real4 a0AF2#1 = <real4>[t30AF6,fy0AF1,t10AF4,t00AF3];
          real4 hy0AE7#1 = EvalKernel<4,bspln3,0>(a0AF2);
          real fx0AE8#5 = Index<real2,0>(f0AC2);
          real t30AED#1 = Add<real>(fx0AE8,_t06BD);
          real t10AEB#1 = Sub<real>(fx0AE8,_t06BD);
          real t00AEA#1 = Sub<real>(fx0AE8,_t06BF);
          real4 a0AE9#1 = <real4>[t30AED,fx0AE8,t10AEB,t00AEA];
          real4 hx0AE6#4 = EvalKernel<4,bspln3,0>(a0AE9);
          real t00AFB#1 = Dot<4>(v00AC6,hx0AE6);
          real t10AFC#1 = Dot<4>(v10AC7,hx0AE6);
          real t20AFD#1 = Dot<4>(v20AC8,hx0AE6);
          real t30AFE#1 = Dot<4>(v30AC9,hx0AE6);
          real4 tv0AFA#1 = <real4>[t00AFB,t10AFC,t20AFD,t30AFE];
          real _t0AC0#1 = Dot<4>(hy0AE7,tv0AFA);
          real _t0B3D#2 = Sub<real>(_t0A43,_t0AC0);
          real _t0B3F#1 = Mul<real>(_t0B3D,_t0B3D);
          real score0B41#1 = Add<real>(score0A2C,_t0B3F);
          goto JOIN0B44
        JOIN0B44:  preds = [ASSIGN0B42,COND0A42]
          real score0B43#2 = phi(score0B41,score0A2C)
          real _t0B45#1 = Dot<2>(r006D7,v040675);
          real _t0B47#1 = Dot<2>(r106DD,v040675);
          real2 _t0B49#1 = <real2>[_t0B45,_t0B47];
          real2 pos0B4B#2 = Add<real2>(_t0B49,_t06ED);
          real2 x0B4E#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0B4B);
          bool _t0B4D#1 = Inside<IMAGE2D<float>,2>(x0B4E,_t0665);
          if _t0B4D then goto ASSIGN0B54 else goto ASSIGN11C7
        ASSIGN0B54:  preds = [COND0B51]
          real2 x0B53#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v040675);
          bool _t0B52#1 = Inside<IMAGE2D<int>,2>(x0B53,_t0661);
          goto JOIN0B58
        JOIN0B58:  preds = [ASSIGN0B55,ASSIGN11C7]
          bool _t0B56#1 = phi(_t0B52,_t0B57)
          if _t0B56 then goto ASSIGN1262 else goto JOIN0C5B
        ASSIGN1262:  preds = [COND0B59]
          real2 nd0B5D#2 = Floor<2>(x0B4E);
          real2 f0B5C#2 = Sub<real2>(x0B4E,nd0B5D);
          int{2} n0B5E#8 = RealToInt<2>(nd0B5D);
          int t10B7A#4 = -1;
          int t20B7B#1 = Index<int{2},0>(n0B5E);
          int ix0B79#4 = Add<int>(t10B7A,t20B7B);
          int t20B7E#4 = Index<int{2},1>(n0B5E);
          int iy0B7C#1 = Add<int>(t10B7A,t20B7E);
          addr(IMAGE2D<float>) a0B7F#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B7C);
          real4 v00B60#1 = LoadVoxels<IMAGE2D<float>,4>(a0B7F);
          int iy0B75#1 = Add<int>(_t06E5,t20B7E);
          addr(IMAGE2D<float>) a0B78#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B75);
          real4 v10B61#1 = LoadVoxels<IMAGE2D<float>,4>(a0B78);
          int iy0B6E#1 = Add<int>(_t06E9,t20B7E);
          addr(IMAGE2D<float>) a0B71#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B6E);
          real4 v20B62#1 = LoadVoxels<IMAGE2D<float>,4>(a0B71);
          int iy0B67#1 = Add<int>(_t06C1,t20B7E);
          addr(IMAGE2D<float>) a0B6A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B67);
          real4 v30B63#1 = LoadVoxels<IMAGE2D<float>,4>(a0B6A);
          real fy0B8B#5 = Index<real2,1>(f0B5C);
          real t30B90#1 = Add<real>(fy0B8B,_t06BD);
          real t10B8E#1 = Sub<real>(fy0B8B,_t06BD);
          real t00B8D#1 = Sub<real>(fy0B8B,_t06BF);
          real4 a0B8C#1 = <real4>[t30B90,fy0B8B,t10B8E,t00B8D];
          real4 hy0B81#1 = EvalKernel<4,bspln3,0>(a0B8C);
          real fx0B82#5 = Index<real2,0>(f0B5C);
          real t30B87#1 = Add<real>(fx0B82,_t06BD);
          real t10B85#1 = Sub<real>(fx0B82,_t06BD);
          real t00B84#1 = Sub<real>(fx0B82,_t06BF);
          real4 a0B83#1 = <real4>[t30B87,fx0B82,t10B85,t00B84];
          real4 hx0B80#4 = EvalKernel<4,bspln3,0>(a0B83);
          real t00B95#1 = Dot<4>(v00B60,hx0B80);
          real t10B96#1 = Dot<4>(v10B61,hx0B80);
          real t20B97#1 = Dot<4>(v20B62,hx0B80);
          real t30B98#1 = Dot<4>(v30B63,hx0B80);
          real4 tv0B94#1 = <real4>[t00B95,t10B96,t20B97,t30B98];
          real _t0B5A#1 = Dot<4>(hy0B81,tv0B94);
          real2 x0BD8#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v040675);
          real2 nd0BDA#2 = Floor<2>(x0BD8);
          real2 f0BD9#2 = Sub<real2>(x0BD8,nd0BDA);
          int{2} n0BDB#8 = RealToInt<2>(nd0BDA);
          int t20BF8#1 = Index<int{2},0>(n0BDB);
          int ix0BF6#4 = Add<int>(t10B7A,t20BF8);
          int t20BFB#4 = Index<int{2},1>(n0BDB);
          int iy0BF9#1 = Add<int>(t10B7A,t20BFB);
          addr(IMAGE2D<int>) a0BFC#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BF9);
          real4 v00BDD#1 = LoadVoxels<IMAGE2D<int>,4>(a0BFC);
          int iy0BF2#1 = Add<int>(_t06E5,t20BFB);
          addr(IMAGE2D<int>) a0BF5#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BF2);
          real4 v10BDE#1 = LoadVoxels<IMAGE2D<int>,4>(a0BF5);
          int iy0BEB#1 = Add<int>(_t06E9,t20BFB);
          addr(IMAGE2D<int>) a0BEE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BEB);
          real4 v20BDF#1 = LoadVoxels<IMAGE2D<int>,4>(a0BEE);
          int iy0BE4#1 = Add<int>(_t06C1,t20BFB);
          addr(IMAGE2D<int>) a0BE7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BE4);
          real4 v30BE0#1 = LoadVoxels<IMAGE2D<int>,4>(a0BE7);
          real fy0C08#5 = Index<real2,1>(f0BD9);
          real t30C0D#1 = Add<real>(fy0C08,_t06BD);
          real t10C0B#1 = Sub<real>(fy0C08,_t06BD);
          real t00C0A#1 = Sub<real>(fy0C08,_t06BF);
          real4 a0C09#1 = <real4>[t30C0D,fy0C08,t10C0B,t00C0A];
          real4 hy0BFE#1 = EvalKernel<4,bspln3,0>(a0C09);
          real fx0BFF#5 = Index<real2,0>(f0BD9);
          real t30C04#1 = Add<real>(fx0BFF,_t06BD);
          real t10C02#1 = Sub<real>(fx0BFF,_t06BD);
          real t00C01#1 = Sub<real>(fx0BFF,_t06BF);
          real4 a0C00#1 = <real4>[t30C04,fx0BFF,t10C02,t00C01];
          real4 hx0BFD#4 = EvalKernel<4,bspln3,0>(a0C00);
          real t00C12#1 = Dot<4>(v00BDD,hx0BFD);
          real t10C13#1 = Dot<4>(v10BDE,hx0BFD);
          real t20C14#1 = Dot<4>(v20BDF,hx0BFD);
          real t30C15#1 = Dot<4>(v30BE0,hx0BFD);
          real4 tv0C11#1 = <real4>[t00C12,t10C13,t20C14,t30C15];
          real _t0BD7#1 = Dot<4>(hy0BFE,tv0C11);
          real _t0C54#2 = Sub<real>(_t0B5A,_t0BD7);
          real _t0C56#1 = Mul<real>(_t0C54,_t0C54);
          real score0C58#1 = Add<real>(score0B43,_t0C56);
          goto JOIN0C5B
        JOIN0C5B:  preds = [ASSIGN0C59,COND0B59]
          real score0C5A#2 = phi(score0C58,score0B43)
          if _t06F1 then goto JOIN0C5D else goto JOIN0C5D
        JOIN0C5D:  preds = [COND0C5C]
          if _t06FA then goto ASSIGN1283 else goto JOIN0D60
        ASSIGN1283:  preds = [COND0C5E]
          real2 nd0C62#2 = Floor<2>(x06F2);
          real2 f0C61#2 = Sub<real2>(x06F2,nd0C62);
          int{2} n0C63#8 = RealToInt<2>(nd0C62);
          int t10C7F#4 = -1;
          int t20C80#1 = Index<int{2},0>(n0C63);
          int ix0C7E#4 = Add<int>(t10C7F,t20C80);
          int t20C83#4 = Index<int{2},1>(n0C63);
          int iy0C81#1 = Add<int>(t10C7F,t20C83);
          addr(IMAGE2D<float>) a0C84#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C81);
          real4 v00C65#1 = LoadVoxels<IMAGE2D<float>,4>(a0C84);
          int iy0C7A#1 = Add<int>(_t06E5,t20C83);
          addr(IMAGE2D<float>) a0C7D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C7A);
          real4 v10C66#1 = LoadVoxels<IMAGE2D<float>,4>(a0C7D);
          int iy0C73#1 = Add<int>(_t06E9,t20C83);
          addr(IMAGE2D<float>) a0C76#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C73);
          real4 v20C67#1 = LoadVoxels<IMAGE2D<float>,4>(a0C76);
          int iy0C6C#1 = Add<int>(_t06C1,t20C83);
          addr(IMAGE2D<float>) a0C6F#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C6C);
          real4 v30C68#1 = LoadVoxels<IMAGE2D<float>,4>(a0C6F);
          real fy0C90#5 = Index<real2,1>(f0C61);
          real t30C95#1 = Add<real>(fy0C90,_t06BD);
          real t10C93#1 = Sub<real>(fy0C90,_t06BD);
          real t00C92#1 = Sub<real>(fy0C90,_t06BF);
          real4 a0C91#1 = <real4>[t30C95,fy0C90,t10C93,t00C92];
          real4 hy0C86#1 = EvalKernel<4,bspln3,0>(a0C91);
          real fx0C87#5 = Index<real2,0>(f0C61);
          real t30C8C#1 = Add<real>(fx0C87,_t06BD);
          real t10C8A#1 = Sub<real>(fx0C87,_t06BD);
          real t00C89#1 = Sub<real>(fx0C87,_t06BF);
          real4 a0C88#1 = <real4>[t30C8C,fx0C87,t10C8A,t00C89];
          real4 hx0C85#4 = EvalKernel<4,bspln3,0>(a0C88);
          real t00C9A#1 = Dot<4>(v00C65,hx0C85);
          real t10C9B#1 = Dot<4>(v10C66,hx0C85);
          real t20C9C#1 = Dot<4>(v20C67,hx0C85);
          real t30C9D#1 = Dot<4>(v30C68,hx0C85);
          real4 tv0C99#1 = <real4>[t00C9A,t10C9B,t20C9C,t30C9D];
          real _t0C5F#1 = Dot<4>(hy0C86,tv0C99);
          real2 x0CDD#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          real2 nd0CDF#2 = Floor<2>(x0CDD);
          real2 f0CDE#2 = Sub<real2>(x0CDD,nd0CDF);
          int{2} n0CE0#8 = RealToInt<2>(nd0CDF);
          int t20CFD#1 = Index<int{2},0>(n0CE0);
          int ix0CFB#4 = Add<int>(t10C7F,t20CFD);
          int t20D00#4 = Index<int{2},1>(n0CE0);
          int iy0CFE#1 = Add<int>(t10C7F,t20D00);
          addr(IMAGE2D<int>) a0D01#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CFE);
          real4 v00CE2#1 = LoadVoxels<IMAGE2D<int>,4>(a0D01);
          int iy0CF7#1 = Add<int>(_t06E5,t20D00);
          addr(IMAGE2D<int>) a0CFA#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CF7);
          real4 v10CE3#1 = LoadVoxels<IMAGE2D<int>,4>(a0CFA);
          int iy0CF0#1 = Add<int>(_t06E9,t20D00);
          addr(IMAGE2D<int>) a0CF3#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CF0);
          real4 v20CE4#1 = LoadVoxels<IMAGE2D<int>,4>(a0CF3);
          int iy0CE9#1 = Add<int>(_t06C1,t20D00);
          addr(IMAGE2D<int>) a0CEC#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CE9);
          real4 v30CE5#1 = LoadVoxels<IMAGE2D<int>,4>(a0CEC);
          real fy0D0D#5 = Index<real2,1>(f0CDE);
          real t30D12#1 = Add<real>(fy0D0D,_t06BD);
          real t10D10#1 = Sub<real>(fy0D0D,_t06BD);
          real t00D0F#1 = Sub<real>(fy0D0D,_t06BF);
          real4 a0D0E#1 = <real4>[t30D12,fy0D0D,t10D10,t00D0F];
          real4 hy0D03#1 = EvalKernel<4,bspln3,0>(a0D0E);
          real fx0D04#5 = Index<real2,0>(f0CDE);
          real t30D09#1 = Add<real>(fx0D04,_t06BD);
          real t10D07#1 = Sub<real>(fx0D04,_t06BD);
          real t00D06#1 = Sub<real>(fx0D04,_t06BF);
          real4 a0D05#1 = <real4>[t30D09,fx0D04,t10D07,t00D06];
          real4 hx0D02#4 = EvalKernel<4,bspln3,0>(a0D05);
          real t00D17#1 = Dot<4>(v00CE2,hx0D02);
          real t10D18#1 = Dot<4>(v10CE3,hx0D02);
          real t20D19#1 = Dot<4>(v20CE4,hx0D02);
          real t30D1A#1 = Dot<4>(v30CE5,hx0D02);
          real4 tv0D16#1 = <real4>[t00D17,t10D18,t20D19,t30D1A];
          real _t0CDC#1 = Dot<4>(hy0D03,tv0D16);
          real _t0D59#2 = Sub<real>(_t0C5F,_t0CDC);
          real _t0D5B#1 = Mul<real>(_t0D59,_t0D59);
          real score0D5D#1 = Add<real>(score0C5A,_t0D5B);
          goto JOIN0D60
        JOIN0D60:  preds = [ASSIGN0D5E,COND0C5E]
          real score0D5F#2 = phi(score0D5D,score0C5A)
          real _t0D61#1 = Dot<2>(r006D7,v060677);
          real _t0D63#1 = Dot<2>(r106DD,v060677);
          real2 _t0D65#1 = <real2>[_t0D61,_t0D63];
          real2 pos0D67#2 = Add<real2>(_t0D65,_t06ED);
          real2 x0D6A#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0D67);
          bool _t0D69#1 = Inside<IMAGE2D<float>,2>(x0D6A,_t0665);
          if _t0D69 then goto ASSIGN0D70 else goto ASSIGN11C6
        ASSIGN0D70:  preds = [COND0D6D]
          real2 x0D6F#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v060677);
          bool _t0D6E#1 = Inside<IMAGE2D<int>,2>(x0D6F,_t0661);
          goto JOIN0D74
        JOIN0D74:  preds = [ASSIGN0D71,ASSIGN11C6]
          bool _t0D72#1 = phi(_t0D6E,_t0D73)
          if _t0D72 then goto ASSIGN12A4 else goto JOIN0E77
        ASSIGN12A4:  preds = [COND0D75]
          real2 nd0D79#2 = Floor<2>(x0D6A);
          real2 f0D78#2 = Sub<real2>(x0D6A,nd0D79);
          int{2} n0D7A#8 = RealToInt<2>(nd0D79);
          int t10D96#4 = -1;
          int t20D97#1 = Index<int{2},0>(n0D7A);
          int ix0D95#4 = Add<int>(t10D96,t20D97);
          int t20D9A#4 = Index<int{2},1>(n0D7A);
          int iy0D98#1 = Add<int>(t10D96,t20D9A);
          addr(IMAGE2D<float>) a0D9B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D98);
          real4 v00D7C#1 = LoadVoxels<IMAGE2D<float>,4>(a0D9B);
          int iy0D91#1 = Add<int>(_t06E5,t20D9A);
          addr(IMAGE2D<float>) a0D94#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D91);
          real4 v10D7D#1 = LoadVoxels<IMAGE2D<float>,4>(a0D94);
          int iy0D8A#1 = Add<int>(_t06E9,t20D9A);
          addr(IMAGE2D<float>) a0D8D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D8A);
          real4 v20D7E#1 = LoadVoxels<IMAGE2D<float>,4>(a0D8D);
          int iy0D83#1 = Add<int>(_t06C1,t20D9A);
          addr(IMAGE2D<float>) a0D86#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D83);
          real4 v30D7F#1 = LoadVoxels<IMAGE2D<float>,4>(a0D86);
          real fy0DA7#5 = Index<real2,1>(f0D78);
          real t30DAC#1 = Add<real>(fy0DA7,_t06BD);
          real t10DAA#1 = Sub<real>(fy0DA7,_t06BD);
          real t00DA9#1 = Sub<real>(fy0DA7,_t06BF);
          real4 a0DA8#1 = <real4>[t30DAC,fy0DA7,t10DAA,t00DA9];
          real4 hy0D9D#1 = EvalKernel<4,bspln3,0>(a0DA8);
          real fx0D9E#5 = Index<real2,0>(f0D78);
          real t30DA3#1 = Add<real>(fx0D9E,_t06BD);
          real t10DA1#1 = Sub<real>(fx0D9E,_t06BD);
          real t00DA0#1 = Sub<real>(fx0D9E,_t06BF);
          real4 a0D9F#1 = <real4>[t30DA3,fx0D9E,t10DA1,t00DA0];
          real4 hx0D9C#4 = EvalKernel<4,bspln3,0>(a0D9F);
          real t00DB1#1 = Dot<4>(v00D7C,hx0D9C);
          real t10DB2#1 = Dot<4>(v10D7D,hx0D9C);
          real t20DB3#1 = Dot<4>(v20D7E,hx0D9C);
          real t30DB4#1 = Dot<4>(v30D7F,hx0D9C);
          real4 tv0DB0#1 = <real4>[t00DB1,t10DB2,t20DB3,t30DB4];
          real _t0D76#1 = Dot<4>(hy0D9D,tv0DB0);
          real2 x0DF4#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v060677);
          real2 nd0DF6#2 = Floor<2>(x0DF4);
          real2 f0DF5#2 = Sub<real2>(x0DF4,nd0DF6);
          int{2} n0DF7#8 = RealToInt<2>(nd0DF6);
          int t20E14#1 = Index<int{2},0>(n0DF7);
          int ix0E12#4 = Add<int>(t10D96,t20E14);
          int t20E17#4 = Index<int{2},1>(n0DF7);
          int iy0E15#1 = Add<int>(t10D96,t20E17);
          addr(IMAGE2D<int>) a0E18#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E15);
          real4 v00DF9#1 = LoadVoxels<IMAGE2D<int>,4>(a0E18);
          int iy0E0E#1 = Add<int>(_t06E5,t20E17);
          addr(IMAGE2D<int>) a0E11#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E0E);
          real4 v10DFA#1 = LoadVoxels<IMAGE2D<int>,4>(a0E11);
          int iy0E07#1 = Add<int>(_t06E9,t20E17);
          addr(IMAGE2D<int>) a0E0A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E07);
          real4 v20DFB#1 = LoadVoxels<IMAGE2D<int>,4>(a0E0A);
          int iy0E00#1 = Add<int>(_t06C1,t20E17);
          addr(IMAGE2D<int>) a0E03#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E00);
          real4 v30DFC#1 = LoadVoxels<IMAGE2D<int>,4>(a0E03);
          real fy0E24#5 = Index<real2,1>(f0DF5);
          real t30E29#1 = Add<real>(fy0E24,_t06BD);
          real t10E27#1 = Sub<real>(fy0E24,_t06BD);
          real t00E26#1 = Sub<real>(fy0E24,_t06BF);
          real4 a0E25#1 = <real4>[t30E29,fy0E24,t10E27,t00E26];
          real4 hy0E1A#1 = EvalKernel<4,bspln3,0>(a0E25);
          real fx0E1B#5 = Index<real2,0>(f0DF5);
          real t30E20#1 = Add<real>(fx0E1B,_t06BD);
          real t10E1E#1 = Sub<real>(fx0E1B,_t06BD);
          real t00E1D#1 = Sub<real>(fx0E1B,_t06BF);
          real4 a0E1C#1 = <real4>[t30E20,fx0E1B,t10E1E,t00E1D];
          real4 hx0E19#4 = EvalKernel<4,bspln3,0>(a0E1C);
          real t00E2E#1 = Dot<4>(v00DF9,hx0E19);
          real t10E2F#1 = Dot<4>(v10DFA,hx0E19);
          real t20E30#1 = Dot<4>(v20DFB,hx0E19);
          real t30E31#1 = Dot<4>(v30DFC,hx0E19);
          real4 tv0E2D#1 = <real4>[t00E2E,t10E2F,t20E30,t30E31];
          real _t0DF3#1 = Dot<4>(hy0E1A,tv0E2D);
          real _t0E70#2 = Sub<real>(_t0D76,_t0DF3);
          real _t0E72#1 = Mul<real>(_t0E70,_t0E70);
          real score0E74#1 = Add<real>(score0D5F,_t0E72);
          goto JOIN0E77
        JOIN0E77:  preds = [ASSIGN0E75,COND0D75]
          real score0E76#2 = phi(score0E74,score0D5F)
          real _t0E78#1 = Dot<2>(r006D7,v070679);
          real _t0E7A#1 = Dot<2>(r106DD,v070679);
          real2 _t0E7C#1 = <real2>[_t0E78,_t0E7A];
          real2 pos0E7E#2 = Add<real2>(_t0E7C,_t06ED);
          real2 x0E81#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0E7E);
          bool _t0E80#1 = Inside<IMAGE2D<float>,2>(x0E81,_t0665);
          if _t0E80 then goto ASSIGN0E87 else goto ASSIGN11C5
        ASSIGN0E87:  preds = [COND0E84]
          real2 x0E86#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v070679);
          bool _t0E85#1 = Inside<IMAGE2D<int>,2>(x0E86,_t0661);
          goto JOIN0E8B
        JOIN0E8B:  preds = [ASSIGN0E88,ASSIGN11C5]
          bool _t0E89#1 = phi(_t0E85,_t0E8A)
          if _t0E89 then goto ASSIGN12C5 else goto JOIN0F8E
        ASSIGN12C5:  preds = [COND0E8C]
          real2 nd0E90#2 = Floor<2>(x0E81);
          real2 f0E8F#2 = Sub<real2>(x0E81,nd0E90);
          int{2} n0E91#8 = RealToInt<2>(nd0E90);
          int t10EAD#4 = -1;
          int t20EAE#1 = Index<int{2},0>(n0E91);
          int ix0EAC#4 = Add<int>(t10EAD,t20EAE);
          int t20EB1#4 = Index<int{2},1>(n0E91);
          int iy0EAF#1 = Add<int>(t10EAD,t20EB1);
          addr(IMAGE2D<float>) a0EB2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0EAF);
          real4 v00E93#1 = LoadVoxels<IMAGE2D<float>,4>(a0EB2);
          int iy0EA8#1 = Add<int>(_t06E5,t20EB1);
          addr(IMAGE2D<float>) a0EAB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0EA8);
          real4 v10E94#1 = LoadVoxels<IMAGE2D<float>,4>(a0EAB);
          int iy0EA1#1 = Add<int>(_t06E9,t20EB1);
          addr(IMAGE2D<float>) a0EA4#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0EA1);
          real4 v20E95#1 = LoadVoxels<IMAGE2D<float>,4>(a0EA4);
          int iy0E9A#1 = Add<int>(_t06C1,t20EB1);
          addr(IMAGE2D<float>) a0E9D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0E9A);
          real4 v30E96#1 = LoadVoxels<IMAGE2D<float>,4>(a0E9D);
          real fy0EBE#5 = Index<real2,1>(f0E8F);
          real t30EC3#1 = Add<real>(fy0EBE,_t06BD);
          real t10EC1#1 = Sub<real>(fy0EBE,_t06BD);
          real t00EC0#1 = Sub<real>(fy0EBE,_t06BF);
          real4 a0EBF#1 = <real4>[t30EC3,fy0EBE,t10EC1,t00EC0];
          real4 hy0EB4#1 = EvalKernel<4,bspln3,0>(a0EBF);
          real fx0EB5#5 = Index<real2,0>(f0E8F);
          real t30EBA#1 = Add<real>(fx0EB5,_t06BD);
          real t10EB8#1 = Sub<real>(fx0EB5,_t06BD);
          real t00EB7#1 = Sub<real>(fx0EB5,_t06BF);
          real4 a0EB6#1 = <real4>[t30EBA,fx0EB5,t10EB8,t00EB7];
          real4 hx0EB3#4 = EvalKernel<4,bspln3,0>(a0EB6);
          real t00EC8#1 = Dot<4>(v00E93,hx0EB3);
          real t10EC9#1 = Dot<4>(v10E94,hx0EB3);
          real t20ECA#1 = Dot<4>(v20E95,hx0EB3);
          real t30ECB#1 = Dot<4>(v30E96,hx0EB3);
          real4 tv0EC7#1 = <real4>[t00EC8,t10EC9,t20ECA,t30ECB];
          real _t0E8D#1 = Dot<4>(hy0EB4,tv0EC7);
          real2 x0F0B#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v070679);
          real2 nd0F0D#2 = Floor<2>(x0F0B);
          real2 f0F0C#2 = Sub<real2>(x0F0B,nd0F0D);
          int{2} n0F0E#8 = RealToInt<2>(nd0F0D);
          int t20F2B#1 = Index<int{2},0>(n0F0E);
          int ix0F29#4 = Add<int>(t10EAD,t20F2B);
          int t20F2E#4 = Index<int{2},1>(n0F0E);
          int iy0F2C#1 = Add<int>(t10EAD,t20F2E);
          addr(IMAGE2D<int>) a0F2F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F2C);
          real4 v00F10#1 = LoadVoxels<IMAGE2D<int>,4>(a0F2F);
          int iy0F25#1 = Add<int>(_t06E5,t20F2E);
          addr(IMAGE2D<int>) a0F28#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F25);
          real4 v10F11#1 = LoadVoxels<IMAGE2D<int>,4>(a0F28);
          int iy0F1E#1 = Add<int>(_t06E9,t20F2E);
          addr(IMAGE2D<int>) a0F21#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F1E);
          real4 v20F12#1 = LoadVoxels<IMAGE2D<int>,4>(a0F21);
          int iy0F17#1 = Add<int>(_t06C1,t20F2E);
          addr(IMAGE2D<int>) a0F1A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F17);
          real4 v30F13#1 = LoadVoxels<IMAGE2D<int>,4>(a0F1A);
          real fy0F3B#5 = Index<real2,1>(f0F0C);
          real t30F40#1 = Add<real>(fy0F3B,_t06BD);
          real t10F3E#1 = Sub<real>(fy0F3B,_t06BD);
          real t00F3D#1 = Sub<real>(fy0F3B,_t06BF);
          real4 a0F3C#1 = <real4>[t30F40,fy0F3B,t10F3E,t00F3D];
          real4 hy0F31#1 = EvalKernel<4,bspln3,0>(a0F3C);
          real fx0F32#5 = Index<real2,0>(f0F0C);
          real t30F37#1 = Add<real>(fx0F32,_t06BD);
          real t10F35#1 = Sub<real>(fx0F32,_t06BD);
          real t00F34#1 = Sub<real>(fx0F32,_t06BF);
          real4 a0F33#1 = <real4>[t30F37,fx0F32,t10F35,t00F34];
          real4 hx0F30#4 = EvalKernel<4,bspln3,0>(a0F33);
          real t00F45#1 = Dot<4>(v00F10,hx0F30);
          real t10F46#1 = Dot<4>(v10F11,hx0F30);
          real t20F47#1 = Dot<4>(v20F12,hx0F30);
          real t30F48#1 = Dot<4>(v30F13,hx0F30);
          real4 tv0F44#1 = <real4>[t00F45,t10F46,t20F47,t30F48];
          real _t0F0A#1 = Dot<4>(hy0F31,tv0F44);
          real _t0F87#2 = Sub<real>(_t0E8D,_t0F0A);
          real _t0F89#1 = Mul<real>(_t0F87,_t0F87);
          real score0F8B#1 = Add<real>(score0E76,_t0F89);
          goto JOIN0F8E
        JOIN0F8E:  preds = [ASSIGN0F8C,COND0E8C]
          real score0F8D#2 = phi(score0F8B,score0E76)
          real _t0F8F#1 = Dot<2>(r006D7,v08067B);
          real _t0F91#1 = Dot<2>(r106DD,v08067B);
          real2 _t0F93#1 = <real2>[_t0F8F,_t0F91];
          real2 pos0F95#2 = Add<real2>(_t0F93,_t06ED);
          real2 x0F98#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0F95);
          bool _t0F97#1 = Inside<IMAGE2D<float>,2>(x0F98,_t0665);
          if _t0F97 then goto ASSIGN0F9E else goto ASSIGN11C4
        ASSIGN0F9E:  preds = [COND0F9B]
          real2 x0F9D#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v08067B);
          bool _t0F9C#1 = Inside<IMAGE2D<int>,2>(x0F9D,_t0661);
          goto JOIN0FA2
        JOIN0FA2:  preds = [ASSIGN0F9F,ASSIGN11C4]
          bool _t0FA0#1 = phi(_t0F9C,_t0FA1)
          if _t0FA0 then goto ASSIGN12E6 else goto JOIN10A5
        ASSIGN12E6:  preds = [COND0FA3]
          real2 nd0FA7#2 = Floor<2>(x0F98);
          real2 f0FA6#2 = Sub<real2>(x0F98,nd0FA7);
          int{2} n0FA8#8 = RealToInt<2>(nd0FA7);
          int t10FC4#4 = -1;
          int t20FC5#1 = Index<int{2},0>(n0FA8);
          int ix0FC3#4 = Add<int>(t10FC4,t20FC5);
          int t20FC8#4 = Index<int{2},1>(n0FA8);
          int iy0FC6#1 = Add<int>(t10FC4,t20FC8);
          addr(IMAGE2D<float>) a0FC9#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FC6);
          real4 v00FAA#1 = LoadVoxels<IMAGE2D<float>,4>(a0FC9);
          int iy0FBF#1 = Add<int>(_t06E5,t20FC8);
          addr(IMAGE2D<float>) a0FC2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FBF);
          real4 v10FAB#1 = LoadVoxels<IMAGE2D<float>,4>(a0FC2);
          int iy0FB8#1 = Add<int>(_t06E9,t20FC8);
          addr(IMAGE2D<float>) a0FBB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FB8);
          real4 v20FAC#1 = LoadVoxels<IMAGE2D<float>,4>(a0FBB);
          int iy0FB1#1 = Add<int>(_t06C1,t20FC8);
          addr(IMAGE2D<float>) a0FB4#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FB1);
          real4 v30FAD#1 = LoadVoxels<IMAGE2D<float>,4>(a0FB4);
          real fy0FD5#5 = Index<real2,1>(f0FA6);
          real t30FDA#1 = Add<real>(fy0FD5,_t06BD);
          real t10FD8#1 = Sub<real>(fy0FD5,_t06BD);
          real t00FD7#1 = Sub<real>(fy0FD5,_t06BF);
          real4 a0FD6#1 = <real4>[t30FDA,fy0FD5,t10FD8,t00FD7];
          real4 hy0FCB#1 = EvalKernel<4,bspln3,0>(a0FD6);
          real fx0FCC#5 = Index<real2,0>(f0FA6);
          real t30FD1#1 = Add<real>(fx0FCC,_t06BD);
          real t10FCF#1 = Sub<real>(fx0FCC,_t06BD);
          real t00FCE#1 = Sub<real>(fx0FCC,_t06BF);
          real4 a0FCD#1 = <real4>[t30FD1,fx0FCC,t10FCF,t00FCE];
          real4 hx0FCA#4 = EvalKernel<4,bspln3,0>(a0FCD);
          real t00FDF#1 = Dot<4>(v00FAA,hx0FCA);
          real t10FE0#1 = Dot<4>(v10FAB,hx0FCA);
          real t20FE1#1 = Dot<4>(v20FAC,hx0FCA);
          real t30FE2#1 = Dot<4>(v30FAD,hx0FCA);
          real4 tv0FDE#1 = <real4>[t00FDF,t10FE0,t20FE1,t30FE2];
          real _t0FA4#1 = Dot<4>(hy0FCB,tv0FDE);
          real2 x1022#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v08067B);
          real2 nd1024#2 = Floor<2>(x1022);
          real2 f1023#2 = Sub<real2>(x1022,nd1024);
          int{2} n1025#8 = RealToInt<2>(nd1024);
          int t21042#1 = Index<int{2},0>(n1025);
          int ix1040#4 = Add<int>(t10FC4,t21042);
          int t21045#4 = Index<int{2},1>(n1025);
          int iy1043#1 = Add<int>(t10FC4,t21045);
          addr(IMAGE2D<int>) a1046#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy1043);
          real4 v01027#1 = LoadVoxels<IMAGE2D<int>,4>(a1046);
          int iy103C#1 = Add<int>(_t06E5,t21045);
          addr(IMAGE2D<int>) a103F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy103C);
          real4 v11028#1 = LoadVoxels<IMAGE2D<int>,4>(a103F);
          int iy1035#1 = Add<int>(_t06E9,t21045);
          addr(IMAGE2D<int>) a1038#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy1035);
          real4 v21029#1 = LoadVoxels<IMAGE2D<int>,4>(a1038);
          int iy102E#1 = Add<int>(_t06C1,t21045);
          addr(IMAGE2D<int>) a1031#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy102E);
          real4 v3102A#1 = LoadVoxels<IMAGE2D<int>,4>(a1031);
          real fy1052#5 = Index<real2,1>(f1023);
          real t31057#1 = Add<real>(fy1052,_t06BD);
          real t11055#1 = Sub<real>(fy1052,_t06BD);
          real t01054#1 = Sub<real>(fy1052,_t06BF);
          real4 a1053#1 = <real4>[t31057,fy1052,t11055,t01054];
          real4 hy1048#1 = EvalKernel<4,bspln3,0>(a1053);
          real fx1049#5 = Index<real2,0>(f1023);
          real t3104E#1 = Add<real>(fx1049,_t06BD);
          real t1104C#1 = Sub<real>(fx1049,_t06BD);
          real t0104B#1 = Sub<real>(fx1049,_t06BF);
          real4 a104A#1 = <real4>[t3104E,fx1049,t1104C,t0104B];
          real4 hx1047#4 = EvalKernel<4,bspln3,0>(a104A);
          real t0105C#1 = Dot<4>(v01027,hx1047);
          real t1105D#1 = Dot<4>(v11028,hx1047);
          real t2105E#1 = Dot<4>(v21029,hx1047);
          real t3105F#1 = Dot<4>(v3102A,hx1047);
          real4 tv105B#1 = <real4>[t0105C,t1105D,t2105E,t3105F];
          real _t1021#1 = Dot<4>(hy1048,tv105B);
          real _t109E#2 = Sub<real>(_t0FA4,_t1021);
          real _t10A0#1 = Mul<real>(_t109E,_t109E);
          real score10A2#1 = Add<real>(score0F8D,_t10A0);
          goto JOIN10A5
        JOIN10A5:  preds = [ASSIGN10A3,COND0FA3]
          real score10A4#2 = phi(score10A2,score0F8D)
          real _t10A6#1 = Dot<2>(r006D7,v09067D);
          real _t10A8#1 = Dot<2>(r106DD,v09067D);
          real2 _t10AA#1 = <real2>[_t10A6,_t10A8];
          real2 pos10AC#3 = Add<real2>(_t10AA,_t06ED);
          real2 x10AF#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos10AC);
          bool _t10AE#1 = Inside<IMAGE2D<float>,2>(x10AF,_t0665);
          if _t10AE then goto ASSIGN10B5 else goto ASSIGN11C3
        ASSIGN10B5:  preds = [COND10B2]
          real2 x10B4#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v09067D);
          bool _t10B3#1 = Inside<IMAGE2D<int>,2>(x10B4,_t0661);
          goto JOIN10B9
        JOIN10B9:  preds = [ASSIGN10B6,ASSIGN11C3]
          bool _t10B7#1 = phi(_t10B3,_t10B8)
          if _t10B7 then goto ASSIGN1307 else goto JOIN11BC
        ASSIGN1307:  preds = [COND10BA]
          real2 nd10BE#2 = Floor<2>(x10AF);
          real2 f10BD#2 = Sub<real2>(x10AF,nd10BE);
          int{2} n10BF#8 = RealToInt<2>(nd10BE);
          int t110DB#4 = -1;
          int t210DC#1 = Index<int{2},0>(n10BF);
          int ix10DA#4 = Add<int>(t110DB,t210DC);
          int t210DF#4 = Index<int{2},1>(n10BF);
          int iy10DD#1 = Add<int>(t110DB,t210DF);
          addr(IMAGE2D<float>) a10E0#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10DD);
          real4 v010C1#1 = LoadVoxels<IMAGE2D<float>,4>(a10E0);
          int iy10D6#1 = Add<int>(_t06E5,t210DF);
          addr(IMAGE2D<float>) a10D9#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10D6);
          real4 v110C2#1 = LoadVoxels<IMAGE2D<float>,4>(a10D9);
          int iy10CF#1 = Add<int>(_t06E9,t210DF);
          addr(IMAGE2D<float>) a10D2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10CF);
          real4 v210C3#1 = LoadVoxels<IMAGE2D<float>,4>(a10D2);
          int iy10C8#1 = Add<int>(_t06C1,t210DF);
          addr(IMAGE2D<float>) a10CB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10C8);
          real4 v310C4#1 = LoadVoxels<IMAGE2D<float>,4>(a10CB);
          real fy10EC#5 = Index<real2,1>(f10BD);
          real t310F1#1 = Add<real>(fy10EC,_t06BD);
          real t110EF#1 = Sub<real>(fy10EC,_t06BD);
          real t010EE#1 = Sub<real>(fy10EC,_t06BF);
          real4 a10ED#1 = <real4>[t310F1,fy10EC,t110EF,t010EE];
          real4 hy10E2#1 = EvalKernel<4,bspln3,0>(a10ED);
          real fx10E3#5 = Index<real2,0>(f10BD);
          real t310E8#1 = Add<real>(fx10E3,_t06BD);
          real t110E6#1 = Sub<real>(fx10E3,_t06BD);
          real t010E5#1 = Sub<real>(fx10E3,_t06BF);
          real4 a10E4#1 = <real4>[t310E8,fx10E3,t110E6,t010E5];
          real4 hx10E1#4 = EvalKernel<4,bspln3,0>(a10E4);
          real t010F6#1 = Dot<4>(v010C1,hx10E1);
          real t110F7#1 = Dot<4>(v110C2,hx10E1);
          real t210F8#1 = Dot<4>(v210C3,hx10E1);
          real t310F9#1 = Dot<4>(v310C4,hx10E1);
          real4 tv10F5#1 = <real4>[t010F6,t110F7,t210F8,t310F9];
          real _t10BB#1 = Dot<4>(hy10E2,tv10F5);
          real2 x1139#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v09067D);
          real2 nd113B#2 = Floor<2>(x1139);
          real2 f113A#2 = Sub<real2>(x1139,nd113B);
          int{2} n113C#8 = RealToInt<2>(nd113B);
          int t21159#1 = Index<int{2},0>(n113C);
          int ix1157#4 = Add<int>(t110DB,t21159);
          int t2115C#4 = Index<int{2},1>(n113C);
          int iy115A#1 = Add<int>(t110DB,t2115C);
          addr(IMAGE2D<int>) a115D#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy115A);
          real4 v0113E#1 = LoadVoxels<IMAGE2D<int>,4>(a115D);
          int iy1153#1 = Add<int>(_t06E5,t2115C);
          addr(IMAGE2D<int>) a1156#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy1153);
          real4 v1113F#1 = LoadVoxels<IMAGE2D<int>,4>(a1156);
          int iy114C#1 = Add<int>(_t06E9,t2115C);
          addr(IMAGE2D<int>) a114F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy114C);
          real4 v21140#1 = LoadVoxels<IMAGE2D<int>,4>(a114F);
          int iy1145#1 = Add<int>(_t06C1,t2115C);
          addr(IMAGE2D<int>) a1148#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy1145);
          real4 v31141#1 = LoadVoxels<IMAGE2D<int>,4>(a1148);
          real fy1169#5 = Index<real2,1>(f113A);
          real t3116E#1 = Add<real>(fy1169,_t06BD);
          real t1116C#1 = Sub<real>(fy1169,_t06BD);
          real t0116B#1 = Sub<real>(fy1169,_t06BF);
          real4 a116A#1 = <real4>[t3116E,fy1169,t1116C,t0116B];
          real4 hy115F#1 = EvalKernel<4,bspln3,0>(a116A);
          real fx1160#5 = Index<real2,0>(f113A);
          real t31165#1 = Add<real>(fx1160,_t06BD);
          real t11163#1 = Sub<real>(fx1160,_t06BD);
          real t01162#1 = Sub<real>(fx1160,_t06BF);
          real4 a1161#1 = <real4>[t31165,fx1160,t11163,t01162];
          real4 hx115E#4 = EvalKernel<4,bspln3,0>(a1161);
          real t01173#1 = Dot<4>(v0113E,hx115E);
          real t11174#1 = Dot<4>(v1113F,hx115E);
          real t21175#1 = Dot<4>(v21140,hx115E);
          real t31176#1 = Dot<4>(v31141,hx115E);
          real4 tv1172#1 = <real4>[t01173,t11174,t21175,t31176];
          real _t1138#1 = Dot<4>(hy115F,tv1172);
          real _t11B5#2 = Sub<real>(_t10BB,_t1138);
          real _t11B7#1 = Mul<real>(_t11B5,_t11B5);
          real score11B9#1 = Add<real>(score10A4,_t11B7);
          goto JOIN11BC
        JOIN11BC:  preds = [ASSIGN11BA,COND10BA]
          real score11BB#1 = phi(score11B9,score10A4)
          self.t = t06B9;
          self.score = score11BB;
          self.r0 = r006D7;
          self.r1 = r106DD;
          self.pos = pos10AC;
          stabilize ()
        ASSIGN11C3:  preds = [COND10B2]
          bool _t10B8#1 = false;
          goto JOIN10B9
        ASSIGN11C4:  preds = [COND0F9B]
          bool _t0FA1#1 = false;
          goto JOIN0FA2
        ASSIGN11C5:  preds = [COND0E84]
          bool _t0E8A#1 = false;
          goto JOIN0E8B
        ASSIGN11C6:  preds = [COND0D6D]
          bool _t0D73#1 = false;
          goto JOIN0D74
        ASSIGN11C7:  preds = [COND0B51]
          bool _t0B57#1 = false;
          goto JOIN0B58
        ASSIGN11C8:  preds = [COND0A3A]
          bool _t0A40#1 = false;
          goto JOIN0A41
        ASSIGN11C9:  preds = [COND0923]
          bool _t0929#1 = false;
          goto JOIN092A
        ASSIGN11CA:  preds = [COND080C]
          bool _t0812#1 = false;
          goto JOIN0813
        ASSIGN11CB:  preds = [COND06F5]
          bool _t06FB#1 = false;
          goto JOIN06FC
    end Update
    method Stabilize
        ENTRY11CD:  preds = []
          real3 t11CE#1 = self.t;
          real score11D0#1 = self.score;
          real2 r011D2#1 = self.r0;
          real2 r111D4#1 = self.r1;
          real2 pos11D6#1 = self.pos;
          self.t = t11CE;
          self.score = score11D0;
          self.r0 = r011D2;
          self.r1 = r111D4;
          self.pos = pos11D6;
          return ()
    end Stabilize
  end R
#### end program ####
++ mid-opt:unused
##### MidIL after contraction ####
## properties
  none
## globals
  global int T067F#0
  global int F0680#0
  global real2 v01066D#4
  global real2 v02066F#4
  global real2 v030673#4
  global real2 v040675#4
  global real2 v000669#5
  global real2 v060677#4
  global real2 v070679#4
  global real2 v08067B#4
  global real2 v09067D#4
  global string _t065F#1
  global image(IMAGE2D<int>) _t0661#68
  global int _t065D#0
  global string _t0663#1
  global image(IMAGE2D<float>) _t0665#68
  global real _t0667#6
  global real _t066B#7
  global real _t0671#6
## global initialization
  ENTRY065C:  preds = []
    string _t065F#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t0661#68 = LoadImage<IMAGE2D<int>>(_t065F);
    string _t0663#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t0665#68 = LoadImage<IMAGE2D<float>>(_t0663);
    real _t0667#6 = 0.0;
    real2 v000669#5 = <real2>[_t0667,_t0667];
    real _t066B#7 = 0.5e0;
    real2 v01066D#4 = <real2>[_t066B,_t066B];
    real2 v02066F#4 = <real2>[_t066B,_t0667];
    real _t0671#6 = Neg<real>(_t066B);
    real2 v030673#4 = <real2>[_t066B,_t0671];
    real2 v040675#4 = <real2>[_t0667,_t066B];
    real2 v060677#4 = <real2>[_t0667,_t0671];
    real2 v070679#4 = <real2>[_t0671,_t066B];
    real2 v08067B#4 = <real2>[_t0671,_t0667];
    real2 v09067D#4 = <real2>[_t0671,_t0671];
    return (T067F,F0680,v01066D,v02066F,v030673,v040675,v000669,v060677,v070679,v08067B,v09067D,_t065F,_t0661,_t065D,_t0663,_t0665,_t0667,_t066B,_t0671)
## initially
  ARRAY
    ENTRY0687:  preds = []
      int _t0683#4 = 0;
      int _t0684#4 = 60;
      live vars = (_t0684,_t0683)
    for int i0682#1 = _t0683 .. _t0684
      for int j0685#1 = _t0683 .. _t0684
        for int k0686#1 = _t0683 .. _t0684
          ENTRY068B:  preds = []
            live vars = ()
          new R(i0682,j0685,k0686);
## strands
  strand R (int i068D#1, int j068E#1, int k068F#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY0695:  preds = []
        real _t0696#1 = IntToReal(i068D);
        real _t0698#3 = 0.60e2;
        real _t069A#1 = Div<real>(_t0696,_t0698);
        real _t069C#3 = 0.5e0;
        real _t069E#1 = Sub<real>(_t069A,_t069C);
        real _t06A0#1 = IntToReal(j068E);
        real _t06A2#1 = Div<real>(_t06A0,_t0698);
        real _t06A4#1 = Sub<real>(_t06A2,_t069C);
        real _t06A6#1 = IntToReal(k068F);
        real _t06A8#1 = Div<real>(_t06A6,_t0698);
        real _t06AA#1 = Sub<real>(_t06A8,_t069C);
        real3 t06AC#1 = <real3>[_t069E,_t06A4,_t06AA];
        real score06AE#3 = 0.0;
        real2 r006B0#3 = <real2>[score06AE,score06AE];
        self.t = t06AC;
        self.score = score06AE;
        self.r0 = r006B0;
        self.r1 = r006B0;
        self.pos = r006B0;
        strand_init ()
    method Update
        ENTRY06B8:  preds = []
          real3 t06B9#4 = self.t;
          real score06BB#2 = self.score;
          real _t06BD#82 = 0.1e1;
          real _t06BF#43 = 0.2e1;
          int _t06C1#21 = 2;
          real _t06C3#6 = Subscript<real3>(t06B9,_t06C1);
          real _t06C5#1 = Mul<real>(_t06BF,_t06C3);
          real _t06C7#1 = Mul<real>(_t06C5,_t06C3);
          real _t06C9#2 = Sub<real>(_t06BD,_t06C7);
          real _t06CB#1 = Neg<real>(_t06BF);
          real _t06CD#1 = Mul<real>(_t06C3,_t06C3);
          real _t06CF#1 = Sub<real>(_t06BD,_t06CD);
          real _t06D1#2 = sqrt(_t06CF);
          real _t06D3#1 = Mul<real>(_t06CB,_t06D1);
          real _t06D5#1 = Mul<real>(_t06D3,_t06C3);
          real2 r006D7#10 = <real2>[_t06C9,_t06D5];
          real _t06D9#1 = Mul<real>(_t06BF,_t06D1);
          real _t06DB#1 = Mul<real>(_t06D9,_t06C3);
          real2 r106DD#10 = <real2>[_t06DB,_t06C9];
          real _t06DF#1 = Dot<2>(r006D7,v000669);
          real _t06E1#1 = Dot<2>(r106DD,v000669);
          real2 _t06E3#1 = <real2>[_t06DF,_t06E1];
          int _t06E5#21 = 0;
          real _t06E7#1 = Subscript<real3>(t06B9,_t06E5);
          int _t06E9#21 = 1;
          real _t06EB#1 = Subscript<real3>(t06B9,_t06E9);
          real2 _t06ED#9 = <real2>[_t06E7,_t06EB];
          real2 pos06EF#3 = Add<real2>(_t06E3,_t06ED);
          real2 x06F2#5 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos06EF);
          bool _t06F1#2 = Inside<IMAGE2D<float>,2>(x06F2,_t0665);
          if _t06F1 then goto ASSIGN06F8 else goto ASSIGN11CB
        ASSIGN06F8:  preds = [COND06F5]
          real2 x06F7#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          bool _t06F6#1 = Inside<IMAGE2D<int>,2>(x06F7,_t0661);
          goto JOIN06FC
        JOIN06FC:  preds = [ASSIGN06F9,ASSIGN11CB]
          bool _t06FA#2 = phi(_t06F6,_t06FB)
          if _t06FA then goto ASSIGN11DE else goto JOIN07FF
        ASSIGN11DE:  preds = [COND06FD]
          real2 nd0701#2 = Floor<2>(x06F2);
          real2 f0700#2 = Sub<real2>(x06F2,nd0701);
          int{2} n0702#8 = RealToInt<2>(nd0701);
          int t1071E#4 = -1;
          int t2071F#1 = Index<int{2},0>(n0702);
          int ix071D#4 = Add<int>(t1071E,t2071F);
          int t20722#4 = Index<int{2},1>(n0702);
          int iy0720#1 = Add<int>(t1071E,t20722);
          addr(IMAGE2D<float>) a0723#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy0720);
          real4 v00704#1 = LoadVoxels<IMAGE2D<float>,4>(a0723);
          int iy0719#1 = Add<int>(_t06E5,t20722);
          addr(IMAGE2D<float>) a071C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy0719);
          real4 v10705#1 = LoadVoxels<IMAGE2D<float>,4>(a071C);
          int iy0712#1 = Add<int>(_t06E9,t20722);
          addr(IMAGE2D<float>) a0715#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy0712);
          real4 v20706#1 = LoadVoxels<IMAGE2D<float>,4>(a0715);
          int iy070B#1 = Add<int>(_t06C1,t20722);
          addr(IMAGE2D<float>) a070E#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix071D,iy070B);
          real4 v30707#1 = LoadVoxels<IMAGE2D<float>,4>(a070E);
          real fy072F#5 = Index<real2,1>(f0700);
          real t30734#1 = Add<real>(fy072F,_t06BD);
          real t10732#1 = Sub<real>(fy072F,_t06BD);
          real t00731#1 = Sub<real>(fy072F,_t06BF);
          real4 a0730#1 = <real4>[t30734,fy072F,t10732,t00731];
          real4 hy0725#1 = EvalKernel<4,bspln3,0>(a0730);
          real fx0726#5 = Index<real2,0>(f0700);
          real t3072B#1 = Add<real>(fx0726,_t06BD);
          real t10729#1 = Sub<real>(fx0726,_t06BD);
          real t00728#1 = Sub<real>(fx0726,_t06BF);
          real4 a0727#1 = <real4>[t3072B,fx0726,t10729,t00728];
          real4 hx0724#4 = EvalKernel<4,bspln3,0>(a0727);
          real t00739#1 = Dot<4>(v00704,hx0724);
          real t1073A#1 = Dot<4>(v10705,hx0724);
          real t2073B#1 = Dot<4>(v20706,hx0724);
          real t3073C#1 = Dot<4>(v30707,hx0724);
          real4 tv0738#1 = <real4>[t00739,t1073A,t2073B,t3073C];
          real _t06FE#1 = Dot<4>(hy0725,tv0738);
          real2 x077C#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          real2 nd077E#2 = Floor<2>(x077C);
          real2 f077D#2 = Sub<real2>(x077C,nd077E);
          int{2} n077F#8 = RealToInt<2>(nd077E);
          int t2079C#1 = Index<int{2},0>(n077F);
          int ix079A#4 = Add<int>(t1071E,t2079C);
          int t2079F#4 = Index<int{2},1>(n077F);
          int iy079D#1 = Add<int>(t1071E,t2079F);
          addr(IMAGE2D<int>) a07A0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy079D);
          real4 v00781#1 = LoadVoxels<IMAGE2D<int>,4>(a07A0);
          int iy0796#1 = Add<int>(_t06E5,t2079F);
          addr(IMAGE2D<int>) a0799#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy0796);
          real4 v10782#1 = LoadVoxels<IMAGE2D<int>,4>(a0799);
          int iy078F#1 = Add<int>(_t06E9,t2079F);
          addr(IMAGE2D<int>) a0792#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy078F);
          real4 v20783#1 = LoadVoxels<IMAGE2D<int>,4>(a0792);
          int iy0788#1 = Add<int>(_t06C1,t2079F);
          addr(IMAGE2D<int>) a078B#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix079A,iy0788);
          real4 v30784#1 = LoadVoxels<IMAGE2D<int>,4>(a078B);
          real fy07AC#5 = Index<real2,1>(f077D);
          real t307B1#1 = Add<real>(fy07AC,_t06BD);
          real t107AF#1 = Sub<real>(fy07AC,_t06BD);
          real t007AE#1 = Sub<real>(fy07AC,_t06BF);
          real4 a07AD#1 = <real4>[t307B1,fy07AC,t107AF,t007AE];
          real4 hy07A2#1 = EvalKernel<4,bspln3,0>(a07AD);
          real fx07A3#5 = Index<real2,0>(f077D);
          real t307A8#1 = Add<real>(fx07A3,_t06BD);
          real t107A6#1 = Sub<real>(fx07A3,_t06BD);
          real t007A5#1 = Sub<real>(fx07A3,_t06BF);
          real4 a07A4#1 = <real4>[t307A8,fx07A3,t107A6,t007A5];
          real4 hx07A1#4 = EvalKernel<4,bspln3,0>(a07A4);
          real t007B6#1 = Dot<4>(v00781,hx07A1);
          real t107B7#1 = Dot<4>(v10782,hx07A1);
          real t207B8#1 = Dot<4>(v20783,hx07A1);
          real t307B9#1 = Dot<4>(v30784,hx07A1);
          real4 tv07B5#1 = <real4>[t007B6,t107B7,t207B8,t307B9];
          real _t077B#1 = Dot<4>(hy07A2,tv07B5);
          real _t07F8#2 = Sub<real>(_t06FE,_t077B);
          real _t07FA#1 = Mul<real>(_t07F8,_t07F8);
          real score07FC#1 = Add<real>(score06BB,_t07FA);
          goto JOIN07FF
        JOIN07FF:  preds = [ASSIGN07FD,COND06FD]
          real score07FE#2 = phi(score07FC,score06BB)
          real _t0800#1 = Dot<2>(r006D7,v01066D);
          real _t0802#1 = Dot<2>(r106DD,v01066D);
          real2 _t0804#1 = <real2>[_t0800,_t0802];
          real2 pos0806#2 = Add<real2>(_t0804,_t06ED);
          real2 x0809#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0806);
          bool _t0808#1 = Inside<IMAGE2D<float>,2>(x0809,_t0665);
          if _t0808 then goto ASSIGN080F else goto ASSIGN11CA
        ASSIGN080F:  preds = [COND080C]
          real2 x080E#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v01066D);
          bool _t080D#1 = Inside<IMAGE2D<int>,2>(x080E,_t0661);
          goto JOIN0813
        JOIN0813:  preds = [ASSIGN0810,ASSIGN11CA]
          bool _t0811#1 = phi(_t080D,_t0812)
          if _t0811 then goto ASSIGN11FF else goto JOIN0916
        ASSIGN11FF:  preds = [COND0814]
          real2 nd0818#2 = Floor<2>(x0809);
          real2 f0817#2 = Sub<real2>(x0809,nd0818);
          int{2} n0819#8 = RealToInt<2>(nd0818);
          int t10835#4 = -1;
          int t20836#1 = Index<int{2},0>(n0819);
          int ix0834#4 = Add<int>(t10835,t20836);
          int t20839#4 = Index<int{2},1>(n0819);
          int iy0837#1 = Add<int>(t10835,t20839);
          addr(IMAGE2D<float>) a083A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0837);
          real4 v0081B#1 = LoadVoxels<IMAGE2D<float>,4>(a083A);
          int iy0830#1 = Add<int>(_t06E5,t20839);
          addr(IMAGE2D<float>) a0833#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0830);
          real4 v1081C#1 = LoadVoxels<IMAGE2D<float>,4>(a0833);
          int iy0829#1 = Add<int>(_t06E9,t20839);
          addr(IMAGE2D<float>) a082C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0829);
          real4 v2081D#1 = LoadVoxels<IMAGE2D<float>,4>(a082C);
          int iy0822#1 = Add<int>(_t06C1,t20839);
          addr(IMAGE2D<float>) a0825#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0834,iy0822);
          real4 v3081E#1 = LoadVoxels<IMAGE2D<float>,4>(a0825);
          real fy0846#5 = Index<real2,1>(f0817);
          real t3084B#1 = Add<real>(fy0846,_t06BD);
          real t10849#1 = Sub<real>(fy0846,_t06BD);
          real t00848#1 = Sub<real>(fy0846,_t06BF);
          real4 a0847#1 = <real4>[t3084B,fy0846,t10849,t00848];
          real4 hy083C#1 = EvalKernel<4,bspln3,0>(a0847);
          real fx083D#5 = Index<real2,0>(f0817);
          real t30842#1 = Add<real>(fx083D,_t06BD);
          real t10840#1 = Sub<real>(fx083D,_t06BD);
          real t0083F#1 = Sub<real>(fx083D,_t06BF);
          real4 a083E#1 = <real4>[t30842,fx083D,t10840,t0083F];
          real4 hx083B#4 = EvalKernel<4,bspln3,0>(a083E);
          real t00850#1 = Dot<4>(v0081B,hx083B);
          real t10851#1 = Dot<4>(v1081C,hx083B);
          real t20852#1 = Dot<4>(v2081D,hx083B);
          real t30853#1 = Dot<4>(v3081E,hx083B);
          real4 tv084F#1 = <real4>[t00850,t10851,t20852,t30853];
          real _t0815#1 = Dot<4>(hy083C,tv084F);
          real2 x0893#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v01066D);
          real2 nd0895#2 = Floor<2>(x0893);
          real2 f0894#2 = Sub<real2>(x0893,nd0895);
          int{2} n0896#8 = RealToInt<2>(nd0895);
          int t208B3#1 = Index<int{2},0>(n0896);
          int ix08B1#4 = Add<int>(t10835,t208B3);
          int t208B6#4 = Index<int{2},1>(n0896);
          int iy08B4#1 = Add<int>(t10835,t208B6);
          addr(IMAGE2D<int>) a08B7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy08B4);
          real4 v00898#1 = LoadVoxels<IMAGE2D<int>,4>(a08B7);
          int iy08AD#1 = Add<int>(_t06E5,t208B6);
          addr(IMAGE2D<int>) a08B0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy08AD);
          real4 v10899#1 = LoadVoxels<IMAGE2D<int>,4>(a08B0);
          int iy08A6#1 = Add<int>(_t06E9,t208B6);
          addr(IMAGE2D<int>) a08A9#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy08A6);
          real4 v2089A#1 = LoadVoxels<IMAGE2D<int>,4>(a08A9);
          int iy089F#1 = Add<int>(_t06C1,t208B6);
          addr(IMAGE2D<int>) a08A2#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix08B1,iy089F);
          real4 v3089B#1 = LoadVoxels<IMAGE2D<int>,4>(a08A2);
          real fy08C3#5 = Index<real2,1>(f0894);
          real t308C8#1 = Add<real>(fy08C3,_t06BD);
          real t108C6#1 = Sub<real>(fy08C3,_t06BD);
          real t008C5#1 = Sub<real>(fy08C3,_t06BF);
          real4 a08C4#1 = <real4>[t308C8,fy08C3,t108C6,t008C5];
          real4 hy08B9#1 = EvalKernel<4,bspln3,0>(a08C4);
          real fx08BA#5 = Index<real2,0>(f0894);
          real t308BF#1 = Add<real>(fx08BA,_t06BD);
          real t108BD#1 = Sub<real>(fx08BA,_t06BD);
          real t008BC#1 = Sub<real>(fx08BA,_t06BF);
          real4 a08BB#1 = <real4>[t308BF,fx08BA,t108BD,t008BC];
          real4 hx08B8#4 = EvalKernel<4,bspln3,0>(a08BB);
          real t008CD#1 = Dot<4>(v00898,hx08B8);
          real t108CE#1 = Dot<4>(v10899,hx08B8);
          real t208CF#1 = Dot<4>(v2089A,hx08B8);
          real t308D0#1 = Dot<4>(v3089B,hx08B8);
          real4 tv08CC#1 = <real4>[t008CD,t108CE,t208CF,t308D0];
          real _t0892#1 = Dot<4>(hy08B9,tv08CC);
          real _t090F#2 = Sub<real>(_t0815,_t0892);
          real _t0911#1 = Mul<real>(_t090F,_t090F);
          real score0913#1 = Add<real>(score07FE,_t0911);
          goto JOIN0916
        JOIN0916:  preds = [ASSIGN0914,COND0814]
          real score0915#2 = phi(score0913,score07FE)
          real _t0917#1 = Dot<2>(r006D7,v02066F);
          real _t0919#1 = Dot<2>(r106DD,v02066F);
          real2 _t091B#1 = <real2>[_t0917,_t0919];
          real2 pos091D#2 = Add<real2>(_t091B,_t06ED);
          real2 x0920#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos091D);
          bool _t091F#1 = Inside<IMAGE2D<float>,2>(x0920,_t0665);
          if _t091F then goto ASSIGN0926 else goto ASSIGN11C9
        ASSIGN0926:  preds = [COND0923]
          real2 x0925#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v02066F);
          bool _t0924#1 = Inside<IMAGE2D<int>,2>(x0925,_t0661);
          goto JOIN092A
        JOIN092A:  preds = [ASSIGN0927,ASSIGN11C9]
          bool _t0928#1 = phi(_t0924,_t0929)
          if _t0928 then goto ASSIGN1220 else goto JOIN0A2D
        ASSIGN1220:  preds = [COND092B]
          real2 nd092F#2 = Floor<2>(x0920);
          real2 f092E#2 = Sub<real2>(x0920,nd092F);
          int{2} n0930#8 = RealToInt<2>(nd092F);
          int t1094C#4 = -1;
          int t2094D#1 = Index<int{2},0>(n0930);
          int ix094B#4 = Add<int>(t1094C,t2094D);
          int t20950#4 = Index<int{2},1>(n0930);
          int iy094E#1 = Add<int>(t1094C,t20950);
          addr(IMAGE2D<float>) a0951#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy094E);
          real4 v00932#1 = LoadVoxels<IMAGE2D<float>,4>(a0951);
          int iy0947#1 = Add<int>(_t06E5,t20950);
          addr(IMAGE2D<float>) a094A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy0947);
          real4 v10933#1 = LoadVoxels<IMAGE2D<float>,4>(a094A);
          int iy0940#1 = Add<int>(_t06E9,t20950);
          addr(IMAGE2D<float>) a0943#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy0940);
          real4 v20934#1 = LoadVoxels<IMAGE2D<float>,4>(a0943);
          int iy0939#1 = Add<int>(_t06C1,t20950);
          addr(IMAGE2D<float>) a093C#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix094B,iy0939);
          real4 v30935#1 = LoadVoxels<IMAGE2D<float>,4>(a093C);
          real fy095D#5 = Index<real2,1>(f092E);
          real t30962#1 = Add<real>(fy095D,_t06BD);
          real t10960#1 = Sub<real>(fy095D,_t06BD);
          real t0095F#1 = Sub<real>(fy095D,_t06BF);
          real4 a095E#1 = <real4>[t30962,fy095D,t10960,t0095F];
          real4 hy0953#1 = EvalKernel<4,bspln3,0>(a095E);
          real fx0954#5 = Index<real2,0>(f092E);
          real t30959#1 = Add<real>(fx0954,_t06BD);
          real t10957#1 = Sub<real>(fx0954,_t06BD);
          real t00956#1 = Sub<real>(fx0954,_t06BF);
          real4 a0955#1 = <real4>[t30959,fx0954,t10957,t00956];
          real4 hx0952#4 = EvalKernel<4,bspln3,0>(a0955);
          real t00967#1 = Dot<4>(v00932,hx0952);
          real t10968#1 = Dot<4>(v10933,hx0952);
          real t20969#1 = Dot<4>(v20934,hx0952);
          real t3096A#1 = Dot<4>(v30935,hx0952);
          real4 tv0966#1 = <real4>[t00967,t10968,t20969,t3096A];
          real _t092C#1 = Dot<4>(hy0953,tv0966);
          real2 x09AA#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v02066F);
          real2 nd09AC#2 = Floor<2>(x09AA);
          real2 f09AB#2 = Sub<real2>(x09AA,nd09AC);
          int{2} n09AD#8 = RealToInt<2>(nd09AC);
          int t209CA#1 = Index<int{2},0>(n09AD);
          int ix09C8#4 = Add<int>(t1094C,t209CA);
          int t209CD#4 = Index<int{2},1>(n09AD);
          int iy09CB#1 = Add<int>(t1094C,t209CD);
          addr(IMAGE2D<int>) a09CE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09CB);
          real4 v009AF#1 = LoadVoxels<IMAGE2D<int>,4>(a09CE);
          int iy09C4#1 = Add<int>(_t06E5,t209CD);
          addr(IMAGE2D<int>) a09C7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09C4);
          real4 v109B0#1 = LoadVoxels<IMAGE2D<int>,4>(a09C7);
          int iy09BD#1 = Add<int>(_t06E9,t209CD);
          addr(IMAGE2D<int>) a09C0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09BD);
          real4 v209B1#1 = LoadVoxels<IMAGE2D<int>,4>(a09C0);
          int iy09B6#1 = Add<int>(_t06C1,t209CD);
          addr(IMAGE2D<int>) a09B9#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix09C8,iy09B6);
          real4 v309B2#1 = LoadVoxels<IMAGE2D<int>,4>(a09B9);
          real fy09DA#5 = Index<real2,1>(f09AB);
          real t309DF#1 = Add<real>(fy09DA,_t06BD);
          real t109DD#1 = Sub<real>(fy09DA,_t06BD);
          real t009DC#1 = Sub<real>(fy09DA,_t06BF);
          real4 a09DB#1 = <real4>[t309DF,fy09DA,t109DD,t009DC];
          real4 hy09D0#1 = EvalKernel<4,bspln3,0>(a09DB);
          real fx09D1#5 = Index<real2,0>(f09AB);
          real t309D6#1 = Add<real>(fx09D1,_t06BD);
          real t109D4#1 = Sub<real>(fx09D1,_t06BD);
          real t009D3#1 = Sub<real>(fx09D1,_t06BF);
          real4 a09D2#1 = <real4>[t309D6,fx09D1,t109D4,t009D3];
          real4 hx09CF#4 = EvalKernel<4,bspln3,0>(a09D2);
          real t009E4#1 = Dot<4>(v009AF,hx09CF);
          real t109E5#1 = Dot<4>(v109B0,hx09CF);
          real t209E6#1 = Dot<4>(v209B1,hx09CF);
          real t309E7#1 = Dot<4>(v309B2,hx09CF);
          real4 tv09E3#1 = <real4>[t009E4,t109E5,t209E6,t309E7];
          real _t09A9#1 = Dot<4>(hy09D0,tv09E3);
          real _t0A26#2 = Sub<real>(_t092C,_t09A9);
          real _t0A28#1 = Mul<real>(_t0A26,_t0A26);
          real score0A2A#1 = Add<real>(score0915,_t0A28);
          goto JOIN0A2D
        JOIN0A2D:  preds = [ASSIGN0A2B,COND092B]
          real score0A2C#2 = phi(score0A2A,score0915)
          real _t0A2E#1 = Dot<2>(r006D7,v030673);
          real _t0A30#1 = Dot<2>(r106DD,v030673);
          real2 _t0A32#1 = <real2>[_t0A2E,_t0A30];
          real2 pos0A34#2 = Add<real2>(_t0A32,_t06ED);
          real2 x0A37#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0A34);
          bool _t0A36#1 = Inside<IMAGE2D<float>,2>(x0A37,_t0665);
          if _t0A36 then goto ASSIGN0A3D else goto ASSIGN11C8
        ASSIGN0A3D:  preds = [COND0A3A]
          real2 x0A3C#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v030673);
          bool _t0A3B#1 = Inside<IMAGE2D<int>,2>(x0A3C,_t0661);
          goto JOIN0A41
        JOIN0A41:  preds = [ASSIGN0A3E,ASSIGN11C8]
          bool _t0A3F#1 = phi(_t0A3B,_t0A40)
          if _t0A3F then goto ASSIGN1241 else goto JOIN0B44
        ASSIGN1241:  preds = [COND0A42]
          real2 nd0A46#2 = Floor<2>(x0A37);
          real2 f0A45#2 = Sub<real2>(x0A37,nd0A46);
          int{2} n0A47#8 = RealToInt<2>(nd0A46);
          int t10A63#4 = -1;
          int t20A64#1 = Index<int{2},0>(n0A47);
          int ix0A62#4 = Add<int>(t10A63,t20A64);
          int t20A67#4 = Index<int{2},1>(n0A47);
          int iy0A65#1 = Add<int>(t10A63,t20A67);
          addr(IMAGE2D<float>) a0A68#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A65);
          real4 v00A49#1 = LoadVoxels<IMAGE2D<float>,4>(a0A68);
          int iy0A5E#1 = Add<int>(_t06E5,t20A67);
          addr(IMAGE2D<float>) a0A61#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A5E);
          real4 v10A4A#1 = LoadVoxels<IMAGE2D<float>,4>(a0A61);
          int iy0A57#1 = Add<int>(_t06E9,t20A67);
          addr(IMAGE2D<float>) a0A5A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A57);
          real4 v20A4B#1 = LoadVoxels<IMAGE2D<float>,4>(a0A5A);
          int iy0A50#1 = Add<int>(_t06C1,t20A67);
          addr(IMAGE2D<float>) a0A53#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0A62,iy0A50);
          real4 v30A4C#1 = LoadVoxels<IMAGE2D<float>,4>(a0A53);
          real fy0A74#5 = Index<real2,1>(f0A45);
          real t30A79#1 = Add<real>(fy0A74,_t06BD);
          real t10A77#1 = Sub<real>(fy0A74,_t06BD);
          real t00A76#1 = Sub<real>(fy0A74,_t06BF);
          real4 a0A75#1 = <real4>[t30A79,fy0A74,t10A77,t00A76];
          real4 hy0A6A#1 = EvalKernel<4,bspln3,0>(a0A75);
          real fx0A6B#5 = Index<real2,0>(f0A45);
          real t30A70#1 = Add<real>(fx0A6B,_t06BD);
          real t10A6E#1 = Sub<real>(fx0A6B,_t06BD);
          real t00A6D#1 = Sub<real>(fx0A6B,_t06BF);
          real4 a0A6C#1 = <real4>[t30A70,fx0A6B,t10A6E,t00A6D];
          real4 hx0A69#4 = EvalKernel<4,bspln3,0>(a0A6C);
          real t00A7E#1 = Dot<4>(v00A49,hx0A69);
          real t10A7F#1 = Dot<4>(v10A4A,hx0A69);
          real t20A80#1 = Dot<4>(v20A4B,hx0A69);
          real t30A81#1 = Dot<4>(v30A4C,hx0A69);
          real4 tv0A7D#1 = <real4>[t00A7E,t10A7F,t20A80,t30A81];
          real _t0A43#1 = Dot<4>(hy0A6A,tv0A7D);
          real2 x0AC1#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v030673);
          real2 nd0AC3#2 = Floor<2>(x0AC1);
          real2 f0AC2#2 = Sub<real2>(x0AC1,nd0AC3);
          int{2} n0AC4#8 = RealToInt<2>(nd0AC3);
          int t20AE1#1 = Index<int{2},0>(n0AC4);
          int ix0ADF#4 = Add<int>(t10A63,t20AE1);
          int t20AE4#4 = Index<int{2},1>(n0AC4);
          int iy0AE2#1 = Add<int>(t10A63,t20AE4);
          addr(IMAGE2D<int>) a0AE5#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0AE2);
          real4 v00AC6#1 = LoadVoxels<IMAGE2D<int>,4>(a0AE5);
          int iy0ADB#1 = Add<int>(_t06E5,t20AE4);
          addr(IMAGE2D<int>) a0ADE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0ADB);
          real4 v10AC7#1 = LoadVoxels<IMAGE2D<int>,4>(a0ADE);
          int iy0AD4#1 = Add<int>(_t06E9,t20AE4);
          addr(IMAGE2D<int>) a0AD7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0AD4);
          real4 v20AC8#1 = LoadVoxels<IMAGE2D<int>,4>(a0AD7);
          int iy0ACD#1 = Add<int>(_t06C1,t20AE4);
          addr(IMAGE2D<int>) a0AD0#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0ADF,iy0ACD);
          real4 v30AC9#1 = LoadVoxels<IMAGE2D<int>,4>(a0AD0);
          real fy0AF1#5 = Index<real2,1>(f0AC2);
          real t30AF6#1 = Add<real>(fy0AF1,_t06BD);
          real t10AF4#1 = Sub<real>(fy0AF1,_t06BD);
          real t00AF3#1 = Sub<real>(fy0AF1,_t06BF);
          real4 a0AF2#1 = <real4>[t30AF6,fy0AF1,t10AF4,t00AF3];
          real4 hy0AE7#1 = EvalKernel<4,bspln3,0>(a0AF2);
          real fx0AE8#5 = Index<real2,0>(f0AC2);
          real t30AED#1 = Add<real>(fx0AE8,_t06BD);
          real t10AEB#1 = Sub<real>(fx0AE8,_t06BD);
          real t00AEA#1 = Sub<real>(fx0AE8,_t06BF);
          real4 a0AE9#1 = <real4>[t30AED,fx0AE8,t10AEB,t00AEA];
          real4 hx0AE6#4 = EvalKernel<4,bspln3,0>(a0AE9);
          real t00AFB#1 = Dot<4>(v00AC6,hx0AE6);
          real t10AFC#1 = Dot<4>(v10AC7,hx0AE6);
          real t20AFD#1 = Dot<4>(v20AC8,hx0AE6);
          real t30AFE#1 = Dot<4>(v30AC9,hx0AE6);
          real4 tv0AFA#1 = <real4>[t00AFB,t10AFC,t20AFD,t30AFE];
          real _t0AC0#1 = Dot<4>(hy0AE7,tv0AFA);
          real _t0B3D#2 = Sub<real>(_t0A43,_t0AC0);
          real _t0B3F#1 = Mul<real>(_t0B3D,_t0B3D);
          real score0B41#1 = Add<real>(score0A2C,_t0B3F);
          goto JOIN0B44
        JOIN0B44:  preds = [ASSIGN0B42,COND0A42]
          real score0B43#2 = phi(score0B41,score0A2C)
          real _t0B45#1 = Dot<2>(r006D7,v040675);
          real _t0B47#1 = Dot<2>(r106DD,v040675);
          real2 _t0B49#1 = <real2>[_t0B45,_t0B47];
          real2 pos0B4B#2 = Add<real2>(_t0B49,_t06ED);
          real2 x0B4E#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0B4B);
          bool _t0B4D#1 = Inside<IMAGE2D<float>,2>(x0B4E,_t0665);
          if _t0B4D then goto ASSIGN0B54 else goto ASSIGN11C7
        ASSIGN0B54:  preds = [COND0B51]
          real2 x0B53#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v040675);
          bool _t0B52#1 = Inside<IMAGE2D<int>,2>(x0B53,_t0661);
          goto JOIN0B58
        JOIN0B58:  preds = [ASSIGN0B55,ASSIGN11C7]
          bool _t0B56#1 = phi(_t0B52,_t0B57)
          if _t0B56 then goto ASSIGN1262 else goto JOIN0C5B
        ASSIGN1262:  preds = [COND0B59]
          real2 nd0B5D#2 = Floor<2>(x0B4E);
          real2 f0B5C#2 = Sub<real2>(x0B4E,nd0B5D);
          int{2} n0B5E#8 = RealToInt<2>(nd0B5D);
          int t10B7A#4 = -1;
          int t20B7B#1 = Index<int{2},0>(n0B5E);
          int ix0B79#4 = Add<int>(t10B7A,t20B7B);
          int t20B7E#4 = Index<int{2},1>(n0B5E);
          int iy0B7C#1 = Add<int>(t10B7A,t20B7E);
          addr(IMAGE2D<float>) a0B7F#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B7C);
          real4 v00B60#1 = LoadVoxels<IMAGE2D<float>,4>(a0B7F);
          int iy0B75#1 = Add<int>(_t06E5,t20B7E);
          addr(IMAGE2D<float>) a0B78#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B75);
          real4 v10B61#1 = LoadVoxels<IMAGE2D<float>,4>(a0B78);
          int iy0B6E#1 = Add<int>(_t06E9,t20B7E);
          addr(IMAGE2D<float>) a0B71#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B6E);
          real4 v20B62#1 = LoadVoxels<IMAGE2D<float>,4>(a0B71);
          int iy0B67#1 = Add<int>(_t06C1,t20B7E);
          addr(IMAGE2D<float>) a0B6A#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0B79,iy0B67);
          real4 v30B63#1 = LoadVoxels<IMAGE2D<float>,4>(a0B6A);
          real fy0B8B#5 = Index<real2,1>(f0B5C);
          real t30B90#1 = Add<real>(fy0B8B,_t06BD);
          real t10B8E#1 = Sub<real>(fy0B8B,_t06BD);
          real t00B8D#1 = Sub<real>(fy0B8B,_t06BF);
          real4 a0B8C#1 = <real4>[t30B90,fy0B8B,t10B8E,t00B8D];
          real4 hy0B81#1 = EvalKernel<4,bspln3,0>(a0B8C);
          real fx0B82#5 = Index<real2,0>(f0B5C);
          real t30B87#1 = Add<real>(fx0B82,_t06BD);
          real t10B85#1 = Sub<real>(fx0B82,_t06BD);
          real t00B84#1 = Sub<real>(fx0B82,_t06BF);
          real4 a0B83#1 = <real4>[t30B87,fx0B82,t10B85,t00B84];
          real4 hx0B80#4 = EvalKernel<4,bspln3,0>(a0B83);
          real t00B95#1 = Dot<4>(v00B60,hx0B80);
          real t10B96#1 = Dot<4>(v10B61,hx0B80);
          real t20B97#1 = Dot<4>(v20B62,hx0B80);
          real t30B98#1 = Dot<4>(v30B63,hx0B80);
          real4 tv0B94#1 = <real4>[t00B95,t10B96,t20B97,t30B98];
          real _t0B5A#1 = Dot<4>(hy0B81,tv0B94);
          real2 x0BD8#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v040675);
          real2 nd0BDA#2 = Floor<2>(x0BD8);
          real2 f0BD9#2 = Sub<real2>(x0BD8,nd0BDA);
          int{2} n0BDB#8 = RealToInt<2>(nd0BDA);
          int t20BF8#1 = Index<int{2},0>(n0BDB);
          int ix0BF6#4 = Add<int>(t10B7A,t20BF8);
          int t20BFB#4 = Index<int{2},1>(n0BDB);
          int iy0BF9#1 = Add<int>(t10B7A,t20BFB);
          addr(IMAGE2D<int>) a0BFC#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BF9);
          real4 v00BDD#1 = LoadVoxels<IMAGE2D<int>,4>(a0BFC);
          int iy0BF2#1 = Add<int>(_t06E5,t20BFB);
          addr(IMAGE2D<int>) a0BF5#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BF2);
          real4 v10BDE#1 = LoadVoxels<IMAGE2D<int>,4>(a0BF5);
          int iy0BEB#1 = Add<int>(_t06E9,t20BFB);
          addr(IMAGE2D<int>) a0BEE#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BEB);
          real4 v20BDF#1 = LoadVoxels<IMAGE2D<int>,4>(a0BEE);
          int iy0BE4#1 = Add<int>(_t06C1,t20BFB);
          addr(IMAGE2D<int>) a0BE7#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0BF6,iy0BE4);
          real4 v30BE0#1 = LoadVoxels<IMAGE2D<int>,4>(a0BE7);
          real fy0C08#5 = Index<real2,1>(f0BD9);
          real t30C0D#1 = Add<real>(fy0C08,_t06BD);
          real t10C0B#1 = Sub<real>(fy0C08,_t06BD);
          real t00C0A#1 = Sub<real>(fy0C08,_t06BF);
          real4 a0C09#1 = <real4>[t30C0D,fy0C08,t10C0B,t00C0A];
          real4 hy0BFE#1 = EvalKernel<4,bspln3,0>(a0C09);
          real fx0BFF#5 = Index<real2,0>(f0BD9);
          real t30C04#1 = Add<real>(fx0BFF,_t06BD);
          real t10C02#1 = Sub<real>(fx0BFF,_t06BD);
          real t00C01#1 = Sub<real>(fx0BFF,_t06BF);
          real4 a0C00#1 = <real4>[t30C04,fx0BFF,t10C02,t00C01];
          real4 hx0BFD#4 = EvalKernel<4,bspln3,0>(a0C00);
          real t00C12#1 = Dot<4>(v00BDD,hx0BFD);
          real t10C13#1 = Dot<4>(v10BDE,hx0BFD);
          real t20C14#1 = Dot<4>(v20BDF,hx0BFD);
          real t30C15#1 = Dot<4>(v30BE0,hx0BFD);
          real4 tv0C11#1 = <real4>[t00C12,t10C13,t20C14,t30C15];
          real _t0BD7#1 = Dot<4>(hy0BFE,tv0C11);
          real _t0C54#2 = Sub<real>(_t0B5A,_t0BD7);
          real _t0C56#1 = Mul<real>(_t0C54,_t0C54);
          real score0C58#1 = Add<real>(score0B43,_t0C56);
          goto JOIN0C5B
        JOIN0C5B:  preds = [ASSIGN0C59,COND0B59]
          real score0C5A#2 = phi(score0C58,score0B43)
          if _t06F1 then goto JOIN0C5D else goto JOIN0C5D
        JOIN0C5D:  preds = [COND0C5C]
          if _t06FA then goto ASSIGN1283 else goto JOIN0D60
        ASSIGN1283:  preds = [COND0C5E]
          real2 nd0C62#2 = Floor<2>(x06F2);
          real2 f0C61#2 = Sub<real2>(x06F2,nd0C62);
          int{2} n0C63#8 = RealToInt<2>(nd0C62);
          int t10C7F#4 = -1;
          int t20C80#1 = Index<int{2},0>(n0C63);
          int ix0C7E#4 = Add<int>(t10C7F,t20C80);
          int t20C83#4 = Index<int{2},1>(n0C63);
          int iy0C81#1 = Add<int>(t10C7F,t20C83);
          addr(IMAGE2D<float>) a0C84#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C81);
          real4 v00C65#1 = LoadVoxels<IMAGE2D<float>,4>(a0C84);
          int iy0C7A#1 = Add<int>(_t06E5,t20C83);
          addr(IMAGE2D<float>) a0C7D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C7A);
          real4 v10C66#1 = LoadVoxels<IMAGE2D<float>,4>(a0C7D);
          int iy0C73#1 = Add<int>(_t06E9,t20C83);
          addr(IMAGE2D<float>) a0C76#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C73);
          real4 v20C67#1 = LoadVoxels<IMAGE2D<float>,4>(a0C76);
          int iy0C6C#1 = Add<int>(_t06C1,t20C83);
          addr(IMAGE2D<float>) a0C6F#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0C7E,iy0C6C);
          real4 v30C68#1 = LoadVoxels<IMAGE2D<float>,4>(a0C6F);
          real fy0C90#5 = Index<real2,1>(f0C61);
          real t30C95#1 = Add<real>(fy0C90,_t06BD);
          real t10C93#1 = Sub<real>(fy0C90,_t06BD);
          real t00C92#1 = Sub<real>(fy0C90,_t06BF);
          real4 a0C91#1 = <real4>[t30C95,fy0C90,t10C93,t00C92];
          real4 hy0C86#1 = EvalKernel<4,bspln3,0>(a0C91);
          real fx0C87#5 = Index<real2,0>(f0C61);
          real t30C8C#1 = Add<real>(fx0C87,_t06BD);
          real t10C8A#1 = Sub<real>(fx0C87,_t06BD);
          real t00C89#1 = Sub<real>(fx0C87,_t06BF);
          real4 a0C88#1 = <real4>[t30C8C,fx0C87,t10C8A,t00C89];
          real4 hx0C85#4 = EvalKernel<4,bspln3,0>(a0C88);
          real t00C9A#1 = Dot<4>(v00C65,hx0C85);
          real t10C9B#1 = Dot<4>(v10C66,hx0C85);
          real t20C9C#1 = Dot<4>(v20C67,hx0C85);
          real t30C9D#1 = Dot<4>(v30C68,hx0C85);
          real4 tv0C99#1 = <real4>[t00C9A,t10C9B,t20C9C,t30C9D];
          real _t0C5F#1 = Dot<4>(hy0C86,tv0C99);
          real2 x0CDD#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v000669);
          real2 nd0CDF#2 = Floor<2>(x0CDD);
          real2 f0CDE#2 = Sub<real2>(x0CDD,nd0CDF);
          int{2} n0CE0#8 = RealToInt<2>(nd0CDF);
          int t20CFD#1 = Index<int{2},0>(n0CE0);
          int ix0CFB#4 = Add<int>(t10C7F,t20CFD);
          int t20D00#4 = Index<int{2},1>(n0CE0);
          int iy0CFE#1 = Add<int>(t10C7F,t20D00);
          addr(IMAGE2D<int>) a0D01#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CFE);
          real4 v00CE2#1 = LoadVoxels<IMAGE2D<int>,4>(a0D01);
          int iy0CF7#1 = Add<int>(_t06E5,t20D00);
          addr(IMAGE2D<int>) a0CFA#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CF7);
          real4 v10CE3#1 = LoadVoxels<IMAGE2D<int>,4>(a0CFA);
          int iy0CF0#1 = Add<int>(_t06E9,t20D00);
          addr(IMAGE2D<int>) a0CF3#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CF0);
          real4 v20CE4#1 = LoadVoxels<IMAGE2D<int>,4>(a0CF3);
          int iy0CE9#1 = Add<int>(_t06C1,t20D00);
          addr(IMAGE2D<int>) a0CEC#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0CFB,iy0CE9);
          real4 v30CE5#1 = LoadVoxels<IMAGE2D<int>,4>(a0CEC);
          real fy0D0D#5 = Index<real2,1>(f0CDE);
          real t30D12#1 = Add<real>(fy0D0D,_t06BD);
          real t10D10#1 = Sub<real>(fy0D0D,_t06BD);
          real t00D0F#1 = Sub<real>(fy0D0D,_t06BF);
          real4 a0D0E#1 = <real4>[t30D12,fy0D0D,t10D10,t00D0F];
          real4 hy0D03#1 = EvalKernel<4,bspln3,0>(a0D0E);
          real fx0D04#5 = Index<real2,0>(f0CDE);
          real t30D09#1 = Add<real>(fx0D04,_t06BD);
          real t10D07#1 = Sub<real>(fx0D04,_t06BD);
          real t00D06#1 = Sub<real>(fx0D04,_t06BF);
          real4 a0D05#1 = <real4>[t30D09,fx0D04,t10D07,t00D06];
          real4 hx0D02#4 = EvalKernel<4,bspln3,0>(a0D05);
          real t00D17#1 = Dot<4>(v00CE2,hx0D02);
          real t10D18#1 = Dot<4>(v10CE3,hx0D02);
          real t20D19#1 = Dot<4>(v20CE4,hx0D02);
          real t30D1A#1 = Dot<4>(v30CE5,hx0D02);
          real4 tv0D16#1 = <real4>[t00D17,t10D18,t20D19,t30D1A];
          real _t0CDC#1 = Dot<4>(hy0D03,tv0D16);
          real _t0D59#2 = Sub<real>(_t0C5F,_t0CDC);
          real _t0D5B#1 = Mul<real>(_t0D59,_t0D59);
          real score0D5D#1 = Add<real>(score0C5A,_t0D5B);
          goto JOIN0D60
        JOIN0D60:  preds = [ASSIGN0D5E,COND0C5E]
          real score0D5F#2 = phi(score0D5D,score0C5A)
          real _t0D61#1 = Dot<2>(r006D7,v060677);
          real _t0D63#1 = Dot<2>(r106DD,v060677);
          real2 _t0D65#1 = <real2>[_t0D61,_t0D63];
          real2 pos0D67#2 = Add<real2>(_t0D65,_t06ED);
          real2 x0D6A#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0D67);
          bool _t0D69#1 = Inside<IMAGE2D<float>,2>(x0D6A,_t0665);
          if _t0D69 then goto ASSIGN0D70 else goto ASSIGN11C6
        ASSIGN0D70:  preds = [COND0D6D]
          real2 x0D6F#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v060677);
          bool _t0D6E#1 = Inside<IMAGE2D<int>,2>(x0D6F,_t0661);
          goto JOIN0D74
        JOIN0D74:  preds = [ASSIGN0D71,ASSIGN11C6]
          bool _t0D72#1 = phi(_t0D6E,_t0D73)
          if _t0D72 then goto ASSIGN12A4 else goto JOIN0E77
        ASSIGN12A4:  preds = [COND0D75]
          real2 nd0D79#2 = Floor<2>(x0D6A);
          real2 f0D78#2 = Sub<real2>(x0D6A,nd0D79);
          int{2} n0D7A#8 = RealToInt<2>(nd0D79);
          int t10D96#4 = -1;
          int t20D97#1 = Index<int{2},0>(n0D7A);
          int ix0D95#4 = Add<int>(t10D96,t20D97);
          int t20D9A#4 = Index<int{2},1>(n0D7A);
          int iy0D98#1 = Add<int>(t10D96,t20D9A);
          addr(IMAGE2D<float>) a0D9B#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D98);
          real4 v00D7C#1 = LoadVoxels<IMAGE2D<float>,4>(a0D9B);
          int iy0D91#1 = Add<int>(_t06E5,t20D9A);
          addr(IMAGE2D<float>) a0D94#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D91);
          real4 v10D7D#1 = LoadVoxels<IMAGE2D<float>,4>(a0D94);
          int iy0D8A#1 = Add<int>(_t06E9,t20D9A);
          addr(IMAGE2D<float>) a0D8D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D8A);
          real4 v20D7E#1 = LoadVoxels<IMAGE2D<float>,4>(a0D8D);
          int iy0D83#1 = Add<int>(_t06C1,t20D9A);
          addr(IMAGE2D<float>) a0D86#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0D95,iy0D83);
          real4 v30D7F#1 = LoadVoxels<IMAGE2D<float>,4>(a0D86);
          real fy0DA7#5 = Index<real2,1>(f0D78);
          real t30DAC#1 = Add<real>(fy0DA7,_t06BD);
          real t10DAA#1 = Sub<real>(fy0DA7,_t06BD);
          real t00DA9#1 = Sub<real>(fy0DA7,_t06BF);
          real4 a0DA8#1 = <real4>[t30DAC,fy0DA7,t10DAA,t00DA9];
          real4 hy0D9D#1 = EvalKernel<4,bspln3,0>(a0DA8);
          real fx0D9E#5 = Index<real2,0>(f0D78);
          real t30DA3#1 = Add<real>(fx0D9E,_t06BD);
          real t10DA1#1 = Sub<real>(fx0D9E,_t06BD);
          real t00DA0#1 = Sub<real>(fx0D9E,_t06BF);
          real4 a0D9F#1 = <real4>[t30DA3,fx0D9E,t10DA1,t00DA0];
          real4 hx0D9C#4 = EvalKernel<4,bspln3,0>(a0D9F);
          real t00DB1#1 = Dot<4>(v00D7C,hx0D9C);
          real t10DB2#1 = Dot<4>(v10D7D,hx0D9C);
          real t20DB3#1 = Dot<4>(v20D7E,hx0D9C);
          real t30DB4#1 = Dot<4>(v30D7F,hx0D9C);
          real4 tv0DB0#1 = <real4>[t00DB1,t10DB2,t20DB3,t30DB4];
          real _t0D76#1 = Dot<4>(hy0D9D,tv0DB0);
          real2 x0DF4#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v060677);
          real2 nd0DF6#2 = Floor<2>(x0DF4);
          real2 f0DF5#2 = Sub<real2>(x0DF4,nd0DF6);
          int{2} n0DF7#8 = RealToInt<2>(nd0DF6);
          int t20E14#1 = Index<int{2},0>(n0DF7);
          int ix0E12#4 = Add<int>(t10D96,t20E14);
          int t20E17#4 = Index<int{2},1>(n0DF7);
          int iy0E15#1 = Add<int>(t10D96,t20E17);
          addr(IMAGE2D<int>) a0E18#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E15);
          real4 v00DF9#1 = LoadVoxels<IMAGE2D<int>,4>(a0E18);
          int iy0E0E#1 = Add<int>(_t06E5,t20E17);
          addr(IMAGE2D<int>) a0E11#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E0E);
          real4 v10DFA#1 = LoadVoxels<IMAGE2D<int>,4>(a0E11);
          int iy0E07#1 = Add<int>(_t06E9,t20E17);
          addr(IMAGE2D<int>) a0E0A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E07);
          real4 v20DFB#1 = LoadVoxels<IMAGE2D<int>,4>(a0E0A);
          int iy0E00#1 = Add<int>(_t06C1,t20E17);
          addr(IMAGE2D<int>) a0E03#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0E12,iy0E00);
          real4 v30DFC#1 = LoadVoxels<IMAGE2D<int>,4>(a0E03);
          real fy0E24#5 = Index<real2,1>(f0DF5);
          real t30E29#1 = Add<real>(fy0E24,_t06BD);
          real t10E27#1 = Sub<real>(fy0E24,_t06BD);
          real t00E26#1 = Sub<real>(fy0E24,_t06BF);
          real4 a0E25#1 = <real4>[t30E29,fy0E24,t10E27,t00E26];
          real4 hy0E1A#1 = EvalKernel<4,bspln3,0>(a0E25);
          real fx0E1B#5 = Index<real2,0>(f0DF5);
          real t30E20#1 = Add<real>(fx0E1B,_t06BD);
          real t10E1E#1 = Sub<real>(fx0E1B,_t06BD);
          real t00E1D#1 = Sub<real>(fx0E1B,_t06BF);
          real4 a0E1C#1 = <real4>[t30E20,fx0E1B,t10E1E,t00E1D];
          real4 hx0E19#4 = EvalKernel<4,bspln3,0>(a0E1C);
          real t00E2E#1 = Dot<4>(v00DF9,hx0E19);
          real t10E2F#1 = Dot<4>(v10DFA,hx0E19);
          real t20E30#1 = Dot<4>(v20DFB,hx0E19);
          real t30E31#1 = Dot<4>(v30DFC,hx0E19);
          real4 tv0E2D#1 = <real4>[t00E2E,t10E2F,t20E30,t30E31];
          real _t0DF3#1 = Dot<4>(hy0E1A,tv0E2D);
          real _t0E70#2 = Sub<real>(_t0D76,_t0DF3);
          real _t0E72#1 = Mul<real>(_t0E70,_t0E70);
          real score0E74#1 = Add<real>(score0D5F,_t0E72);
          goto JOIN0E77
        JOIN0E77:  preds = [ASSIGN0E75,COND0D75]
          real score0E76#2 = phi(score0E74,score0D5F)
          real _t0E78#1 = Dot<2>(r006D7,v070679);
          real _t0E7A#1 = Dot<2>(r106DD,v070679);
          real2 _t0E7C#1 = <real2>[_t0E78,_t0E7A];
          real2 pos0E7E#2 = Add<real2>(_t0E7C,_t06ED);
          real2 x0E81#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0E7E);
          bool _t0E80#1 = Inside<IMAGE2D<float>,2>(x0E81,_t0665);
          if _t0E80 then goto ASSIGN0E87 else goto ASSIGN11C5
        ASSIGN0E87:  preds = [COND0E84]
          real2 x0E86#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v070679);
          bool _t0E85#1 = Inside<IMAGE2D<int>,2>(x0E86,_t0661);
          goto JOIN0E8B
        JOIN0E8B:  preds = [ASSIGN0E88,ASSIGN11C5]
          bool _t0E89#1 = phi(_t0E85,_t0E8A)
          if _t0E89 then goto ASSIGN12C5 else goto JOIN0F8E
        ASSIGN12C5:  preds = [COND0E8C]
          real2 nd0E90#2 = Floor<2>(x0E81);
          real2 f0E8F#2 = Sub<real2>(x0E81,nd0E90);
          int{2} n0E91#8 = RealToInt<2>(nd0E90);
          int t10EAD#4 = -1;
          int t20EAE#1 = Index<int{2},0>(n0E91);
          int ix0EAC#4 = Add<int>(t10EAD,t20EAE);
          int t20EB1#4 = Index<int{2},1>(n0E91);
          int iy0EAF#1 = Add<int>(t10EAD,t20EB1);
          addr(IMAGE2D<float>) a0EB2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0EAF);
          real4 v00E93#1 = LoadVoxels<IMAGE2D<float>,4>(a0EB2);
          int iy0EA8#1 = Add<int>(_t06E5,t20EB1);
          addr(IMAGE2D<float>) a0EAB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0EA8);
          real4 v10E94#1 = LoadVoxels<IMAGE2D<float>,4>(a0EAB);
          int iy0EA1#1 = Add<int>(_t06E9,t20EB1);
          addr(IMAGE2D<float>) a0EA4#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0EA1);
          real4 v20E95#1 = LoadVoxels<IMAGE2D<float>,4>(a0EA4);
          int iy0E9A#1 = Add<int>(_t06C1,t20EB1);
          addr(IMAGE2D<float>) a0E9D#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0EAC,iy0E9A);
          real4 v30E96#1 = LoadVoxels<IMAGE2D<float>,4>(a0E9D);
          real fy0EBE#5 = Index<real2,1>(f0E8F);
          real t30EC3#1 = Add<real>(fy0EBE,_t06BD);
          real t10EC1#1 = Sub<real>(fy0EBE,_t06BD);
          real t00EC0#1 = Sub<real>(fy0EBE,_t06BF);
          real4 a0EBF#1 = <real4>[t30EC3,fy0EBE,t10EC1,t00EC0];
          real4 hy0EB4#1 = EvalKernel<4,bspln3,0>(a0EBF);
          real fx0EB5#5 = Index<real2,0>(f0E8F);
          real t30EBA#1 = Add<real>(fx0EB5,_t06BD);
          real t10EB8#1 = Sub<real>(fx0EB5,_t06BD);
          real t00EB7#1 = Sub<real>(fx0EB5,_t06BF);
          real4 a0EB6#1 = <real4>[t30EBA,fx0EB5,t10EB8,t00EB7];
          real4 hx0EB3#4 = EvalKernel<4,bspln3,0>(a0EB6);
          real t00EC8#1 = Dot<4>(v00E93,hx0EB3);
          real t10EC9#1 = Dot<4>(v10E94,hx0EB3);
          real t20ECA#1 = Dot<4>(v20E95,hx0EB3);
          real t30ECB#1 = Dot<4>(v30E96,hx0EB3);
          real4 tv0EC7#1 = <real4>[t00EC8,t10EC9,t20ECA,t30ECB];
          real _t0E8D#1 = Dot<4>(hy0EB4,tv0EC7);
          real2 x0F0B#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v070679);
          real2 nd0F0D#2 = Floor<2>(x0F0B);
          real2 f0F0C#2 = Sub<real2>(x0F0B,nd0F0D);
          int{2} n0F0E#8 = RealToInt<2>(nd0F0D);
          int t20F2B#1 = Index<int{2},0>(n0F0E);
          int ix0F29#4 = Add<int>(t10EAD,t20F2B);
          int t20F2E#4 = Index<int{2},1>(n0F0E);
          int iy0F2C#1 = Add<int>(t10EAD,t20F2E);
          addr(IMAGE2D<int>) a0F2F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F2C);
          real4 v00F10#1 = LoadVoxels<IMAGE2D<int>,4>(a0F2F);
          int iy0F25#1 = Add<int>(_t06E5,t20F2E);
          addr(IMAGE2D<int>) a0F28#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F25);
          real4 v10F11#1 = LoadVoxels<IMAGE2D<int>,4>(a0F28);
          int iy0F1E#1 = Add<int>(_t06E9,t20F2E);
          addr(IMAGE2D<int>) a0F21#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F1E);
          real4 v20F12#1 = LoadVoxels<IMAGE2D<int>,4>(a0F21);
          int iy0F17#1 = Add<int>(_t06C1,t20F2E);
          addr(IMAGE2D<int>) a0F1A#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix0F29,iy0F17);
          real4 v30F13#1 = LoadVoxels<IMAGE2D<int>,4>(a0F1A);
          real fy0F3B#5 = Index<real2,1>(f0F0C);
          real t30F40#1 = Add<real>(fy0F3B,_t06BD);
          real t10F3E#1 = Sub<real>(fy0F3B,_t06BD);
          real t00F3D#1 = Sub<real>(fy0F3B,_t06BF);
          real4 a0F3C#1 = <real4>[t30F40,fy0F3B,t10F3E,t00F3D];
          real4 hy0F31#1 = EvalKernel<4,bspln3,0>(a0F3C);
          real fx0F32#5 = Index<real2,0>(f0F0C);
          real t30F37#1 = Add<real>(fx0F32,_t06BD);
          real t10F35#1 = Sub<real>(fx0F32,_t06BD);
          real t00F34#1 = Sub<real>(fx0F32,_t06BF);
          real4 a0F33#1 = <real4>[t30F37,fx0F32,t10F35,t00F34];
          real4 hx0F30#4 = EvalKernel<4,bspln3,0>(a0F33);
          real t00F45#1 = Dot<4>(v00F10,hx0F30);
          real t10F46#1 = Dot<4>(v10F11,hx0F30);
          real t20F47#1 = Dot<4>(v20F12,hx0F30);
          real t30F48#1 = Dot<4>(v30F13,hx0F30);
          real4 tv0F44#1 = <real4>[t00F45,t10F46,t20F47,t30F48];
          real _t0F0A#1 = Dot<4>(hy0F31,tv0F44);
          real _t0F87#2 = Sub<real>(_t0E8D,_t0F0A);
          real _t0F89#1 = Mul<real>(_t0F87,_t0F87);
          real score0F8B#1 = Add<real>(score0E76,_t0F89);
          goto JOIN0F8E
        JOIN0F8E:  preds = [ASSIGN0F8C,COND0E8C]
          real score0F8D#2 = phi(score0F8B,score0E76)
          real _t0F8F#1 = Dot<2>(r006D7,v08067B);
          real _t0F91#1 = Dot<2>(r106DD,v08067B);
          real2 _t0F93#1 = <real2>[_t0F8F,_t0F91];
          real2 pos0F95#2 = Add<real2>(_t0F93,_t06ED);
          real2 x0F98#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos0F95);
          bool _t0F97#1 = Inside<IMAGE2D<float>,2>(x0F98,_t0665);
          if _t0F97 then goto ASSIGN0F9E else goto ASSIGN11C4
        ASSIGN0F9E:  preds = [COND0F9B]
          real2 x0F9D#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v08067B);
          bool _t0F9C#1 = Inside<IMAGE2D<int>,2>(x0F9D,_t0661);
          goto JOIN0FA2
        JOIN0FA2:  preds = [ASSIGN0F9F,ASSIGN11C4]
          bool _t0FA0#1 = phi(_t0F9C,_t0FA1)
          if _t0FA0 then goto ASSIGN12E6 else goto JOIN10A5
        ASSIGN12E6:  preds = [COND0FA3]
          real2 nd0FA7#2 = Floor<2>(x0F98);
          real2 f0FA6#2 = Sub<real2>(x0F98,nd0FA7);
          int{2} n0FA8#8 = RealToInt<2>(nd0FA7);
          int t10FC4#4 = -1;
          int t20FC5#1 = Index<int{2},0>(n0FA8);
          int ix0FC3#4 = Add<int>(t10FC4,t20FC5);
          int t20FC8#4 = Index<int{2},1>(n0FA8);
          int iy0FC6#1 = Add<int>(t10FC4,t20FC8);
          addr(IMAGE2D<float>) a0FC9#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FC6);
          real4 v00FAA#1 = LoadVoxels<IMAGE2D<float>,4>(a0FC9);
          int iy0FBF#1 = Add<int>(_t06E5,t20FC8);
          addr(IMAGE2D<float>) a0FC2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FBF);
          real4 v10FAB#1 = LoadVoxels<IMAGE2D<float>,4>(a0FC2);
          int iy0FB8#1 = Add<int>(_t06E9,t20FC8);
          addr(IMAGE2D<float>) a0FBB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FB8);
          real4 v20FAC#1 = LoadVoxels<IMAGE2D<float>,4>(a0FBB);
          int iy0FB1#1 = Add<int>(_t06C1,t20FC8);
          addr(IMAGE2D<float>) a0FB4#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix0FC3,iy0FB1);
          real4 v30FAD#1 = LoadVoxels<IMAGE2D<float>,4>(a0FB4);
          real fy0FD5#5 = Index<real2,1>(f0FA6);
          real t30FDA#1 = Add<real>(fy0FD5,_t06BD);
          real t10FD8#1 = Sub<real>(fy0FD5,_t06BD);
          real t00FD7#1 = Sub<real>(fy0FD5,_t06BF);
          real4 a0FD6#1 = <real4>[t30FDA,fy0FD5,t10FD8,t00FD7];
          real4 hy0FCB#1 = EvalKernel<4,bspln3,0>(a0FD6);
          real fx0FCC#5 = Index<real2,0>(f0FA6);
          real t30FD1#1 = Add<real>(fx0FCC,_t06BD);
          real t10FCF#1 = Sub<real>(fx0FCC,_t06BD);
          real t00FCE#1 = Sub<real>(fx0FCC,_t06BF);
          real4 a0FCD#1 = <real4>[t30FD1,fx0FCC,t10FCF,t00FCE];
          real4 hx0FCA#4 = EvalKernel<4,bspln3,0>(a0FCD);
          real t00FDF#1 = Dot<4>(v00FAA,hx0FCA);
          real t10FE0#1 = Dot<4>(v10FAB,hx0FCA);
          real t20FE1#1 = Dot<4>(v20FAC,hx0FCA);
          real t30FE2#1 = Dot<4>(v30FAD,hx0FCA);
          real4 tv0FDE#1 = <real4>[t00FDF,t10FE0,t20FE1,t30FE2];
          real _t0FA4#1 = Dot<4>(hy0FCB,tv0FDE);
          real2 x1022#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v08067B);
          real2 nd1024#2 = Floor<2>(x1022);
          real2 f1023#2 = Sub<real2>(x1022,nd1024);
          int{2} n1025#8 = RealToInt<2>(nd1024);
          int t21042#1 = Index<int{2},0>(n1025);
          int ix1040#4 = Add<int>(t10FC4,t21042);
          int t21045#4 = Index<int{2},1>(n1025);
          int iy1043#1 = Add<int>(t10FC4,t21045);
          addr(IMAGE2D<int>) a1046#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy1043);
          real4 v01027#1 = LoadVoxels<IMAGE2D<int>,4>(a1046);
          int iy103C#1 = Add<int>(_t06E5,t21045);
          addr(IMAGE2D<int>) a103F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy103C);
          real4 v11028#1 = LoadVoxels<IMAGE2D<int>,4>(a103F);
          int iy1035#1 = Add<int>(_t06E9,t21045);
          addr(IMAGE2D<int>) a1038#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy1035);
          real4 v21029#1 = LoadVoxels<IMAGE2D<int>,4>(a1038);
          int iy102E#1 = Add<int>(_t06C1,t21045);
          addr(IMAGE2D<int>) a1031#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1040,iy102E);
          real4 v3102A#1 = LoadVoxels<IMAGE2D<int>,4>(a1031);
          real fy1052#5 = Index<real2,1>(f1023);
          real t31057#1 = Add<real>(fy1052,_t06BD);
          real t11055#1 = Sub<real>(fy1052,_t06BD);
          real t01054#1 = Sub<real>(fy1052,_t06BF);
          real4 a1053#1 = <real4>[t31057,fy1052,t11055,t01054];
          real4 hy1048#1 = EvalKernel<4,bspln3,0>(a1053);
          real fx1049#5 = Index<real2,0>(f1023);
          real t3104E#1 = Add<real>(fx1049,_t06BD);
          real t1104C#1 = Sub<real>(fx1049,_t06BD);
          real t0104B#1 = Sub<real>(fx1049,_t06BF);
          real4 a104A#1 = <real4>[t3104E,fx1049,t1104C,t0104B];
          real4 hx1047#4 = EvalKernel<4,bspln3,0>(a104A);
          real t0105C#1 = Dot<4>(v01027,hx1047);
          real t1105D#1 = Dot<4>(v11028,hx1047);
          real t2105E#1 = Dot<4>(v21029,hx1047);
          real t3105F#1 = Dot<4>(v3102A,hx1047);
          real4 tv105B#1 = <real4>[t0105C,t1105D,t2105E,t3105F];
          real _t1021#1 = Dot<4>(hy1048,tv105B);
          real _t109E#2 = Sub<real>(_t0FA4,_t1021);
          real _t10A0#1 = Mul<real>(_t109E,_t109E);
          real score10A2#1 = Add<real>(score0F8D,_t10A0);
          goto JOIN10A5
        JOIN10A5:  preds = [ASSIGN10A3,COND0FA3]
          real score10A4#2 = phi(score10A2,score0F8D)
          real _t10A6#1 = Dot<2>(r006D7,v09067D);
          real _t10A8#1 = Dot<2>(r106DD,v09067D);
          real2 _t10AA#1 = <real2>[_t10A6,_t10A8];
          real2 pos10AC#3 = Add<real2>(_t10AA,_t06ED);
          real2 x10AF#3 = PosToImgSpace<IMAGE2D<float>>(_t0665,pos10AC);
          bool _t10AE#1 = Inside<IMAGE2D<float>,2>(x10AF,_t0665);
          if _t10AE then goto ASSIGN10B5 else goto ASSIGN11C3
        ASSIGN10B5:  preds = [COND10B2]
          real2 x10B4#1 = PosToImgSpace<IMAGE2D<int>>(_t0661,v09067D);
          bool _t10B3#1 = Inside<IMAGE2D<int>,2>(x10B4,_t0661);
          goto JOIN10B9
        JOIN10B9:  preds = [ASSIGN10B6,ASSIGN11C3]
          bool _t10B7#1 = phi(_t10B3,_t10B8)
          if _t10B7 then goto ASSIGN1307 else goto JOIN11BC
        ASSIGN1307:  preds = [COND10BA]
          real2 nd10BE#2 = Floor<2>(x10AF);
          real2 f10BD#2 = Sub<real2>(x10AF,nd10BE);
          int{2} n10BF#8 = RealToInt<2>(nd10BE);
          int t110DB#4 = -1;
          int t210DC#1 = Index<int{2},0>(n10BF);
          int ix10DA#4 = Add<int>(t110DB,t210DC);
          int t210DF#4 = Index<int{2},1>(n10BF);
          int iy10DD#1 = Add<int>(t110DB,t210DF);
          addr(IMAGE2D<float>) a10E0#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10DD);
          real4 v010C1#1 = LoadVoxels<IMAGE2D<float>,4>(a10E0);
          int iy10D6#1 = Add<int>(_t06E5,t210DF);
          addr(IMAGE2D<float>) a10D9#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10D6);
          real4 v110C2#1 = LoadVoxels<IMAGE2D<float>,4>(a10D9);
          int iy10CF#1 = Add<int>(_t06E9,t210DF);
          addr(IMAGE2D<float>) a10D2#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10CF);
          real4 v210C3#1 = LoadVoxels<IMAGE2D<float>,4>(a10D2);
          int iy10C8#1 = Add<int>(_t06C1,t210DF);
          addr(IMAGE2D<float>) a10CB#1 = VoxelAddress<IMAGE2D<float>,0>(_t0665,ix10DA,iy10C8);
          real4 v310C4#1 = LoadVoxels<IMAGE2D<float>,4>(a10CB);
          real fy10EC#5 = Index<real2,1>(f10BD);
          real t310F1#1 = Add<real>(fy10EC,_t06BD);
          real t110EF#1 = Sub<real>(fy10EC,_t06BD);
          real t010EE#1 = Sub<real>(fy10EC,_t06BF);
          real4 a10ED#1 = <real4>[t310F1,fy10EC,t110EF,t010EE];
          real4 hy10E2#1 = EvalKernel<4,bspln3,0>(a10ED);
          real fx10E3#5 = Index<real2,0>(f10BD);
          real t310E8#1 = Add<real>(fx10E3,_t06BD);
          real t110E6#1 = Sub<real>(fx10E3,_t06BD);
          real t010E5#1 = Sub<real>(fx10E3,_t06BF);
          real4 a10E4#1 = <real4>[t310E8,fx10E3,t110E6,t010E5];
          real4 hx10E1#4 = EvalKernel<4,bspln3,0>(a10E4);
          real t010F6#1 = Dot<4>(v010C1,hx10E1);
          real t110F7#1 = Dot<4>(v110C2,hx10E1);
          real t210F8#1 = Dot<4>(v210C3,hx10E1);
          real t310F9#1 = Dot<4>(v310C4,hx10E1);
          real4 tv10F5#1 = <real4>[t010F6,t110F7,t210F8,t310F9];
          real _t10BB#1 = Dot<4>(hy10E2,tv10F5);
          real2 x1139#2 = PosToImgSpace<IMAGE2D<int>>(_t0661,v09067D);
          real2 nd113B#2 = Floor<2>(x1139);
          real2 f113A#2 = Sub<real2>(x1139,nd113B);
          int{2} n113C#8 = RealToInt<2>(nd113B);
          int t21159#1 = Index<int{2},0>(n113C);
          int ix1157#4 = Add<int>(t110DB,t21159);
          int t2115C#4 = Index<int{2},1>(n113C);
          int iy115A#1 = Add<int>(t110DB,t2115C);
          addr(IMAGE2D<int>) a115D#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy115A);
          real4 v0113E#1 = LoadVoxels<IMAGE2D<int>,4>(a115D);
          int iy1153#1 = Add<int>(_t06E5,t2115C);
          addr(IMAGE2D<int>) a1156#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy1153);
          real4 v1113F#1 = LoadVoxels<IMAGE2D<int>,4>(a1156);
          int iy114C#1 = Add<int>(_t06E9,t2115C);
          addr(IMAGE2D<int>) a114F#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy114C);
          real4 v21140#1 = LoadVoxels<IMAGE2D<int>,4>(a114F);
          int iy1145#1 = Add<int>(_t06C1,t2115C);
          addr(IMAGE2D<int>) a1148#1 = VoxelAddress<IMAGE2D<int>,0>(_t0661,ix1157,iy1145);
          real4 v31141#1 = LoadVoxels<IMAGE2D<int>,4>(a1148);
          real fy1169#5 = Index<real2,1>(f113A);
          real t3116E#1 = Add<real>(fy1169,_t06BD);
          real t1116C#1 = Sub<real>(fy1169,_t06BD);
          real t0116B#1 = Sub<real>(fy1169,_t06BF);
          real4 a116A#1 = <real4>[t3116E,fy1169,t1116C,t0116B];
          real4 hy115F#1 = EvalKernel<4,bspln3,0>(a116A);
          real fx1160#5 = Index<real2,0>(f113A);
          real t31165#1 = Add<real>(fx1160,_t06BD);
          real t11163#1 = Sub<real>(fx1160,_t06BD);
          real t01162#1 = Sub<real>(fx1160,_t06BF);
          real4 a1161#1 = <real4>[t31165,fx1160,t11163,t01162];
          real4 hx115E#4 = EvalKernel<4,bspln3,0>(a1161);
          real t01173#1 = Dot<4>(v0113E,hx115E);
          real t11174#1 = Dot<4>(v1113F,hx115E);
          real t21175#1 = Dot<4>(v21140,hx115E);
          real t31176#1 = Dot<4>(v31141,hx115E);
          real4 tv1172#1 = <real4>[t01173,t11174,t21175,t31176];
          real _t1138#1 = Dot<4>(hy115F,tv1172);
          real _t11B5#2 = Sub<real>(_t10BB,_t1138);
          real _t11B7#1 = Mul<real>(_t11B5,_t11B5);
          real score11B9#1 = Add<real>(score10A4,_t11B7);
          goto JOIN11BC
        JOIN11BC:  preds = [ASSIGN11BA,COND10BA]
          real score11BB#1 = phi(score11B9,score10A4)
          self.t = t06B9;
          self.score = score11BB;
          self.r0 = r006D7;
          self.r1 = r106DD;
          self.pos = pos10AC;
          stabilize ()
        ASSIGN11C3:  preds = [COND10B2]
          bool _t10B8#1 = false;
          goto JOIN10B9
        ASSIGN11C4:  preds = [COND0F9B]
          bool _t0FA1#1 = false;
          goto JOIN0FA2
        ASSIGN11C5:  preds = [COND0E84]
          bool _t0E8A#1 = false;
          goto JOIN0E8B
        ASSIGN11C6:  preds = [COND0D6D]
          bool _t0D73#1 = false;
          goto JOIN0D74
        ASSIGN11C7:  preds = [COND0B51]
          bool _t0B57#1 = false;
          goto JOIN0B58
        ASSIGN11C8:  preds = [COND0A3A]
          bool _t0A40#1 = false;
          goto JOIN0A41
        ASSIGN11C9:  preds = [COND0923]
          bool _t0929#1 = false;
          goto JOIN092A
        ASSIGN11CA:  preds = [COND080C]
          bool _t0812#1 = false;
          goto JOIN0813
        ASSIGN11CB:  preds = [COND06F5]
          bool _t06FB#1 = false;
          goto JOIN06FC
    end Update
    method Stabilize
        ENTRY11CD:  preds = []
          real3 t11CE#1 = self.t;
          real score11D0#1 = self.score;
          real2 r011D2#1 = self.r0;
          real2 r111D4#1 = self.r1;
          real2 pos11D6#1 = self.pos;
          self.t = t11CE;
          self.score = score11D0;
          self.r0 = r011D2;
          self.r1 = r111D4;
          self.pos = pos11D6;
          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
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ low-il:redundant-assign
++ 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 T1349#0
  global int F134A#0
  global real2 v011337#4
  global real2 v021339#4
  global real2 v03133D#4
  global real2 v04133F#4
  global real2 v001333#5
  global real2 v061341#4
  global real2 v071343#4
  global real2 v081345#4
  global real2 v091347#4
  global string _t1329#1
  global image(IMAGE2D<int>) _t132B#68
  global int _t134B#0
  global string _t132D#1
  global image(IMAGE2D<float>) _t132F#58
  global real _t1331#6
  global real _t1335#7
  global real _t133B#6
## global initialization
  ENTRY1328:  preds = []
    string _t1329#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t132B#68 = LoadImage<IMAGE2D<int>>(_t1329);
    string _t132D#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t132F#58 = LoadImage<IMAGE2D<float>>(_t132D);
    real _t1331#6 = 0.0;
    real2 v001333#5 = <real2>[_t1331,_t1331];
    real _t1335#7 = 0.5e0;
    real2 v011337#4 = <real2>[_t1335,_t1335];
    real2 v021339#4 = <real2>[_t1335,_t1331];
    real _t133B#6 = Neg<real>(_t1335);
    real2 v03133D#4 = <real2>[_t1335,_t133B];
    real2 v04133F#4 = <real2>[_t1331,_t1335];
    real2 v061341#4 = <real2>[_t1331,_t133B];
    real2 v071343#4 = <real2>[_t133B,_t1335];
    real2 v081345#4 = <real2>[_t133B,_t1331];
    real2 v091347#4 = <real2>[_t133B,_t133B];
    return (T1349,F134A,v011337,v021339,v03133D,v04133F,v001333,v061341,v071343,v081345,v091347,_t1329,_t132B,_t134B,_t132D,_t132F,_t1331,_t1335,_t133B)
## initially
  ARRAY
    ENTRY1352:  preds = []
      int _t134E#4 = 0;
      int _t134F#4 = 60;
      live vars = (_t134F,_t134E)
    for int i134D#1 = _t134E .. _t134F
      for int j1350#1 = _t134E .. _t134F
        for int k1351#1 = _t134E .. _t134F
          ENTRY1356:  preds = []
            live vars = ()
          new R(i134D,j1350,k1351);
## strands
  strand R (int i1358#1, int j1359#1, int k135A#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY1360:  preds = []
        real _t1361#1 = IntToReal(i1358);
        real _t1363#3 = 0.60e2;
        real _t1365#1 = Div<real>(_t1361,_t1363);
        real _t1367#3 = 0.5e0;
        real _t1369#1 = Sub<real>(_t1365,_t1367);
        real _t136B#1 = IntToReal(j1359);
        real _t136D#1 = Div<real>(_t136B,_t1363);
        real _t136F#1 = Sub<real>(_t136D,_t1367);
        real _t1371#1 = IntToReal(k135A);
        real _t1373#1 = Div<real>(_t1371,_t1363);
        real _t1375#1 = Sub<real>(_t1373,_t1367);
        real3 t1377#1 = <real3>[_t1369,_t136F,_t1375];
        real score1379#3 = 0.0;
        real2 r0137B#3 = <real2>[score1379,score1379];
        self.t = t1377;
        self.score = score1379;
        self.r0 = r0137B;
        self.r1 = r0137B;
        self.pos = r0137B;
        strand_init ()
    method Update
        ENTRY1383:  preds = []
          real3 t1384#4 = self.t;
          real score1386#2 = self.score;
          real _t1388#102 = 0.1e1;
          real _t138A#53 = 0.2e1;
          int _t138C#21 = 2;
          real _t138E#6 = Subscript<real3>(t1384,_t138C);
          real _t1390#1 = Mul<real>(_t138A,_t138E);
          real _t1392#1 = Mul<real>(_t1390,_t138E);
          real _t1394#2 = Sub<real>(_t1388,_t1392);
          real _t1396#1 = Neg<real>(_t138A);
          real _t1398#1 = Mul<real>(_t138E,_t138E);
          real _t139A#1 = Sub<real>(_t1388,_t1398);
          real _t139C#2 = sqrt(_t139A);
          real _t139E#1 = Mul<real>(_t1396,_t139C);
          real _t13A0#1 = Mul<real>(_t139E,_t138E);
          real2 r013A2#10 = <real2>[_t1394,_t13A0];
          real _t13A4#1 = Mul<real>(_t138A,_t139C);
          real _t13A6#1 = Mul<real>(_t13A4,_t138E);
          real2 r113A8#10 = <real2>[_t13A6,_t1394];
          real _t13AA#1 = Dot<2>(r013A2,v001333);
          real _t13AC#1 = Dot<2>(r113A8,v001333);
          real2 _t13AE#1 = <real2>[_t13AA,_t13AC];
          int _t13B0#21 = 0;
          real _t13B2#1 = Subscript<real3>(t1384,_t13B0);
          int _t13B4#21 = 1;
          real _t13B6#1 = Subscript<real3>(t1384,_t13B4);
          real2 _t13B8#9 = <real2>[_t13B2,_t13B6];
          real2 pos13BA#1 = Add<real2>(_t13AE,_t13B8);
          real2 x13BC#5 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos13BA);
          bool _t13BE#2 = Inside<IMAGE2D<float>,2>(x13BC,_t132F);
          if _t13BE then goto ASSIGN13C2 else goto ASSIGN24EA
        ASSIGN13C2:  preds = [COND13C0]
          real2 x13C1#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v001333);
          bool _t13C3#1 = Inside<IMAGE2D<int>,2>(x13C1,_t132B);
          goto JOIN13C7
        JOIN13C7:  preds = [ASSIGN13C4,ASSIGN24EA]
          bool _t13C5#2 = phi(_t13C3,_t13C6)
          if _t13C5 then goto ASSIGN13CA else goto JOIN156C
        ASSIGN13CA:  preds = [COND13C8]
          real2 nd13C9#2 = Floor<2>(x13BC);
          real2 f13CB#2 = Sub<real2>(x13BC,nd13C9);
          int{2} n13CD#2 = RealToInt<2>(nd13C9);
          int t113CF#4 = -1;
          int t213D1#1 = Index<int{2},0>(n13CD);
          int ix13D3#4 = Add<int>(t113CF,t213D1);
          int t213D5#4 = Index<int{2},1>(n13CD);
          int iy13D7#1 = Add<int>(t113CF,t213D5);
          int n013DA#8 = 21;
          int t13DB#1 = Mul<int>(n013DA,iy13D7);
          int index13DC#1 = Add<int>(ix13D3,t13DB);
          addr(IMAGE2D<float>) imgBaseAddr13DD#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a13D9#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index13DC);
          real4 v013E3#1 = LoadVoxels<IMAGE2D<float>,4>(a13D9);
          int iy13E5#1 = Add<int>(_t13B0,t213D5);
          int t13E9#1 = Mul<int>(n013DA,iy13E5);
          int index13EA#1 = Add<int>(ix13D3,t13E9);
          addr(IMAGE2D<float>) a13E7#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index13EA);
          real4 v113F1#1 = LoadVoxels<IMAGE2D<float>,4>(a13E7);
          int iy13F3#1 = Add<int>(_t13B4,t213D5);
          int t13F7#1 = Mul<int>(n013DA,iy13F3);
          int index13F8#1 = Add<int>(ix13D3,t13F7);
          addr(IMAGE2D<float>) a13F5#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index13F8);
          real4 v213FF#1 = LoadVoxels<IMAGE2D<float>,4>(a13F5);
          int iy1401#1 = Add<int>(_t138C,t213D5);
          int t1405#1 = Mul<int>(n013DA,iy1401);
          int index1406#1 = Add<int>(ix13D3,t1405);
          addr(IMAGE2D<float>) a1403#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index1406);
          real4 v3140D#1 = LoadVoxels<IMAGE2D<float>,4>(a1403);
          real fy140F#4 = Index<real2,1>(f13CB);
          real t31411#1 = Add<real>(fy140F,_t1388);
          real t11413#1 = Sub<real>(fy140F,_t1388);
          real t01415#1 = Sub<real>(fy140F,_t138A);
          real4 a1417#3 = <real4>[t31411,fy140F,t11413,t01415];
          real _f142A#2 = 0.133333333333e1;
          real _f142B#2 = 0.666666666667e0;
          real4 a0141A#4 = <real4>[_f142A,_f142B,_f142B,_f142A];
          real _f1426#1 = -0.2e1;
          real _f1427#2 = 0.0;
          real4 a1141B#4 = <real4>[_f1426,_f1427,_f1427,_t138A];
          real _f1423#2 = -0.1e1;
          real4 a2141C#4 = <real4>[_t1388,_f1423,_f1423,_t1388];
          real _f141E#1 = -0.166666666667e0;
          real _f141F#1 = 0.5e0;
          real _f1420#1 = -0.5e0;
          real _f1421#1 = 0.166666666667e0;
          real4 a3141D#4 = <real4>[_f141E,_f141F,_f1420,_f1421];
          real4 prod3142E#1 = Mul<real4>(a1417,a3141D);
          real4 sum2142F#1 = Add<real4>(a2141C,prod3142E);
          real4 prod21430#1 = Mul<real4>(a1417,sum2142F);
          real4 sum11431#1 = Add<real4>(a1141B,prod21430);
          real4 prod11432#1 = Mul<real4>(a1417,sum11431);
          real4 hy1419#1 = Add<real4>(a0141A,prod11432);
          real fx144D#4 = Index<real2,0>(f13CB);
          real t3144F#1 = Add<real>(fx144D,_t1388);
          real t11451#1 = Sub<real>(fx144D,_t1388);
          real t01453#1 = Sub<real>(fx144D,_t138A);
          real4 a1455#3 = <real4>[t3144F,fx144D,t11451,t01453];
          real4 prod3146C#1 = Mul<real4>(a1455,a3141D);
          real4 sum2146D#1 = Add<real4>(a2141C,prod3146C);
          real4 prod2146E#1 = Mul<real4>(a1455,sum2146D);
          real4 sum1146F#1 = Add<real4>(a1141B,prod2146E);
          real4 prod11470#1 = Mul<real4>(a1455,sum1146F);
          real4 hx1457#4 = Add<real4>(a0141A,prod11470);
          real t0148B#1 = Dot<4>(v013E3,hx1457);
          real t1148D#1 = Dot<4>(v113F1,hx1457);
          real t2148F#1 = Dot<4>(v213FF,hx1457);
          real t31491#1 = Dot<4>(v3140D,hx1457);
          real4 tv1493#1 = <real4>[t0148B,t1148D,t2148F,t31491];
          real _t1495#1 = Dot<4>(hy1419,tv1493);
          real2 x1497#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v001333);
          real2 nd1499#2 = Floor<2>(x1497);
          real2 f149B#2 = Sub<real2>(x1497,nd1499);
          int{2} n149D#2 = RealToInt<2>(nd1499);
          int t2149F#1 = Index<int{2},0>(n149D);
          int ix14A1#4 = Add<int>(t113CF,t2149F);
          int t214A3#4 = Index<int{2},1>(n149D);
          int iy14A5#1 = Add<int>(t113CF,t214A3);
          int t14A9#1 = Mul<int>(n013DA,iy14A5);
          int index14AA#1 = Add<int>(ix14A1,t14A9);
          addr(IMAGE2D<int>) imgBaseAddr14AB#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a14A7#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14AA);
          real4 v014B1#1 = LoadVoxels<IMAGE2D<int>,4>(a14A7);
          int iy14B3#1 = Add<int>(_t13B0,t214A3);
          int t14B7#1 = Mul<int>(n013DA,iy14B3);
          int index14B8#1 = Add<int>(ix14A1,t14B7);
          addr(IMAGE2D<int>) a14B5#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14B8);
          real4 v114BF#1 = LoadVoxels<IMAGE2D<int>,4>(a14B5);
          int iy14C1#1 = Add<int>(_t13B4,t214A3);
          int t14C5#1 = Mul<int>(n013DA,iy14C1);
          int index14C6#1 = Add<int>(ix14A1,t14C5);
          addr(IMAGE2D<int>) a14C3#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14C6);
          real4 v214CD#1 = LoadVoxels<IMAGE2D<int>,4>(a14C3);
          int iy14CF#1 = Add<int>(_t138C,t214A3);
          int t14D3#1 = Mul<int>(n013DA,iy14CF);
          int index14D4#1 = Add<int>(ix14A1,t14D3);
          addr(IMAGE2D<int>) a14D1#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14D4);
          real4 v314DB#1 = LoadVoxels<IMAGE2D<int>,4>(a14D1);
          real fy14DD#4 = Index<real2,1>(f149B);
          real t314DF#1 = Add<real>(fy14DD,_t1388);
          real t114E1#1 = Sub<real>(fy14DD,_t1388);
          real t014E3#1 = Sub<real>(fy14DD,_t138A);
          real4 a14E5#3 = <real4>[t314DF,fy14DD,t114E1,t014E3];
          real4 prod314FC#1 = Mul<real4>(a14E5,a3141D);
          real4 sum214FD#1 = Add<real4>(a2141C,prod314FC);
          real4 prod214FE#1 = Mul<real4>(a14E5,sum214FD);
          real4 sum114FF#1 = Add<real4>(a1141B,prod214FE);
          real4 prod11500#1 = Mul<real4>(a14E5,sum114FF);
          real4 hy14E7#1 = Add<real4>(a0141A,prod11500);
          real fx151B#4 = Index<real2,0>(f149B);
          real t3151D#1 = Add<real>(fx151B,_t1388);
          real t1151F#1 = Sub<real>(fx151B,_t1388);
          real t01521#1 = Sub<real>(fx151B,_t138A);
          real4 a1523#3 = <real4>[t3151D,fx151B,t1151F,t01521];
          real4 prod3153A#1 = Mul<real4>(a1523,a3141D);
          real4 sum2153B#1 = Add<real4>(a2141C,prod3153A);
          real4 prod2153C#1 = Mul<real4>(a1523,sum2153B);
          real4 sum1153D#1 = Add<real4>(a1141B,prod2153C);
          real4 prod1153E#1 = Mul<real4>(a1523,sum1153D);
          real4 hx1525#4 = Add<real4>(a0141A,prod1153E);
          real t01559#1 = Dot<4>(v014B1,hx1525);
          real t1155B#1 = Dot<4>(v114BF,hx1525);
          real t2155D#1 = Dot<4>(v214CD,hx1525);
          real t3155F#1 = Dot<4>(v314DB,hx1525);
          real4 tv1561#1 = <real4>[t01559,t1155B,t2155D,t3155F];
          real _t1563#1 = Dot<4>(hy14E7,tv1561);
          real _t1565#2 = Sub<real>(_t1495,_t1563);
          real _t1567#1 = Mul<real>(_t1565,_t1565);
          real score1569#1 = Add<real>(score1386,_t1567);
          goto JOIN156C
        JOIN156C:  preds = [ASSIGN156A,COND13C8]
          real score156B#2 = phi(score1569,score1386)
          real _t156D#1 = Dot<2>(r013A2,v011337);
          real _t156F#1 = Dot<2>(r113A8,v011337);
          real2 _t1571#1 = <real2>[_t156D,_t156F];
          real2 pos1573#1 = Add<real2>(_t1571,_t13B8);
          real2 x1575#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1573);
          bool _t1577#1 = Inside<IMAGE2D<float>,2>(x1575,_t132F);
          if _t1577 then goto ASSIGN157B else goto ASSIGN24E9
        ASSIGN157B:  preds = [COND1579]
          real2 x157A#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v011337);
          bool _t157C#1 = Inside<IMAGE2D<int>,2>(x157A,_t132B);
          goto JOIN1580
        JOIN1580:  preds = [ASSIGN157D,ASSIGN24E9]
          bool _t157E#1 = phi(_t157C,_t157F)
          if _t157E then goto ASSIGN1583 else goto JOIN1725
        ASSIGN1583:  preds = [COND1581]
          real2 nd1582#2 = Floor<2>(x1575);
          real2 f1584#2 = Sub<real2>(x1575,nd1582);
          int{2} n1586#2 = RealToInt<2>(nd1582);
          int t11588#4 = -1;
          int t2158A#1 = Index<int{2},0>(n1586);
          int ix158C#4 = Add<int>(t11588,t2158A);
          int t2158E#4 = Index<int{2},1>(n1586);
          int iy1590#1 = Add<int>(t11588,t2158E);
          int n01593#8 = 21;
          int t1594#1 = Mul<int>(n01593,iy1590);
          int index1595#1 = Add<int>(ix158C,t1594);
          addr(IMAGE2D<float>) imgBaseAddr1596#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1592#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index1595);
          real4 v0159C#1 = LoadVoxels<IMAGE2D<float>,4>(a1592);
          int iy159E#1 = Add<int>(_t13B0,t2158E);
          int t15A2#1 = Mul<int>(n01593,iy159E);
          int index15A3#1 = Add<int>(ix158C,t15A2);
          addr(IMAGE2D<float>) a15A0#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index15A3);
          real4 v115AA#1 = LoadVoxels<IMAGE2D<float>,4>(a15A0);
          int iy15AC#1 = Add<int>(_t13B4,t2158E);
          int t15B0#1 = Mul<int>(n01593,iy15AC);
          int index15B1#1 = Add<int>(ix158C,t15B0);
          addr(IMAGE2D<float>) a15AE#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index15B1);
          real4 v215B8#1 = LoadVoxels<IMAGE2D<float>,4>(a15AE);
          int iy15BA#1 = Add<int>(_t138C,t2158E);
          int t15BE#1 = Mul<int>(n01593,iy15BA);
          int index15BF#1 = Add<int>(ix158C,t15BE);
          addr(IMAGE2D<float>) a15BC#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index15BF);
          real4 v315C6#1 = LoadVoxels<IMAGE2D<float>,4>(a15BC);
          real fy15C8#4 = Index<real2,1>(f1584);
          real t315CA#1 = Add<real>(fy15C8,_t1388);
          real t115CC#1 = Sub<real>(fy15C8,_t1388);
          real t015CE#1 = Sub<real>(fy15C8,_t138A);
          real4 a15D0#3 = <real4>[t315CA,fy15C8,t115CC,t015CE];
          real _f15E3#2 = 0.133333333333e1;
          real _f15E4#2 = 0.666666666667e0;
          real4 a015D3#4 = <real4>[_f15E3,_f15E4,_f15E4,_f15E3];
          real _f15DF#1 = -0.2e1;
          real _f15E0#2 = 0.0;
          real4 a115D4#4 = <real4>[_f15DF,_f15E0,_f15E0,_t138A];
          real _f15DC#2 = -0.1e1;
          real4 a215D5#4 = <real4>[_t1388,_f15DC,_f15DC,_t1388];
          real _f15D7#1 = -0.166666666667e0;
          real _f15D8#1 = 0.5e0;
          real _f15D9#1 = -0.5e0;
          real _f15DA#1 = 0.166666666667e0;
          real4 a315D6#4 = <real4>[_f15D7,_f15D8,_f15D9,_f15DA];
          real4 prod315E7#1 = Mul<real4>(a15D0,a315D6);
          real4 sum215E8#1 = Add<real4>(a215D5,prod315E7);
          real4 prod215E9#1 = Mul<real4>(a15D0,sum215E8);
          real4 sum115EA#1 = Add<real4>(a115D4,prod215E9);
          real4 prod115EB#1 = Mul<real4>(a15D0,sum115EA);
          real4 hy15D2#1 = Add<real4>(a015D3,prod115EB);
          real fx1606#4 = Index<real2,0>(f1584);
          real t31608#1 = Add<real>(fx1606,_t1388);
          real t1160A#1 = Sub<real>(fx1606,_t1388);
          real t0160C#1 = Sub<real>(fx1606,_t138A);
          real4 a160E#3 = <real4>[t31608,fx1606,t1160A,t0160C];
          real4 prod31625#1 = Mul<real4>(a160E,a315D6);
          real4 sum21626#1 = Add<real4>(a215D5,prod31625);
          real4 prod21627#1 = Mul<real4>(a160E,sum21626);
          real4 sum11628#1 = Add<real4>(a115D4,prod21627);
          real4 prod11629#1 = Mul<real4>(a160E,sum11628);
          real4 hx1610#4 = Add<real4>(a015D3,prod11629);
          real t01644#1 = Dot<4>(v0159C,hx1610);
          real t11646#1 = Dot<4>(v115AA,hx1610);
          real t21648#1 = Dot<4>(v215B8,hx1610);
          real t3164A#1 = Dot<4>(v315C6,hx1610);
          real4 tv164C#1 = <real4>[t01644,t11646,t21648,t3164A];
          real _t164E#1 = Dot<4>(hy15D2,tv164C);
          real2 x1650#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v011337);
          real2 nd1652#2 = Floor<2>(x1650);
          real2 f1654#2 = Sub<real2>(x1650,nd1652);
          int{2} n1656#2 = RealToInt<2>(nd1652);
          int t21658#1 = Index<int{2},0>(n1656);
          int ix165A#4 = Add<int>(t11588,t21658);
          int t2165C#4 = Index<int{2},1>(n1656);
          int iy165E#1 = Add<int>(t11588,t2165C);
          int t1662#1 = Mul<int>(n01593,iy165E);
          int index1663#1 = Add<int>(ix165A,t1662);
          addr(IMAGE2D<int>) imgBaseAddr1664#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1660#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index1663);
          real4 v0166A#1 = LoadVoxels<IMAGE2D<int>,4>(a1660);
          int iy166C#1 = Add<int>(_t13B0,t2165C);
          int t1670#1 = Mul<int>(n01593,iy166C);
          int index1671#1 = Add<int>(ix165A,t1670);
          addr(IMAGE2D<int>) a166E#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index1671);
          real4 v11678#1 = LoadVoxels<IMAGE2D<int>,4>(a166E);
          int iy167A#1 = Add<int>(_t13B4,t2165C);
          int t167E#1 = Mul<int>(n01593,iy167A);
          int index167F#1 = Add<int>(ix165A,t167E);
          addr(IMAGE2D<int>) a167C#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index167F);
          real4 v21686#1 = LoadVoxels<IMAGE2D<int>,4>(a167C);
          int iy1688#1 = Add<int>(_t138C,t2165C);
          int t168C#1 = Mul<int>(n01593,iy1688);
          int index168D#1 = Add<int>(ix165A,t168C);
          addr(IMAGE2D<int>) a168A#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index168D);
          real4 v31694#1 = LoadVoxels<IMAGE2D<int>,4>(a168A);
          real fy1696#4 = Index<real2,1>(f1654);
          real t31698#1 = Add<real>(fy1696,_t1388);
          real t1169A#1 = Sub<real>(fy1696,_t1388);
          real t0169C#1 = Sub<real>(fy1696,_t138A);
          real4 a169E#3 = <real4>[t31698,fy1696,t1169A,t0169C];
          real4 prod316B5#1 = Mul<real4>(a169E,a315D6);
          real4 sum216B6#1 = Add<real4>(a215D5,prod316B5);
          real4 prod216B7#1 = Mul<real4>(a169E,sum216B6);
          real4 sum116B8#1 = Add<real4>(a115D4,prod216B7);
          real4 prod116B9#1 = Mul<real4>(a169E,sum116B8);
          real4 hy16A0#1 = Add<real4>(a015D3,prod116B9);
          real fx16D4#4 = Index<real2,0>(f1654);
          real t316D6#1 = Add<real>(fx16D4,_t1388);
          real t116D8#1 = Sub<real>(fx16D4,_t1388);
          real t016DA#1 = Sub<real>(fx16D4,_t138A);
          real4 a16DC#3 = <real4>[t316D6,fx16D4,t116D8,t016DA];
          real4 prod316F3#1 = Mul<real4>(a16DC,a315D6);
          real4 sum216F4#1 = Add<real4>(a215D5,prod316F3);
          real4 prod216F5#1 = Mul<real4>(a16DC,sum216F4);
          real4 sum116F6#1 = Add<real4>(a115D4,prod216F5);
          real4 prod116F7#1 = Mul<real4>(a16DC,sum116F6);
          real4 hx16DE#4 = Add<real4>(a015D3,prod116F7);
          real t01712#1 = Dot<4>(v0166A,hx16DE);
          real t11714#1 = Dot<4>(v11678,hx16DE);
          real t21716#1 = Dot<4>(v21686,hx16DE);
          real t31718#1 = Dot<4>(v31694,hx16DE);
          real4 tv171A#1 = <real4>[t01712,t11714,t21716,t31718];
          real _t171C#1 = Dot<4>(hy16A0,tv171A);
          real _t171E#2 = Sub<real>(_t164E,_t171C);
          real _t1720#1 = Mul<real>(_t171E,_t171E);
          real score1722#1 = Add<real>(score156B,_t1720);
          goto JOIN1725
        JOIN1725:  preds = [ASSIGN1723,COND1581]
          real score1724#2 = phi(score1722,score156B)
          real _t1726#1 = Dot<2>(r013A2,v021339);
          real _t1728#1 = Dot<2>(r113A8,v021339);
          real2 _t172A#1 = <real2>[_t1726,_t1728];
          real2 pos172C#1 = Add<real2>(_t172A,_t13B8);
          real2 x172E#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos172C);
          bool _t1730#1 = Inside<IMAGE2D<float>,2>(x172E,_t132F);
          if _t1730 then goto ASSIGN1734 else goto ASSIGN24E8
        ASSIGN1734:  preds = [COND1732]
          real2 x1733#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v021339);
          bool _t1735#1 = Inside<IMAGE2D<int>,2>(x1733,_t132B);
          goto JOIN1739
        JOIN1739:  preds = [ASSIGN1736,ASSIGN24E8]
          bool _t1737#1 = phi(_t1735,_t1738)
          if _t1737 then goto ASSIGN173C else goto JOIN18DE
        ASSIGN173C:  preds = [COND173A]
          real2 nd173B#2 = Floor<2>(x172E);
          real2 f173D#2 = Sub<real2>(x172E,nd173B);
          int{2} n173F#2 = RealToInt<2>(nd173B);
          int t11741#4 = -1;
          int t21743#1 = Index<int{2},0>(n173F);
          int ix1745#4 = Add<int>(t11741,t21743);
          int t21747#4 = Index<int{2},1>(n173F);
          int iy1749#1 = Add<int>(t11741,t21747);
          int n0174C#8 = 21;
          int t174D#1 = Mul<int>(n0174C,iy1749);
          int index174E#1 = Add<int>(ix1745,t174D);
          addr(IMAGE2D<float>) imgBaseAddr174F#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a174B#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index174E);
          real4 v01755#1 = LoadVoxels<IMAGE2D<float>,4>(a174B);
          int iy1757#1 = Add<int>(_t13B0,t21747);
          int t175B#1 = Mul<int>(n0174C,iy1757);
          int index175C#1 = Add<int>(ix1745,t175B);
          addr(IMAGE2D<float>) a1759#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index175C);
          real4 v11763#1 = LoadVoxels<IMAGE2D<float>,4>(a1759);
          int iy1765#1 = Add<int>(_t13B4,t21747);
          int t1769#1 = Mul<int>(n0174C,iy1765);
          int index176A#1 = Add<int>(ix1745,t1769);
          addr(IMAGE2D<float>) a1767#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index176A);
          real4 v21771#1 = LoadVoxels<IMAGE2D<float>,4>(a1767);
          int iy1773#1 = Add<int>(_t138C,t21747);
          int t1777#1 = Mul<int>(n0174C,iy1773);
          int index1778#1 = Add<int>(ix1745,t1777);
          addr(IMAGE2D<float>) a1775#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index1778);
          real4 v3177F#1 = LoadVoxels<IMAGE2D<float>,4>(a1775);
          real fy1781#4 = Index<real2,1>(f173D);
          real t31783#1 = Add<real>(fy1781,_t1388);
          real t11785#1 = Sub<real>(fy1781,_t1388);
          real t01787#1 = Sub<real>(fy1781,_t138A);
          real4 a1789#3 = <real4>[t31783,fy1781,t11785,t01787];
          real _f179C#2 = 0.133333333333e1;
          real _f179D#2 = 0.666666666667e0;
          real4 a0178C#4 = <real4>[_f179C,_f179D,_f179D,_f179C];
          real _f1798#1 = -0.2e1;
          real _f1799#2 = 0.0;
          real4 a1178D#4 = <real4>[_f1798,_f1799,_f1799,_t138A];
          real _f1795#2 = -0.1e1;
          real4 a2178E#4 = <real4>[_t1388,_f1795,_f1795,_t1388];
          real _f1790#1 = -0.166666666667e0;
          real _f1791#1 = 0.5e0;
          real _f1792#1 = -0.5e0;
          real _f1793#1 = 0.166666666667e0;
          real4 a3178F#4 = <real4>[_f1790,_f1791,_f1792,_f1793];
          real4 prod317A0#1 = Mul<real4>(a1789,a3178F);
          real4 sum217A1#1 = Add<real4>(a2178E,prod317A0);
          real4 prod217A2#1 = Mul<real4>(a1789,sum217A1);
          real4 sum117A3#1 = Add<real4>(a1178D,prod217A2);
          real4 prod117A4#1 = Mul<real4>(a1789,sum117A3);
          real4 hy178B#1 = Add<real4>(a0178C,prod117A4);
          real fx17BF#4 = Index<real2,0>(f173D);
          real t317C1#1 = Add<real>(fx17BF,_t1388);
          real t117C3#1 = Sub<real>(fx17BF,_t1388);
          real t017C5#1 = Sub<real>(fx17BF,_t138A);
          real4 a17C7#3 = <real4>[t317C1,fx17BF,t117C3,t017C5];
          real4 prod317DE#1 = Mul<real4>(a17C7,a3178F);
          real4 sum217DF#1 = Add<real4>(a2178E,prod317DE);
          real4 prod217E0#1 = Mul<real4>(a17C7,sum217DF);
          real4 sum117E1#1 = Add<real4>(a1178D,prod217E0);
          real4 prod117E2#1 = Mul<real4>(a17C7,sum117E1);
          real4 hx17C9#4 = Add<real4>(a0178C,prod117E2);
          real t017FD#1 = Dot<4>(v01755,hx17C9);
          real t117FF#1 = Dot<4>(v11763,hx17C9);
          real t21801#1 = Dot<4>(v21771,hx17C9);
          real t31803#1 = Dot<4>(v3177F,hx17C9);
          real4 tv1805#1 = <real4>[t017FD,t117FF,t21801,t31803];
          real _t1807#1 = Dot<4>(hy178B,tv1805);
          real2 x1809#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v021339);
          real2 nd180B#2 = Floor<2>(x1809);
          real2 f180D#2 = Sub<real2>(x1809,nd180B);
          int{2} n180F#2 = RealToInt<2>(nd180B);
          int t21811#1 = Index<int{2},0>(n180F);
          int ix1813#4 = Add<int>(t11741,t21811);
          int t21815#4 = Index<int{2},1>(n180F);
          int iy1817#1 = Add<int>(t11741,t21815);
          int t181B#1 = Mul<int>(n0174C,iy1817);
          int index181C#1 = Add<int>(ix1813,t181B);
          addr(IMAGE2D<int>) imgBaseAddr181D#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1819#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index181C);
          real4 v01823#1 = LoadVoxels<IMAGE2D<int>,4>(a1819);
          int iy1825#1 = Add<int>(_t13B0,t21815);
          int t1829#1 = Mul<int>(n0174C,iy1825);
          int index182A#1 = Add<int>(ix1813,t1829);
          addr(IMAGE2D<int>) a1827#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index182A);
          real4 v11831#1 = LoadVoxels<IMAGE2D<int>,4>(a1827);
          int iy1833#1 = Add<int>(_t13B4,t21815);
          int t1837#1 = Mul<int>(n0174C,iy1833);
          int index1838#1 = Add<int>(ix1813,t1837);
          addr(IMAGE2D<int>) a1835#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index1838);
          real4 v2183F#1 = LoadVoxels<IMAGE2D<int>,4>(a1835);
          int iy1841#1 = Add<int>(_t138C,t21815);
          int t1845#1 = Mul<int>(n0174C,iy1841);
          int index1846#1 = Add<int>(ix1813,t1845);
          addr(IMAGE2D<int>) a1843#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index1846);
          real4 v3184D#1 = LoadVoxels<IMAGE2D<int>,4>(a1843);
          real fy184F#4 = Index<real2,1>(f180D);
          real t31851#1 = Add<real>(fy184F,_t1388);
          real t11853#1 = Sub<real>(fy184F,_t1388);
          real t01855#1 = Sub<real>(fy184F,_t138A);
          real4 a1857#3 = <real4>[t31851,fy184F,t11853,t01855];
          real4 prod3186E#1 = Mul<real4>(a1857,a3178F);
          real4 sum2186F#1 = Add<real4>(a2178E,prod3186E);
          real4 prod21870#1 = Mul<real4>(a1857,sum2186F);
          real4 sum11871#1 = Add<real4>(a1178D,prod21870);
          real4 prod11872#1 = Mul<real4>(a1857,sum11871);
          real4 hy1859#1 = Add<real4>(a0178C,prod11872);
          real fx188D#4 = Index<real2,0>(f180D);
          real t3188F#1 = Add<real>(fx188D,_t1388);
          real t11891#1 = Sub<real>(fx188D,_t1388);
          real t01893#1 = Sub<real>(fx188D,_t138A);
          real4 a1895#3 = <real4>[t3188F,fx188D,t11891,t01893];
          real4 prod318AC#1 = Mul<real4>(a1895,a3178F);
          real4 sum218AD#1 = Add<real4>(a2178E,prod318AC);
          real4 prod218AE#1 = Mul<real4>(a1895,sum218AD);
          real4 sum118AF#1 = Add<real4>(a1178D,prod218AE);
          real4 prod118B0#1 = Mul<real4>(a1895,sum118AF);
          real4 hx1897#4 = Add<real4>(a0178C,prod118B0);
          real t018CB#1 = Dot<4>(v01823,hx1897);
          real t118CD#1 = Dot<4>(v11831,hx1897);
          real t218CF#1 = Dot<4>(v2183F,hx1897);
          real t318D1#1 = Dot<4>(v3184D,hx1897);
          real4 tv18D3#1 = <real4>[t018CB,t118CD,t218CF,t318D1];
          real _t18D5#1 = Dot<4>(hy1859,tv18D3);
          real _t18D7#2 = Sub<real>(_t1807,_t18D5);
          real _t18D9#1 = Mul<real>(_t18D7,_t18D7);
          real score18DB#1 = Add<real>(score1724,_t18D9);
          goto JOIN18DE
        JOIN18DE:  preds = [ASSIGN18DC,COND173A]
          real score18DD#2 = phi(score18DB,score1724)
          real _t18DF#1 = Dot<2>(r013A2,v03133D);
          real _t18E1#1 = Dot<2>(r113A8,v03133D);
          real2 _t18E3#1 = <real2>[_t18DF,_t18E1];
          real2 pos18E5#1 = Add<real2>(_t18E3,_t13B8);
          real2 x18E7#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos18E5);
          bool _t18E9#1 = Inside<IMAGE2D<float>,2>(x18E7,_t132F);
          if _t18E9 then goto ASSIGN18ED else goto ASSIGN24E7
        ASSIGN18ED:  preds = [COND18EB]
          real2 x18EC#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v03133D);
          bool _t18EE#1 = Inside<IMAGE2D<int>,2>(x18EC,_t132B);
          goto JOIN18F2
        JOIN18F2:  preds = [ASSIGN18EF,ASSIGN24E7]
          bool _t18F0#1 = phi(_t18EE,_t18F1)
          if _t18F0 then goto ASSIGN18F5 else goto JOIN1A97
        ASSIGN18F5:  preds = [COND18F3]
          real2 nd18F4#2 = Floor<2>(x18E7);
          real2 f18F6#2 = Sub<real2>(x18E7,nd18F4);
          int{2} n18F8#2 = RealToInt<2>(nd18F4);
          int t118FA#4 = -1;
          int t218FC#1 = Index<int{2},0>(n18F8);
          int ix18FE#4 = Add<int>(t118FA,t218FC);
          int t21900#4 = Index<int{2},1>(n18F8);
          int iy1902#1 = Add<int>(t118FA,t21900);
          int n01905#8 = 21;
          int t1906#1 = Mul<int>(n01905,iy1902);
          int index1907#1 = Add<int>(ix18FE,t1906);
          addr(IMAGE2D<float>) imgBaseAddr1908#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1904#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1907);
          real4 v0190E#1 = LoadVoxels<IMAGE2D<float>,4>(a1904);
          int iy1910#1 = Add<int>(_t13B0,t21900);
          int t1914#1 = Mul<int>(n01905,iy1910);
          int index1915#1 = Add<int>(ix18FE,t1914);
          addr(IMAGE2D<float>) a1912#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1915);
          real4 v1191C#1 = LoadVoxels<IMAGE2D<float>,4>(a1912);
          int iy191E#1 = Add<int>(_t13B4,t21900);
          int t1922#1 = Mul<int>(n01905,iy191E);
          int index1923#1 = Add<int>(ix18FE,t1922);
          addr(IMAGE2D<float>) a1920#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1923);
          real4 v2192A#1 = LoadVoxels<IMAGE2D<float>,4>(a1920);
          int iy192C#1 = Add<int>(_t138C,t21900);
          int t1930#1 = Mul<int>(n01905,iy192C);
          int index1931#1 = Add<int>(ix18FE,t1930);
          addr(IMAGE2D<float>) a192E#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1931);
          real4 v31938#1 = LoadVoxels<IMAGE2D<float>,4>(a192E);
          real fy193A#4 = Index<real2,1>(f18F6);
          real t3193C#1 = Add<real>(fy193A,_t1388);
          real t1193E#1 = Sub<real>(fy193A,_t1388);
          real t01940#1 = Sub<real>(fy193A,_t138A);
          real4 a1942#3 = <real4>[t3193C,fy193A,t1193E,t01940];
          real _f1955#2 = 0.133333333333e1;
          real _f1956#2 = 0.666666666667e0;
          real4 a01945#4 = <real4>[_f1955,_f1956,_f1956,_f1955];
          real _f1951#1 = -0.2e1;
          real _f1952#2 = 0.0;
          real4 a11946#4 = <real4>[_f1951,_f1952,_f1952,_t138A];
          real _f194E#2 = -0.1e1;
          real4 a21947#4 = <real4>[_t1388,_f194E,_f194E,_t1388];
          real _f1949#1 = -0.166666666667e0;
          real _f194A#1 = 0.5e0;
          real _f194B#1 = -0.5e0;
          real _f194C#1 = 0.166666666667e0;
          real4 a31948#4 = <real4>[_f1949,_f194A,_f194B,_f194C];
          real4 prod31959#1 = Mul<real4>(a1942,a31948);
          real4 sum2195A#1 = Add<real4>(a21947,prod31959);
          real4 prod2195B#1 = Mul<real4>(a1942,sum2195A);
          real4 sum1195C#1 = Add<real4>(a11946,prod2195B);
          real4 prod1195D#1 = Mul<real4>(a1942,sum1195C);
          real4 hy1944#1 = Add<real4>(a01945,prod1195D);
          real fx1978#4 = Index<real2,0>(f18F6);
          real t3197A#1 = Add<real>(fx1978,_t1388);
          real t1197C#1 = Sub<real>(fx1978,_t1388);
          real t0197E#1 = Sub<real>(fx1978,_t138A);
          real4 a1980#3 = <real4>[t3197A,fx1978,t1197C,t0197E];
          real4 prod31997#1 = Mul<real4>(a1980,a31948);
          real4 sum21998#1 = Add<real4>(a21947,prod31997);
          real4 prod21999#1 = Mul<real4>(a1980,sum21998);
          real4 sum1199A#1 = Add<real4>(a11946,prod21999);
          real4 prod1199B#1 = Mul<real4>(a1980,sum1199A);
          real4 hx1982#4 = Add<real4>(a01945,prod1199B);
          real t019B6#1 = Dot<4>(v0190E,hx1982);
          real t119B8#1 = Dot<4>(v1191C,hx1982);
          real t219BA#1 = Dot<4>(v2192A,hx1982);
          real t319BC#1 = Dot<4>(v31938,hx1982);
          real4 tv19BE#1 = <real4>[t019B6,t119B8,t219BA,t319BC];
          real _t19C0#1 = Dot<4>(hy1944,tv19BE);
          real2 x19C2#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v03133D);
          real2 nd19C4#2 = Floor<2>(x19C2);
          real2 f19C6#2 = Sub<real2>(x19C2,nd19C4);
          int{2} n19C8#2 = RealToInt<2>(nd19C4);
          int t219CA#1 = Index<int{2},0>(n19C8);
          int ix19CC#4 = Add<int>(t118FA,t219CA);
          int t219CE#4 = Index<int{2},1>(n19C8);
          int iy19D0#1 = Add<int>(t118FA,t219CE);
          int t19D4#1 = Mul<int>(n01905,iy19D0);
          int index19D5#1 = Add<int>(ix19CC,t19D4);
          addr(IMAGE2D<int>) imgBaseAddr19D6#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a19D2#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19D5);
          real4 v019DC#1 = LoadVoxels<IMAGE2D<int>,4>(a19D2);
          int iy19DE#1 = Add<int>(_t13B0,t219CE);
          int t19E2#1 = Mul<int>(n01905,iy19DE);
          int index19E3#1 = Add<int>(ix19CC,t19E2);
          addr(IMAGE2D<int>) a19E0#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19E3);
          real4 v119EA#1 = LoadVoxels<IMAGE2D<int>,4>(a19E0);
          int iy19EC#1 = Add<int>(_t13B4,t219CE);
          int t19F0#1 = Mul<int>(n01905,iy19EC);
          int index19F1#1 = Add<int>(ix19CC,t19F0);
          addr(IMAGE2D<int>) a19EE#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19F1);
          real4 v219F8#1 = LoadVoxels<IMAGE2D<int>,4>(a19EE);
          int iy19FA#1 = Add<int>(_t138C,t219CE);
          int t19FE#1 = Mul<int>(n01905,iy19FA);
          int index19FF#1 = Add<int>(ix19CC,t19FE);
          addr(IMAGE2D<int>) a19FC#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19FF);
          real4 v31A06#1 = LoadVoxels<IMAGE2D<int>,4>(a19FC);
          real fy1A08#4 = Index<real2,1>(f19C6);
          real t31A0A#1 = Add<real>(fy1A08,_t1388);
          real t11A0C#1 = Sub<real>(fy1A08,_t1388);
          real t01A0E#1 = Sub<real>(fy1A08,_t138A);
          real4 a1A10#3 = <real4>[t31A0A,fy1A08,t11A0C,t01A0E];
          real4 prod31A27#1 = Mul<real4>(a1A10,a31948);
          real4 sum21A28#1 = Add<real4>(a21947,prod31A27);
          real4 prod21A29#1 = Mul<real4>(a1A10,sum21A28);
          real4 sum11A2A#1 = Add<real4>(a11946,prod21A29);
          real4 prod11A2B#1 = Mul<real4>(a1A10,sum11A2A);
          real4 hy1A12#1 = Add<real4>(a01945,prod11A2B);
          real fx1A46#4 = Index<real2,0>(f19C6);
          real t31A48#1 = Add<real>(fx1A46,_t1388);
          real t11A4A#1 = Sub<real>(fx1A46,_t1388);
          real t01A4C#1 = Sub<real>(fx1A46,_t138A);
          real4 a1A4E#3 = <real4>[t31A48,fx1A46,t11A4A,t01A4C];
          real4 prod31A65#1 = Mul<real4>(a1A4E,a31948);
          real4 sum21A66#1 = Add<real4>(a21947,prod31A65);
          real4 prod21A67#1 = Mul<real4>(a1A4E,sum21A66);
          real4 sum11A68#1 = Add<real4>(a11946,prod21A67);
          real4 prod11A69#1 = Mul<real4>(a1A4E,sum11A68);
          real4 hx1A50#4 = Add<real4>(a01945,prod11A69);
          real t01A84#1 = Dot<4>(v019DC,hx1A50);
          real t11A86#1 = Dot<4>(v119EA,hx1A50);
          real t21A88#1 = Dot<4>(v219F8,hx1A50);
          real t31A8A#1 = Dot<4>(v31A06,hx1A50);
          real4 tv1A8C#1 = <real4>[t01A84,t11A86,t21A88,t31A8A];
          real _t1A8E#1 = Dot<4>(hy1A12,tv1A8C);
          real _t1A90#2 = Sub<real>(_t19C0,_t1A8E);
          real _t1A92#1 = Mul<real>(_t1A90,_t1A90);
          real score1A94#1 = Add<real>(score18DD,_t1A92);
          goto JOIN1A97
        JOIN1A97:  preds = [ASSIGN1A95,COND18F3]
          real score1A96#2 = phi(score1A94,score18DD)
          real _t1A98#1 = Dot<2>(r013A2,v04133F);
          real _t1A9A#1 = Dot<2>(r113A8,v04133F);
          real2 _t1A9C#1 = <real2>[_t1A98,_t1A9A];
          real2 pos1A9E#1 = Add<real2>(_t1A9C,_t13B8);
          real2 x1AA0#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1A9E);
          bool _t1AA2#1 = Inside<IMAGE2D<float>,2>(x1AA0,_t132F);
          if _t1AA2 then goto ASSIGN1AA6 else goto ASSIGN24E6
        ASSIGN1AA6:  preds = [COND1AA4]
          real2 x1AA5#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v04133F);
          bool _t1AA7#1 = Inside<IMAGE2D<int>,2>(x1AA5,_t132B);
          goto JOIN1AAB
        JOIN1AAB:  preds = [ASSIGN1AA8,ASSIGN24E6]
          bool _t1AA9#1 = phi(_t1AA7,_t1AAA)
          if _t1AA9 then goto ASSIGN1AAE else goto JOIN1C50
        ASSIGN1AAE:  preds = [COND1AAC]
          real2 nd1AAD#2 = Floor<2>(x1AA0);
          real2 f1AAF#2 = Sub<real2>(x1AA0,nd1AAD);
          int{2} n1AB1#2 = RealToInt<2>(nd1AAD);
          int t11AB3#4 = -1;
          int t21AB5#1 = Index<int{2},0>(n1AB1);
          int ix1AB7#4 = Add<int>(t11AB3,t21AB5);
          int t21AB9#4 = Index<int{2},1>(n1AB1);
          int iy1ABB#1 = Add<int>(t11AB3,t21AB9);
          int n01ABE#8 = 21;
          int t1ABF#1 = Mul<int>(n01ABE,iy1ABB);
          int index1AC0#1 = Add<int>(ix1AB7,t1ABF);
          addr(IMAGE2D<float>) imgBaseAddr1AC1#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1ABD#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1AC0);
          real4 v01AC7#1 = LoadVoxels<IMAGE2D<float>,4>(a1ABD);
          int iy1AC9#1 = Add<int>(_t13B0,t21AB9);
          int t1ACD#1 = Mul<int>(n01ABE,iy1AC9);
          int index1ACE#1 = Add<int>(ix1AB7,t1ACD);
          addr(IMAGE2D<float>) a1ACB#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1ACE);
          real4 v11AD5#1 = LoadVoxels<IMAGE2D<float>,4>(a1ACB);
          int iy1AD7#1 = Add<int>(_t13B4,t21AB9);
          int t1ADB#1 = Mul<int>(n01ABE,iy1AD7);
          int index1ADC#1 = Add<int>(ix1AB7,t1ADB);
          addr(IMAGE2D<float>) a1AD9#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1ADC);
          real4 v21AE3#1 = LoadVoxels<IMAGE2D<float>,4>(a1AD9);
          int iy1AE5#1 = Add<int>(_t138C,t21AB9);
          int t1AE9#1 = Mul<int>(n01ABE,iy1AE5);
          int index1AEA#1 = Add<int>(ix1AB7,t1AE9);
          addr(IMAGE2D<float>) a1AE7#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1AEA);
          real4 v31AF1#1 = LoadVoxels<IMAGE2D<float>,4>(a1AE7);
          real fy1AF3#4 = Index<real2,1>(f1AAF);
          real t31AF5#1 = Add<real>(fy1AF3,_t1388);
          real t11AF7#1 = Sub<real>(fy1AF3,_t1388);
          real t01AF9#1 = Sub<real>(fy1AF3,_t138A);
          real4 a1AFB#3 = <real4>[t31AF5,fy1AF3,t11AF7,t01AF9];
          real _f1B0E#2 = 0.133333333333e1;
          real _f1B0F#2 = 0.666666666667e0;
          real4 a01AFE#4 = <real4>[_f1B0E,_f1B0F,_f1B0F,_f1B0E];
          real _f1B0A#1 = -0.2e1;
          real _f1B0B#2 = 0.0;
          real4 a11AFF#4 = <real4>[_f1B0A,_f1B0B,_f1B0B,_t138A];
          real _f1B07#2 = -0.1e1;
          real4 a21B00#4 = <real4>[_t1388,_f1B07,_f1B07,_t1388];
          real _f1B02#1 = -0.166666666667e0;
          real _f1B03#1 = 0.5e0;
          real _f1B04#1 = -0.5e0;
          real _f1B05#1 = 0.166666666667e0;
          real4 a31B01#4 = <real4>[_f1B02,_f1B03,_f1B04,_f1B05];
          real4 prod31B12#1 = Mul<real4>(a1AFB,a31B01);
          real4 sum21B13#1 = Add<real4>(a21B00,prod31B12);
          real4 prod21B14#1 = Mul<real4>(a1AFB,sum21B13);
          real4 sum11B15#1 = Add<real4>(a11AFF,prod21B14);
          real4 prod11B16#1 = Mul<real4>(a1AFB,sum11B15);
          real4 hy1AFD#1 = Add<real4>(a01AFE,prod11B16);
          real fx1B31#4 = Index<real2,0>(f1AAF);
          real t31B33#1 = Add<real>(fx1B31,_t1388);
          real t11B35#1 = Sub<real>(fx1B31,_t1388);
          real t01B37#1 = Sub<real>(fx1B31,_t138A);
          real4 a1B39#3 = <real4>[t31B33,fx1B31,t11B35,t01B37];
          real4 prod31B50#1 = Mul<real4>(a1B39,a31B01);
          real4 sum21B51#1 = Add<real4>(a21B00,prod31B50);
          real4 prod21B52#1 = Mul<real4>(a1B39,sum21B51);
          real4 sum11B53#1 = Add<real4>(a11AFF,prod21B52);
          real4 prod11B54#1 = Mul<real4>(a1B39,sum11B53);
          real4 hx1B3B#4 = Add<real4>(a01AFE,prod11B54);
          real t01B6F#1 = Dot<4>(v01AC7,hx1B3B);
          real t11B71#1 = Dot<4>(v11AD5,hx1B3B);
          real t21B73#1 = Dot<4>(v21AE3,hx1B3B);
          real t31B75#1 = Dot<4>(v31AF1,hx1B3B);
          real4 tv1B77#1 = <real4>[t01B6F,t11B71,t21B73,t31B75];
          real _t1B79#1 = Dot<4>(hy1AFD,tv1B77);
          real2 x1B7B#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v04133F);
          real2 nd1B7D#2 = Floor<2>(x1B7B);
          real2 f1B7F#2 = Sub<real2>(x1B7B,nd1B7D);
          int{2} n1B81#2 = RealToInt<2>(nd1B7D);
          int t21B83#1 = Index<int{2},0>(n1B81);
          int ix1B85#4 = Add<int>(t11AB3,t21B83);
          int t21B87#4 = Index<int{2},1>(n1B81);
          int iy1B89#1 = Add<int>(t11AB3,t21B87);
          int t1B8D#1 = Mul<int>(n01ABE,iy1B89);
          int index1B8E#1 = Add<int>(ix1B85,t1B8D);
          addr(IMAGE2D<int>) imgBaseAddr1B8F#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1B8B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1B8E);
          real4 v01B95#1 = LoadVoxels<IMAGE2D<int>,4>(a1B8B);
          int iy1B97#1 = Add<int>(_t13B0,t21B87);
          int t1B9B#1 = Mul<int>(n01ABE,iy1B97);
          int index1B9C#1 = Add<int>(ix1B85,t1B9B);
          addr(IMAGE2D<int>) a1B99#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1B9C);
          real4 v11BA3#1 = LoadVoxels<IMAGE2D<int>,4>(a1B99);
          int iy1BA5#1 = Add<int>(_t13B4,t21B87);
          int t1BA9#1 = Mul<int>(n01ABE,iy1BA5);
          int index1BAA#1 = Add<int>(ix1B85,t1BA9);
          addr(IMAGE2D<int>) a1BA7#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1BAA);
          real4 v21BB1#1 = LoadVoxels<IMAGE2D<int>,4>(a1BA7);
          int iy1BB3#1 = Add<int>(_t138C,t21B87);
          int t1BB7#1 = Mul<int>(n01ABE,iy1BB3);
          int index1BB8#1 = Add<int>(ix1B85,t1BB7);
          addr(IMAGE2D<int>) a1BB5#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1BB8);
          real4 v31BBF#1 = LoadVoxels<IMAGE2D<int>,4>(a1BB5);
          real fy1BC1#4 = Index<real2,1>(f1B7F);
          real t31BC3#1 = Add<real>(fy1BC1,_t1388);
          real t11BC5#1 = Sub<real>(fy1BC1,_t1388);
          real t01BC7#1 = Sub<real>(fy1BC1,_t138A);
          real4 a1BC9#3 = <real4>[t31BC3,fy1BC1,t11BC5,t01BC7];
          real4 prod31BE0#1 = Mul<real4>(a1BC9,a31B01);
          real4 sum21BE1#1 = Add<real4>(a21B00,prod31BE0);
          real4 prod21BE2#1 = Mul<real4>(a1BC9,sum21BE1);
          real4 sum11BE3#1 = Add<real4>(a11AFF,prod21BE2);
          real4 prod11BE4#1 = Mul<real4>(a1BC9,sum11BE3);
          real4 hy1BCB#1 = Add<real4>(a01AFE,prod11BE4);
          real fx1BFF#4 = Index<real2,0>(f1B7F);
          real t31C01#1 = Add<real>(fx1BFF,_t1388);
          real t11C03#1 = Sub<real>(fx1BFF,_t1388);
          real t01C05#1 = Sub<real>(fx1BFF,_t138A);
          real4 a1C07#3 = <real4>[t31C01,fx1BFF,t11C03,t01C05];
          real4 prod31C1E#1 = Mul<real4>(a1C07,a31B01);
          real4 sum21C1F#1 = Add<real4>(a21B00,prod31C1E);
          real4 prod21C20#1 = Mul<real4>(a1C07,sum21C1F);
          real4 sum11C21#1 = Add<real4>(a11AFF,prod21C20);
          real4 prod11C22#1 = Mul<real4>(a1C07,sum11C21);
          real4 hx1C09#4 = Add<real4>(a01AFE,prod11C22);
          real t01C3D#1 = Dot<4>(v01B95,hx1C09);
          real t11C3F#1 = Dot<4>(v11BA3,hx1C09);
          real t21C41#1 = Dot<4>(v21BB1,hx1C09);
          real t31C43#1 = Dot<4>(v31BBF,hx1C09);
          real4 tv1C45#1 = <real4>[t01C3D,t11C3F,t21C41,t31C43];
          real _t1C47#1 = Dot<4>(hy1BCB,tv1C45);
          real _t1C49#2 = Sub<real>(_t1B79,_t1C47);
          real _t1C4B#1 = Mul<real>(_t1C49,_t1C49);
          real score1C4D#1 = Add<real>(score1A96,_t1C4B);
          goto JOIN1C50
        JOIN1C50:  preds = [ASSIGN1C4E,COND1AAC]
          real score1C4F#2 = phi(score1C4D,score1A96)
          if _t13BE then goto JOIN1C52 else goto JOIN1C52
        JOIN1C52:  preds = [COND1C51]
          if _t13C5 then goto ASSIGN1C55 else goto JOIN1DF7
        ASSIGN1C55:  preds = [COND1C53]
          real2 nd1C54#2 = Floor<2>(x13BC);
          real2 f1C56#2 = Sub<real2>(x13BC,nd1C54);
          int{2} n1C58#2 = RealToInt<2>(nd1C54);
          int t11C5A#4 = -1;
          int t21C5C#1 = Index<int{2},0>(n1C58);
          int ix1C5E#4 = Add<int>(t11C5A,t21C5C);
          int t21C60#4 = Index<int{2},1>(n1C58);
          int iy1C62#1 = Add<int>(t11C5A,t21C60);
          int n01C65#8 = 21;
          int t1C66#1 = Mul<int>(n01C65,iy1C62);
          int index1C67#1 = Add<int>(ix1C5E,t1C66);
          addr(IMAGE2D<float>) imgBaseAddr1C68#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1C64#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C67);
          real4 v01C6E#1 = LoadVoxels<IMAGE2D<float>,4>(a1C64);
          int iy1C70#1 = Add<int>(_t13B0,t21C60);
          int t1C74#1 = Mul<int>(n01C65,iy1C70);
          int index1C75#1 = Add<int>(ix1C5E,t1C74);
          addr(IMAGE2D<float>) a1C72#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C75);
          real4 v11C7C#1 = LoadVoxels<IMAGE2D<float>,4>(a1C72);
          int iy1C7E#1 = Add<int>(_t13B4,t21C60);
          int t1C82#1 = Mul<int>(n01C65,iy1C7E);
          int index1C83#1 = Add<int>(ix1C5E,t1C82);
          addr(IMAGE2D<float>) a1C80#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C83);
          real4 v21C8A#1 = LoadVoxels<IMAGE2D<float>,4>(a1C80);
          int iy1C8C#1 = Add<int>(_t138C,t21C60);
          int t1C90#1 = Mul<int>(n01C65,iy1C8C);
          int index1C91#1 = Add<int>(ix1C5E,t1C90);
          addr(IMAGE2D<float>) a1C8E#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C91);
          real4 v31C98#1 = LoadVoxels<IMAGE2D<float>,4>(a1C8E);
          real fy1C9A#4 = Index<real2,1>(f1C56);
          real t31C9C#1 = Add<real>(fy1C9A,_t1388);
          real t11C9E#1 = Sub<real>(fy1C9A,_t1388);
          real t01CA0#1 = Sub<real>(fy1C9A,_t138A);
          real4 a1CA2#3 = <real4>[t31C9C,fy1C9A,t11C9E,t01CA0];
          real _f1CB5#2 = 0.133333333333e1;
          real _f1CB6#2 = 0.666666666667e0;
          real4 a01CA5#4 = <real4>[_f1CB5,_f1CB6,_f1CB6,_f1CB5];
          real _f1CB1#1 = -0.2e1;
          real _f1CB2#2 = 0.0;
          real4 a11CA6#4 = <real4>[_f1CB1,_f1CB2,_f1CB2,_t138A];
          real _f1CAE#2 = -0.1e1;
          real4 a21CA7#4 = <real4>[_t1388,_f1CAE,_f1CAE,_t1388];
          real _f1CA9#1 = -0.166666666667e0;
          real _f1CAA#1 = 0.5e0;
          real _f1CAB#1 = -0.5e0;
          real _f1CAC#1 = 0.166666666667e0;
          real4 a31CA8#4 = <real4>[_f1CA9,_f1CAA,_f1CAB,_f1CAC];
          real4 prod31CB9#1 = Mul<real4>(a1CA2,a31CA8);
          real4 sum21CBA#1 = Add<real4>(a21CA7,prod31CB9);
          real4 prod21CBB#1 = Mul<real4>(a1CA2,sum21CBA);
          real4 sum11CBC#1 = Add<real4>(a11CA6,prod21CBB);
          real4 prod11CBD#1 = Mul<real4>(a1CA2,sum11CBC);
          real4 hy1CA4#1 = Add<real4>(a01CA5,prod11CBD);
          real fx1CD8#4 = Index<real2,0>(f1C56);
          real t31CDA#1 = Add<real>(fx1CD8,_t1388);
          real t11CDC#1 = Sub<real>(fx1CD8,_t1388);
          real t01CDE#1 = Sub<real>(fx1CD8,_t138A);
          real4 a1CE0#3 = <real4>[t31CDA,fx1CD8,t11CDC,t01CDE];
          real4 prod31CF7#1 = Mul<real4>(a1CE0,a31CA8);
          real4 sum21CF8#1 = Add<real4>(a21CA7,prod31CF7);
          real4 prod21CF9#1 = Mul<real4>(a1CE0,sum21CF8);
          real4 sum11CFA#1 = Add<real4>(a11CA6,prod21CF9);
          real4 prod11CFB#1 = Mul<real4>(a1CE0,sum11CFA);
          real4 hx1CE2#4 = Add<real4>(a01CA5,prod11CFB);
          real t01D16#1 = Dot<4>(v01C6E,hx1CE2);
          real t11D18#1 = Dot<4>(v11C7C,hx1CE2);
          real t21D1A#1 = Dot<4>(v21C8A,hx1CE2);
          real t31D1C#1 = Dot<4>(v31C98,hx1CE2);
          real4 tv1D1E#1 = <real4>[t01D16,t11D18,t21D1A,t31D1C];
          real _t1D20#1 = Dot<4>(hy1CA4,tv1D1E);
          real2 x1D22#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v001333);
          real2 nd1D24#2 = Floor<2>(x1D22);
          real2 f1D26#2 = Sub<real2>(x1D22,nd1D24);
          int{2} n1D28#2 = RealToInt<2>(nd1D24);
          int t21D2A#1 = Index<int{2},0>(n1D28);
          int ix1D2C#4 = Add<int>(t11C5A,t21D2A);
          int t21D2E#4 = Index<int{2},1>(n1D28);
          int iy1D30#1 = Add<int>(t11C5A,t21D2E);
          int t1D34#1 = Mul<int>(n01C65,iy1D30);
          int index1D35#1 = Add<int>(ix1D2C,t1D34);
          addr(IMAGE2D<int>) imgBaseAddr1D36#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1D32#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D35);
          real4 v01D3C#1 = LoadVoxels<IMAGE2D<int>,4>(a1D32);
          int iy1D3E#1 = Add<int>(_t13B0,t21D2E);
          int t1D42#1 = Mul<int>(n01C65,iy1D3E);
          int index1D43#1 = Add<int>(ix1D2C,t1D42);
          addr(IMAGE2D<int>) a1D40#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D43);
          real4 v11D4A#1 = LoadVoxels<IMAGE2D<int>,4>(a1D40);
          int iy1D4C#1 = Add<int>(_t13B4,t21D2E);
          int t1D50#1 = Mul<int>(n01C65,iy1D4C);
          int index1D51#1 = Add<int>(ix1D2C,t1D50);
          addr(IMAGE2D<int>) a1D4E#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D51);
          real4 v21D58#1 = LoadVoxels<IMAGE2D<int>,4>(a1D4E);
          int iy1D5A#1 = Add<int>(_t138C,t21D2E);
          int t1D5E#1 = Mul<int>(n01C65,iy1D5A);
          int index1D5F#1 = Add<int>(ix1D2C,t1D5E);
          addr(IMAGE2D<int>) a1D5C#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D5F);
          real4 v31D66#1 = LoadVoxels<IMAGE2D<int>,4>(a1D5C);
          real fy1D68#4 = Index<real2,1>(f1D26);
          real t31D6A#1 = Add<real>(fy1D68,_t1388);
          real t11D6C#1 = Sub<real>(fy1D68,_t1388);
          real t01D6E#1 = Sub<real>(fy1D68,_t138A);
          real4 a1D70#3 = <real4>[t31D6A,fy1D68,t11D6C,t01D6E];
          real4 prod31D87#1 = Mul<real4>(a1D70,a31CA8);
          real4 sum21D88#1 = Add<real4>(a21CA7,prod31D87);
          real4 prod21D89#1 = Mul<real4>(a1D70,sum21D88);
          real4 sum11D8A#1 = Add<real4>(a11CA6,prod21D89);
          real4 prod11D8B#1 = Mul<real4>(a1D70,sum11D8A);
          real4 hy1D72#1 = Add<real4>(a01CA5,prod11D8B);
          real fx1DA6#4 = Index<real2,0>(f1D26);
          real t31DA8#1 = Add<real>(fx1DA6,_t1388);
          real t11DAA#1 = Sub<real>(fx1DA6,_t1388);
          real t01DAC#1 = Sub<real>(fx1DA6,_t138A);
          real4 a1DAE#3 = <real4>[t31DA8,fx1DA6,t11DAA,t01DAC];
          real4 prod31DC5#1 = Mul<real4>(a1DAE,a31CA8);
          real4 sum21DC6#1 = Add<real4>(a21CA7,prod31DC5);
          real4 prod21DC7#1 = Mul<real4>(a1DAE,sum21DC6);
          real4 sum11DC8#1 = Add<real4>(a11CA6,prod21DC7);
          real4 prod11DC9#1 = Mul<real4>(a1DAE,sum11DC8);
          real4 hx1DB0#4 = Add<real4>(a01CA5,prod11DC9);
          real t01DE4#1 = Dot<4>(v01D3C,hx1DB0);
          real t11DE6#1 = Dot<4>(v11D4A,hx1DB0);
          real t21DE8#1 = Dot<4>(v21D58,hx1DB0);
          real t31DEA#1 = Dot<4>(v31D66,hx1DB0);
          real4 tv1DEC#1 = <real4>[t01DE4,t11DE6,t21DE8,t31DEA];
          real _t1DEE#1 = Dot<4>(hy1D72,tv1DEC);
          real _t1DF0#2 = Sub<real>(_t1D20,_t1DEE);
          real _t1DF2#1 = Mul<real>(_t1DF0,_t1DF0);
          real score1DF4#1 = Add<real>(score1C4F,_t1DF2);
          goto JOIN1DF7
        JOIN1DF7:  preds = [ASSIGN1DF5,COND1C53]
          real score1DF6#2 = phi(score1DF4,score1C4F)
          real _t1DF8#1 = Dot<2>(r013A2,v061341);
          real _t1DFA#1 = Dot<2>(r113A8,v061341);
          real2 _t1DFC#1 = <real2>[_t1DF8,_t1DFA];
          real2 pos1DFE#1 = Add<real2>(_t1DFC,_t13B8);
          real2 x1E00#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1DFE);
          bool _t1E02#1 = Inside<IMAGE2D<float>,2>(x1E00,_t132F);
          if _t1E02 then goto ASSIGN1E06 else goto ASSIGN24E5
        ASSIGN1E06:  preds = [COND1E04]
          real2 x1E05#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v061341);
          bool _t1E07#1 = Inside<IMAGE2D<int>,2>(x1E05,_t132B);
          goto JOIN1E0B
        JOIN1E0B:  preds = [ASSIGN1E08,ASSIGN24E5]
          bool _t1E09#1 = phi(_t1E07,_t1E0A)
          if _t1E09 then goto ASSIGN1E0E else goto JOIN1FB0
        ASSIGN1E0E:  preds = [COND1E0C]
          real2 nd1E0D#2 = Floor<2>(x1E00);
          real2 f1E0F#2 = Sub<real2>(x1E00,nd1E0D);
          int{2} n1E11#2 = RealToInt<2>(nd1E0D);
          int t11E13#4 = -1;
          int t21E15#1 = Index<int{2},0>(n1E11);
          int ix1E17#4 = Add<int>(t11E13,t21E15);
          int t21E19#4 = Index<int{2},1>(n1E11);
          int iy1E1B#1 = Add<int>(t11E13,t21E19);
          int n01E1E#8 = 21;
          int t1E1F#1 = Mul<int>(n01E1E,iy1E1B);
          int index1E20#1 = Add<int>(ix1E17,t1E1F);
          addr(IMAGE2D<float>) imgBaseAddr1E21#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1E1D#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E20);
          real4 v01E27#1 = LoadVoxels<IMAGE2D<float>,4>(a1E1D);
          int iy1E29#1 = Add<int>(_t13B0,t21E19);
          int t1E2D#1 = Mul<int>(n01E1E,iy1E29);
          int index1E2E#1 = Add<int>(ix1E17,t1E2D);
          addr(IMAGE2D<float>) a1E2B#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E2E);
          real4 v11E35#1 = LoadVoxels<IMAGE2D<float>,4>(a1E2B);
          int iy1E37#1 = Add<int>(_t13B4,t21E19);
          int t1E3B#1 = Mul<int>(n01E1E,iy1E37);
          int index1E3C#1 = Add<int>(ix1E17,t1E3B);
          addr(IMAGE2D<float>) a1E39#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E3C);
          real4 v21E43#1 = LoadVoxels<IMAGE2D<float>,4>(a1E39);
          int iy1E45#1 = Add<int>(_t138C,t21E19);
          int t1E49#1 = Mul<int>(n01E1E,iy1E45);
          int index1E4A#1 = Add<int>(ix1E17,t1E49);
          addr(IMAGE2D<float>) a1E47#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E4A);
          real4 v31E51#1 = LoadVoxels<IMAGE2D<float>,4>(a1E47);
          real fy1E53#4 = Index<real2,1>(f1E0F);
          real t31E55#1 = Add<real>(fy1E53,_t1388);
          real t11E57#1 = Sub<real>(fy1E53,_t1388);
          real t01E59#1 = Sub<real>(fy1E53,_t138A);
          real4 a1E5B#3 = <real4>[t31E55,fy1E53,t11E57,t01E59];
          real _f1E6E#2 = 0.133333333333e1;
          real _f1E6F#2 = 0.666666666667e0;
          real4 a01E5E#4 = <real4>[_f1E6E,_f1E6F,_f1E6F,_f1E6E];
          real _f1E6A#1 = -0.2e1;
          real _f1E6B#2 = 0.0;
          real4 a11E5F#4 = <real4>[_f1E6A,_f1E6B,_f1E6B,_t138A];
          real _f1E67#2 = -0.1e1;
          real4 a21E60#4 = <real4>[_t1388,_f1E67,_f1E67,_t1388];
          real _f1E62#1 = -0.166666666667e0;
          real _f1E63#1 = 0.5e0;
          real _f1E64#1 = -0.5e0;
          real _f1E65#1 = 0.166666666667e0;
          real4 a31E61#4 = <real4>[_f1E62,_f1E63,_f1E64,_f1E65];
          real4 prod31E72#1 = Mul<real4>(a1E5B,a31E61);
          real4 sum21E73#1 = Add<real4>(a21E60,prod31E72);
          real4 prod21E74#1 = Mul<real4>(a1E5B,sum21E73);
          real4 sum11E75#1 = Add<real4>(a11E5F,prod21E74);
          real4 prod11E76#1 = Mul<real4>(a1E5B,sum11E75);
          real4 hy1E5D#1 = Add<real4>(a01E5E,prod11E76);
          real fx1E91#4 = Index<real2,0>(f1E0F);
          real t31E93#1 = Add<real>(fx1E91,_t1388);
          real t11E95#1 = Sub<real>(fx1E91,_t1388);
          real t01E97#1 = Sub<real>(fx1E91,_t138A);
          real4 a1E99#3 = <real4>[t31E93,fx1E91,t11E95,t01E97];
          real4 prod31EB0#1 = Mul<real4>(a1E99,a31E61);
          real4 sum21EB1#1 = Add<real4>(a21E60,prod31EB0);
          real4 prod21EB2#1 = Mul<real4>(a1E99,sum21EB1);
          real4 sum11EB3#1 = Add<real4>(a11E5F,prod21EB2);
          real4 prod11EB4#1 = Mul<real4>(a1E99,sum11EB3);
          real4 hx1E9B#4 = Add<real4>(a01E5E,prod11EB4);
          real t01ECF#1 = Dot<4>(v01E27,hx1E9B);
          real t11ED1#1 = Dot<4>(v11E35,hx1E9B);
          real t21ED3#1 = Dot<4>(v21E43,hx1E9B);
          real t31ED5#1 = Dot<4>(v31E51,hx1E9B);
          real4 tv1ED7#1 = <real4>[t01ECF,t11ED1,t21ED3,t31ED5];
          real _t1ED9#1 = Dot<4>(hy1E5D,tv1ED7);
          real2 x1EDB#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v061341);
          real2 nd1EDD#2 = Floor<2>(x1EDB);
          real2 f1EDF#2 = Sub<real2>(x1EDB,nd1EDD);
          int{2} n1EE1#2 = RealToInt<2>(nd1EDD);
          int t21EE3#1 = Index<int{2},0>(n1EE1);
          int ix1EE5#4 = Add<int>(t11E13,t21EE3);
          int t21EE7#4 = Index<int{2},1>(n1EE1);
          int iy1EE9#1 = Add<int>(t11E13,t21EE7);
          int t1EED#1 = Mul<int>(n01E1E,iy1EE9);
          int index1EEE#1 = Add<int>(ix1EE5,t1EED);
          addr(IMAGE2D<int>) imgBaseAddr1EEF#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1EEB#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1EEE);
          real4 v01EF5#1 = LoadVoxels<IMAGE2D<int>,4>(a1EEB);
          int iy1EF7#1 = Add<int>(_t13B0,t21EE7);
          int t1EFB#1 = Mul<int>(n01E1E,iy1EF7);
          int index1EFC#1 = Add<int>(ix1EE5,t1EFB);
          addr(IMAGE2D<int>) a1EF9#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1EFC);
          real4 v11F03#1 = LoadVoxels<IMAGE2D<int>,4>(a1EF9);
          int iy1F05#1 = Add<int>(_t13B4,t21EE7);
          int t1F09#1 = Mul<int>(n01E1E,iy1F05);
          int index1F0A#1 = Add<int>(ix1EE5,t1F09);
          addr(IMAGE2D<int>) a1F07#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1F0A);
          real4 v21F11#1 = LoadVoxels<IMAGE2D<int>,4>(a1F07);
          int iy1F13#1 = Add<int>(_t138C,t21EE7);
          int t1F17#1 = Mul<int>(n01E1E,iy1F13);
          int index1F18#1 = Add<int>(ix1EE5,t1F17);
          addr(IMAGE2D<int>) a1F15#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1F18);
          real4 v31F1F#1 = LoadVoxels<IMAGE2D<int>,4>(a1F15);
          real fy1F21#4 = Index<real2,1>(f1EDF);
          real t31F23#1 = Add<real>(fy1F21,_t1388);
          real t11F25#1 = Sub<real>(fy1F21,_t1388);
          real t01F27#1 = Sub<real>(fy1F21,_t138A);
          real4 a1F29#3 = <real4>[t31F23,fy1F21,t11F25,t01F27];
          real4 prod31F40#1 = Mul<real4>(a1F29,a31E61);
          real4 sum21F41#1 = Add<real4>(a21E60,prod31F40);
          real4 prod21F42#1 = Mul<real4>(a1F29,sum21F41);
          real4 sum11F43#1 = Add<real4>(a11E5F,prod21F42);
          real4 prod11F44#1 = Mul<real4>(a1F29,sum11F43);
          real4 hy1F2B#1 = Add<real4>(a01E5E,prod11F44);
          real fx1F5F#4 = Index<real2,0>(f1EDF);
          real t31F61#1 = Add<real>(fx1F5F,_t1388);
          real t11F63#1 = Sub<real>(fx1F5F,_t1388);
          real t01F65#1 = Sub<real>(fx1F5F,_t138A);
          real4 a1F67#3 = <real4>[t31F61,fx1F5F,t11F63,t01F65];
          real4 prod31F7E#1 = Mul<real4>(a1F67,a31E61);
          real4 sum21F7F#1 = Add<real4>(a21E60,prod31F7E);
          real4 prod21F80#1 = Mul<real4>(a1F67,sum21F7F);
          real4 sum11F81#1 = Add<real4>(a11E5F,prod21F80);
          real4 prod11F82#1 = Mul<real4>(a1F67,sum11F81);
          real4 hx1F69#4 = Add<real4>(a01E5E,prod11F82);
          real t01F9D#1 = Dot<4>(v01EF5,hx1F69);
          real t11F9F#1 = Dot<4>(v11F03,hx1F69);
          real t21FA1#1 = Dot<4>(v21F11,hx1F69);
          real t31FA3#1 = Dot<4>(v31F1F,hx1F69);
          real4 tv1FA5#1 = <real4>[t01F9D,t11F9F,t21FA1,t31FA3];
          real _t1FA7#1 = Dot<4>(hy1F2B,tv1FA5);
          real _t1FA9#2 = Sub<real>(_t1ED9,_t1FA7);
          real _t1FAB#1 = Mul<real>(_t1FA9,_t1FA9);
          real score1FAD#1 = Add<real>(score1DF6,_t1FAB);
          goto JOIN1FB0
        JOIN1FB0:  preds = [ASSIGN1FAE,COND1E0C]
          real score1FAF#2 = phi(score1FAD,score1DF6)
          real _t1FB1#1 = Dot<2>(r013A2,v071343);
          real _t1FB3#1 = Dot<2>(r113A8,v071343);
          real2 _t1FB5#1 = <real2>[_t1FB1,_t1FB3];
          real2 pos1FB7#1 = Add<real2>(_t1FB5,_t13B8);
          real2 x1FB9#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1FB7);
          bool _t1FBB#1 = Inside<IMAGE2D<float>,2>(x1FB9,_t132F);
          if _t1FBB then goto ASSIGN1FBF else goto ASSIGN24E4
        ASSIGN1FBF:  preds = [COND1FBD]
          real2 x1FBE#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v071343);
          bool _t1FC0#1 = Inside<IMAGE2D<int>,2>(x1FBE,_t132B);
          goto JOIN1FC4
        JOIN1FC4:  preds = [ASSIGN1FC1,ASSIGN24E4]
          bool _t1FC2#1 = phi(_t1FC0,_t1FC3)
          if _t1FC2 then goto ASSIGN1FC7 else goto JOIN2169
        ASSIGN1FC7:  preds = [COND1FC5]
          real2 nd1FC6#2 = Floor<2>(x1FB9);
          real2 f1FC8#2 = Sub<real2>(x1FB9,nd1FC6);
          int{2} n1FCA#2 = RealToInt<2>(nd1FC6);
          int t11FCC#4 = -1;
          int t21FCE#1 = Index<int{2},0>(n1FCA);
          int ix1FD0#4 = Add<int>(t11FCC,t21FCE);
          int t21FD2#4 = Index<int{2},1>(n1FCA);
          int iy1FD4#1 = Add<int>(t11FCC,t21FD2);
          int n01FD7#8 = 21;
          int t1FD8#1 = Mul<int>(n01FD7,iy1FD4);
          int index1FD9#1 = Add<int>(ix1FD0,t1FD8);
          addr(IMAGE2D<float>) imgBaseAddr1FDA#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1FD6#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index1FD9);
          real4 v01FE0#1 = LoadVoxels<IMAGE2D<float>,4>(a1FD6);
          int iy1FE2#1 = Add<int>(_t13B0,t21FD2);
          int t1FE6#1 = Mul<int>(n01FD7,iy1FE2);
          int index1FE7#1 = Add<int>(ix1FD0,t1FE6);
          addr(IMAGE2D<float>) a1FE4#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index1FE7);
          real4 v11FEE#1 = LoadVoxels<IMAGE2D<float>,4>(a1FE4);
          int iy1FF0#1 = Add<int>(_t13B4,t21FD2);
          int t1FF4#1 = Mul<int>(n01FD7,iy1FF0);
          int index1FF5#1 = Add<int>(ix1FD0,t1FF4);
          addr(IMAGE2D<float>) a1FF2#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index1FF5);
          real4 v21FFC#1 = LoadVoxels<IMAGE2D<float>,4>(a1FF2);
          int iy1FFE#1 = Add<int>(_t138C,t21FD2);
          int t2002#1 = Mul<int>(n01FD7,iy1FFE);
          int index2003#1 = Add<int>(ix1FD0,t2002);
          addr(IMAGE2D<float>) a2000#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index2003);
          real4 v3200A#1 = LoadVoxels<IMAGE2D<float>,4>(a2000);
          real fy200C#4 = Index<real2,1>(f1FC8);
          real t3200E#1 = Add<real>(fy200C,_t1388);
          real t12010#1 = Sub<real>(fy200C,_t1388);
          real t02012#1 = Sub<real>(fy200C,_t138A);
          real4 a2014#3 = <real4>[t3200E,fy200C,t12010,t02012];
          real _f2027#2 = 0.133333333333e1;
          real _f2028#2 = 0.666666666667e0;
          real4 a02017#4 = <real4>[_f2027,_f2028,_f2028,_f2027];
          real _f2023#1 = -0.2e1;
          real _f2024#2 = 0.0;
          real4 a12018#4 = <real4>[_f2023,_f2024,_f2024,_t138A];
          real _f2020#2 = -0.1e1;
          real4 a22019#4 = <real4>[_t1388,_f2020,_f2020,_t1388];
          real _f201B#1 = -0.166666666667e0;
          real _f201C#1 = 0.5e0;
          real _f201D#1 = -0.5e0;
          real _f201E#1 = 0.166666666667e0;
          real4 a3201A#4 = <real4>[_f201B,_f201C,_f201D,_f201E];
          real4 prod3202B#1 = Mul<real4>(a2014,a3201A);
          real4 sum2202C#1 = Add<real4>(a22019,prod3202B);
          real4 prod2202D#1 = Mul<real4>(a2014,sum2202C);
          real4 sum1202E#1 = Add<real4>(a12018,prod2202D);
          real4 prod1202F#1 = Mul<real4>(a2014,sum1202E);
          real4 hy2016#1 = Add<real4>(a02017,prod1202F);
          real fx204A#4 = Index<real2,0>(f1FC8);
          real t3204C#1 = Add<real>(fx204A,_t1388);
          real t1204E#1 = Sub<real>(fx204A,_t1388);
          real t02050#1 = Sub<real>(fx204A,_t138A);
          real4 a2052#3 = <real4>[t3204C,fx204A,t1204E,t02050];
          real4 prod32069#1 = Mul<real4>(a2052,a3201A);
          real4 sum2206A#1 = Add<real4>(a22019,prod32069);
          real4 prod2206B#1 = Mul<real4>(a2052,sum2206A);
          real4 sum1206C#1 = Add<real4>(a12018,prod2206B);
          real4 prod1206D#1 = Mul<real4>(a2052,sum1206C);
          real4 hx2054#4 = Add<real4>(a02017,prod1206D);
          real t02088#1 = Dot<4>(v01FE0,hx2054);
          real t1208A#1 = Dot<4>(v11FEE,hx2054);
          real t2208C#1 = Dot<4>(v21FFC,hx2054);
          real t3208E#1 = Dot<4>(v3200A,hx2054);
          real4 tv2090#1 = <real4>[t02088,t1208A,t2208C,t3208E];
          real _t2092#1 = Dot<4>(hy2016,tv2090);
          real2 x2094#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v071343);
          real2 nd2096#2 = Floor<2>(x2094);
          real2 f2098#2 = Sub<real2>(x2094,nd2096);
          int{2} n209A#2 = RealToInt<2>(nd2096);
          int t2209C#1 = Index<int{2},0>(n209A);
          int ix209E#4 = Add<int>(t11FCC,t2209C);
          int t220A0#4 = Index<int{2},1>(n209A);
          int iy20A2#1 = Add<int>(t11FCC,t220A0);
          int t20A6#1 = Mul<int>(n01FD7,iy20A2);
          int index20A7#1 = Add<int>(ix209E,t20A6);
          addr(IMAGE2D<int>) imgBaseAddr20A8#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a20A4#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20A7);
          real4 v020AE#1 = LoadVoxels<IMAGE2D<int>,4>(a20A4);
          int iy20B0#1 = Add<int>(_t13B0,t220A0);
          int t20B4#1 = Mul<int>(n01FD7,iy20B0);
          int index20B5#1 = Add<int>(ix209E,t20B4);
          addr(IMAGE2D<int>) a20B2#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20B5);
          real4 v120BC#1 = LoadVoxels<IMAGE2D<int>,4>(a20B2);
          int iy20BE#1 = Add<int>(_t13B4,t220A0);
          int t20C2#1 = Mul<int>(n01FD7,iy20BE);
          int index20C3#1 = Add<int>(ix209E,t20C2);
          addr(IMAGE2D<int>) a20C0#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20C3);
          real4 v220CA#1 = LoadVoxels<IMAGE2D<int>,4>(a20C0);
          int iy20CC#1 = Add<int>(_t138C,t220A0);
          int t20D0#1 = Mul<int>(n01FD7,iy20CC);
          int index20D1#1 = Add<int>(ix209E,t20D0);
          addr(IMAGE2D<int>) a20CE#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20D1);
          real4 v320D8#1 = LoadVoxels<IMAGE2D<int>,4>(a20CE);
          real fy20DA#4 = Index<real2,1>(f2098);
          real t320DC#1 = Add<real>(fy20DA,_t1388);
          real t120DE#1 = Sub<real>(fy20DA,_t1388);
          real t020E0#1 = Sub<real>(fy20DA,_t138A);
          real4 a20E2#3 = <real4>[t320DC,fy20DA,t120DE,t020E0];
          real4 prod320F9#1 = Mul<real4>(a20E2,a3201A);
          real4 sum220FA#1 = Add<real4>(a22019,prod320F9);
          real4 prod220FB#1 = Mul<real4>(a20E2,sum220FA);
          real4 sum120FC#1 = Add<real4>(a12018,prod220FB);
          real4 prod120FD#1 = Mul<real4>(a20E2,sum120FC);
          real4 hy20E4#1 = Add<real4>(a02017,prod120FD);
          real fx2118#4 = Index<real2,0>(f2098);
          real t3211A#1 = Add<real>(fx2118,_t1388);
          real t1211C#1 = Sub<real>(fx2118,_t1388);
          real t0211E#1 = Sub<real>(fx2118,_t138A);
          real4 a2120#3 = <real4>[t3211A,fx2118,t1211C,t0211E];
          real4 prod32137#1 = Mul<real4>(a2120,a3201A);
          real4 sum22138#1 = Add<real4>(a22019,prod32137);
          real4 prod22139#1 = Mul<real4>(a2120,sum22138);
          real4 sum1213A#1 = Add<real4>(a12018,prod22139);
          real4 prod1213B#1 = Mul<real4>(a2120,sum1213A);
          real4 hx2122#4 = Add<real4>(a02017,prod1213B);
          real t02156#1 = Dot<4>(v020AE,hx2122);
          real t12158#1 = Dot<4>(v120BC,hx2122);
          real t2215A#1 = Dot<4>(v220CA,hx2122);
          real t3215C#1 = Dot<4>(v320D8,hx2122);
          real4 tv215E#1 = <real4>[t02156,t12158,t2215A,t3215C];
          real _t2160#1 = Dot<4>(hy20E4,tv215E);
          real _t2162#2 = Sub<real>(_t2092,_t2160);
          real _t2164#1 = Mul<real>(_t2162,_t2162);
          real score2166#1 = Add<real>(score1FAF,_t2164);
          goto JOIN2169
        JOIN2169:  preds = [ASSIGN2167,COND1FC5]
          real score2168#2 = phi(score2166,score1FAF)
          real _t216A#1 = Dot<2>(r013A2,v081345);
          real _t216C#1 = Dot<2>(r113A8,v081345);
          real2 _t216E#1 = <real2>[_t216A,_t216C];
          real2 pos2170#1 = Add<real2>(_t216E,_t13B8);
          real2 x2172#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos2170);
          bool _t2174#1 = Inside<IMAGE2D<float>,2>(x2172,_t132F);
          if _t2174 then goto ASSIGN2178 else goto ASSIGN24E3
        ASSIGN2178:  preds = [COND2176]
          real2 x2177#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v081345);
          bool _t2179#1 = Inside<IMAGE2D<int>,2>(x2177,_t132B);
          goto JOIN217D
        JOIN217D:  preds = [ASSIGN217A,ASSIGN24E3]
          bool _t217B#1 = phi(_t2179,_t217C)
          if _t217B then goto ASSIGN2180 else goto JOIN2322
        ASSIGN2180:  preds = [COND217E]
          real2 nd217F#2 = Floor<2>(x2172);
          real2 f2181#2 = Sub<real2>(x2172,nd217F);
          int{2} n2183#2 = RealToInt<2>(nd217F);
          int t12185#4 = -1;
          int t22187#1 = Index<int{2},0>(n2183);
          int ix2189#4 = Add<int>(t12185,t22187);
          int t2218B#4 = Index<int{2},1>(n2183);
          int iy218D#1 = Add<int>(t12185,t2218B);
          int n02190#8 = 21;
          int t2191#1 = Mul<int>(n02190,iy218D);
          int index2192#1 = Add<int>(ix2189,t2191);
          addr(IMAGE2D<float>) imgBaseAddr2193#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a218F#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index2192);
          real4 v02199#1 = LoadVoxels<IMAGE2D<float>,4>(a218F);
          int iy219B#1 = Add<int>(_t13B0,t2218B);
          int t219F#1 = Mul<int>(n02190,iy219B);
          int index21A0#1 = Add<int>(ix2189,t219F);
          addr(IMAGE2D<float>) a219D#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index21A0);
          real4 v121A7#1 = LoadVoxels<IMAGE2D<float>,4>(a219D);
          int iy21A9#1 = Add<int>(_t13B4,t2218B);
          int t21AD#1 = Mul<int>(n02190,iy21A9);
          int index21AE#1 = Add<int>(ix2189,t21AD);
          addr(IMAGE2D<float>) a21AB#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index21AE);
          real4 v221B5#1 = LoadVoxels<IMAGE2D<float>,4>(a21AB);
          int iy21B7#1 = Add<int>(_t138C,t2218B);
          int t21BB#1 = Mul<int>(n02190,iy21B7);
          int index21BC#1 = Add<int>(ix2189,t21BB);
          addr(IMAGE2D<float>) a21B9#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index21BC);
          real4 v321C3#1 = LoadVoxels<IMAGE2D<float>,4>(a21B9);
          real fy21C5#4 = Index<real2,1>(f2181);
          real t321C7#1 = Add<real>(fy21C5,_t1388);
          real t121C9#1 = Sub<real>(fy21C5,_t1388);
          real t021CB#1 = Sub<real>(fy21C5,_t138A);
          real4 a21CD#3 = <real4>[t321C7,fy21C5,t121C9,t021CB];
          real _f21E0#2 = 0.133333333333e1;
          real _f21E1#2 = 0.666666666667e0;
          real4 a021D0#4 = <real4>[_f21E0,_f21E1,_f21E1,_f21E0];
          real _f21DC#1 = -0.2e1;
          real _f21DD#2 = 0.0;
          real4 a121D1#4 = <real4>[_f21DC,_f21DD,_f21DD,_t138A];
          real _f21D9#2 = -0.1e1;
          real4 a221D2#4 = <real4>[_t1388,_f21D9,_f21D9,_t1388];
          real _f21D4#1 = -0.166666666667e0;
          real _f21D5#1 = 0.5e0;
          real _f21D6#1 = -0.5e0;
          real _f21D7#1 = 0.166666666667e0;
          real4 a321D3#4 = <real4>[_f21D4,_f21D5,_f21D6,_f21D7];
          real4 prod321E4#1 = Mul<real4>(a21CD,a321D3);
          real4 sum221E5#1 = Add<real4>(a221D2,prod321E4);
          real4 prod221E6#1 = Mul<real4>(a21CD,sum221E5);
          real4 sum121E7#1 = Add<real4>(a121D1,prod221E6);
          real4 prod121E8#1 = Mul<real4>(a21CD,sum121E7);
          real4 hy21CF#1 = Add<real4>(a021D0,prod121E8);
          real fx2203#4 = Index<real2,0>(f2181);
          real t32205#1 = Add<real>(fx2203,_t1388);
          real t12207#1 = Sub<real>(fx2203,_t1388);
          real t02209#1 = Sub<real>(fx2203,_t138A);
          real4 a220B#3 = <real4>[t32205,fx2203,t12207,t02209];
          real4 prod32222#1 = Mul<real4>(a220B,a321D3);
          real4 sum22223#1 = Add<real4>(a221D2,prod32222);
          real4 prod22224#1 = Mul<real4>(a220B,sum22223);
          real4 sum12225#1 = Add<real4>(a121D1,prod22224);
          real4 prod12226#1 = Mul<real4>(a220B,sum12225);
          real4 hx220D#4 = Add<real4>(a021D0,prod12226);
          real t02241#1 = Dot<4>(v02199,hx220D);
          real t12243#1 = Dot<4>(v121A7,hx220D);
          real t22245#1 = Dot<4>(v221B5,hx220D);
          real t32247#1 = Dot<4>(v321C3,hx220D);
          real4 tv2249#1 = <real4>[t02241,t12243,t22245,t32247];
          real _t224B#1 = Dot<4>(hy21CF,tv2249);
          real2 x224D#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v081345);
          real2 nd224F#2 = Floor<2>(x224D);
          real2 f2251#2 = Sub<real2>(x224D,nd224F);
          int{2} n2253#2 = RealToInt<2>(nd224F);
          int t22255#1 = Index<int{2},0>(n2253);
          int ix2257#4 = Add<int>(t12185,t22255);
          int t22259#4 = Index<int{2},1>(n2253);
          int iy225B#1 = Add<int>(t12185,t22259);
          int t225F#1 = Mul<int>(n02190,iy225B);
          int index2260#1 = Add<int>(ix2257,t225F);
          addr(IMAGE2D<int>) imgBaseAddr2261#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a225D#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index2260);
          real4 v02267#1 = LoadVoxels<IMAGE2D<int>,4>(a225D);
          int iy2269#1 = Add<int>(_t13B0,t22259);
          int t226D#1 = Mul<int>(n02190,iy2269);
          int index226E#1 = Add<int>(ix2257,t226D);
          addr(IMAGE2D<int>) a226B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index226E);
          real4 v12275#1 = LoadVoxels<IMAGE2D<int>,4>(a226B);
          int iy2277#1 = Add<int>(_t13B4,t22259);
          int t227B#1 = Mul<int>(n02190,iy2277);
          int index227C#1 = Add<int>(ix2257,t227B);
          addr(IMAGE2D<int>) a2279#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index227C);
          real4 v22283#1 = LoadVoxels<IMAGE2D<int>,4>(a2279);
          int iy2285#1 = Add<int>(_t138C,t22259);
          int t2289#1 = Mul<int>(n02190,iy2285);
          int index228A#1 = Add<int>(ix2257,t2289);
          addr(IMAGE2D<int>) a2287#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index228A);
          real4 v32291#1 = LoadVoxels<IMAGE2D<int>,4>(a2287);
          real fy2293#4 = Index<real2,1>(f2251);
          real t32295#1 = Add<real>(fy2293,_t1388);
          real t12297#1 = Sub<real>(fy2293,_t1388);
          real t02299#1 = Sub<real>(fy2293,_t138A);
          real4 a229B#3 = <real4>[t32295,fy2293,t12297,t02299];
          real4 prod322B2#1 = Mul<real4>(a229B,a321D3);
          real4 sum222B3#1 = Add<real4>(a221D2,prod322B2);
          real4 prod222B4#1 = Mul<real4>(a229B,sum222B3);
          real4 sum122B5#1 = Add<real4>(a121D1,prod222B4);
          real4 prod122B6#1 = Mul<real4>(a229B,sum122B5);
          real4 hy229D#1 = Add<real4>(a021D0,prod122B6);
          real fx22D1#4 = Index<real2,0>(f2251);
          real t322D3#1 = Add<real>(fx22D1,_t1388);
          real t122D5#1 = Sub<real>(fx22D1,_t1388);
          real t022D7#1 = Sub<real>(fx22D1,_t138A);
          real4 a22D9#3 = <real4>[t322D3,fx22D1,t122D5,t022D7];
          real4 prod322F0#1 = Mul<real4>(a22D9,a321D3);
          real4 sum222F1#1 = Add<real4>(a221D2,prod322F0);
          real4 prod222F2#1 = Mul<real4>(a22D9,sum222F1);
          real4 sum122F3#1 = Add<real4>(a121D1,prod222F2);
          real4 prod122F4#1 = Mul<real4>(a22D9,sum122F3);
          real4 hx22DB#4 = Add<real4>(a021D0,prod122F4);
          real t0230F#1 = Dot<4>(v02267,hx22DB);
          real t12311#1 = Dot<4>(v12275,hx22DB);
          real t22313#1 = Dot<4>(v22283,hx22DB);
          real t32315#1 = Dot<4>(v32291,hx22DB);
          real4 tv2317#1 = <real4>[t0230F,t12311,t22313,t32315];
          real _t2319#1 = Dot<4>(hy229D,tv2317);
          real _t231B#2 = Sub<real>(_t224B,_t2319);
          real _t231D#1 = Mul<real>(_t231B,_t231B);
          real score231F#1 = Add<real>(score2168,_t231D);
          goto JOIN2322
        JOIN2322:  preds = [ASSIGN2320,COND217E]
          real score2321#2 = phi(score231F,score2168)
          real _t2323#1 = Dot<2>(r013A2,v091347);
          real _t2325#1 = Dot<2>(r113A8,v091347);
          real2 _t2327#1 = <real2>[_t2323,_t2325];
          real2 pos2329#2 = Add<real2>(_t2327,_t13B8);
          real2 x232B#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos2329);
          bool _t232D#1 = Inside<IMAGE2D<float>,2>(x232B,_t132F);
          if _t232D then goto ASSIGN2331 else goto ASSIGN24E2
        ASSIGN2331:  preds = [COND232F]
          real2 x2330#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v091347);
          bool _t2332#1 = Inside<IMAGE2D<int>,2>(x2330,_t132B);
          goto JOIN2336
        JOIN2336:  preds = [ASSIGN2333,ASSIGN24E2]
          bool _t2334#1 = phi(_t2332,_t2335)
          if _t2334 then goto ASSIGN2339 else goto JOIN24DB
        ASSIGN2339:  preds = [COND2337]
          real2 nd2338#2 = Floor<2>(x232B);
          real2 f233A#2 = Sub<real2>(x232B,nd2338);
          int{2} n233C#2 = RealToInt<2>(nd2338);
          int t1233E#4 = -1;
          int t22340#1 = Index<int{2},0>(n233C);
          int ix2342#4 = Add<int>(t1233E,t22340);
          int t22344#4 = Index<int{2},1>(n233C);
          int iy2346#1 = Add<int>(t1233E,t22344);
          int n02349#8 = 21;
          int t234A#1 = Mul<int>(n02349,iy2346);
          int index234B#1 = Add<int>(ix2342,t234A);
          addr(IMAGE2D<float>) imgBaseAddr234C#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a2348#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index234B);
          real4 v02352#1 = LoadVoxels<IMAGE2D<float>,4>(a2348);
          int iy2354#1 = Add<int>(_t13B0,t22344);
          int t2358#1 = Mul<int>(n02349,iy2354);
          int index2359#1 = Add<int>(ix2342,t2358);
          addr(IMAGE2D<float>) a2356#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index2359);
          real4 v12360#1 = LoadVoxels<IMAGE2D<float>,4>(a2356);
          int iy2362#1 = Add<int>(_t13B4,t22344);
          int t2366#1 = Mul<int>(n02349,iy2362);
          int index2367#1 = Add<int>(ix2342,t2366);
          addr(IMAGE2D<float>) a2364#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index2367);
          real4 v2236E#1 = LoadVoxels<IMAGE2D<float>,4>(a2364);
          int iy2370#1 = Add<int>(_t138C,t22344);
          int t2374#1 = Mul<int>(n02349,iy2370);
          int index2375#1 = Add<int>(ix2342,t2374);
          addr(IMAGE2D<float>) a2372#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index2375);
          real4 v3237C#1 = LoadVoxels<IMAGE2D<float>,4>(a2372);
          real fy237E#4 = Index<real2,1>(f233A);
          real t32380#1 = Add<real>(fy237E,_t1388);
          real t12382#1 = Sub<real>(fy237E,_t1388);
          real t02384#1 = Sub<real>(fy237E,_t138A);
          real4 a2386#3 = <real4>[t32380,fy237E,t12382,t02384];
          real _f2399#2 = 0.133333333333e1;
          real _f239A#2 = 0.666666666667e0;
          real4 a02389#4 = <real4>[_f2399,_f239A,_f239A,_f2399];
          real _f2395#1 = -0.2e1;
          real _f2396#2 = 0.0;
          real4 a1238A#4 = <real4>[_f2395,_f2396,_f2396,_t138A];
          real _f2392#2 = -0.1e1;
          real4 a2238B#4 = <real4>[_t1388,_f2392,_f2392,_t1388];
          real _f238D#1 = -0.166666666667e0;
          real _f238E#1 = 0.5e0;
          real _f238F#1 = -0.5e0;
          real _f2390#1 = 0.166666666667e0;
          real4 a3238C#4 = <real4>[_f238D,_f238E,_f238F,_f2390];
          real4 prod3239D#1 = Mul<real4>(a2386,a3238C);
          real4 sum2239E#1 = Add<real4>(a2238B,prod3239D);
          real4 prod2239F#1 = Mul<real4>(a2386,sum2239E);
          real4 sum123A0#1 = Add<real4>(a1238A,prod2239F);
          real4 prod123A1#1 = Mul<real4>(a2386,sum123A0);
          real4 hy2388#1 = Add<real4>(a02389,prod123A1);
          real fx23BC#4 = Index<real2,0>(f233A);
          real t323BE#1 = Add<real>(fx23BC,_t1388);
          real t123C0#1 = Sub<real>(fx23BC,_t1388);
          real t023C2#1 = Sub<real>(fx23BC,_t138A);
          real4 a23C4#3 = <real4>[t323BE,fx23BC,t123C0,t023C2];
          real4 prod323DB#1 = Mul<real4>(a23C4,a3238C);
          real4 sum223DC#1 = Add<real4>(a2238B,prod323DB);
          real4 prod223DD#1 = Mul<real4>(a23C4,sum223DC);
          real4 sum123DE#1 = Add<real4>(a1238A,prod223DD);
          real4 prod123DF#1 = Mul<real4>(a23C4,sum123DE);
          real4 hx23C6#4 = Add<real4>(a02389,prod123DF);
          real t023FA#1 = Dot<4>(v02352,hx23C6);
          real t123FC#1 = Dot<4>(v12360,hx23C6);
          real t223FE#1 = Dot<4>(v2236E,hx23C6);
          real t32400#1 = Dot<4>(v3237C,hx23C6);
          real4 tv2402#1 = <real4>[t023FA,t123FC,t223FE,t32400];
          real _t2404#1 = Dot<4>(hy2388,tv2402);
          real2 x2406#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v091347);
          real2 nd2408#2 = Floor<2>(x2406);
          real2 f240A#2 = Sub<real2>(x2406,nd2408);
          int{2} n240C#2 = RealToInt<2>(nd2408);
          int t2240E#1 = Index<int{2},0>(n240C);
          int ix2410#4 = Add<int>(t1233E,t2240E);
          int t22412#4 = Index<int{2},1>(n240C);
          int iy2414#1 = Add<int>(t1233E,t22412);
          int t2418#1 = Mul<int>(n02349,iy2414);
          int index2419#1 = Add<int>(ix2410,t2418);
          addr(IMAGE2D<int>) imgBaseAddr241A#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a2416#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2419);
          real4 v02420#1 = LoadVoxels<IMAGE2D<int>,4>(a2416);
          int iy2422#1 = Add<int>(_t13B0,t22412);
          int t2426#1 = Mul<int>(n02349,iy2422);
          int index2427#1 = Add<int>(ix2410,t2426);
          addr(IMAGE2D<int>) a2424#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2427);
          real4 v1242E#1 = LoadVoxels<IMAGE2D<int>,4>(a2424);
          int iy2430#1 = Add<int>(_t13B4,t22412);
          int t2434#1 = Mul<int>(n02349,iy2430);
          int index2435#1 = Add<int>(ix2410,t2434);
          addr(IMAGE2D<int>) a2432#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2435);
          real4 v2243C#1 = LoadVoxels<IMAGE2D<int>,4>(a2432);
          int iy243E#1 = Add<int>(_t138C,t22412);
          int t2442#1 = Mul<int>(n02349,iy243E);
          int index2443#1 = Add<int>(ix2410,t2442);
          addr(IMAGE2D<int>) a2440#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2443);
          real4 v3244A#1 = LoadVoxels<IMAGE2D<int>,4>(a2440);
          real fy244C#4 = Index<real2,1>(f240A);
          real t3244E#1 = Add<real>(fy244C,_t1388);
          real t12450#1 = Sub<real>(fy244C,_t1388);
          real t02452#1 = Sub<real>(fy244C,_t138A);
          real4 a2454#3 = <real4>[t3244E,fy244C,t12450,t02452];
          real4 prod3246B#1 = Mul<real4>(a2454,a3238C);
          real4 sum2246C#1 = Add<real4>(a2238B,prod3246B);
          real4 prod2246D#1 = Mul<real4>(a2454,sum2246C);
          real4 sum1246E#1 = Add<real4>(a1238A,prod2246D);
          real4 prod1246F#1 = Mul<real4>(a2454,sum1246E);
          real4 hy2456#1 = Add<real4>(a02389,prod1246F);
          real fx248A#4 = Index<real2,0>(f240A);
          real t3248C#1 = Add<real>(fx248A,_t1388);
          real t1248E#1 = Sub<real>(fx248A,_t1388);
          real t02490#1 = Sub<real>(fx248A,_t138A);
          real4 a2492#3 = <real4>[t3248C,fx248A,t1248E,t02490];
          real4 prod324A9#1 = Mul<real4>(a2492,a3238C);
          real4 sum224AA#1 = Add<real4>(a2238B,prod324A9);
          real4 prod224AB#1 = Mul<real4>(a2492,sum224AA);
          real4 sum124AC#1 = Add<real4>(a1238A,prod224AB);
          real4 prod124AD#1 = Mul<real4>(a2492,sum124AC);
          real4 hx2494#4 = Add<real4>(a02389,prod124AD);
          real t024C8#1 = Dot<4>(v02420,hx2494);
          real t124CA#1 = Dot<4>(v1242E,hx2494);
          real t224CC#1 = Dot<4>(v2243C,hx2494);
          real t324CE#1 = Dot<4>(v3244A,hx2494);
          real4 tv24D0#1 = <real4>[t024C8,t124CA,t224CC,t324CE];
          real _t24D2#1 = Dot<4>(hy2456,tv24D0);
          real _t24D4#2 = Sub<real>(_t2404,_t24D2);
          real _t24D6#1 = Mul<real>(_t24D4,_t24D4);
          real score24D8#1 = Add<real>(score2321,_t24D6);
          goto JOIN24DB
        JOIN24DB:  preds = [ASSIGN24D9,COND2337]
          real score24DA#1 = phi(score24D8,score2321)
          self.t = t1384;
          self.score = score24DA;
          self.r0 = r013A2;
          self.r1 = r113A8;
          self.pos = pos2329;
          stabilize ()
        ASSIGN24E2:  preds = [COND232F]
          bool _t2335#1 = false;
          goto JOIN2336
        ASSIGN24E3:  preds = [COND2176]
          bool _t217C#1 = false;
          goto JOIN217D
        ASSIGN24E4:  preds = [COND1FBD]
          bool _t1FC3#1 = false;
          goto JOIN1FC4
        ASSIGN24E5:  preds = [COND1E04]
          bool _t1E0A#1 = false;
          goto JOIN1E0B
        ASSIGN24E6:  preds = [COND1AA4]
          bool _t1AAA#1 = false;
          goto JOIN1AAB
        ASSIGN24E7:  preds = [COND18EB]
          bool _t18F1#1 = false;
          goto JOIN18F2
        ASSIGN24E8:  preds = [COND1732]
          bool _t1738#1 = false;
          goto JOIN1739
        ASSIGN24E9:  preds = [COND1579]
          bool _t157F#1 = false;
          goto JOIN1580
        ASSIGN24EA:  preds = [COND13C0]
          bool _t13C6#1 = false;
          goto JOIN13C7
    end Update
    method Stabilize
        ENTRY24EC:  preds = []
          real3 t24ED#1 = self.t;
          real score24EF#1 = self.score;
          real2 r024F1#1 = self.r0;
          real2 r124F3#1 = self.r1;
          real2 pos24F5#1 = self.pos;
          self.t = t24ED;
          self.score = score24EF;
          self.r0 = r024F1;
          self.r1 = r124F3;
          self.pos = pos24F5;
          return ()
    end Stabilize
  end R
#### end program ####
##### LowIL after variable analysis ####
## properties
  none
## globals
  global real2 v011337#4
  global real2 v021339#4
  global real2 v03133D#4
  global real2 v04133F#4
  global real2 v001333#5
  global real2 v061341#4
  global real2 v071343#4
  global real2 v081345#4
  global real2 v091347#4
  global image(IMAGE2D<int>) _t132B#68
  global image(IMAGE2D<float>) _t132F#58
## global initialization
  ENTRY1328:  preds = []
    string _t1329#1 = "square-template.nrrd";
    image(IMAGE2D<int>) _t132B#68 = LoadImage<IMAGE2D<int>>(_t1329);
    string _t132D#1 = "square-rotate.nrrd";
    image(IMAGE2D<float>) _t132F#58 = LoadImage<IMAGE2D<float>>(_t132D);
    real _t1331#6 = 0.0;
    real2 v001333#5 = <real2>[_t1331,_t1331];
    real _t1335#7 = 0.5e0;
    real2 v011337#4 = <real2>[_t1335,_t1335];
    real2 v021339#4 = <real2>[_t1335,_t1331];
    real _t133B#6 = Neg<real>(_t1335);
    real2 v03133D#4 = <real2>[_t1335,_t133B];
    real2 v04133F#4 = <real2>[_t1331,_t1335];
    real2 v061341#4 = <real2>[_t1331,_t133B];
    real2 v071343#4 = <real2>[_t133B,_t1335];
    real2 v081345#4 = <real2>[_t133B,_t1331];
    real2 v091347#4 = <real2>[_t133B,_t133B];
    return (v011337,v021339,v03133D,v04133F,v001333,v061341,v071343,v081345,v091347,_t132B,_t132F)
## initially
  ARRAY
    ENTRY1352:  preds = []
      int _t134E#4 = 0;
      int _t134F#4 = 60;
      live vars = (_t134F,_t134E)
    for int i134D#1 = _t134E .. _t134F
      for int j1350#1 = _t134E .. _t134F
        for int k1351#1 = _t134E .. _t134F
          ENTRY1356:  preds = []
            live vars = ()
          new R(i134D,j1350,k1351);
## strands
  strand R (int i1358#1, int j1359#1, int k135A#1)
    state: real3 self.t;output real self.score;real2 self.r0;real2 self.r1;real2 self.pos;
      ENTRY1360:  preds = []
        real _t1361#1 = IntToReal(i1358);
        real _t1363#3 = 0.60e2;
        real _t1365#1 = Div<real>(_t1361,_t1363);
        real _t1367#3 = 0.5e0;
        real _t1369#1 = Sub<real>(_t1365,_t1367);
        real _t136B#1 = IntToReal(j1359);
        real _t136D#1 = Div<real>(_t136B,_t1363);
        real _t136F#1 = Sub<real>(_t136D,_t1367);
        real _t1371#1 = IntToReal(k135A);
        real _t1373#1 = Div<real>(_t1371,_t1363);
        real _t1375#1 = Sub<real>(_t1373,_t1367);
        real3 t1377#1 = <real3>[_t1369,_t136F,_t1375];
        real score1379#3 = 0.0;
        real2 r0137B#3 = <real2>[score1379,score1379];
        self.t = t1377;
        self.score = score1379;
        self.r0 = r0137B;
        self.r1 = r0137B;
        self.pos = r0137B;
        strand_init ()
    method Update
        ENTRY1383:  preds = []
          real3 t1384#4 = self.t;
          real score1386#2 = self.score;
          real _t1388#102 = 0.1e1;
          real _t138A#53 = 0.2e1;
          int _t138C#21 = 2;
          real _t138E#6 = Subscript<real3>(t1384,_t138C);
          real _t1390#1 = Mul<real>(_t138A,_t138E);
          real _t1392#1 = Mul<real>(_t1390,_t138E);
          real _t1394#2 = Sub<real>(_t1388,_t1392);
          real _t1396#1 = Neg<real>(_t138A);
          real _t1398#1 = Mul<real>(_t138E,_t138E);
          real _t139A#1 = Sub<real>(_t1388,_t1398);
          real _t139C#2 = sqrt(_t139A);
          real _t139E#1 = Mul<real>(_t1396,_t139C);
          real _t13A0#1 = Mul<real>(_t139E,_t138E);
          real2 r013A2#10 = <real2>[_t1394,_t13A0];
          real _t13A4#1 = Mul<real>(_t138A,_t139C);
          real _t13A6#1 = Mul<real>(_t13A4,_t138E);
          real2 r113A8#10 = <real2>[_t13A6,_t1394];
          real _t13AA#1 = Dot<2>(r013A2,v001333);
          real _t13AC#1 = Dot<2>(r113A8,v001333);
          real2 _t13AE#1 = <real2>[_t13AA,_t13AC];
          int _t13B0#21 = 0;
          real _t13B2#1 = Subscript<real3>(t1384,_t13B0);
          int _t13B4#21 = 1;
          real _t13B6#1 = Subscript<real3>(t1384,_t13B4);
          real2 _t13B8#9 = <real2>[_t13B2,_t13B6];
          real2 pos13BA#1 = Add<real2>(_t13AE,_t13B8);
          real2 x13BC#5 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos13BA);
          bool _t13BE#2 = Inside<IMAGE2D<float>,2>(x13BC,_t132F);
          if _t13BE then goto ASSIGN13C2 else goto ASSIGN24EA
        ASSIGN13C2:  preds = [COND13C0]
          real2 x13C1#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v001333);
          bool _t13C3#1 = Inside<IMAGE2D<int>,2>(x13C1,_t132B);
          goto JOIN13C7
        JOIN13C7:  preds = [ASSIGN13C4,ASSIGN24EA]
          bool _t13C5#2 = phi(_t13C3,_t13C6)
          if _t13C5 then goto ASSIGN13CA else goto JOIN156C
        ASSIGN13CA:  preds = [COND13C8]
          real2 nd13C9#2 = Floor<2>(x13BC);
          real2 f13CB#2 = Sub<real2>(x13BC,nd13C9);
          int{2} n13CD#2 = RealToInt<2>(nd13C9);
          int t113CF#4 = -1;
          int t213D1#1 = Index<int{2},0>(n13CD);
          int ix13D3#4 = Add<int>(t113CF,t213D1);
          int t213D5#4 = Index<int{2},1>(n13CD);
          int iy13D7#1 = Add<int>(t113CF,t213D5);
          int n013DA#8 = 21;
          int t13DB#1 = Mul<int>(n013DA,iy13D7);
          int index13DC#1 = Add<int>(ix13D3,t13DB);
          addr(IMAGE2D<float>) imgBaseAddr13DD#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a13D9#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index13DC);
          real4 v013E3#1 = LoadVoxels<IMAGE2D<float>,4>(a13D9);
          int iy13E5#1 = Add<int>(_t13B0,t213D5);
          int t13E9#1 = Mul<int>(n013DA,iy13E5);
          int index13EA#1 = Add<int>(ix13D3,t13E9);
          addr(IMAGE2D<float>) a13E7#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index13EA);
          real4 v113F1#1 = LoadVoxels<IMAGE2D<float>,4>(a13E7);
          int iy13F3#1 = Add<int>(_t13B4,t213D5);
          int t13F7#1 = Mul<int>(n013DA,iy13F3);
          int index13F8#1 = Add<int>(ix13D3,t13F7);
          addr(IMAGE2D<float>) a13F5#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index13F8);
          real4 v213FF#1 = LoadVoxels<IMAGE2D<float>,4>(a13F5);
          int iy1401#1 = Add<int>(_t138C,t213D5);
          int t1405#1 = Mul<int>(n013DA,iy1401);
          int index1406#1 = Add<int>(ix13D3,t1405);
          addr(IMAGE2D<float>) a1403#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr13DD,index1406);
          real4 v3140D#1 = LoadVoxels<IMAGE2D<float>,4>(a1403);
          real fy140F#4 = Index<real2,1>(f13CB);
          real t31411#1 = Add<real>(fy140F,_t1388);
          real t11413#1 = Sub<real>(fy140F,_t1388);
          real t01415#1 = Sub<real>(fy140F,_t138A);
          real4 a1417#3 = <real4>[t31411,fy140F,t11413,t01415];
          real _f142A#2 = 0.133333333333e1;
          real _f142B#2 = 0.666666666667e0;
          real4 a0141A#4 = <real4>[_f142A,_f142B,_f142B,_f142A];
          real _f1426#1 = -0.2e1;
          real _f1427#2 = 0.0;
          real4 a1141B#4 = <real4>[_f1426,_f1427,_f1427,_t138A];
          real _f1423#2 = -0.1e1;
          real4 a2141C#4 = <real4>[_t1388,_f1423,_f1423,_t1388];
          real _f141E#1 = -0.166666666667e0;
          real _f141F#1 = 0.5e0;
          real _f1420#1 = -0.5e0;
          real _f1421#1 = 0.166666666667e0;
          real4 a3141D#4 = <real4>[_f141E,_f141F,_f1420,_f1421];
          real4 prod3142E#1 = Mul<real4>(a1417,a3141D);
          real4 sum2142F#1 = Add<real4>(a2141C,prod3142E);
          real4 prod21430#1 = Mul<real4>(a1417,sum2142F);
          real4 sum11431#1 = Add<real4>(a1141B,prod21430);
          real4 prod11432#1 = Mul<real4>(a1417,sum11431);
          real4 hy1419#1 = Add<real4>(a0141A,prod11432);
          real fx144D#4 = Index<real2,0>(f13CB);
          real t3144F#1 = Add<real>(fx144D,_t1388);
          real t11451#1 = Sub<real>(fx144D,_t1388);
          real t01453#1 = Sub<real>(fx144D,_t138A);
          real4 a1455#3 = <real4>[t3144F,fx144D,t11451,t01453];
          real4 prod3146C#1 = Mul<real4>(a1455,a3141D);
          real4 sum2146D#1 = Add<real4>(a2141C,prod3146C);
          real4 prod2146E#1 = Mul<real4>(a1455,sum2146D);
          real4 sum1146F#1 = Add<real4>(a1141B,prod2146E);
          real4 prod11470#1 = Mul<real4>(a1455,sum1146F);
          real4 hx1457#4 = Add<real4>(a0141A,prod11470);
          real t0148B#1 = Dot<4>(v013E3,hx1457);
          real t1148D#1 = Dot<4>(v113F1,hx1457);
          real t2148F#1 = Dot<4>(v213FF,hx1457);
          real t31491#1 = Dot<4>(v3140D,hx1457);
          real4 tv1493#1 = <real4>[t0148B,t1148D,t2148F,t31491];
          real _t1495#1 = Dot<4>(hy1419,tv1493);
          real2 x1497#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v001333);
          real2 nd1499#2 = Floor<2>(x1497);
          real2 f149B#2 = Sub<real2>(x1497,nd1499);
          int{2} n149D#2 = RealToInt<2>(nd1499);
          int t2149F#1 = Index<int{2},0>(n149D);
          int ix14A1#4 = Add<int>(t113CF,t2149F);
          int t214A3#4 = Index<int{2},1>(n149D);
          int iy14A5#1 = Add<int>(t113CF,t214A3);
          int t14A9#1 = Mul<int>(n013DA,iy14A5);
          int index14AA#1 = Add<int>(ix14A1,t14A9);
          addr(IMAGE2D<int>) imgBaseAddr14AB#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a14A7#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14AA);
          real4 v014B1#1 = LoadVoxels<IMAGE2D<int>,4>(a14A7);
          int iy14B3#1 = Add<int>(_t13B0,t214A3);
          int t14B7#1 = Mul<int>(n013DA,iy14B3);
          int index14B8#1 = Add<int>(ix14A1,t14B7);
          addr(IMAGE2D<int>) a14B5#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14B8);
          real4 v114BF#1 = LoadVoxels<IMAGE2D<int>,4>(a14B5);
          int iy14C1#1 = Add<int>(_t13B4,t214A3);
          int t14C5#1 = Mul<int>(n013DA,iy14C1);
          int index14C6#1 = Add<int>(ix14A1,t14C5);
          addr(IMAGE2D<int>) a14C3#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14C6);
          real4 v214CD#1 = LoadVoxels<IMAGE2D<int>,4>(a14C3);
          int iy14CF#1 = Add<int>(_t138C,t214A3);
          int t14D3#1 = Mul<int>(n013DA,iy14CF);
          int index14D4#1 = Add<int>(ix14A1,t14D3);
          addr(IMAGE2D<int>) a14D1#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr14AB,index14D4);
          real4 v314DB#1 = LoadVoxels<IMAGE2D<int>,4>(a14D1);
          real fy14DD#4 = Index<real2,1>(f149B);
          real t314DF#1 = Add<real>(fy14DD,_t1388);
          real t114E1#1 = Sub<real>(fy14DD,_t1388);
          real t014E3#1 = Sub<real>(fy14DD,_t138A);
          real4 a14E5#3 = <real4>[t314DF,fy14DD,t114E1,t014E3];
          real4 prod314FC#1 = Mul<real4>(a14E5,a3141D);
          real4 sum214FD#1 = Add<real4>(a2141C,prod314FC);
          real4 prod214FE#1 = Mul<real4>(a14E5,sum214FD);
          real4 sum114FF#1 = Add<real4>(a1141B,prod214FE);
          real4 prod11500#1 = Mul<real4>(a14E5,sum114FF);
          real4 hy14E7#1 = Add<real4>(a0141A,prod11500);
          real fx151B#4 = Index<real2,0>(f149B);
          real t3151D#1 = Add<real>(fx151B,_t1388);
          real t1151F#1 = Sub<real>(fx151B,_t1388);
          real t01521#1 = Sub<real>(fx151B,_t138A);
          real4 a1523#3 = <real4>[t3151D,fx151B,t1151F,t01521];
          real4 prod3153A#1 = Mul<real4>(a1523,a3141D);
          real4 sum2153B#1 = Add<real4>(a2141C,prod3153A);
          real4 prod2153C#1 = Mul<real4>(a1523,sum2153B);
          real4 sum1153D#1 = Add<real4>(a1141B,prod2153C);
          real4 prod1153E#1 = Mul<real4>(a1523,sum1153D);
          real4 hx1525#4 = Add<real4>(a0141A,prod1153E);
          real t01559#1 = Dot<4>(v014B1,hx1525);
          real t1155B#1 = Dot<4>(v114BF,hx1525);
          real t2155D#1 = Dot<4>(v214CD,hx1525);
          real t3155F#1 = Dot<4>(v314DB,hx1525);
          real4 tv1561#1 = <real4>[t01559,t1155B,t2155D,t3155F];
          real _t1563#1 = Dot<4>(hy14E7,tv1561);
          real _t1565#2 = Sub<real>(_t1495,_t1563);
          real _t1567#1 = Mul<real>(_t1565,_t1565);
          real score1569#1 = Add<real>(score1386,_t1567);
          goto JOIN156C
        JOIN156C:  preds = [ASSIGN156A,COND13C8]
          real score156B#2 = phi(score1569,score1386)
          real _t156D#1 = Dot<2>(r013A2,v011337);
          real _t156F#1 = Dot<2>(r113A8,v011337);
          real2 _t1571#1 = <real2>[_t156D,_t156F];
          real2 pos1573#1 = Add<real2>(_t1571,_t13B8);
          real2 x1575#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1573);
          bool _t1577#1 = Inside<IMAGE2D<float>,2>(x1575,_t132F);
          if _t1577 then goto ASSIGN157B else goto ASSIGN24E9
        ASSIGN157B:  preds = [COND1579]
          real2 x157A#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v011337);
          bool _t157C#1 = Inside<IMAGE2D<int>,2>(x157A,_t132B);
          goto JOIN1580
        JOIN1580:  preds = [ASSIGN157D,ASSIGN24E9]
          bool _t157E#1 = phi(_t157C,_t157F)
          if _t157E then goto ASSIGN1583 else goto JOIN1725
        ASSIGN1583:  preds = [COND1581]
          real2 nd1582#2 = Floor<2>(x1575);
          real2 f1584#2 = Sub<real2>(x1575,nd1582);
          int{2} n1586#2 = RealToInt<2>(nd1582);
          int t11588#4 = -1;
          int t2158A#1 = Index<int{2},0>(n1586);
          int ix158C#4 = Add<int>(t11588,t2158A);
          int t2158E#4 = Index<int{2},1>(n1586);
          int iy1590#1 = Add<int>(t11588,t2158E);
          int n01593#8 = 21;
          int t1594#1 = Mul<int>(n01593,iy1590);
          int index1595#1 = Add<int>(ix158C,t1594);
          addr(IMAGE2D<float>) imgBaseAddr1596#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1592#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index1595);
          real4 v0159C#1 = LoadVoxels<IMAGE2D<float>,4>(a1592);
          int iy159E#1 = Add<int>(_t13B0,t2158E);
          int t15A2#1 = Mul<int>(n01593,iy159E);
          int index15A3#1 = Add<int>(ix158C,t15A2);
          addr(IMAGE2D<float>) a15A0#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index15A3);
          real4 v115AA#1 = LoadVoxels<IMAGE2D<float>,4>(a15A0);
          int iy15AC#1 = Add<int>(_t13B4,t2158E);
          int t15B0#1 = Mul<int>(n01593,iy15AC);
          int index15B1#1 = Add<int>(ix158C,t15B0);
          addr(IMAGE2D<float>) a15AE#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index15B1);
          real4 v215B8#1 = LoadVoxels<IMAGE2D<float>,4>(a15AE);
          int iy15BA#1 = Add<int>(_t138C,t2158E);
          int t15BE#1 = Mul<int>(n01593,iy15BA);
          int index15BF#1 = Add<int>(ix158C,t15BE);
          addr(IMAGE2D<float>) a15BC#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1596,index15BF);
          real4 v315C6#1 = LoadVoxels<IMAGE2D<float>,4>(a15BC);
          real fy15C8#4 = Index<real2,1>(f1584);
          real t315CA#1 = Add<real>(fy15C8,_t1388);
          real t115CC#1 = Sub<real>(fy15C8,_t1388);
          real t015CE#1 = Sub<real>(fy15C8,_t138A);
          real4 a15D0#3 = <real4>[t315CA,fy15C8,t115CC,t015CE];
          real _f15E3#2 = 0.133333333333e1;
          real _f15E4#2 = 0.666666666667e0;
          real4 a015D3#4 = <real4>[_f15E3,_f15E4,_f15E4,_f15E3];
          real _f15DF#1 = -0.2e1;
          real _f15E0#2 = 0.0;
          real4 a115D4#4 = <real4>[_f15DF,_f15E0,_f15E0,_t138A];
          real _f15DC#2 = -0.1e1;
          real4 a215D5#4 = <real4>[_t1388,_f15DC,_f15DC,_t1388];
          real _f15D7#1 = -0.166666666667e0;
          real _f15D8#1 = 0.5e0;
          real _f15D9#1 = -0.5e0;
          real _f15DA#1 = 0.166666666667e0;
          real4 a315D6#4 = <real4>[_f15D7,_f15D8,_f15D9,_f15DA];
          real4 prod315E7#1 = Mul<real4>(a15D0,a315D6);
          real4 sum215E8#1 = Add<real4>(a215D5,prod315E7);
          real4 prod215E9#1 = Mul<real4>(a15D0,sum215E8);
          real4 sum115EA#1 = Add<real4>(a115D4,prod215E9);
          real4 prod115EB#1 = Mul<real4>(a15D0,sum115EA);
          real4 hy15D2#1 = Add<real4>(a015D3,prod115EB);
          real fx1606#4 = Index<real2,0>(f1584);
          real t31608#1 = Add<real>(fx1606,_t1388);
          real t1160A#1 = Sub<real>(fx1606,_t1388);
          real t0160C#1 = Sub<real>(fx1606,_t138A);
          real4 a160E#3 = <real4>[t31608,fx1606,t1160A,t0160C];
          real4 prod31625#1 = Mul<real4>(a160E,a315D6);
          real4 sum21626#1 = Add<real4>(a215D5,prod31625);
          real4 prod21627#1 = Mul<real4>(a160E,sum21626);
          real4 sum11628#1 = Add<real4>(a115D4,prod21627);
          real4 prod11629#1 = Mul<real4>(a160E,sum11628);
          real4 hx1610#4 = Add<real4>(a015D3,prod11629);
          real t01644#1 = Dot<4>(v0159C,hx1610);
          real t11646#1 = Dot<4>(v115AA,hx1610);
          real t21648#1 = Dot<4>(v215B8,hx1610);
          real t3164A#1 = Dot<4>(v315C6,hx1610);
          real4 tv164C#1 = <real4>[t01644,t11646,t21648,t3164A];
          real _t164E#1 = Dot<4>(hy15D2,tv164C);
          real2 x1650#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v011337);
          real2 nd1652#2 = Floor<2>(x1650);
          real2 f1654#2 = Sub<real2>(x1650,nd1652);
          int{2} n1656#2 = RealToInt<2>(nd1652);
          int t21658#1 = Index<int{2},0>(n1656);
          int ix165A#4 = Add<int>(t11588,t21658);
          int t2165C#4 = Index<int{2},1>(n1656);
          int iy165E#1 = Add<int>(t11588,t2165C);
          int t1662#1 = Mul<int>(n01593,iy165E);
          int index1663#1 = Add<int>(ix165A,t1662);
          addr(IMAGE2D<int>) imgBaseAddr1664#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1660#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index1663);
          real4 v0166A#1 = LoadVoxels<IMAGE2D<int>,4>(a1660);
          int iy166C#1 = Add<int>(_t13B0,t2165C);
          int t1670#1 = Mul<int>(n01593,iy166C);
          int index1671#1 = Add<int>(ix165A,t1670);
          addr(IMAGE2D<int>) a166E#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index1671);
          real4 v11678#1 = LoadVoxels<IMAGE2D<int>,4>(a166E);
          int iy167A#1 = Add<int>(_t13B4,t2165C);
          int t167E#1 = Mul<int>(n01593,iy167A);
          int index167F#1 = Add<int>(ix165A,t167E);
          addr(IMAGE2D<int>) a167C#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index167F);
          real4 v21686#1 = LoadVoxels<IMAGE2D<int>,4>(a167C);
          int iy1688#1 = Add<int>(_t138C,t2165C);
          int t168C#1 = Mul<int>(n01593,iy1688);
          int index168D#1 = Add<int>(ix165A,t168C);
          addr(IMAGE2D<int>) a168A#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1664,index168D);
          real4 v31694#1 = LoadVoxels<IMAGE2D<int>,4>(a168A);
          real fy1696#4 = Index<real2,1>(f1654);
          real t31698#1 = Add<real>(fy1696,_t1388);
          real t1169A#1 = Sub<real>(fy1696,_t1388);
          real t0169C#1 = Sub<real>(fy1696,_t138A);
          real4 a169E#3 = <real4>[t31698,fy1696,t1169A,t0169C];
          real4 prod316B5#1 = Mul<real4>(a169E,a315D6);
          real4 sum216B6#1 = Add<real4>(a215D5,prod316B5);
          real4 prod216B7#1 = Mul<real4>(a169E,sum216B6);
          real4 sum116B8#1 = Add<real4>(a115D4,prod216B7);
          real4 prod116B9#1 = Mul<real4>(a169E,sum116B8);
          real4 hy16A0#1 = Add<real4>(a015D3,prod116B9);
          real fx16D4#4 = Index<real2,0>(f1654);
          real t316D6#1 = Add<real>(fx16D4,_t1388);
          real t116D8#1 = Sub<real>(fx16D4,_t1388);
          real t016DA#1 = Sub<real>(fx16D4,_t138A);
          real4 a16DC#3 = <real4>[t316D6,fx16D4,t116D8,t016DA];
          real4 prod316F3#1 = Mul<real4>(a16DC,a315D6);
          real4 sum216F4#1 = Add<real4>(a215D5,prod316F3);
          real4 prod216F5#1 = Mul<real4>(a16DC,sum216F4);
          real4 sum116F6#1 = Add<real4>(a115D4,prod216F5);
          real4 prod116F7#1 = Mul<real4>(a16DC,sum116F6);
          real4 hx16DE#4 = Add<real4>(a015D3,prod116F7);
          real t01712#1 = Dot<4>(v0166A,hx16DE);
          real t11714#1 = Dot<4>(v11678,hx16DE);
          real t21716#1 = Dot<4>(v21686,hx16DE);
          real t31718#1 = Dot<4>(v31694,hx16DE);
          real4 tv171A#1 = <real4>[t01712,t11714,t21716,t31718];
          real _t171C#1 = Dot<4>(hy16A0,tv171A);
          real _t171E#2 = Sub<real>(_t164E,_t171C);
          real _t1720#1 = Mul<real>(_t171E,_t171E);
          real score1722#1 = Add<real>(score156B,_t1720);
          goto JOIN1725
        JOIN1725:  preds = [ASSIGN1723,COND1581]
          real score1724#2 = phi(score1722,score156B)
          real _t1726#1 = Dot<2>(r013A2,v021339);
          real _t1728#1 = Dot<2>(r113A8,v021339);
          real2 _t172A#1 = <real2>[_t1726,_t1728];
          real2 pos172C#1 = Add<real2>(_t172A,_t13B8);
          real2 x172E#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos172C);
          bool _t1730#1 = Inside<IMAGE2D<float>,2>(x172E,_t132F);
          if _t1730 then goto ASSIGN1734 else goto ASSIGN24E8
        ASSIGN1734:  preds = [COND1732]
          real2 x1733#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v021339);
          bool _t1735#1 = Inside<IMAGE2D<int>,2>(x1733,_t132B);
          goto JOIN1739
        JOIN1739:  preds = [ASSIGN1736,ASSIGN24E8]
          bool _t1737#1 = phi(_t1735,_t1738)
          if _t1737 then goto ASSIGN173C else goto JOIN18DE
        ASSIGN173C:  preds = [COND173A]
          real2 nd173B#2 = Floor<2>(x172E);
          real2 f173D#2 = Sub<real2>(x172E,nd173B);
          int{2} n173F#2 = RealToInt<2>(nd173B);
          int t11741#4 = -1;
          int t21743#1 = Index<int{2},0>(n173F);
          int ix1745#4 = Add<int>(t11741,t21743);
          int t21747#4 = Index<int{2},1>(n173F);
          int iy1749#1 = Add<int>(t11741,t21747);
          int n0174C#8 = 21;
          int t174D#1 = Mul<int>(n0174C,iy1749);
          int index174E#1 = Add<int>(ix1745,t174D);
          addr(IMAGE2D<float>) imgBaseAddr174F#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a174B#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index174E);
          real4 v01755#1 = LoadVoxels<IMAGE2D<float>,4>(a174B);
          int iy1757#1 = Add<int>(_t13B0,t21747);
          int t175B#1 = Mul<int>(n0174C,iy1757);
          int index175C#1 = Add<int>(ix1745,t175B);
          addr(IMAGE2D<float>) a1759#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index175C);
          real4 v11763#1 = LoadVoxels<IMAGE2D<float>,4>(a1759);
          int iy1765#1 = Add<int>(_t13B4,t21747);
          int t1769#1 = Mul<int>(n0174C,iy1765);
          int index176A#1 = Add<int>(ix1745,t1769);
          addr(IMAGE2D<float>) a1767#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index176A);
          real4 v21771#1 = LoadVoxels<IMAGE2D<float>,4>(a1767);
          int iy1773#1 = Add<int>(_t138C,t21747);
          int t1777#1 = Mul<int>(n0174C,iy1773);
          int index1778#1 = Add<int>(ix1745,t1777);
          addr(IMAGE2D<float>) a1775#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr174F,index1778);
          real4 v3177F#1 = LoadVoxels<IMAGE2D<float>,4>(a1775);
          real fy1781#4 = Index<real2,1>(f173D);
          real t31783#1 = Add<real>(fy1781,_t1388);
          real t11785#1 = Sub<real>(fy1781,_t1388);
          real t01787#1 = Sub<real>(fy1781,_t138A);
          real4 a1789#3 = <real4>[t31783,fy1781,t11785,t01787];
          real _f179C#2 = 0.133333333333e1;
          real _f179D#2 = 0.666666666667e0;
          real4 a0178C#4 = <real4>[_f179C,_f179D,_f179D,_f179C];
          real _f1798#1 = -0.2e1;
          real _f1799#2 = 0.0;
          real4 a1178D#4 = <real4>[_f1798,_f1799,_f1799,_t138A];
          real _f1795#2 = -0.1e1;
          real4 a2178E#4 = <real4>[_t1388,_f1795,_f1795,_t1388];
          real _f1790#1 = -0.166666666667e0;
          real _f1791#1 = 0.5e0;
          real _f1792#1 = -0.5e0;
          real _f1793#1 = 0.166666666667e0;
          real4 a3178F#4 = <real4>[_f1790,_f1791,_f1792,_f1793];
          real4 prod317A0#1 = Mul<real4>(a1789,a3178F);
          real4 sum217A1#1 = Add<real4>(a2178E,prod317A0);
          real4 prod217A2#1 = Mul<real4>(a1789,sum217A1);
          real4 sum117A3#1 = Add<real4>(a1178D,prod217A2);
          real4 prod117A4#1 = Mul<real4>(a1789,sum117A3);
          real4 hy178B#1 = Add<real4>(a0178C,prod117A4);
          real fx17BF#4 = Index<real2,0>(f173D);
          real t317C1#1 = Add<real>(fx17BF,_t1388);
          real t117C3#1 = Sub<real>(fx17BF,_t1388);
          real t017C5#1 = Sub<real>(fx17BF,_t138A);
          real4 a17C7#3 = <real4>[t317C1,fx17BF,t117C3,t017C5];
          real4 prod317DE#1 = Mul<real4>(a17C7,a3178F);
          real4 sum217DF#1 = Add<real4>(a2178E,prod317DE);
          real4 prod217E0#1 = Mul<real4>(a17C7,sum217DF);
          real4 sum117E1#1 = Add<real4>(a1178D,prod217E0);
          real4 prod117E2#1 = Mul<real4>(a17C7,sum117E1);
          real4 hx17C9#4 = Add<real4>(a0178C,prod117E2);
          real t017FD#1 = Dot<4>(v01755,hx17C9);
          real t117FF#1 = Dot<4>(v11763,hx17C9);
          real t21801#1 = Dot<4>(v21771,hx17C9);
          real t31803#1 = Dot<4>(v3177F,hx17C9);
          real4 tv1805#1 = <real4>[t017FD,t117FF,t21801,t31803];
          real _t1807#1 = Dot<4>(hy178B,tv1805);
          real2 x1809#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v021339);
          real2 nd180B#2 = Floor<2>(x1809);
          real2 f180D#2 = Sub<real2>(x1809,nd180B);
          int{2} n180F#2 = RealToInt<2>(nd180B);
          int t21811#1 = Index<int{2},0>(n180F);
          int ix1813#4 = Add<int>(t11741,t21811);
          int t21815#4 = Index<int{2},1>(n180F);
          int iy1817#1 = Add<int>(t11741,t21815);
          int t181B#1 = Mul<int>(n0174C,iy1817);
          int index181C#1 = Add<int>(ix1813,t181B);
          addr(IMAGE2D<int>) imgBaseAddr181D#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1819#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index181C);
          real4 v01823#1 = LoadVoxels<IMAGE2D<int>,4>(a1819);
          int iy1825#1 = Add<int>(_t13B0,t21815);
          int t1829#1 = Mul<int>(n0174C,iy1825);
          int index182A#1 = Add<int>(ix1813,t1829);
          addr(IMAGE2D<int>) a1827#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index182A);
          real4 v11831#1 = LoadVoxels<IMAGE2D<int>,4>(a1827);
          int iy1833#1 = Add<int>(_t13B4,t21815);
          int t1837#1 = Mul<int>(n0174C,iy1833);
          int index1838#1 = Add<int>(ix1813,t1837);
          addr(IMAGE2D<int>) a1835#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index1838);
          real4 v2183F#1 = LoadVoxels<IMAGE2D<int>,4>(a1835);
          int iy1841#1 = Add<int>(_t138C,t21815);
          int t1845#1 = Mul<int>(n0174C,iy1841);
          int index1846#1 = Add<int>(ix1813,t1845);
          addr(IMAGE2D<int>) a1843#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr181D,index1846);
          real4 v3184D#1 = LoadVoxels<IMAGE2D<int>,4>(a1843);
          real fy184F#4 = Index<real2,1>(f180D);
          real t31851#1 = Add<real>(fy184F,_t1388);
          real t11853#1 = Sub<real>(fy184F,_t1388);
          real t01855#1 = Sub<real>(fy184F,_t138A);
          real4 a1857#3 = <real4>[t31851,fy184F,t11853,t01855];
          real4 prod3186E#1 = Mul<real4>(a1857,a3178F);
          real4 sum2186F#1 = Add<real4>(a2178E,prod3186E);
          real4 prod21870#1 = Mul<real4>(a1857,sum2186F);
          real4 sum11871#1 = Add<real4>(a1178D,prod21870);
          real4 prod11872#1 = Mul<real4>(a1857,sum11871);
          real4 hy1859#1 = Add<real4>(a0178C,prod11872);
          real fx188D#4 = Index<real2,0>(f180D);
          real t3188F#1 = Add<real>(fx188D,_t1388);
          real t11891#1 = Sub<real>(fx188D,_t1388);
          real t01893#1 = Sub<real>(fx188D,_t138A);
          real4 a1895#3 = <real4>[t3188F,fx188D,t11891,t01893];
          real4 prod318AC#1 = Mul<real4>(a1895,a3178F);
          real4 sum218AD#1 = Add<real4>(a2178E,prod318AC);
          real4 prod218AE#1 = Mul<real4>(a1895,sum218AD);
          real4 sum118AF#1 = Add<real4>(a1178D,prod218AE);
          real4 prod118B0#1 = Mul<real4>(a1895,sum118AF);
          real4 hx1897#4 = Add<real4>(a0178C,prod118B0);
          real t018CB#1 = Dot<4>(v01823,hx1897);
          real t118CD#1 = Dot<4>(v11831,hx1897);
          real t218CF#1 = Dot<4>(v2183F,hx1897);
          real t318D1#1 = Dot<4>(v3184D,hx1897);
          real4 tv18D3#1 = <real4>[t018CB,t118CD,t218CF,t318D1];
          real _t18D5#1 = Dot<4>(hy1859,tv18D3);
          real _t18D7#2 = Sub<real>(_t1807,_t18D5);
          real _t18D9#1 = Mul<real>(_t18D7,_t18D7);
          real score18DB#1 = Add<real>(score1724,_t18D9);
          goto JOIN18DE
        JOIN18DE:  preds = [ASSIGN18DC,COND173A]
          real score18DD#2 = phi(score18DB,score1724)
          real _t18DF#1 = Dot<2>(r013A2,v03133D);
          real _t18E1#1 = Dot<2>(r113A8,v03133D);
          real2 _t18E3#1 = <real2>[_t18DF,_t18E1];
          real2 pos18E5#1 = Add<real2>(_t18E3,_t13B8);
          real2 x18E7#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos18E5);
          bool _t18E9#1 = Inside<IMAGE2D<float>,2>(x18E7,_t132F);
          if _t18E9 then goto ASSIGN18ED else goto ASSIGN24E7
        ASSIGN18ED:  preds = [COND18EB]
          real2 x18EC#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v03133D);
          bool _t18EE#1 = Inside<IMAGE2D<int>,2>(x18EC,_t132B);
          goto JOIN18F2
        JOIN18F2:  preds = [ASSIGN18EF,ASSIGN24E7]
          bool _t18F0#1 = phi(_t18EE,_t18F1)
          if _t18F0 then goto ASSIGN18F5 else goto JOIN1A97
        ASSIGN18F5:  preds = [COND18F3]
          real2 nd18F4#2 = Floor<2>(x18E7);
          real2 f18F6#2 = Sub<real2>(x18E7,nd18F4);
          int{2} n18F8#2 = RealToInt<2>(nd18F4);
          int t118FA#4 = -1;
          int t218FC#1 = Index<int{2},0>(n18F8);
          int ix18FE#4 = Add<int>(t118FA,t218FC);
          int t21900#4 = Index<int{2},1>(n18F8);
          int iy1902#1 = Add<int>(t118FA,t21900);
          int n01905#8 = 21;
          int t1906#1 = Mul<int>(n01905,iy1902);
          int index1907#1 = Add<int>(ix18FE,t1906);
          addr(IMAGE2D<float>) imgBaseAddr1908#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1904#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1907);
          real4 v0190E#1 = LoadVoxels<IMAGE2D<float>,4>(a1904);
          int iy1910#1 = Add<int>(_t13B0,t21900);
          int t1914#1 = Mul<int>(n01905,iy1910);
          int index1915#1 = Add<int>(ix18FE,t1914);
          addr(IMAGE2D<float>) a1912#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1915);
          real4 v1191C#1 = LoadVoxels<IMAGE2D<float>,4>(a1912);
          int iy191E#1 = Add<int>(_t13B4,t21900);
          int t1922#1 = Mul<int>(n01905,iy191E);
          int index1923#1 = Add<int>(ix18FE,t1922);
          addr(IMAGE2D<float>) a1920#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1923);
          real4 v2192A#1 = LoadVoxels<IMAGE2D<float>,4>(a1920);
          int iy192C#1 = Add<int>(_t138C,t21900);
          int t1930#1 = Mul<int>(n01905,iy192C);
          int index1931#1 = Add<int>(ix18FE,t1930);
          addr(IMAGE2D<float>) a192E#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1908,index1931);
          real4 v31938#1 = LoadVoxels<IMAGE2D<float>,4>(a192E);
          real fy193A#4 = Index<real2,1>(f18F6);
          real t3193C#1 = Add<real>(fy193A,_t1388);
          real t1193E#1 = Sub<real>(fy193A,_t1388);
          real t01940#1 = Sub<real>(fy193A,_t138A);
          real4 a1942#3 = <real4>[t3193C,fy193A,t1193E,t01940];
          real _f1955#2 = 0.133333333333e1;
          real _f1956#2 = 0.666666666667e0;
          real4 a01945#4 = <real4>[_f1955,_f1956,_f1956,_f1955];
          real _f1951#1 = -0.2e1;
          real _f1952#2 = 0.0;
          real4 a11946#4 = <real4>[_f1951,_f1952,_f1952,_t138A];
          real _f194E#2 = -0.1e1;
          real4 a21947#4 = <real4>[_t1388,_f194E,_f194E,_t1388];
          real _f1949#1 = -0.166666666667e0;
          real _f194A#1 = 0.5e0;
          real _f194B#1 = -0.5e0;
          real _f194C#1 = 0.166666666667e0;
          real4 a31948#4 = <real4>[_f1949,_f194A,_f194B,_f194C];
          real4 prod31959#1 = Mul<real4>(a1942,a31948);
          real4 sum2195A#1 = Add<real4>(a21947,prod31959);
          real4 prod2195B#1 = Mul<real4>(a1942,sum2195A);
          real4 sum1195C#1 = Add<real4>(a11946,prod2195B);
          real4 prod1195D#1 = Mul<real4>(a1942,sum1195C);
          real4 hy1944#1 = Add<real4>(a01945,prod1195D);
          real fx1978#4 = Index<real2,0>(f18F6);
          real t3197A#1 = Add<real>(fx1978,_t1388);
          real t1197C#1 = Sub<real>(fx1978,_t1388);
          real t0197E#1 = Sub<real>(fx1978,_t138A);
          real4 a1980#3 = <real4>[t3197A,fx1978,t1197C,t0197E];
          real4 prod31997#1 = Mul<real4>(a1980,a31948);
          real4 sum21998#1 = Add<real4>(a21947,prod31997);
          real4 prod21999#1 = Mul<real4>(a1980,sum21998);
          real4 sum1199A#1 = Add<real4>(a11946,prod21999);
          real4 prod1199B#1 = Mul<real4>(a1980,sum1199A);
          real4 hx1982#4 = Add<real4>(a01945,prod1199B);
          real t019B6#1 = Dot<4>(v0190E,hx1982);
          real t119B8#1 = Dot<4>(v1191C,hx1982);
          real t219BA#1 = Dot<4>(v2192A,hx1982);
          real t319BC#1 = Dot<4>(v31938,hx1982);
          real4 tv19BE#1 = <real4>[t019B6,t119B8,t219BA,t319BC];
          real _t19C0#1 = Dot<4>(hy1944,tv19BE);
          real2 x19C2#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v03133D);
          real2 nd19C4#2 = Floor<2>(x19C2);
          real2 f19C6#2 = Sub<real2>(x19C2,nd19C4);
          int{2} n19C8#2 = RealToInt<2>(nd19C4);
          int t219CA#1 = Index<int{2},0>(n19C8);
          int ix19CC#4 = Add<int>(t118FA,t219CA);
          int t219CE#4 = Index<int{2},1>(n19C8);
          int iy19D0#1 = Add<int>(t118FA,t219CE);
          int t19D4#1 = Mul<int>(n01905,iy19D0);
          int index19D5#1 = Add<int>(ix19CC,t19D4);
          addr(IMAGE2D<int>) imgBaseAddr19D6#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a19D2#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19D5);
          real4 v019DC#1 = LoadVoxels<IMAGE2D<int>,4>(a19D2);
          int iy19DE#1 = Add<int>(_t13B0,t219CE);
          int t19E2#1 = Mul<int>(n01905,iy19DE);
          int index19E3#1 = Add<int>(ix19CC,t19E2);
          addr(IMAGE2D<int>) a19E0#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19E3);
          real4 v119EA#1 = LoadVoxels<IMAGE2D<int>,4>(a19E0);
          int iy19EC#1 = Add<int>(_t13B4,t219CE);
          int t19F0#1 = Mul<int>(n01905,iy19EC);
          int index19F1#1 = Add<int>(ix19CC,t19F0);
          addr(IMAGE2D<int>) a19EE#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19F1);
          real4 v219F8#1 = LoadVoxels<IMAGE2D<int>,4>(a19EE);
          int iy19FA#1 = Add<int>(_t138C,t219CE);
          int t19FE#1 = Mul<int>(n01905,iy19FA);
          int index19FF#1 = Add<int>(ix19CC,t19FE);
          addr(IMAGE2D<int>) a19FC#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr19D6,index19FF);
          real4 v31A06#1 = LoadVoxels<IMAGE2D<int>,4>(a19FC);
          real fy1A08#4 = Index<real2,1>(f19C6);
          real t31A0A#1 = Add<real>(fy1A08,_t1388);
          real t11A0C#1 = Sub<real>(fy1A08,_t1388);
          real t01A0E#1 = Sub<real>(fy1A08,_t138A);
          real4 a1A10#3 = <real4>[t31A0A,fy1A08,t11A0C,t01A0E];
          real4 prod31A27#1 = Mul<real4>(a1A10,a31948);
          real4 sum21A28#1 = Add<real4>(a21947,prod31A27);
          real4 prod21A29#1 = Mul<real4>(a1A10,sum21A28);
          real4 sum11A2A#1 = Add<real4>(a11946,prod21A29);
          real4 prod11A2B#1 = Mul<real4>(a1A10,sum11A2A);
          real4 hy1A12#1 = Add<real4>(a01945,prod11A2B);
          real fx1A46#4 = Index<real2,0>(f19C6);
          real t31A48#1 = Add<real>(fx1A46,_t1388);
          real t11A4A#1 = Sub<real>(fx1A46,_t1388);
          real t01A4C#1 = Sub<real>(fx1A46,_t138A);
          real4 a1A4E#3 = <real4>[t31A48,fx1A46,t11A4A,t01A4C];
          real4 prod31A65#1 = Mul<real4>(a1A4E,a31948);
          real4 sum21A66#1 = Add<real4>(a21947,prod31A65);
          real4 prod21A67#1 = Mul<real4>(a1A4E,sum21A66);
          real4 sum11A68#1 = Add<real4>(a11946,prod21A67);
          real4 prod11A69#1 = Mul<real4>(a1A4E,sum11A68);
          real4 hx1A50#4 = Add<real4>(a01945,prod11A69);
          real t01A84#1 = Dot<4>(v019DC,hx1A50);
          real t11A86#1 = Dot<4>(v119EA,hx1A50);
          real t21A88#1 = Dot<4>(v219F8,hx1A50);
          real t31A8A#1 = Dot<4>(v31A06,hx1A50);
          real4 tv1A8C#1 = <real4>[t01A84,t11A86,t21A88,t31A8A];
          real _t1A8E#1 = Dot<4>(hy1A12,tv1A8C);
          real _t1A90#2 = Sub<real>(_t19C0,_t1A8E);
          real _t1A92#1 = Mul<real>(_t1A90,_t1A90);
          real score1A94#1 = Add<real>(score18DD,_t1A92);
          goto JOIN1A97
        JOIN1A97:  preds = [ASSIGN1A95,COND18F3]
          real score1A96#2 = phi(score1A94,score18DD)
          real _t1A98#1 = Dot<2>(r013A2,v04133F);
          real _t1A9A#1 = Dot<2>(r113A8,v04133F);
          real2 _t1A9C#1 = <real2>[_t1A98,_t1A9A];
          real2 pos1A9E#1 = Add<real2>(_t1A9C,_t13B8);
          real2 x1AA0#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1A9E);
          bool _t1AA2#1 = Inside<IMAGE2D<float>,2>(x1AA0,_t132F);
          if _t1AA2 then goto ASSIGN1AA6 else goto ASSIGN24E6
        ASSIGN1AA6:  preds = [COND1AA4]
          real2 x1AA5#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v04133F);
          bool _t1AA7#1 = Inside<IMAGE2D<int>,2>(x1AA5,_t132B);
          goto JOIN1AAB
        JOIN1AAB:  preds = [ASSIGN1AA8,ASSIGN24E6]
          bool _t1AA9#1 = phi(_t1AA7,_t1AAA)
          if _t1AA9 then goto ASSIGN1AAE else goto JOIN1C50
        ASSIGN1AAE:  preds = [COND1AAC]
          real2 nd1AAD#2 = Floor<2>(x1AA0);
          real2 f1AAF#2 = Sub<real2>(x1AA0,nd1AAD);
          int{2} n1AB1#2 = RealToInt<2>(nd1AAD);
          int t11AB3#4 = -1;
          int t21AB5#1 = Index<int{2},0>(n1AB1);
          int ix1AB7#4 = Add<int>(t11AB3,t21AB5);
          int t21AB9#4 = Index<int{2},1>(n1AB1);
          int iy1ABB#1 = Add<int>(t11AB3,t21AB9);
          int n01ABE#8 = 21;
          int t1ABF#1 = Mul<int>(n01ABE,iy1ABB);
          int index1AC0#1 = Add<int>(ix1AB7,t1ABF);
          addr(IMAGE2D<float>) imgBaseAddr1AC1#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1ABD#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1AC0);
          real4 v01AC7#1 = LoadVoxels<IMAGE2D<float>,4>(a1ABD);
          int iy1AC9#1 = Add<int>(_t13B0,t21AB9);
          int t1ACD#1 = Mul<int>(n01ABE,iy1AC9);
          int index1ACE#1 = Add<int>(ix1AB7,t1ACD);
          addr(IMAGE2D<float>) a1ACB#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1ACE);
          real4 v11AD5#1 = LoadVoxels<IMAGE2D<float>,4>(a1ACB);
          int iy1AD7#1 = Add<int>(_t13B4,t21AB9);
          int t1ADB#1 = Mul<int>(n01ABE,iy1AD7);
          int index1ADC#1 = Add<int>(ix1AB7,t1ADB);
          addr(IMAGE2D<float>) a1AD9#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1ADC);
          real4 v21AE3#1 = LoadVoxels<IMAGE2D<float>,4>(a1AD9);
          int iy1AE5#1 = Add<int>(_t138C,t21AB9);
          int t1AE9#1 = Mul<int>(n01ABE,iy1AE5);
          int index1AEA#1 = Add<int>(ix1AB7,t1AE9);
          addr(IMAGE2D<float>) a1AE7#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1AC1,index1AEA);
          real4 v31AF1#1 = LoadVoxels<IMAGE2D<float>,4>(a1AE7);
          real fy1AF3#4 = Index<real2,1>(f1AAF);
          real t31AF5#1 = Add<real>(fy1AF3,_t1388);
          real t11AF7#1 = Sub<real>(fy1AF3,_t1388);
          real t01AF9#1 = Sub<real>(fy1AF3,_t138A);
          real4 a1AFB#3 = <real4>[t31AF5,fy1AF3,t11AF7,t01AF9];
          real _f1B0E#2 = 0.133333333333e1;
          real _f1B0F#2 = 0.666666666667e0;
          real4 a01AFE#4 = <real4>[_f1B0E,_f1B0F,_f1B0F,_f1B0E];
          real _f1B0A#1 = -0.2e1;
          real _f1B0B#2 = 0.0;
          real4 a11AFF#4 = <real4>[_f1B0A,_f1B0B,_f1B0B,_t138A];
          real _f1B07#2 = -0.1e1;
          real4 a21B00#4 = <real4>[_t1388,_f1B07,_f1B07,_t1388];
          real _f1B02#1 = -0.166666666667e0;
          real _f1B03#1 = 0.5e0;
          real _f1B04#1 = -0.5e0;
          real _f1B05#1 = 0.166666666667e0;
          real4 a31B01#4 = <real4>[_f1B02,_f1B03,_f1B04,_f1B05];
          real4 prod31B12#1 = Mul<real4>(a1AFB,a31B01);
          real4 sum21B13#1 = Add<real4>(a21B00,prod31B12);
          real4 prod21B14#1 = Mul<real4>(a1AFB,sum21B13);
          real4 sum11B15#1 = Add<real4>(a11AFF,prod21B14);
          real4 prod11B16#1 = Mul<real4>(a1AFB,sum11B15);
          real4 hy1AFD#1 = Add<real4>(a01AFE,prod11B16);
          real fx1B31#4 = Index<real2,0>(f1AAF);
          real t31B33#1 = Add<real>(fx1B31,_t1388);
          real t11B35#1 = Sub<real>(fx1B31,_t1388);
          real t01B37#1 = Sub<real>(fx1B31,_t138A);
          real4 a1B39#3 = <real4>[t31B33,fx1B31,t11B35,t01B37];
          real4 prod31B50#1 = Mul<real4>(a1B39,a31B01);
          real4 sum21B51#1 = Add<real4>(a21B00,prod31B50);
          real4 prod21B52#1 = Mul<real4>(a1B39,sum21B51);
          real4 sum11B53#1 = Add<real4>(a11AFF,prod21B52);
          real4 prod11B54#1 = Mul<real4>(a1B39,sum11B53);
          real4 hx1B3B#4 = Add<real4>(a01AFE,prod11B54);
          real t01B6F#1 = Dot<4>(v01AC7,hx1B3B);
          real t11B71#1 = Dot<4>(v11AD5,hx1B3B);
          real t21B73#1 = Dot<4>(v21AE3,hx1B3B);
          real t31B75#1 = Dot<4>(v31AF1,hx1B3B);
          real4 tv1B77#1 = <real4>[t01B6F,t11B71,t21B73,t31B75];
          real _t1B79#1 = Dot<4>(hy1AFD,tv1B77);
          real2 x1B7B#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v04133F);
          real2 nd1B7D#2 = Floor<2>(x1B7B);
          real2 f1B7F#2 = Sub<real2>(x1B7B,nd1B7D);
          int{2} n1B81#2 = RealToInt<2>(nd1B7D);
          int t21B83#1 = Index<int{2},0>(n1B81);
          int ix1B85#4 = Add<int>(t11AB3,t21B83);
          int t21B87#4 = Index<int{2},1>(n1B81);
          int iy1B89#1 = Add<int>(t11AB3,t21B87);
          int t1B8D#1 = Mul<int>(n01ABE,iy1B89);
          int index1B8E#1 = Add<int>(ix1B85,t1B8D);
          addr(IMAGE2D<int>) imgBaseAddr1B8F#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1B8B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1B8E);
          real4 v01B95#1 = LoadVoxels<IMAGE2D<int>,4>(a1B8B);
          int iy1B97#1 = Add<int>(_t13B0,t21B87);
          int t1B9B#1 = Mul<int>(n01ABE,iy1B97);
          int index1B9C#1 = Add<int>(ix1B85,t1B9B);
          addr(IMAGE2D<int>) a1B99#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1B9C);
          real4 v11BA3#1 = LoadVoxels<IMAGE2D<int>,4>(a1B99);
          int iy1BA5#1 = Add<int>(_t13B4,t21B87);
          int t1BA9#1 = Mul<int>(n01ABE,iy1BA5);
          int index1BAA#1 = Add<int>(ix1B85,t1BA9);
          addr(IMAGE2D<int>) a1BA7#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1BAA);
          real4 v21BB1#1 = LoadVoxels<IMAGE2D<int>,4>(a1BA7);
          int iy1BB3#1 = Add<int>(_t138C,t21B87);
          int t1BB7#1 = Mul<int>(n01ABE,iy1BB3);
          int index1BB8#1 = Add<int>(ix1B85,t1BB7);
          addr(IMAGE2D<int>) a1BB5#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1B8F,index1BB8);
          real4 v31BBF#1 = LoadVoxels<IMAGE2D<int>,4>(a1BB5);
          real fy1BC1#4 = Index<real2,1>(f1B7F);
          real t31BC3#1 = Add<real>(fy1BC1,_t1388);
          real t11BC5#1 = Sub<real>(fy1BC1,_t1388);
          real t01BC7#1 = Sub<real>(fy1BC1,_t138A);
          real4 a1BC9#3 = <real4>[t31BC3,fy1BC1,t11BC5,t01BC7];
          real4 prod31BE0#1 = Mul<real4>(a1BC9,a31B01);
          real4 sum21BE1#1 = Add<real4>(a21B00,prod31BE0);
          real4 prod21BE2#1 = Mul<real4>(a1BC9,sum21BE1);
          real4 sum11BE3#1 = Add<real4>(a11AFF,prod21BE2);
          real4 prod11BE4#1 = Mul<real4>(a1BC9,sum11BE3);
          real4 hy1BCB#1 = Add<real4>(a01AFE,prod11BE4);
          real fx1BFF#4 = Index<real2,0>(f1B7F);
          real t31C01#1 = Add<real>(fx1BFF,_t1388);
          real t11C03#1 = Sub<real>(fx1BFF,_t1388);
          real t01C05#1 = Sub<real>(fx1BFF,_t138A);
          real4 a1C07#3 = <real4>[t31C01,fx1BFF,t11C03,t01C05];
          real4 prod31C1E#1 = Mul<real4>(a1C07,a31B01);
          real4 sum21C1F#1 = Add<real4>(a21B00,prod31C1E);
          real4 prod21C20#1 = Mul<real4>(a1C07,sum21C1F);
          real4 sum11C21#1 = Add<real4>(a11AFF,prod21C20);
          real4 prod11C22#1 = Mul<real4>(a1C07,sum11C21);
          real4 hx1C09#4 = Add<real4>(a01AFE,prod11C22);
          real t01C3D#1 = Dot<4>(v01B95,hx1C09);
          real t11C3F#1 = Dot<4>(v11BA3,hx1C09);
          real t21C41#1 = Dot<4>(v21BB1,hx1C09);
          real t31C43#1 = Dot<4>(v31BBF,hx1C09);
          real4 tv1C45#1 = <real4>[t01C3D,t11C3F,t21C41,t31C43];
          real _t1C47#1 = Dot<4>(hy1BCB,tv1C45);
          real _t1C49#2 = Sub<real>(_t1B79,_t1C47);
          real _t1C4B#1 = Mul<real>(_t1C49,_t1C49);
          real score1C4D#1 = Add<real>(score1A96,_t1C4B);
          goto JOIN1C50
        JOIN1C50:  preds = [ASSIGN1C4E,COND1AAC]
          real score1C4F#2 = phi(score1C4D,score1A96)
          if _t13BE then goto JOIN1C52 else goto JOIN1C52
        JOIN1C52:  preds = [COND1C51]
          if _t13C5 then goto ASSIGN1C55 else goto JOIN1DF7
        ASSIGN1C55:  preds = [COND1C53]
          real2 nd1C54#2 = Floor<2>(x13BC);
          real2 f1C56#2 = Sub<real2>(x13BC,nd1C54);
          int{2} n1C58#2 = RealToInt<2>(nd1C54);
          int t11C5A#4 = -1;
          int t21C5C#1 = Index<int{2},0>(n1C58);
          int ix1C5E#4 = Add<int>(t11C5A,t21C5C);
          int t21C60#4 = Index<int{2},1>(n1C58);
          int iy1C62#1 = Add<int>(t11C5A,t21C60);
          int n01C65#8 = 21;
          int t1C66#1 = Mul<int>(n01C65,iy1C62);
          int index1C67#1 = Add<int>(ix1C5E,t1C66);
          addr(IMAGE2D<float>) imgBaseAddr1C68#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1C64#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C67);
          real4 v01C6E#1 = LoadVoxels<IMAGE2D<float>,4>(a1C64);
          int iy1C70#1 = Add<int>(_t13B0,t21C60);
          int t1C74#1 = Mul<int>(n01C65,iy1C70);
          int index1C75#1 = Add<int>(ix1C5E,t1C74);
          addr(IMAGE2D<float>) a1C72#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C75);
          real4 v11C7C#1 = LoadVoxels<IMAGE2D<float>,4>(a1C72);
          int iy1C7E#1 = Add<int>(_t13B4,t21C60);
          int t1C82#1 = Mul<int>(n01C65,iy1C7E);
          int index1C83#1 = Add<int>(ix1C5E,t1C82);
          addr(IMAGE2D<float>) a1C80#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C83);
          real4 v21C8A#1 = LoadVoxels<IMAGE2D<float>,4>(a1C80);
          int iy1C8C#1 = Add<int>(_t138C,t21C60);
          int t1C90#1 = Mul<int>(n01C65,iy1C8C);
          int index1C91#1 = Add<int>(ix1C5E,t1C90);
          addr(IMAGE2D<float>) a1C8E#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1C68,index1C91);
          real4 v31C98#1 = LoadVoxels<IMAGE2D<float>,4>(a1C8E);
          real fy1C9A#4 = Index<real2,1>(f1C56);
          real t31C9C#1 = Add<real>(fy1C9A,_t1388);
          real t11C9E#1 = Sub<real>(fy1C9A,_t1388);
          real t01CA0#1 = Sub<real>(fy1C9A,_t138A);
          real4 a1CA2#3 = <real4>[t31C9C,fy1C9A,t11C9E,t01CA0];
          real _f1CB5#2 = 0.133333333333e1;
          real _f1CB6#2 = 0.666666666667e0;
          real4 a01CA5#4 = <real4>[_f1CB5,_f1CB6,_f1CB6,_f1CB5];
          real _f1CB1#1 = -0.2e1;
          real _f1CB2#2 = 0.0;
          real4 a11CA6#4 = <real4>[_f1CB1,_f1CB2,_f1CB2,_t138A];
          real _f1CAE#2 = -0.1e1;
          real4 a21CA7#4 = <real4>[_t1388,_f1CAE,_f1CAE,_t1388];
          real _f1CA9#1 = -0.166666666667e0;
          real _f1CAA#1 = 0.5e0;
          real _f1CAB#1 = -0.5e0;
          real _f1CAC#1 = 0.166666666667e0;
          real4 a31CA8#4 = <real4>[_f1CA9,_f1CAA,_f1CAB,_f1CAC];
          real4 prod31CB9#1 = Mul<real4>(a1CA2,a31CA8);
          real4 sum21CBA#1 = Add<real4>(a21CA7,prod31CB9);
          real4 prod21CBB#1 = Mul<real4>(a1CA2,sum21CBA);
          real4 sum11CBC#1 = Add<real4>(a11CA6,prod21CBB);
          real4 prod11CBD#1 = Mul<real4>(a1CA2,sum11CBC);
          real4 hy1CA4#1 = Add<real4>(a01CA5,prod11CBD);
          real fx1CD8#4 = Index<real2,0>(f1C56);
          real t31CDA#1 = Add<real>(fx1CD8,_t1388);
          real t11CDC#1 = Sub<real>(fx1CD8,_t1388);
          real t01CDE#1 = Sub<real>(fx1CD8,_t138A);
          real4 a1CE0#3 = <real4>[t31CDA,fx1CD8,t11CDC,t01CDE];
          real4 prod31CF7#1 = Mul<real4>(a1CE0,a31CA8);
          real4 sum21CF8#1 = Add<real4>(a21CA7,prod31CF7);
          real4 prod21CF9#1 = Mul<real4>(a1CE0,sum21CF8);
          real4 sum11CFA#1 = Add<real4>(a11CA6,prod21CF9);
          real4 prod11CFB#1 = Mul<real4>(a1CE0,sum11CFA);
          real4 hx1CE2#4 = Add<real4>(a01CA5,prod11CFB);
          real t01D16#1 = Dot<4>(v01C6E,hx1CE2);
          real t11D18#1 = Dot<4>(v11C7C,hx1CE2);
          real t21D1A#1 = Dot<4>(v21C8A,hx1CE2);
          real t31D1C#1 = Dot<4>(v31C98,hx1CE2);
          real4 tv1D1E#1 = <real4>[t01D16,t11D18,t21D1A,t31D1C];
          real _t1D20#1 = Dot<4>(hy1CA4,tv1D1E);
          real2 x1D22#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v001333);
          real2 nd1D24#2 = Floor<2>(x1D22);
          real2 f1D26#2 = Sub<real2>(x1D22,nd1D24);
          int{2} n1D28#2 = RealToInt<2>(nd1D24);
          int t21D2A#1 = Index<int{2},0>(n1D28);
          int ix1D2C#4 = Add<int>(t11C5A,t21D2A);
          int t21D2E#4 = Index<int{2},1>(n1D28);
          int iy1D30#1 = Add<int>(t11C5A,t21D2E);
          int t1D34#1 = Mul<int>(n01C65,iy1D30);
          int index1D35#1 = Add<int>(ix1D2C,t1D34);
          addr(IMAGE2D<int>) imgBaseAddr1D36#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1D32#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D35);
          real4 v01D3C#1 = LoadVoxels<IMAGE2D<int>,4>(a1D32);
          int iy1D3E#1 = Add<int>(_t13B0,t21D2E);
          int t1D42#1 = Mul<int>(n01C65,iy1D3E);
          int index1D43#1 = Add<int>(ix1D2C,t1D42);
          addr(IMAGE2D<int>) a1D40#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D43);
          real4 v11D4A#1 = LoadVoxels<IMAGE2D<int>,4>(a1D40);
          int iy1D4C#1 = Add<int>(_t13B4,t21D2E);
          int t1D50#1 = Mul<int>(n01C65,iy1D4C);
          int index1D51#1 = Add<int>(ix1D2C,t1D50);
          addr(IMAGE2D<int>) a1D4E#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D51);
          real4 v21D58#1 = LoadVoxels<IMAGE2D<int>,4>(a1D4E);
          int iy1D5A#1 = Add<int>(_t138C,t21D2E);
          int t1D5E#1 = Mul<int>(n01C65,iy1D5A);
          int index1D5F#1 = Add<int>(ix1D2C,t1D5E);
          addr(IMAGE2D<int>) a1D5C#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1D36,index1D5F);
          real4 v31D66#1 = LoadVoxels<IMAGE2D<int>,4>(a1D5C);
          real fy1D68#4 = Index<real2,1>(f1D26);
          real t31D6A#1 = Add<real>(fy1D68,_t1388);
          real t11D6C#1 = Sub<real>(fy1D68,_t1388);
          real t01D6E#1 = Sub<real>(fy1D68,_t138A);
          real4 a1D70#3 = <real4>[t31D6A,fy1D68,t11D6C,t01D6E];
          real4 prod31D87#1 = Mul<real4>(a1D70,a31CA8);
          real4 sum21D88#1 = Add<real4>(a21CA7,prod31D87);
          real4 prod21D89#1 = Mul<real4>(a1D70,sum21D88);
          real4 sum11D8A#1 = Add<real4>(a11CA6,prod21D89);
          real4 prod11D8B#1 = Mul<real4>(a1D70,sum11D8A);
          real4 hy1D72#1 = Add<real4>(a01CA5,prod11D8B);
          real fx1DA6#4 = Index<real2,0>(f1D26);
          real t31DA8#1 = Add<real>(fx1DA6,_t1388);
          real t11DAA#1 = Sub<real>(fx1DA6,_t1388);
          real t01DAC#1 = Sub<real>(fx1DA6,_t138A);
          real4 a1DAE#3 = <real4>[t31DA8,fx1DA6,t11DAA,t01DAC];
          real4 prod31DC5#1 = Mul<real4>(a1DAE,a31CA8);
          real4 sum21DC6#1 = Add<real4>(a21CA7,prod31DC5);
          real4 prod21DC7#1 = Mul<real4>(a1DAE,sum21DC6);
          real4 sum11DC8#1 = Add<real4>(a11CA6,prod21DC7);
          real4 prod11DC9#1 = Mul<real4>(a1DAE,sum11DC8);
          real4 hx1DB0#4 = Add<real4>(a01CA5,prod11DC9);
          real t01DE4#1 = Dot<4>(v01D3C,hx1DB0);
          real t11DE6#1 = Dot<4>(v11D4A,hx1DB0);
          real t21DE8#1 = Dot<4>(v21D58,hx1DB0);
          real t31DEA#1 = Dot<4>(v31D66,hx1DB0);
          real4 tv1DEC#1 = <real4>[t01DE4,t11DE6,t21DE8,t31DEA];
          real _t1DEE#1 = Dot<4>(hy1D72,tv1DEC);
          real _t1DF0#2 = Sub<real>(_t1D20,_t1DEE);
          real _t1DF2#1 = Mul<real>(_t1DF0,_t1DF0);
          real score1DF4#1 = Add<real>(score1C4F,_t1DF2);
          goto JOIN1DF7
        JOIN1DF7:  preds = [ASSIGN1DF5,COND1C53]
          real score1DF6#2 = phi(score1DF4,score1C4F)
          real _t1DF8#1 = Dot<2>(r013A2,v061341);
          real _t1DFA#1 = Dot<2>(r113A8,v061341);
          real2 _t1DFC#1 = <real2>[_t1DF8,_t1DFA];
          real2 pos1DFE#1 = Add<real2>(_t1DFC,_t13B8);
          real2 x1E00#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1DFE);
          bool _t1E02#1 = Inside<IMAGE2D<float>,2>(x1E00,_t132F);
          if _t1E02 then goto ASSIGN1E06 else goto ASSIGN24E5
        ASSIGN1E06:  preds = [COND1E04]
          real2 x1E05#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v061341);
          bool _t1E07#1 = Inside<IMAGE2D<int>,2>(x1E05,_t132B);
          goto JOIN1E0B
        JOIN1E0B:  preds = [ASSIGN1E08,ASSIGN24E5]
          bool _t1E09#1 = phi(_t1E07,_t1E0A)
          if _t1E09 then goto ASSIGN1E0E else goto JOIN1FB0
        ASSIGN1E0E:  preds = [COND1E0C]
          real2 nd1E0D#2 = Floor<2>(x1E00);
          real2 f1E0F#2 = Sub<real2>(x1E00,nd1E0D);
          int{2} n1E11#2 = RealToInt<2>(nd1E0D);
          int t11E13#4 = -1;
          int t21E15#1 = Index<int{2},0>(n1E11);
          int ix1E17#4 = Add<int>(t11E13,t21E15);
          int t21E19#4 = Index<int{2},1>(n1E11);
          int iy1E1B#1 = Add<int>(t11E13,t21E19);
          int n01E1E#8 = 21;
          int t1E1F#1 = Mul<int>(n01E1E,iy1E1B);
          int index1E20#1 = Add<int>(ix1E17,t1E1F);
          addr(IMAGE2D<float>) imgBaseAddr1E21#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1E1D#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E20);
          real4 v01E27#1 = LoadVoxels<IMAGE2D<float>,4>(a1E1D);
          int iy1E29#1 = Add<int>(_t13B0,t21E19);
          int t1E2D#1 = Mul<int>(n01E1E,iy1E29);
          int index1E2E#1 = Add<int>(ix1E17,t1E2D);
          addr(IMAGE2D<float>) a1E2B#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E2E);
          real4 v11E35#1 = LoadVoxels<IMAGE2D<float>,4>(a1E2B);
          int iy1E37#1 = Add<int>(_t13B4,t21E19);
          int t1E3B#1 = Mul<int>(n01E1E,iy1E37);
          int index1E3C#1 = Add<int>(ix1E17,t1E3B);
          addr(IMAGE2D<float>) a1E39#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E3C);
          real4 v21E43#1 = LoadVoxels<IMAGE2D<float>,4>(a1E39);
          int iy1E45#1 = Add<int>(_t138C,t21E19);
          int t1E49#1 = Mul<int>(n01E1E,iy1E45);
          int index1E4A#1 = Add<int>(ix1E17,t1E49);
          addr(IMAGE2D<float>) a1E47#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1E21,index1E4A);
          real4 v31E51#1 = LoadVoxels<IMAGE2D<float>,4>(a1E47);
          real fy1E53#4 = Index<real2,1>(f1E0F);
          real t31E55#1 = Add<real>(fy1E53,_t1388);
          real t11E57#1 = Sub<real>(fy1E53,_t1388);
          real t01E59#1 = Sub<real>(fy1E53,_t138A);
          real4 a1E5B#3 = <real4>[t31E55,fy1E53,t11E57,t01E59];
          real _f1E6E#2 = 0.133333333333e1;
          real _f1E6F#2 = 0.666666666667e0;
          real4 a01E5E#4 = <real4>[_f1E6E,_f1E6F,_f1E6F,_f1E6E];
          real _f1E6A#1 = -0.2e1;
          real _f1E6B#2 = 0.0;
          real4 a11E5F#4 = <real4>[_f1E6A,_f1E6B,_f1E6B,_t138A];
          real _f1E67#2 = -0.1e1;
          real4 a21E60#4 = <real4>[_t1388,_f1E67,_f1E67,_t1388];
          real _f1E62#1 = -0.166666666667e0;
          real _f1E63#1 = 0.5e0;
          real _f1E64#1 = -0.5e0;
          real _f1E65#1 = 0.166666666667e0;
          real4 a31E61#4 = <real4>[_f1E62,_f1E63,_f1E64,_f1E65];
          real4 prod31E72#1 = Mul<real4>(a1E5B,a31E61);
          real4 sum21E73#1 = Add<real4>(a21E60,prod31E72);
          real4 prod21E74#1 = Mul<real4>(a1E5B,sum21E73);
          real4 sum11E75#1 = Add<real4>(a11E5F,prod21E74);
          real4 prod11E76#1 = Mul<real4>(a1E5B,sum11E75);
          real4 hy1E5D#1 = Add<real4>(a01E5E,prod11E76);
          real fx1E91#4 = Index<real2,0>(f1E0F);
          real t31E93#1 = Add<real>(fx1E91,_t1388);
          real t11E95#1 = Sub<real>(fx1E91,_t1388);
          real t01E97#1 = Sub<real>(fx1E91,_t138A);
          real4 a1E99#3 = <real4>[t31E93,fx1E91,t11E95,t01E97];
          real4 prod31EB0#1 = Mul<real4>(a1E99,a31E61);
          real4 sum21EB1#1 = Add<real4>(a21E60,prod31EB0);
          real4 prod21EB2#1 = Mul<real4>(a1E99,sum21EB1);
          real4 sum11EB3#1 = Add<real4>(a11E5F,prod21EB2);
          real4 prod11EB4#1 = Mul<real4>(a1E99,sum11EB3);
          real4 hx1E9B#4 = Add<real4>(a01E5E,prod11EB4);
          real t01ECF#1 = Dot<4>(v01E27,hx1E9B);
          real t11ED1#1 = Dot<4>(v11E35,hx1E9B);
          real t21ED3#1 = Dot<4>(v21E43,hx1E9B);
          real t31ED5#1 = Dot<4>(v31E51,hx1E9B);
          real4 tv1ED7#1 = <real4>[t01ECF,t11ED1,t21ED3,t31ED5];
          real _t1ED9#1 = Dot<4>(hy1E5D,tv1ED7);
          real2 x1EDB#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v061341);
          real2 nd1EDD#2 = Floor<2>(x1EDB);
          real2 f1EDF#2 = Sub<real2>(x1EDB,nd1EDD);
          int{2} n1EE1#2 = RealToInt<2>(nd1EDD);
          int t21EE3#1 = Index<int{2},0>(n1EE1);
          int ix1EE5#4 = Add<int>(t11E13,t21EE3);
          int t21EE7#4 = Index<int{2},1>(n1EE1);
          int iy1EE9#1 = Add<int>(t11E13,t21EE7);
          int t1EED#1 = Mul<int>(n01E1E,iy1EE9);
          int index1EEE#1 = Add<int>(ix1EE5,t1EED);
          addr(IMAGE2D<int>) imgBaseAddr1EEF#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a1EEB#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1EEE);
          real4 v01EF5#1 = LoadVoxels<IMAGE2D<int>,4>(a1EEB);
          int iy1EF7#1 = Add<int>(_t13B0,t21EE7);
          int t1EFB#1 = Mul<int>(n01E1E,iy1EF7);
          int index1EFC#1 = Add<int>(ix1EE5,t1EFB);
          addr(IMAGE2D<int>) a1EF9#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1EFC);
          real4 v11F03#1 = LoadVoxels<IMAGE2D<int>,4>(a1EF9);
          int iy1F05#1 = Add<int>(_t13B4,t21EE7);
          int t1F09#1 = Mul<int>(n01E1E,iy1F05);
          int index1F0A#1 = Add<int>(ix1EE5,t1F09);
          addr(IMAGE2D<int>) a1F07#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1F0A);
          real4 v21F11#1 = LoadVoxels<IMAGE2D<int>,4>(a1F07);
          int iy1F13#1 = Add<int>(_t138C,t21EE7);
          int t1F17#1 = Mul<int>(n01E1E,iy1F13);
          int index1F18#1 = Add<int>(ix1EE5,t1F17);
          addr(IMAGE2D<int>) a1F15#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr1EEF,index1F18);
          real4 v31F1F#1 = LoadVoxels<IMAGE2D<int>,4>(a1F15);
          real fy1F21#4 = Index<real2,1>(f1EDF);
          real t31F23#1 = Add<real>(fy1F21,_t1388);
          real t11F25#1 = Sub<real>(fy1F21,_t1388);
          real t01F27#1 = Sub<real>(fy1F21,_t138A);
          real4 a1F29#3 = <real4>[t31F23,fy1F21,t11F25,t01F27];
          real4 prod31F40#1 = Mul<real4>(a1F29,a31E61);
          real4 sum21F41#1 = Add<real4>(a21E60,prod31F40);
          real4 prod21F42#1 = Mul<real4>(a1F29,sum21F41);
          real4 sum11F43#1 = Add<real4>(a11E5F,prod21F42);
          real4 prod11F44#1 = Mul<real4>(a1F29,sum11F43);
          real4 hy1F2B#1 = Add<real4>(a01E5E,prod11F44);
          real fx1F5F#4 = Index<real2,0>(f1EDF);
          real t31F61#1 = Add<real>(fx1F5F,_t1388);
          real t11F63#1 = Sub<real>(fx1F5F,_t1388);
          real t01F65#1 = Sub<real>(fx1F5F,_t138A);
          real4 a1F67#3 = <real4>[t31F61,fx1F5F,t11F63,t01F65];
          real4 prod31F7E#1 = Mul<real4>(a1F67,a31E61);
          real4 sum21F7F#1 = Add<real4>(a21E60,prod31F7E);
          real4 prod21F80#1 = Mul<real4>(a1F67,sum21F7F);
          real4 sum11F81#1 = Add<real4>(a11E5F,prod21F80);
          real4 prod11F82#1 = Mul<real4>(a1F67,sum11F81);
          real4 hx1F69#4 = Add<real4>(a01E5E,prod11F82);
          real t01F9D#1 = Dot<4>(v01EF5,hx1F69);
          real t11F9F#1 = Dot<4>(v11F03,hx1F69);
          real t21FA1#1 = Dot<4>(v21F11,hx1F69);
          real t31FA3#1 = Dot<4>(v31F1F,hx1F69);
          real4 tv1FA5#1 = <real4>[t01F9D,t11F9F,t21FA1,t31FA3];
          real _t1FA7#1 = Dot<4>(hy1F2B,tv1FA5);
          real _t1FA9#2 = Sub<real>(_t1ED9,_t1FA7);
          real _t1FAB#1 = Mul<real>(_t1FA9,_t1FA9);
          real score1FAD#1 = Add<real>(score1DF6,_t1FAB);
          goto JOIN1FB0
        JOIN1FB0:  preds = [ASSIGN1FAE,COND1E0C]
          real score1FAF#2 = phi(score1FAD,score1DF6)
          real _t1FB1#1 = Dot<2>(r013A2,v071343);
          real _t1FB3#1 = Dot<2>(r113A8,v071343);
          real2 _t1FB5#1 = <real2>[_t1FB1,_t1FB3];
          real2 pos1FB7#1 = Add<real2>(_t1FB5,_t13B8);
          real2 x1FB9#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos1FB7);
          bool _t1FBB#1 = Inside<IMAGE2D<float>,2>(x1FB9,_t132F);
          if _t1FBB then goto ASSIGN1FBF else goto ASSIGN24E4
        ASSIGN1FBF:  preds = [COND1FBD]
          real2 x1FBE#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v071343);
          bool _t1FC0#1 = Inside<IMAGE2D<int>,2>(x1FBE,_t132B);
          goto JOIN1FC4
        JOIN1FC4:  preds = [ASSIGN1FC1,ASSIGN24E4]
          bool _t1FC2#1 = phi(_t1FC0,_t1FC3)
          if _t1FC2 then goto ASSIGN1FC7 else goto JOIN2169
        ASSIGN1FC7:  preds = [COND1FC5]
          real2 nd1FC6#2 = Floor<2>(x1FB9);
          real2 f1FC8#2 = Sub<real2>(x1FB9,nd1FC6);
          int{2} n1FCA#2 = RealToInt<2>(nd1FC6);
          int t11FCC#4 = -1;
          int t21FCE#1 = Index<int{2},0>(n1FCA);
          int ix1FD0#4 = Add<int>(t11FCC,t21FCE);
          int t21FD2#4 = Index<int{2},1>(n1FCA);
          int iy1FD4#1 = Add<int>(t11FCC,t21FD2);
          int n01FD7#8 = 21;
          int t1FD8#1 = Mul<int>(n01FD7,iy1FD4);
          int index1FD9#1 = Add<int>(ix1FD0,t1FD8);
          addr(IMAGE2D<float>) imgBaseAddr1FDA#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a1FD6#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index1FD9);
          real4 v01FE0#1 = LoadVoxels<IMAGE2D<float>,4>(a1FD6);
          int iy1FE2#1 = Add<int>(_t13B0,t21FD2);
          int t1FE6#1 = Mul<int>(n01FD7,iy1FE2);
          int index1FE7#1 = Add<int>(ix1FD0,t1FE6);
          addr(IMAGE2D<float>) a1FE4#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index1FE7);
          real4 v11FEE#1 = LoadVoxels<IMAGE2D<float>,4>(a1FE4);
          int iy1FF0#1 = Add<int>(_t13B4,t21FD2);
          int t1FF4#1 = Mul<int>(n01FD7,iy1FF0);
          int index1FF5#1 = Add<int>(ix1FD0,t1FF4);
          addr(IMAGE2D<float>) a1FF2#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index1FF5);
          real4 v21FFC#1 = LoadVoxels<IMAGE2D<float>,4>(a1FF2);
          int iy1FFE#1 = Add<int>(_t138C,t21FD2);
          int t2002#1 = Mul<int>(n01FD7,iy1FFE);
          int index2003#1 = Add<int>(ix1FD0,t2002);
          addr(IMAGE2D<float>) a2000#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr1FDA,index2003);
          real4 v3200A#1 = LoadVoxels<IMAGE2D<float>,4>(a2000);
          real fy200C#4 = Index<real2,1>(f1FC8);
          real t3200E#1 = Add<real>(fy200C,_t1388);
          real t12010#1 = Sub<real>(fy200C,_t1388);
          real t02012#1 = Sub<real>(fy200C,_t138A);
          real4 a2014#3 = <real4>[t3200E,fy200C,t12010,t02012];
          real _f2027#2 = 0.133333333333e1;
          real _f2028#2 = 0.666666666667e0;
          real4 a02017#4 = <real4>[_f2027,_f2028,_f2028,_f2027];
          real _f2023#1 = -0.2e1;
          real _f2024#2 = 0.0;
          real4 a12018#4 = <real4>[_f2023,_f2024,_f2024,_t138A];
          real _f2020#2 = -0.1e1;
          real4 a22019#4 = <real4>[_t1388,_f2020,_f2020,_t1388];
          real _f201B#1 = -0.166666666667e0;
          real _f201C#1 = 0.5e0;
          real _f201D#1 = -0.5e0;
          real _f201E#1 = 0.166666666667e0;
          real4 a3201A#4 = <real4>[_f201B,_f201C,_f201D,_f201E];
          real4 prod3202B#1 = Mul<real4>(a2014,a3201A);
          real4 sum2202C#1 = Add<real4>(a22019,prod3202B);
          real4 prod2202D#1 = Mul<real4>(a2014,sum2202C);
          real4 sum1202E#1 = Add<real4>(a12018,prod2202D);
          real4 prod1202F#1 = Mul<real4>(a2014,sum1202E);
          real4 hy2016#1 = Add<real4>(a02017,prod1202F);
          real fx204A#4 = Index<real2,0>(f1FC8);
          real t3204C#1 = Add<real>(fx204A,_t1388);
          real t1204E#1 = Sub<real>(fx204A,_t1388);
          real t02050#1 = Sub<real>(fx204A,_t138A);
          real4 a2052#3 = <real4>[t3204C,fx204A,t1204E,t02050];
          real4 prod32069#1 = Mul<real4>(a2052,a3201A);
          real4 sum2206A#1 = Add<real4>(a22019,prod32069);
          real4 prod2206B#1 = Mul<real4>(a2052,sum2206A);
          real4 sum1206C#1 = Add<real4>(a12018,prod2206B);
          real4 prod1206D#1 = Mul<real4>(a2052,sum1206C);
          real4 hx2054#4 = Add<real4>(a02017,prod1206D);
          real t02088#1 = Dot<4>(v01FE0,hx2054);
          real t1208A#1 = Dot<4>(v11FEE,hx2054);
          real t2208C#1 = Dot<4>(v21FFC,hx2054);
          real t3208E#1 = Dot<4>(v3200A,hx2054);
          real4 tv2090#1 = <real4>[t02088,t1208A,t2208C,t3208E];
          real _t2092#1 = Dot<4>(hy2016,tv2090);
          real2 x2094#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v071343);
          real2 nd2096#2 = Floor<2>(x2094);
          real2 f2098#2 = Sub<real2>(x2094,nd2096);
          int{2} n209A#2 = RealToInt<2>(nd2096);
          int t2209C#1 = Index<int{2},0>(n209A);
          int ix209E#4 = Add<int>(t11FCC,t2209C);
          int t220A0#4 = Index<int{2},1>(n209A);
          int iy20A2#1 = Add<int>(t11FCC,t220A0);
          int t20A6#1 = Mul<int>(n01FD7,iy20A2);
          int index20A7#1 = Add<int>(ix209E,t20A6);
          addr(IMAGE2D<int>) imgBaseAddr20A8#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a20A4#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20A7);
          real4 v020AE#1 = LoadVoxels<IMAGE2D<int>,4>(a20A4);
          int iy20B0#1 = Add<int>(_t13B0,t220A0);
          int t20B4#1 = Mul<int>(n01FD7,iy20B0);
          int index20B5#1 = Add<int>(ix209E,t20B4);
          addr(IMAGE2D<int>) a20B2#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20B5);
          real4 v120BC#1 = LoadVoxels<IMAGE2D<int>,4>(a20B2);
          int iy20BE#1 = Add<int>(_t13B4,t220A0);
          int t20C2#1 = Mul<int>(n01FD7,iy20BE);
          int index20C3#1 = Add<int>(ix209E,t20C2);
          addr(IMAGE2D<int>) a20C0#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20C3);
          real4 v220CA#1 = LoadVoxels<IMAGE2D<int>,4>(a20C0);
          int iy20CC#1 = Add<int>(_t138C,t220A0);
          int t20D0#1 = Mul<int>(n01FD7,iy20CC);
          int index20D1#1 = Add<int>(ix209E,t20D0);
          addr(IMAGE2D<int>) a20CE#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr20A8,index20D1);
          real4 v320D8#1 = LoadVoxels<IMAGE2D<int>,4>(a20CE);
          real fy20DA#4 = Index<real2,1>(f2098);
          real t320DC#1 = Add<real>(fy20DA,_t1388);
          real t120DE#1 = Sub<real>(fy20DA,_t1388);
          real t020E0#1 = Sub<real>(fy20DA,_t138A);
          real4 a20E2#3 = <real4>[t320DC,fy20DA,t120DE,t020E0];
          real4 prod320F9#1 = Mul<real4>(a20E2,a3201A);
          real4 sum220FA#1 = Add<real4>(a22019,prod320F9);
          real4 prod220FB#1 = Mul<real4>(a20E2,sum220FA);
          real4 sum120FC#1 = Add<real4>(a12018,prod220FB);
          real4 prod120FD#1 = Mul<real4>(a20E2,sum120FC);
          real4 hy20E4#1 = Add<real4>(a02017,prod120FD);
          real fx2118#4 = Index<real2,0>(f2098);
          real t3211A#1 = Add<real>(fx2118,_t1388);
          real t1211C#1 = Sub<real>(fx2118,_t1388);
          real t0211E#1 = Sub<real>(fx2118,_t138A);
          real4 a2120#3 = <real4>[t3211A,fx2118,t1211C,t0211E];
          real4 prod32137#1 = Mul<real4>(a2120,a3201A);
          real4 sum22138#1 = Add<real4>(a22019,prod32137);
          real4 prod22139#1 = Mul<real4>(a2120,sum22138);
          real4 sum1213A#1 = Add<real4>(a12018,prod22139);
          real4 prod1213B#1 = Mul<real4>(a2120,sum1213A);
          real4 hx2122#4 = Add<real4>(a02017,prod1213B);
          real t02156#1 = Dot<4>(v020AE,hx2122);
          real t12158#1 = Dot<4>(v120BC,hx2122);
          real t2215A#1 = Dot<4>(v220CA,hx2122);
          real t3215C#1 = Dot<4>(v320D8,hx2122);
          real4 tv215E#1 = <real4>[t02156,t12158,t2215A,t3215C];
          real _t2160#1 = Dot<4>(hy20E4,tv215E);
          real _t2162#2 = Sub<real>(_t2092,_t2160);
          real _t2164#1 = Mul<real>(_t2162,_t2162);
          real score2166#1 = Add<real>(score1FAF,_t2164);
          goto JOIN2169
        JOIN2169:  preds = [ASSIGN2167,COND1FC5]
          real score2168#2 = phi(score2166,score1FAF)
          real _t216A#1 = Dot<2>(r013A2,v081345);
          real _t216C#1 = Dot<2>(r113A8,v081345);
          real2 _t216E#1 = <real2>[_t216A,_t216C];
          real2 pos2170#1 = Add<real2>(_t216E,_t13B8);
          real2 x2172#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos2170);
          bool _t2174#1 = Inside<IMAGE2D<float>,2>(x2172,_t132F);
          if _t2174 then goto ASSIGN2178 else goto ASSIGN24E3
        ASSIGN2178:  preds = [COND2176]
          real2 x2177#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v081345);
          bool _t2179#1 = Inside<IMAGE2D<int>,2>(x2177,_t132B);
          goto JOIN217D
        JOIN217D:  preds = [ASSIGN217A,ASSIGN24E3]
          bool _t217B#1 = phi(_t2179,_t217C)
          if _t217B then goto ASSIGN2180 else goto JOIN2322
        ASSIGN2180:  preds = [COND217E]
          real2 nd217F#2 = Floor<2>(x2172);
          real2 f2181#2 = Sub<real2>(x2172,nd217F);
          int{2} n2183#2 = RealToInt<2>(nd217F);
          int t12185#4 = -1;
          int t22187#1 = Index<int{2},0>(n2183);
          int ix2189#4 = Add<int>(t12185,t22187);
          int t2218B#4 = Index<int{2},1>(n2183);
          int iy218D#1 = Add<int>(t12185,t2218B);
          int n02190#8 = 21;
          int t2191#1 = Mul<int>(n02190,iy218D);
          int index2192#1 = Add<int>(ix2189,t2191);
          addr(IMAGE2D<float>) imgBaseAddr2193#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a218F#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index2192);
          real4 v02199#1 = LoadVoxels<IMAGE2D<float>,4>(a218F);
          int iy219B#1 = Add<int>(_t13B0,t2218B);
          int t219F#1 = Mul<int>(n02190,iy219B);
          int index21A0#1 = Add<int>(ix2189,t219F);
          addr(IMAGE2D<float>) a219D#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index21A0);
          real4 v121A7#1 = LoadVoxels<IMAGE2D<float>,4>(a219D);
          int iy21A9#1 = Add<int>(_t13B4,t2218B);
          int t21AD#1 = Mul<int>(n02190,iy21A9);
          int index21AE#1 = Add<int>(ix2189,t21AD);
          addr(IMAGE2D<float>) a21AB#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index21AE);
          real4 v221B5#1 = LoadVoxels<IMAGE2D<float>,4>(a21AB);
          int iy21B7#1 = Add<int>(_t138C,t2218B);
          int t21BB#1 = Mul<int>(n02190,iy21B7);
          int index21BC#1 = Add<int>(ix2189,t21BB);
          addr(IMAGE2D<float>) a21B9#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr2193,index21BC);
          real4 v321C3#1 = LoadVoxels<IMAGE2D<float>,4>(a21B9);
          real fy21C5#4 = Index<real2,1>(f2181);
          real t321C7#1 = Add<real>(fy21C5,_t1388);
          real t121C9#1 = Sub<real>(fy21C5,_t1388);
          real t021CB#1 = Sub<real>(fy21C5,_t138A);
          real4 a21CD#3 = <real4>[t321C7,fy21C5,t121C9,t021CB];
          real _f21E0#2 = 0.133333333333e1;
          real _f21E1#2 = 0.666666666667e0;
          real4 a021D0#4 = <real4>[_f21E0,_f21E1,_f21E1,_f21E0];
          real _f21DC#1 = -0.2e1;
          real _f21DD#2 = 0.0;
          real4 a121D1#4 = <real4>[_f21DC,_f21DD,_f21DD,_t138A];
          real _f21D9#2 = -0.1e1;
          real4 a221D2#4 = <real4>[_t1388,_f21D9,_f21D9,_t1388];
          real _f21D4#1 = -0.166666666667e0;
          real _f21D5#1 = 0.5e0;
          real _f21D6#1 = -0.5e0;
          real _f21D7#1 = 0.166666666667e0;
          real4 a321D3#4 = <real4>[_f21D4,_f21D5,_f21D6,_f21D7];
          real4 prod321E4#1 = Mul<real4>(a21CD,a321D3);
          real4 sum221E5#1 = Add<real4>(a221D2,prod321E4);
          real4 prod221E6#1 = Mul<real4>(a21CD,sum221E5);
          real4 sum121E7#1 = Add<real4>(a121D1,prod221E6);
          real4 prod121E8#1 = Mul<real4>(a21CD,sum121E7);
          real4 hy21CF#1 = Add<real4>(a021D0,prod121E8);
          real fx2203#4 = Index<real2,0>(f2181);
          real t32205#1 = Add<real>(fx2203,_t1388);
          real t12207#1 = Sub<real>(fx2203,_t1388);
          real t02209#1 = Sub<real>(fx2203,_t138A);
          real4 a220B#3 = <real4>[t32205,fx2203,t12207,t02209];
          real4 prod32222#1 = Mul<real4>(a220B,a321D3);
          real4 sum22223#1 = Add<real4>(a221D2,prod32222);
          real4 prod22224#1 = Mul<real4>(a220B,sum22223);
          real4 sum12225#1 = Add<real4>(a121D1,prod22224);
          real4 prod12226#1 = Mul<real4>(a220B,sum12225);
          real4 hx220D#4 = Add<real4>(a021D0,prod12226);
          real t02241#1 = Dot<4>(v02199,hx220D);
          real t12243#1 = Dot<4>(v121A7,hx220D);
          real t22245#1 = Dot<4>(v221B5,hx220D);
          real t32247#1 = Dot<4>(v321C3,hx220D);
          real4 tv2249#1 = <real4>[t02241,t12243,t22245,t32247];
          real _t224B#1 = Dot<4>(hy21CF,tv2249);
          real2 x224D#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v081345);
          real2 nd224F#2 = Floor<2>(x224D);
          real2 f2251#2 = Sub<real2>(x224D,nd224F);
          int{2} n2253#2 = RealToInt<2>(nd224F);
          int t22255#1 = Index<int{2},0>(n2253);
          int ix2257#4 = Add<int>(t12185,t22255);
          int t22259#4 = Index<int{2},1>(n2253);
          int iy225B#1 = Add<int>(t12185,t22259);
          int t225F#1 = Mul<int>(n02190,iy225B);
          int index2260#1 = Add<int>(ix2257,t225F);
          addr(IMAGE2D<int>) imgBaseAddr2261#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a225D#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index2260);
          real4 v02267#1 = LoadVoxels<IMAGE2D<int>,4>(a225D);
          int iy2269#1 = Add<int>(_t13B0,t22259);
          int t226D#1 = Mul<int>(n02190,iy2269);
          int index226E#1 = Add<int>(ix2257,t226D);
          addr(IMAGE2D<int>) a226B#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index226E);
          real4 v12275#1 = LoadVoxels<IMAGE2D<int>,4>(a226B);
          int iy2277#1 = Add<int>(_t13B4,t22259);
          int t227B#1 = Mul<int>(n02190,iy2277);
          int index227C#1 = Add<int>(ix2257,t227B);
          addr(IMAGE2D<int>) a2279#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index227C);
          real4 v22283#1 = LoadVoxels<IMAGE2D<int>,4>(a2279);
          int iy2285#1 = Add<int>(_t138C,t22259);
          int t2289#1 = Mul<int>(n02190,iy2285);
          int index228A#1 = Add<int>(ix2257,t2289);
          addr(IMAGE2D<int>) a2287#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr2261,index228A);
          real4 v32291#1 = LoadVoxels<IMAGE2D<int>,4>(a2287);
          real fy2293#4 = Index<real2,1>(f2251);
          real t32295#1 = Add<real>(fy2293,_t1388);
          real t12297#1 = Sub<real>(fy2293,_t1388);
          real t02299#1 = Sub<real>(fy2293,_t138A);
          real4 a229B#3 = <real4>[t32295,fy2293,t12297,t02299];
          real4 prod322B2#1 = Mul<real4>(a229B,a321D3);
          real4 sum222B3#1 = Add<real4>(a221D2,prod322B2);
          real4 prod222B4#1 = Mul<real4>(a229B,sum222B3);
          real4 sum122B5#1 = Add<real4>(a121D1,prod222B4);
          real4 prod122B6#1 = Mul<real4>(a229B,sum122B5);
          real4 hy229D#1 = Add<real4>(a021D0,prod122B6);
          real fx22D1#4 = Index<real2,0>(f2251);
          real t322D3#1 = Add<real>(fx22D1,_t1388);
          real t122D5#1 = Sub<real>(fx22D1,_t1388);
          real t022D7#1 = Sub<real>(fx22D1,_t138A);
          real4 a22D9#3 = <real4>[t322D3,fx22D1,t122D5,t022D7];
          real4 prod322F0#1 = Mul<real4>(a22D9,a321D3);
          real4 sum222F1#1 = Add<real4>(a221D2,prod322F0);
          real4 prod222F2#1 = Mul<real4>(a22D9,sum222F1);
          real4 sum122F3#1 = Add<real4>(a121D1,prod222F2);
          real4 prod122F4#1 = Mul<real4>(a22D9,sum122F3);
          real4 hx22DB#4 = Add<real4>(a021D0,prod122F4);
          real t0230F#1 = Dot<4>(v02267,hx22DB);
          real t12311#1 = Dot<4>(v12275,hx22DB);
          real t22313#1 = Dot<4>(v22283,hx22DB);
          real t32315#1 = Dot<4>(v32291,hx22DB);
          real4 tv2317#1 = <real4>[t0230F,t12311,t22313,t32315];
          real _t2319#1 = Dot<4>(hy229D,tv2317);
          real _t231B#2 = Sub<real>(_t224B,_t2319);
          real _t231D#1 = Mul<real>(_t231B,_t231B);
          real score231F#1 = Add<real>(score2168,_t231D);
          goto JOIN2322
        JOIN2322:  preds = [ASSIGN2320,COND217E]
          real score2321#2 = phi(score231F,score2168)
          real _t2323#1 = Dot<2>(r013A2,v091347);
          real _t2325#1 = Dot<2>(r113A8,v091347);
          real2 _t2327#1 = <real2>[_t2323,_t2325];
          real2 pos2329#2 = Add<real2>(_t2327,_t13B8);
          real2 x232B#3 = PosToImgSpace<IMAGE2D<float>>(_t132F,pos2329);
          bool _t232D#1 = Inside<IMAGE2D<float>,2>(x232B,_t132F);
          if _t232D then goto ASSIGN2331 else goto ASSIGN24E2
        ASSIGN2331:  preds = [COND232F]
          real2 x2330#1 = PosToImgSpace<IMAGE2D<int>>(_t132B,v091347);
          bool _t2332#1 = Inside<IMAGE2D<int>,2>(x2330,_t132B);
          goto JOIN2336
        JOIN2336:  preds = [ASSIGN2333,ASSIGN24E2]
          bool _t2334#1 = phi(_t2332,_t2335)
          if _t2334 then goto ASSIGN2339 else goto JOIN24DB
        ASSIGN2339:  preds = [COND2337]
          real2 nd2338#2 = Floor<2>(x232B);
          real2 f233A#2 = Sub<real2>(x232B,nd2338);
          int{2} n233C#2 = RealToInt<2>(nd2338);
          int t1233E#4 = -1;
          int t22340#1 = Index<int{2},0>(n233C);
          int ix2342#4 = Add<int>(t1233E,t22340);
          int t22344#4 = Index<int{2},1>(n233C);
          int iy2346#1 = Add<int>(t1233E,t22344);
          int n02349#8 = 21;
          int t234A#1 = Mul<int>(n02349,iy2346);
          int index234B#1 = Add<int>(ix2342,t234A);
          addr(IMAGE2D<float>) imgBaseAddr234C#4 = ImageAddress<IMAGE2D<float>>(_t132F);
          addr(IMAGE2D<float>) a2348#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index234B);
          real4 v02352#1 = LoadVoxels<IMAGE2D<float>,4>(a2348);
          int iy2354#1 = Add<int>(_t13B0,t22344);
          int t2358#1 = Mul<int>(n02349,iy2354);
          int index2359#1 = Add<int>(ix2342,t2358);
          addr(IMAGE2D<float>) a2356#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index2359);
          real4 v12360#1 = LoadVoxels<IMAGE2D<float>,4>(a2356);
          int iy2362#1 = Add<int>(_t13B4,t22344);
          int t2366#1 = Mul<int>(n02349,iy2362);
          int index2367#1 = Add<int>(ix2342,t2366);
          addr(IMAGE2D<float>) a2364#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index2367);
          real4 v2236E#1 = LoadVoxels<IMAGE2D<float>,4>(a2364);
          int iy2370#1 = Add<int>(_t138C,t22344);
          int t2374#1 = Mul<int>(n02349,iy2370);
          int index2375#1 = Add<int>(ix2342,t2374);
          addr(IMAGE2D<float>) a2372#1 = Add<addr(IMAGE2D<float>)>(imgBaseAddr234C,index2375);
          real4 v3237C#1 = LoadVoxels<IMAGE2D<float>,4>(a2372);
          real fy237E#4 = Index<real2,1>(f233A);
          real t32380#1 = Add<real>(fy237E,_t1388);
          real t12382#1 = Sub<real>(fy237E,_t1388);
          real t02384#1 = Sub<real>(fy237E,_t138A);
          real4 a2386#3 = <real4>[t32380,fy237E,t12382,t02384];
          real _f2399#2 = 0.133333333333e1;
          real _f239A#2 = 0.666666666667e0;
          real4 a02389#4 = <real4>[_f2399,_f239A,_f239A,_f2399];
          real _f2395#1 = -0.2e1;
          real _f2396#2 = 0.0;
          real4 a1238A#4 = <real4>[_f2395,_f2396,_f2396,_t138A];
          real _f2392#2 = -0.1e1;
          real4 a2238B#4 = <real4>[_t1388,_f2392,_f2392,_t1388];
          real _f238D#1 = -0.166666666667e0;
          real _f238E#1 = 0.5e0;
          real _f238F#1 = -0.5e0;
          real _f2390#1 = 0.166666666667e0;
          real4 a3238C#4 = <real4>[_f238D,_f238E,_f238F,_f2390];
          real4 prod3239D#1 = Mul<real4>(a2386,a3238C);
          real4 sum2239E#1 = Add<real4>(a2238B,prod3239D);
          real4 prod2239F#1 = Mul<real4>(a2386,sum2239E);
          real4 sum123A0#1 = Add<real4>(a1238A,prod2239F);
          real4 prod123A1#1 = Mul<real4>(a2386,sum123A0);
          real4 hy2388#1 = Add<real4>(a02389,prod123A1);
          real fx23BC#4 = Index<real2,0>(f233A);
          real t323BE#1 = Add<real>(fx23BC,_t1388);
          real t123C0#1 = Sub<real>(fx23BC,_t1388);
          real t023C2#1 = Sub<real>(fx23BC,_t138A);
          real4 a23C4#3 = <real4>[t323BE,fx23BC,t123C0,t023C2];
          real4 prod323DB#1 = Mul<real4>(a23C4,a3238C);
          real4 sum223DC#1 = Add<real4>(a2238B,prod323DB);
          real4 prod223DD#1 = Mul<real4>(a23C4,sum223DC);
          real4 sum123DE#1 = Add<real4>(a1238A,prod223DD);
          real4 prod123DF#1 = Mul<real4>(a23C4,sum123DE);
          real4 hx23C6#4 = Add<real4>(a02389,prod123DF);
          real t023FA#1 = Dot<4>(v02352,hx23C6);
          real t123FC#1 = Dot<4>(v12360,hx23C6);
          real t223FE#1 = Dot<4>(v2236E,hx23C6);
          real t32400#1 = Dot<4>(v3237C,hx23C6);
          real4 tv2402#1 = <real4>[t023FA,t123FC,t223FE,t32400];
          real _t2404#1 = Dot<4>(hy2388,tv2402);
          real2 x2406#2 = PosToImgSpace<IMAGE2D<int>>(_t132B,v091347);
          real2 nd2408#2 = Floor<2>(x2406);
          real2 f240A#2 = Sub<real2>(x2406,nd2408);
          int{2} n240C#2 = RealToInt<2>(nd2408);
          int t2240E#1 = Index<int{2},0>(n240C);
          int ix2410#4 = Add<int>(t1233E,t2240E);
          int t22412#4 = Index<int{2},1>(n240C);
          int iy2414#1 = Add<int>(t1233E,t22412);
          int t2418#1 = Mul<int>(n02349,iy2414);
          int index2419#1 = Add<int>(ix2410,t2418);
          addr(IMAGE2D<int>) imgBaseAddr241A#4 = ImageAddress<IMAGE2D<int>>(_t132B);
          addr(IMAGE2D<int>) a2416#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2419);
          real4 v02420#1 = LoadVoxels<IMAGE2D<int>,4>(a2416);
          int iy2422#1 = Add<int>(_t13B0,t22412);
          int t2426#1 = Mul<int>(n02349,iy2422);
          int index2427#1 = Add<int>(ix2410,t2426);
          addr(IMAGE2D<int>) a2424#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2427);
          real4 v1242E#1 = LoadVoxels<IMAGE2D<int>,4>(a2424);
          int iy2430#1 = Add<int>(_t13B4,t22412);
          int t2434#1 = Mul<int>(n02349,iy2430);
          int index2435#1 = Add<int>(ix2410,t2434);
          addr(IMAGE2D<int>) a2432#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2435);
          real4 v2243C#1 = LoadVoxels<IMAGE2D<int>,4>(a2432);
          int iy243E#1 = Add<int>(_t138C,t22412);
          int t2442#1 = Mul<int>(n02349,iy243E);
          int index2443#1 = Add<int>(ix2410,t2442);
          addr(IMAGE2D<int>) a2440#1 = Add<addr(IMAGE2D<int>)>(imgBaseAddr241A,index2443);
          real4 v3244A#1 = LoadVoxels<IMAGE2D<int>,4>(a2440);
          real fy244C#4 = Index<real2,1>(f240A);
          real t3244E#1 = Add<real>(fy244C,_t1388);
          real t12450#1 = Sub<real>(fy244C,_t1388);
          real t02452#1 = Sub<real>(fy244C,_t138A);
          real4 a2454#3 = <real4>[t3244E,fy244C,t12450,t02452];
          real4 prod3246B#1 = Mul<real4>(a2454,a3238C);
          real4 sum2246C#1 = Add<real4>(a2238B,prod3246B);
          real4 prod2246D#1 = Mul<real4>(a2454,sum2246C);
          real4 sum1246E#1 = Add<real4>(a1238A,prod2246D);
          real4 prod1246F#1 = Mul<real4>(a2454,sum1246E);
          real4 hy2456#1 = Add<real4>(a02389,prod1246F);
          real fx248A#4 = Index<real2,0>(f240A);
          real t3248C#1 = Add<real>(fx248A,_t1388);
          real t1248E#1 = Sub<real>(fx248A,_t1388);
          real t02490#1 = Sub<real>(fx248A,_t138A);
          real4 a2492#3 = <real4>[t3248C,fx248A,t1248E,t02490];
          real4 prod324A9#1 = Mul<real4>(a2492,a3238C);
          real4 sum224AA#1 = Add<real4>(a2238B,prod324A9);
          real4 prod224AB#1 = Mul<real4>(a2492,sum224AA);
          real4 sum124AC#1 = Add<real4>(a1238A,prod224AB);
          real4 prod124AD#1 = Mul<real4>(a2492,sum124AC);
          real4 hx2494#4 = Add<real4>(a02389,prod124AD);
          real t024C8#1 = Dot<4>(v02420,hx2494);
          real t124CA#1 = Dot<4>(v1242E,hx2494);
          real t224CC#1 = Dot<4>(v2243C,hx2494);
          real t324CE#1 = Dot<4>(v3244A,hx2494);
          real4 tv24D0#1 = <real4>[t024C8,t124CA,t224CC,t324CE];
          real _t24D2#1 = Dot<4>(hy2456,tv24D0);
          real _t24D4#2 = Sub<real>(_t2404,_t24D2);
          real _t24D6#1 = Mul<real>(_t24D4,_t24D4);
          real score24D8#1 = Add<real>(score2321,_t24D6);
          goto JOIN24DB
        JOIN24DB:  preds = [ASSIGN24D9,COND2337]
          real score24DA#1 = phi(score24D8,score2321)
          self.score = score24DA;
          self.r0 = r013A2;
          self.r1 = r113A8;
          self.pos = pos2329;
          stabilize ()
        ASSIGN24E2:  preds = [COND232F]
          bool _t2335#1 = false;
          goto JOIN2336
        ASSIGN24E3:  preds = [COND2176]
          bool _t217C#1 = false;
          goto JOIN217D
        ASSIGN24E4:  preds = [COND1FBD]
          bool _t1FC3#1 = false;
          goto JOIN1FC4
        ASSIGN24E5:  preds = [COND1E04]
          bool _t1E0A#1 = false;
          goto JOIN1E0B
        ASSIGN24E6:  preds = [COND1AA4]
          bool _t1AAA#1 = false;
          goto JOIN1AAB
        ASSIGN24E7:  preds = [COND18EB]
          bool _t18F1#1 = false;
          goto JOIN18F2
        ASSIGN24E8:  preds = [COND1732]
          bool _t1738#1 = false;
          goto JOIN1739
        ASSIGN24E9:  preds = [COND1579]
          bool _t157F#1 = false;
          goto JOIN1580
        ASSIGN24EA:  preds = [COND13C0]
          bool _t13C6#1 = false;
          goto JOIN13C7
    end Update
    method Stabilize
        ENTRY24EC:  preds = []
          real3 t24ED#1 = self.t;
          real score24EF#1 = self.score;
          real2 r024F1#1 = self.r0;
          real2 r124F3#1 = self.r1;
          real2 pos24F5#1 = self.pos;
          self.score = score24EF;
          self.r0 = r024F1;
          self.r1 = r124F3;
          self.pos = pos24F5;
          return ()
    end Stabilize
  end R
#### end program ####
********** After translation to TreeIL **********
//***** PROPERTIES *****
  none
//***** GLOBALS *****
  real2 v01;
  real2 v02;
  real2 v03;
  real2 v04;
  real2 v00;
  real2 v06;
  real2 v07;
  real2 v08;
  real2 v09;
  image(IMAGE2D<int>) _t;
  image(IMAGE2D<float>) _t;
//***** INPUT INIT *****
  {
    exit();
  }
//***** GLOBAL INIT *****
  {
    real l__t_419;
    _t = load<2> ("square-template.nrrd");
    _t = load<2> ("square-rotate.nrrd");
    v00 = <real2>{0.0,0.0};
    v01 = <real2>{0.5e0,0.5e0};
    v02 = <real2>{0.5e0,0.0};
    l__t_419 = Neg<real>(0.5e0);
    v03 = <real2>{0.5e0,l__t_419};
    v04 = <real2>{0.0,0.5e0};
    v06 = <real2>{0.0,l__t_419};
    v07 = <real2>{l__t_419,0.5e0};
    v08 = <real2>{l__t_419,0.0};
    v09 = <real2>{l__t_419,l__t_419};
    exit(::v01,::v02,::v03,::v04,::v00,::v06,::v07,::v08,::v09,::_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;
    bool l__t_13;
    real2 l_nd_14;
    real2 l_f_15;
    int{2} l_n_16;
    int l_ix_17;
    int l_t2_18;
    addr(IMAGE2D<float>) l_imgBaseAddr_19;
    real4 l_v0_20;
    real4 l_v1_21;
    real4 l_v2_22;
    real4 l_v3_23;
    real l_fy_24;
    real4 l_a_25;
    real4 l_a0_26;
    real4 l_a1_27;
    real4 l_a2_28;
    real4 l_a3_29;
    real l_fx_30;
    real4 l_a_31;
    real4 l_hx_32;
    real2 l_x_33;
    real2 l_nd_34;
    real2 l_f_35;
    int{2} l_n_36;
    int l_ix_37;
    int l_t2_38;
    addr(IMAGE2D<int>) l_imgBaseAddr_39;
    real4 l_v0_40;
    real4 l_v1_41;
    real4 l_v2_42;
    real4 l_v3_43;
    real l_fy_44;
    real4 l_a_45;
    real l_fx_46;
    real4 l_a_47;
    real4 l_hx_48;
    real l__t_49;
    real l_score_50;
    real l_score_51;
    real2 l_x_52;
    bool l__t_53;
    bool l__t_54;
    real2 l_nd_55;
    real2 l_f_56;
    int{2} l_n_57;
    int l_ix_58;
    int l_t2_59;
    addr(IMAGE2D<float>) l_imgBaseAddr_60;
    real4 l_v0_61;
    real4 l_v1_62;
    real4 l_v2_63;
    real4 l_v3_64;
    real l_fy_65;
    real4 l_a_66;
    real4 l_a0_67;
    real4 l_a1_68;
    real4 l_a2_69;
    real4 l_a3_70;
    real l_fx_71;
    real4 l_a_72;
    real4 l_hx_73;
    real2 l_x_74;
    real2 l_nd_75;
    real2 l_f_76;
    int{2} l_n_77;
    int l_ix_78;
    int l_t2_79;
    addr(IMAGE2D<int>) l_imgBaseAddr_80;
    real4 l_v0_81;
    real4 l_v1_82;
    real4 l_v2_83;
    real4 l_v3_84;
    real l_fy_85;
    real4 l_a_86;
    real l_fx_87;
    real4 l_a_88;
    real4 l_hx_89;
    real l__t_90;
    real l_score_91;
    real l_score_92;
    real2 l_x_93;
    bool l__t_94;
    bool l__t_95;
    real2 l_nd_96;
    real2 l_f_97;
    int{2} l_n_98;
    int l_ix_99;
    int l_t2_100;
    addr(IMAGE2D<float>) l_imgBaseAddr_101;
    real4 l_v0_102;
    real4 l_v1_103;
    real4 l_v2_104;
    real4 l_v3_105;
    real l_fy_106;
    real4 l_a_107;
    real4 l_a0_108;
    real4 l_a1_109;
    real4 l_a2_110;
    real4 l_a3_111;
    real l_fx_112;
    real4 l_a_113;
    real4 l_hx_114;
    real2 l_x_115;
    real2 l_nd_116;
    real2 l_f_117;
    int{2} l_n_118;
    int l_ix_119;
    int l_t2_120;
    addr(IMAGE2D<int>) l_imgBaseAddr_121;
    real4 l_v0_122;
    real4 l_v1_123;
    real4 l_v2_124;
    real4 l_v3_125;
    real l_fy_126;
    real4 l_a_127;
    real l_fx_128;
    real4 l_a_129;
    real4 l_hx_130;
    real l__t_131;
    real l_score_132;
    real l_score_133;
    real2 l_x_134;
    bool l__t_135;
    bool l__t_136;
    real2 l_nd_137;
    real2 l_f_138;
    int{2} l_n_139;
    int l_ix_140;
    int l_t2_141;
    addr(IMAGE2D<float>) l_imgBaseAddr_142;
    real4 l_v0_143;
    real4 l_v1_144;
    real4 l_v2_145;
    real4 l_v3_146;
    real l_fy_147;
    real4 l_a_148;
    real4 l_a0_149;
    real4 l_a1_150;
    real4 l_a2_151;
    real4 l_a3_152;
    real l_fx_153;
    real4 l_a_154;
    real4 l_hx_155;
    real2 l_x_156;
    real2 l_nd_157;
    real2 l_f_158;
    int{2} l_n_159;
    int l_ix_160;
    int l_t2_161;
    addr(IMAGE2D<int>) l_imgBaseAddr_162;
    real4 l_v0_163;
    real4 l_v1_164;
    real4 l_v2_165;
    real4 l_v3_166;
    real l_fy_167;
    real4 l_a_168;
    real l_fx_169;
    real4 l_a_170;
    real4 l_hx_171;
    real l__t_172;
    real l_score_173;
    real l_score_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;
    real2 l_nd_216;
    real2 l_f_217;
    int{2} l_n_218;
    int l_ix_219;
    int l_t2_220;
    addr(IMAGE2D<float>) l_imgBaseAddr_221;
    real4 l_v0_222;
    real4 l_v1_223;
    real4 l_v2_224;
    real4 l_v3_225;
    real l_fy_226;
    real4 l_a_227;
    real4 l_a0_228;
    real4 l_a1_229;
    real4 l_a2_230;
    real4 l_a3_231;
    real l_fx_232;
    real4 l_a_233;
    real4 l_hx_234;
    real2 l_x_235;
    real2 l_nd_236;
    real2 l_f_237;
    int{2} l_n_238;
    int l_ix_239;
    int l_t2_240;
    addr(IMAGE2D<int>) l_imgBaseAddr_241;
    real4 l_v0_242;
    real4 l_v1_243;
    real4 l_v2_244;
    real4 l_v3_245;
    real l_fy_246;
    real4 l_a_247;
    real l_fx_248;
    real4 l_a_249;
    real4 l_hx_250;
    real l__t_251;
    real l_score_252;
    real l_score_253;
    real2 l_x_254;
    bool l__t_255;
    bool l__t_256;
    real2 l_nd_257;
    real2 l_f_258;
    int{2} l_n_259;
    int l_ix_260;
    int l_t2_261;
    addr(IMAGE2D<float>) l_imgBaseAddr_262;
    real4 l_v0_263;
    real4 l_v1_264;
    real4 l_v2_265;
    real4 l_v3_266;
    real l_fy_267;
    real4 l_a_268;
    real4 l_a0_269;
    real4 l_a1_270;
    real4 l_a2_271;
    real4 l_a3_272;
    real l_fx_273;
    real4 l_a_274;
    real4 l_hx_275;
    real2 l_x_276;
    real2 l_nd_277;
    real2 l_f_278;
    int{2} l_n_279;
    int l_ix_280;
    int l_t2_281;
    addr(IMAGE2D<int>) l_imgBaseAddr_282;
    real4 l_v0_283;
    real4 l_v1_284;
    real4 l_v2_285;
    real4 l_v3_286;
    real l_fy_287;
    real4 l_a_288;
    real l_fx_289;
    real4 l_a_290;
    real4 l_hx_291;
    real l__t_292;
    real l_score_293;
    real l_score_294;
    real2 l_x_295;
    bool l__t_296;
    bool l__t_297;
    real2 l_nd_298;
    real2 l_f_299;
    int{2} l_n_300;
    int l_ix_301;
    int l_t2_302;
    addr(IMAGE2D<float>) l_imgBaseAddr_303;
    real4 l_v0_304;
    real4 l_v1_305;
    real4 l_v2_306;
    real4 l_v3_307;
    real l_fy_308;
    real4 l_a_309;
    real4 l_a0_310;
    real4 l_a1_311;
    real4 l_a2_312;
    real4 l_a3_313;
    real l_fx_314;
    real4 l_a_315;
    real4 l_hx_316;
    real2 l_x_317;
    real2 l_nd_318;
    real2 l_f_319;
    int{2} l_n_320;
    int l_ix_321;
    int l_t2_322;
    addr(IMAGE2D<int>) l_imgBaseAddr_323;
    real4 l_v0_324;
    real4 l_v1_325;
    real4 l_v2_326;
    real4 l_v3_327;
    real l_fy_328;
    real4 l_a_329;
    real l_fx_330;
    real4 l_a_331;
    real4 l_hx_332;
    real l__t_333;
    real l_score_334;
    real l_score_335;
    real2 l_x_336;
    bool l__t_337;
    bool l__t_338;
    real2 l_nd_339;
    real2 l_f_340;
    int{2} l_n_341;
    int l_ix_342;
    int l_t2_343;
    addr(IMAGE2D<float>) l_imgBaseAddr_344;
    real4 l_v0_345;
    real4 l_v1_346;
    real4 l_v2_347;
    real4 l_v3_348;
    real l_fy_349;
    real4 l_a_350;
    real4 l_a0_351;
    real4 l_a1_352;
    real4 l_a2_353;
    real4 l_a3_354;
    real l_fx_355;
    real4 l_a_356;
    real4 l_hx_357;
    real2 l_x_358;
    real2 l_nd_359;
    real2 l_f_360;
    int{2} l_n_361;
    int l_ix_362;
    int l_t2_363;
    addr(IMAGE2D<int>) l_imgBaseAddr_364;
    real4 l_v0_365;
    real4 l_v1_366;
    real4 l_v2_367;
    real4 l_v3_368;
    real l_fy_369;
    real4 l_a_370;
    real l_fx_371;
    real4 l_a_372;
    real4 l_hx_373;
    real l__t_374;
    real l_score_375;
    real l_score_376;
    real2 l_pos_377;
    real2 l_x_378;
    bool l__t_379;
    bool l__t_380;
    real2 l_nd_381;
    real2 l_f_382;
    int{2} l_n_383;
    int l_ix_384;
    int l_t2_385;
    addr(IMAGE2D<float>) l_imgBaseAddr_386;
    real4 l_v0_387;
    real4 l_v1_388;
    real4 l_v2_389;
    real4 l_v3_390;
    real l_fy_391;
    real4 l_a_392;
    real4 l_a0_393;
    real4 l_a1_394;
    real4 l_a2_395;
    real4 l_a3_396;
    real l_fx_397;
    real4 l_a_398;
    real4 l_hx_399;
    real2 l_x_400;
    real2 l_nd_401;
    real2 l_f_402;
    int{2} l_n_403;
    int l_ix_404;
    int l_t2_405;
    addr(IMAGE2D<int>) l_imgBaseAddr_406;
    real4 l_v0_407;
    real4 l_v1_408;
    real4 l_v2_409;
    real4 l_v3_410;
    real l_fy_411;
    real4 l_a_412;
    real l_fx_413;
    real4 l_a_414;
    real4 l_hx_415;
    real l__t_416;
    real l_score_417;
    real l_score_418;
    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));
    l__t_11 = Inside<IMAGE2D<float>,2>(l_x_10,::_t);
    if (l__t_11) {
      l__t_12 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v00),::_t);
      l__t_13 = l__t_12;
    } else {
      l__t_13 = false;
    }
    if (l__t_13) {
      l_nd_14 = Floor<2>(l_x_10);
      l_f_15 = Sub<real2>(l_x_10,l_nd_14);
      l_n_16 = RealToInt<2>(l_nd_14);
      l_ix_17 = Add<int>(-1,Index<int{2},0>(l_n_16));
      l_t2_18 = Index<int{2},1>(l_n_16);
      l_imgBaseAddr_19 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_20 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_19,Add<int>(l_ix_17,Mul<int>(21,Add<int>(-1,l_t2_18)))));
      l_v1_21 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_19,Add<int>(l_ix_17,Mul<int>(21,Add<int>(0,l_t2_18)))));
      l_v2_22 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_19,Add<int>(l_ix_17,Mul<int>(21,Add<int>(1,l_t2_18)))));
      l_v3_23 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_19,Add<int>(l_ix_17,Mul<int>(21,Add<int>(2,l_t2_18)))));
      l_fy_24 = Index<real2,1>(l_f_15);
      l_a_25 = <real4>{Add<real>(l_fy_24,0.1e1),l_fy_24,Sub<real>(l_fy_24,0.1e1),Sub<real>(l_fy_24,0.2e1)};
      l_a0_26 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_27 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_28 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_29 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_30 = Index<real2,0>(l_f_15);
      l_a_31 = <real4>{Add<real>(l_fx_30,0.1e1),l_fx_30,Sub<real>(l_fx_30,0.1e1),Sub<real>(l_fx_30,0.2e1)};
      l_hx_32 = Add<real4>(l_a0_26,Mul<real4>(l_a_31,Add<real4>(l_a1_27,Mul<real4>(l_a_31,Add<real4>(l_a2_28,Mul<real4>(l_a_31,l_a3_29))))));
      l_x_33 = PosToImgSpace<IMAGE2D<int>>(::_t,::v00);
      l_nd_34 = Floor<2>(l_x_33);
      l_f_35 = Sub<real2>(l_x_33,l_nd_34);
      l_n_36 = RealToInt<2>(l_nd_34);
      l_ix_37 = Add<int>(-1,Index<int{2},0>(l_n_36));
      l_t2_38 = Index<int{2},1>(l_n_36);
      l_imgBaseAddr_39 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_40 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_39,Add<int>(l_ix_37,Mul<int>(21,Add<int>(-1,l_t2_38)))));
      l_v1_41 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_39,Add<int>(l_ix_37,Mul<int>(21,Add<int>(0,l_t2_38)))));
      l_v2_42 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_39,Add<int>(l_ix_37,Mul<int>(21,Add<int>(1,l_t2_38)))));
      l_v3_43 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_39,Add<int>(l_ix_37,Mul<int>(21,Add<int>(2,l_t2_38)))));
      l_fy_44 = Index<real2,1>(l_f_35);
      l_a_45 = <real4>{Add<real>(l_fy_44,0.1e1),l_fy_44,Sub<real>(l_fy_44,0.1e1),Sub<real>(l_fy_44,0.2e1)};
      l_fx_46 = Index<real2,0>(l_f_35);
      l_a_47 = <real4>{Add<real>(l_fx_46,0.1e1),l_fx_46,Sub<real>(l_fx_46,0.1e1),Sub<real>(l_fx_46,0.2e1)};
      l_hx_48 = Add<real4>(l_a0_26,Mul<real4>(l_a_47,Add<real4>(l_a1_27,Mul<real4>(l_a_47,Add<real4>(l_a2_28,Mul<real4>(l_a_47,l_a3_29))))));
      l__t_49 = Sub<real>(Dot<4>(Add<real4>(l_a0_26,Mul<real4>(l_a_25,Add<real4>(l_a1_27,Mul<real4>(l_a_25,Add<real4>(l_a2_28,Mul<real4>(l_a_25,l_a3_29)))))),<real4>{Dot<4>(l_v0_20,l_hx_32),Dot<4>(l_v1_21,l_hx_32),Dot<4>(l_v2_22,l_hx_32),Dot<4>(l_v3_23,l_hx_32)}),Dot<4>(Add<real4>(l_a0_26,Mul<real4>(l_a_45,Add<real4>(l_a1_27,Mul<real4>(l_a_45,Add<real4>(l_a2_28,Mul<real4>(l_a_45,l_a3_29)))))),<real4>{Dot<4>(l_v0_40,l_hx_48),Dot<4>(l_v1_41,l_hx_48),Dot<4>(l_v2_42,l_hx_48),Dot<4>(l_v3_43,l_hx_48)}));
      l_score_50 = Add<real>(self.score,Mul<real>(l__t_49,l__t_49));
      l_score_51 = l_score_50;
    } else {
      l_score_51 = self.score;
    }
    l_x_52 = 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_52,::_t)) {
      l__t_53 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v01),::_t);
      l__t_54 = l__t_53;
    } else {
      l__t_54 = false;
    }
    if (l__t_54) {
      l_nd_55 = Floor<2>(l_x_52);
      l_f_56 = Sub<real2>(l_x_52,l_nd_55);
      l_n_57 = RealToInt<2>(l_nd_55);
      l_ix_58 = Add<int>(-1,Index<int{2},0>(l_n_57));
      l_t2_59 = Index<int{2},1>(l_n_57);
      l_imgBaseAddr_60 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_61 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_60,Add<int>(l_ix_58,Mul<int>(21,Add<int>(-1,l_t2_59)))));
      l_v1_62 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_60,Add<int>(l_ix_58,Mul<int>(21,Add<int>(0,l_t2_59)))));
      l_v2_63 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_60,Add<int>(l_ix_58,Mul<int>(21,Add<int>(1,l_t2_59)))));
      l_v3_64 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_60,Add<int>(l_ix_58,Mul<int>(21,Add<int>(2,l_t2_59)))));
      l_fy_65 = Index<real2,1>(l_f_56);
      l_a_66 = <real4>{Add<real>(l_fy_65,0.1e1),l_fy_65,Sub<real>(l_fy_65,0.1e1),Sub<real>(l_fy_65,0.2e1)};
      l_a0_67 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_68 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_69 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_70 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_71 = Index<real2,0>(l_f_56);
      l_a_72 = <real4>{Add<real>(l_fx_71,0.1e1),l_fx_71,Sub<real>(l_fx_71,0.1e1),Sub<real>(l_fx_71,0.2e1)};
      l_hx_73 = Add<real4>(l_a0_67,Mul<real4>(l_a_72,Add<real4>(l_a1_68,Mul<real4>(l_a_72,Add<real4>(l_a2_69,Mul<real4>(l_a_72,l_a3_70))))));
      l_x_74 = PosToImgSpace<IMAGE2D<int>>(::_t,::v01);
      l_nd_75 = Floor<2>(l_x_74);
      l_f_76 = Sub<real2>(l_x_74,l_nd_75);
      l_n_77 = RealToInt<2>(l_nd_75);
      l_ix_78 = Add<int>(-1,Index<int{2},0>(l_n_77));
      l_t2_79 = Index<int{2},1>(l_n_77);
      l_imgBaseAddr_80 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_81 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_80,Add<int>(l_ix_78,Mul<int>(21,Add<int>(-1,l_t2_79)))));
      l_v1_82 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_80,Add<int>(l_ix_78,Mul<int>(21,Add<int>(0,l_t2_79)))));
      l_v2_83 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_80,Add<int>(l_ix_78,Mul<int>(21,Add<int>(1,l_t2_79)))));
      l_v3_84 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_80,Add<int>(l_ix_78,Mul<int>(21,Add<int>(2,l_t2_79)))));
      l_fy_85 = Index<real2,1>(l_f_76);
      l_a_86 = <real4>{Add<real>(l_fy_85,0.1e1),l_fy_85,Sub<real>(l_fy_85,0.1e1),Sub<real>(l_fy_85,0.2e1)};
      l_fx_87 = Index<real2,0>(l_f_76);
      l_a_88 = <real4>{Add<real>(l_fx_87,0.1e1),l_fx_87,Sub<real>(l_fx_87,0.1e1),Sub<real>(l_fx_87,0.2e1)};
      l_hx_89 = Add<real4>(l_a0_67,Mul<real4>(l_a_88,Add<real4>(l_a1_68,Mul<real4>(l_a_88,Add<real4>(l_a2_69,Mul<real4>(l_a_88,l_a3_70))))));
      l__t_90 = Sub<real>(Dot<4>(Add<real4>(l_a0_67,Mul<real4>(l_a_66,Add<real4>(l_a1_68,Mul<real4>(l_a_66,Add<real4>(l_a2_69,Mul<real4>(l_a_66,l_a3_70)))))),<real4>{Dot<4>(l_v0_61,l_hx_73),Dot<4>(l_v1_62,l_hx_73),Dot<4>(l_v2_63,l_hx_73),Dot<4>(l_v3_64,l_hx_73)}),Dot<4>(Add<real4>(l_a0_67,Mul<real4>(l_a_86,Add<real4>(l_a1_68,Mul<real4>(l_a_86,Add<real4>(l_a2_69,Mul<real4>(l_a_86,l_a3_70)))))),<real4>{Dot<4>(l_v0_81,l_hx_89),Dot<4>(l_v1_82,l_hx_89),Dot<4>(l_v2_83,l_hx_89),Dot<4>(l_v3_84,l_hx_89)}));
      l_score_91 = Add<real>(l_score_51,Mul<real>(l__t_90,l__t_90));
      l_score_92 = l_score_91;
    } else {
      l_score_92 = l_score_51;
    }
    l_x_93 = 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_93,::_t)) {
      l__t_94 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v02),::_t);
      l__t_95 = l__t_94;
    } else {
      l__t_95 = false;
    }
    if (l__t_95) {
      l_nd_96 = Floor<2>(l_x_93);
      l_f_97 = Sub<real2>(l_x_93,l_nd_96);
      l_n_98 = RealToInt<2>(l_nd_96);
      l_ix_99 = Add<int>(-1,Index<int{2},0>(l_n_98));
      l_t2_100 = Index<int{2},1>(l_n_98);
      l_imgBaseAddr_101 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_102 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_101,Add<int>(l_ix_99,Mul<int>(21,Add<int>(-1,l_t2_100)))));
      l_v1_103 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_101,Add<int>(l_ix_99,Mul<int>(21,Add<int>(0,l_t2_100)))));
      l_v2_104 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_101,Add<int>(l_ix_99,Mul<int>(21,Add<int>(1,l_t2_100)))));
      l_v3_105 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_101,Add<int>(l_ix_99,Mul<int>(21,Add<int>(2,l_t2_100)))));
      l_fy_106 = Index<real2,1>(l_f_97);
      l_a_107 = <real4>{Add<real>(l_fy_106,0.1e1),l_fy_106,Sub<real>(l_fy_106,0.1e1),Sub<real>(l_fy_106,0.2e1)};
      l_a0_108 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_109 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_110 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_111 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_112 = Index<real2,0>(l_f_97);
      l_a_113 = <real4>{Add<real>(l_fx_112,0.1e1),l_fx_112,Sub<real>(l_fx_112,0.1e1),Sub<real>(l_fx_112,0.2e1)};
      l_hx_114 = Add<real4>(l_a0_108,Mul<real4>(l_a_113,Add<real4>(l_a1_109,Mul<real4>(l_a_113,Add<real4>(l_a2_110,Mul<real4>(l_a_113,l_a3_111))))));
      l_x_115 = PosToImgSpace<IMAGE2D<int>>(::_t,::v02);
      l_nd_116 = Floor<2>(l_x_115);
      l_f_117 = Sub<real2>(l_x_115,l_nd_116);
      l_n_118 = RealToInt<2>(l_nd_116);
      l_ix_119 = Add<int>(-1,Index<int{2},0>(l_n_118));
      l_t2_120 = Index<int{2},1>(l_n_118);
      l_imgBaseAddr_121 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_122 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_121,Add<int>(l_ix_119,Mul<int>(21,Add<int>(-1,l_t2_120)))));
      l_v1_123 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_121,Add<int>(l_ix_119,Mul<int>(21,Add<int>(0,l_t2_120)))));
      l_v2_124 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_121,Add<int>(l_ix_119,Mul<int>(21,Add<int>(1,l_t2_120)))));
      l_v3_125 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_121,Add<int>(l_ix_119,Mul<int>(21,Add<int>(2,l_t2_120)))));
      l_fy_126 = Index<real2,1>(l_f_117);
      l_a_127 = <real4>{Add<real>(l_fy_126,0.1e1),l_fy_126,Sub<real>(l_fy_126,0.1e1),Sub<real>(l_fy_126,0.2e1)};
      l_fx_128 = Index<real2,0>(l_f_117);
      l_a_129 = <real4>{Add<real>(l_fx_128,0.1e1),l_fx_128,Sub<real>(l_fx_128,0.1e1),Sub<real>(l_fx_128,0.2e1)};
      l_hx_130 = Add<real4>(l_a0_108,Mul<real4>(l_a_129,Add<real4>(l_a1_109,Mul<real4>(l_a_129,Add<real4>(l_a2_110,Mul<real4>(l_a_129,l_a3_111))))));
      l__t_131 = Sub<real>(Dot<4>(Add<real4>(l_a0_108,Mul<real4>(l_a_107,Add<real4>(l_a1_109,Mul<real4>(l_a_107,Add<real4>(l_a2_110,Mul<real4>(l_a_107,l_a3_111)))))),<real4>{Dot<4>(l_v0_102,l_hx_114),Dot<4>(l_v1_103,l_hx_114),Dot<4>(l_v2_104,l_hx_114),Dot<4>(l_v3_105,l_hx_114)}),Dot<4>(Add<real4>(l_a0_108,Mul<real4>(l_a_127,Add<real4>(l_a1_109,Mul<real4>(l_a_127,Add<real4>(l_a2_110,Mul<real4>(l_a_127,l_a3_111)))))),<real4>{Dot<4>(l_v0_122,l_hx_130),Dot<4>(l_v1_123,l_hx_130),Dot<4>(l_v2_124,l_hx_130),Dot<4>(l_v3_125,l_hx_130)}));
      l_score_132 = Add<real>(l_score_92,Mul<real>(l__t_131,l__t_131));
      l_score_133 = l_score_132;
    } else {
      l_score_133 = l_score_92;
    }
    l_x_134 = 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_134,::_t)) {
      l__t_135 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v03),::_t);
      l__t_136 = l__t_135;
    } else {
      l__t_136 = false;
    }
    if (l__t_136) {
      l_nd_137 = Floor<2>(l_x_134);
      l_f_138 = Sub<real2>(l_x_134,l_nd_137);
      l_n_139 = RealToInt<2>(l_nd_137);
      l_ix_140 = Add<int>(-1,Index<int{2},0>(l_n_139));
      l_t2_141 = Index<int{2},1>(l_n_139);
      l_imgBaseAddr_142 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_143 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_142,Add<int>(l_ix_140,Mul<int>(21,Add<int>(-1,l_t2_141)))));
      l_v1_144 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_142,Add<int>(l_ix_140,Mul<int>(21,Add<int>(0,l_t2_141)))));
      l_v2_145 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_142,Add<int>(l_ix_140,Mul<int>(21,Add<int>(1,l_t2_141)))));
      l_v3_146 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_142,Add<int>(l_ix_140,Mul<int>(21,Add<int>(2,l_t2_141)))));
      l_fy_147 = Index<real2,1>(l_f_138);
      l_a_148 = <real4>{Add<real>(l_fy_147,0.1e1),l_fy_147,Sub<real>(l_fy_147,0.1e1),Sub<real>(l_fy_147,0.2e1)};
      l_a0_149 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_150 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_151 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_152 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_153 = Index<real2,0>(l_f_138);
      l_a_154 = <real4>{Add<real>(l_fx_153,0.1e1),l_fx_153,Sub<real>(l_fx_153,0.1e1),Sub<real>(l_fx_153,0.2e1)};
      l_hx_155 = Add<real4>(l_a0_149,Mul<real4>(l_a_154,Add<real4>(l_a1_150,Mul<real4>(l_a_154,Add<real4>(l_a2_151,Mul<real4>(l_a_154,l_a3_152))))));
      l_x_156 = PosToImgSpace<IMAGE2D<int>>(::_t,::v03);
      l_nd_157 = Floor<2>(l_x_156);
      l_f_158 = Sub<real2>(l_x_156,l_nd_157);
      l_n_159 = RealToInt<2>(l_nd_157);
      l_ix_160 = Add<int>(-1,Index<int{2},0>(l_n_159));
      l_t2_161 = Index<int{2},1>(l_n_159);
      l_imgBaseAddr_162 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_163 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_162,Add<int>(l_ix_160,Mul<int>(21,Add<int>(-1,l_t2_161)))));
      l_v1_164 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_162,Add<int>(l_ix_160,Mul<int>(21,Add<int>(0,l_t2_161)))));
      l_v2_165 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_162,Add<int>(l_ix_160,Mul<int>(21,Add<int>(1,l_t2_161)))));
      l_v3_166 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_162,Add<int>(l_ix_160,Mul<int>(21,Add<int>(2,l_t2_161)))));
      l_fy_167 = Index<real2,1>(l_f_158);
      l_a_168 = <real4>{Add<real>(l_fy_167,0.1e1),l_fy_167,Sub<real>(l_fy_167,0.1e1),Sub<real>(l_fy_167,0.2e1)};
      l_fx_169 = Index<real2,0>(l_f_158);
      l_a_170 = <real4>{Add<real>(l_fx_169,0.1e1),l_fx_169,Sub<real>(l_fx_169,0.1e1),Sub<real>(l_fx_169,0.2e1)};
      l_hx_171 = Add<real4>(l_a0_149,Mul<real4>(l_a_170,Add<real4>(l_a1_150,Mul<real4>(l_a_170,Add<real4>(l_a2_151,Mul<real4>(l_a_170,l_a3_152))))));
      l__t_172 = Sub<real>(Dot<4>(Add<real4>(l_a0_149,Mul<real4>(l_a_148,Add<real4>(l_a1_150,Mul<real4>(l_a_148,Add<real4>(l_a2_151,Mul<real4>(l_a_148,l_a3_152)))))),<real4>{Dot<4>(l_v0_143,l_hx_155),Dot<4>(l_v1_144,l_hx_155),Dot<4>(l_v2_145,l_hx_155),Dot<4>(l_v3_146,l_hx_155)}),Dot<4>(Add<real4>(l_a0_149,Mul<real4>(l_a_168,Add<real4>(l_a1_150,Mul<real4>(l_a_168,Add<real4>(l_a2_151,Mul<real4>(l_a_168,l_a3_152)))))),<real4>{Dot<4>(l_v0_163,l_hx_171),Dot<4>(l_v1_164,l_hx_171),Dot<4>(l_v2_165,l_hx_171),Dot<4>(l_v3_166,l_hx_171)}));
      l_score_173 = Add<real>(l_score_133,Mul<real>(l__t_172,l__t_172));
      l_score_174 = l_score_173;
    } else {
      l_score_174 = l_score_133;
    }
    l_x_175 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v04),Dot<2>(l_r1_8,::v04)},l__t_9));
    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_174,Mul<real>(l__t_213,l__t_213));
      l_score_215 = l_score_214;
    } else {
      l_score_215 = l_score_174;
    }
    if (l__t_11) {
    }
    if (l__t_13) {
      l_nd_216 = Floor<2>(l_x_10);
      l_f_217 = Sub<real2>(l_x_10,l_nd_216);
      l_n_218 = RealToInt<2>(l_nd_216);
      l_ix_219 = Add<int>(-1,Index<int{2},0>(l_n_218));
      l_t2_220 = Index<int{2},1>(l_n_218);
      l_imgBaseAddr_221 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_222 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_221,Add<int>(l_ix_219,Mul<int>(21,Add<int>(-1,l_t2_220)))));
      l_v1_223 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_221,Add<int>(l_ix_219,Mul<int>(21,Add<int>(0,l_t2_220)))));
      l_v2_224 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_221,Add<int>(l_ix_219,Mul<int>(21,Add<int>(1,l_t2_220)))));
      l_v3_225 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_221,Add<int>(l_ix_219,Mul<int>(21,Add<int>(2,l_t2_220)))));
      l_fy_226 = Index<real2,1>(l_f_217);
      l_a_227 = <real4>{Add<real>(l_fy_226,0.1e1),l_fy_226,Sub<real>(l_fy_226,0.1e1),Sub<real>(l_fy_226,0.2e1)};
      l_a0_228 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_229 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_230 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_231 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_232 = Index<real2,0>(l_f_217);
      l_a_233 = <real4>{Add<real>(l_fx_232,0.1e1),l_fx_232,Sub<real>(l_fx_232,0.1e1),Sub<real>(l_fx_232,0.2e1)};
      l_hx_234 = Add<real4>(l_a0_228,Mul<real4>(l_a_233,Add<real4>(l_a1_229,Mul<real4>(l_a_233,Add<real4>(l_a2_230,Mul<real4>(l_a_233,l_a3_231))))));
      l_x_235 = PosToImgSpace<IMAGE2D<int>>(::_t,::v00);
      l_nd_236 = Floor<2>(l_x_235);
      l_f_237 = Sub<real2>(l_x_235,l_nd_236);
      l_n_238 = RealToInt<2>(l_nd_236);
      l_ix_239 = Add<int>(-1,Index<int{2},0>(l_n_238));
      l_t2_240 = Index<int{2},1>(l_n_238);
      l_imgBaseAddr_241 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_242 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_241,Add<int>(l_ix_239,Mul<int>(21,Add<int>(-1,l_t2_240)))));
      l_v1_243 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_241,Add<int>(l_ix_239,Mul<int>(21,Add<int>(0,l_t2_240)))));
      l_v2_244 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_241,Add<int>(l_ix_239,Mul<int>(21,Add<int>(1,l_t2_240)))));
      l_v3_245 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_241,Add<int>(l_ix_239,Mul<int>(21,Add<int>(2,l_t2_240)))));
      l_fy_246 = Index<real2,1>(l_f_237);
      l_a_247 = <real4>{Add<real>(l_fy_246,0.1e1),l_fy_246,Sub<real>(l_fy_246,0.1e1),Sub<real>(l_fy_246,0.2e1)};
      l_fx_248 = Index<real2,0>(l_f_237);
      l_a_249 = <real4>{Add<real>(l_fx_248,0.1e1),l_fx_248,Sub<real>(l_fx_248,0.1e1),Sub<real>(l_fx_248,0.2e1)};
      l_hx_250 = Add<real4>(l_a0_228,Mul<real4>(l_a_249,Add<real4>(l_a1_229,Mul<real4>(l_a_249,Add<real4>(l_a2_230,Mul<real4>(l_a_249,l_a3_231))))));
      l__t_251 = Sub<real>(Dot<4>(Add<real4>(l_a0_228,Mul<real4>(l_a_227,Add<real4>(l_a1_229,Mul<real4>(l_a_227,Add<real4>(l_a2_230,Mul<real4>(l_a_227,l_a3_231)))))),<real4>{Dot<4>(l_v0_222,l_hx_234),Dot<4>(l_v1_223,l_hx_234),Dot<4>(l_v2_224,l_hx_234),Dot<4>(l_v3_225,l_hx_234)}),Dot<4>(Add<real4>(l_a0_228,Mul<real4>(l_a_247,Add<real4>(l_a1_229,Mul<real4>(l_a_247,Add<real4>(l_a2_230,Mul<real4>(l_a_247,l_a3_231)))))),<real4>{Dot<4>(l_v0_242,l_hx_250),Dot<4>(l_v1_243,l_hx_250),Dot<4>(l_v2_244,l_hx_250),Dot<4>(l_v3_245,l_hx_250)}));
      l_score_252 = Add<real>(l_score_215,Mul<real>(l__t_251,l__t_251));
      l_score_253 = l_score_252;
    } else {
      l_score_253 = l_score_215;
    }
    l_x_254 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v06),Dot<2>(l_r1_8,::v06)},l__t_9));
    if (Inside<IMAGE2D<float>,2>(l_x_254,::_t)) {
      l__t_255 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v06),::_t);
      l__t_256 = l__t_255;
    } else {
      l__t_256 = false;
    }
    if (l__t_256) {
      l_nd_257 = Floor<2>(l_x_254);
      l_f_258 = Sub<real2>(l_x_254,l_nd_257);
      l_n_259 = RealToInt<2>(l_nd_257);
      l_ix_260 = Add<int>(-1,Index<int{2},0>(l_n_259));
      l_t2_261 = Index<int{2},1>(l_n_259);
      l_imgBaseAddr_262 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_263 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_262,Add<int>(l_ix_260,Mul<int>(21,Add<int>(-1,l_t2_261)))));
      l_v1_264 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_262,Add<int>(l_ix_260,Mul<int>(21,Add<int>(0,l_t2_261)))));
      l_v2_265 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_262,Add<int>(l_ix_260,Mul<int>(21,Add<int>(1,l_t2_261)))));
      l_v3_266 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_262,Add<int>(l_ix_260,Mul<int>(21,Add<int>(2,l_t2_261)))));
      l_fy_267 = Index<real2,1>(l_f_258);
      l_a_268 = <real4>{Add<real>(l_fy_267,0.1e1),l_fy_267,Sub<real>(l_fy_267,0.1e1),Sub<real>(l_fy_267,0.2e1)};
      l_a0_269 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_270 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_271 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_272 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_273 = Index<real2,0>(l_f_258);
      l_a_274 = <real4>{Add<real>(l_fx_273,0.1e1),l_fx_273,Sub<real>(l_fx_273,0.1e1),Sub<real>(l_fx_273,0.2e1)};
      l_hx_275 = Add<real4>(l_a0_269,Mul<real4>(l_a_274,Add<real4>(l_a1_270,Mul<real4>(l_a_274,Add<real4>(l_a2_271,Mul<real4>(l_a_274,l_a3_272))))));
      l_x_276 = PosToImgSpace<IMAGE2D<int>>(::_t,::v06);
      l_nd_277 = Floor<2>(l_x_276);
      l_f_278 = Sub<real2>(l_x_276,l_nd_277);
      l_n_279 = RealToInt<2>(l_nd_277);
      l_ix_280 = Add<int>(-1,Index<int{2},0>(l_n_279));
      l_t2_281 = Index<int{2},1>(l_n_279);
      l_imgBaseAddr_282 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_283 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_282,Add<int>(l_ix_280,Mul<int>(21,Add<int>(-1,l_t2_281)))));
      l_v1_284 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_282,Add<int>(l_ix_280,Mul<int>(21,Add<int>(0,l_t2_281)))));
      l_v2_285 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_282,Add<int>(l_ix_280,Mul<int>(21,Add<int>(1,l_t2_281)))));
      l_v3_286 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_282,Add<int>(l_ix_280,Mul<int>(21,Add<int>(2,l_t2_281)))));
      l_fy_287 = Index<real2,1>(l_f_278);
      l_a_288 = <real4>{Add<real>(l_fy_287,0.1e1),l_fy_287,Sub<real>(l_fy_287,0.1e1),Sub<real>(l_fy_287,0.2e1)};
      l_fx_289 = Index<real2,0>(l_f_278);
      l_a_290 = <real4>{Add<real>(l_fx_289,0.1e1),l_fx_289,Sub<real>(l_fx_289,0.1e1),Sub<real>(l_fx_289,0.2e1)};
      l_hx_291 = Add<real4>(l_a0_269,Mul<real4>(l_a_290,Add<real4>(l_a1_270,Mul<real4>(l_a_290,Add<real4>(l_a2_271,Mul<real4>(l_a_290,l_a3_272))))));
      l__t_292 = Sub<real>(Dot<4>(Add<real4>(l_a0_269,Mul<real4>(l_a_268,Add<real4>(l_a1_270,Mul<real4>(l_a_268,Add<real4>(l_a2_271,Mul<real4>(l_a_268,l_a3_272)))))),<real4>{Dot<4>(l_v0_263,l_hx_275),Dot<4>(l_v1_264,l_hx_275),Dot<4>(l_v2_265,l_hx_275),Dot<4>(l_v3_266,l_hx_275)}),Dot<4>(Add<real4>(l_a0_269,Mul<real4>(l_a_288,Add<real4>(l_a1_270,Mul<real4>(l_a_288,Add<real4>(l_a2_271,Mul<real4>(l_a_288,l_a3_272)))))),<real4>{Dot<4>(l_v0_283,l_hx_291),Dot<4>(l_v1_284,l_hx_291),Dot<4>(l_v2_285,l_hx_291),Dot<4>(l_v3_286,l_hx_291)}));
      l_score_293 = Add<real>(l_score_253,Mul<real>(l__t_292,l__t_292));
      l_score_294 = l_score_293;
    } else {
      l_score_294 = l_score_253;
    }
    l_x_295 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v07),Dot<2>(l_r1_8,::v07)},l__t_9));
    if (Inside<IMAGE2D<float>,2>(l_x_295,::_t)) {
      l__t_296 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v07),::_t);
      l__t_297 = l__t_296;
    } else {
      l__t_297 = false;
    }
    if (l__t_297) {
      l_nd_298 = Floor<2>(l_x_295);
      l_f_299 = Sub<real2>(l_x_295,l_nd_298);
      l_n_300 = RealToInt<2>(l_nd_298);
      l_ix_301 = Add<int>(-1,Index<int{2},0>(l_n_300));
      l_t2_302 = Index<int{2},1>(l_n_300);
      l_imgBaseAddr_303 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_304 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_303,Add<int>(l_ix_301,Mul<int>(21,Add<int>(-1,l_t2_302)))));
      l_v1_305 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_303,Add<int>(l_ix_301,Mul<int>(21,Add<int>(0,l_t2_302)))));
      l_v2_306 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_303,Add<int>(l_ix_301,Mul<int>(21,Add<int>(1,l_t2_302)))));
      l_v3_307 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_303,Add<int>(l_ix_301,Mul<int>(21,Add<int>(2,l_t2_302)))));
      l_fy_308 = Index<real2,1>(l_f_299);
      l_a_309 = <real4>{Add<real>(l_fy_308,0.1e1),l_fy_308,Sub<real>(l_fy_308,0.1e1),Sub<real>(l_fy_308,0.2e1)};
      l_a0_310 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_311 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_312 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_313 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_314 = Index<real2,0>(l_f_299);
      l_a_315 = <real4>{Add<real>(l_fx_314,0.1e1),l_fx_314,Sub<real>(l_fx_314,0.1e1),Sub<real>(l_fx_314,0.2e1)};
      l_hx_316 = Add<real4>(l_a0_310,Mul<real4>(l_a_315,Add<real4>(l_a1_311,Mul<real4>(l_a_315,Add<real4>(l_a2_312,Mul<real4>(l_a_315,l_a3_313))))));
      l_x_317 = PosToImgSpace<IMAGE2D<int>>(::_t,::v07);
      l_nd_318 = Floor<2>(l_x_317);
      l_f_319 = Sub<real2>(l_x_317,l_nd_318);
      l_n_320 = RealToInt<2>(l_nd_318);
      l_ix_321 = Add<int>(-1,Index<int{2},0>(l_n_320));
      l_t2_322 = Index<int{2},1>(l_n_320);
      l_imgBaseAddr_323 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_324 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_323,Add<int>(l_ix_321,Mul<int>(21,Add<int>(-1,l_t2_322)))));
      l_v1_325 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_323,Add<int>(l_ix_321,Mul<int>(21,Add<int>(0,l_t2_322)))));
      l_v2_326 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_323,Add<int>(l_ix_321,Mul<int>(21,Add<int>(1,l_t2_322)))));
      l_v3_327 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_323,Add<int>(l_ix_321,Mul<int>(21,Add<int>(2,l_t2_322)))));
      l_fy_328 = Index<real2,1>(l_f_319);
      l_a_329 = <real4>{Add<real>(l_fy_328,0.1e1),l_fy_328,Sub<real>(l_fy_328,0.1e1),Sub<real>(l_fy_328,0.2e1)};
      l_fx_330 = Index<real2,0>(l_f_319);
      l_a_331 = <real4>{Add<real>(l_fx_330,0.1e1),l_fx_330,Sub<real>(l_fx_330,0.1e1),Sub<real>(l_fx_330,0.2e1)};
      l_hx_332 = Add<real4>(l_a0_310,Mul<real4>(l_a_331,Add<real4>(l_a1_311,Mul<real4>(l_a_331,Add<real4>(l_a2_312,Mul<real4>(l_a_331,l_a3_313))))));
      l__t_333 = Sub<real>(Dot<4>(Add<real4>(l_a0_310,Mul<real4>(l_a_309,Add<real4>(l_a1_311,Mul<real4>(l_a_309,Add<real4>(l_a2_312,Mul<real4>(l_a_309,l_a3_313)))))),<real4>{Dot<4>(l_v0_304,l_hx_316),Dot<4>(l_v1_305,l_hx_316),Dot<4>(l_v2_306,l_hx_316),Dot<4>(l_v3_307,l_hx_316)}),Dot<4>(Add<real4>(l_a0_310,Mul<real4>(l_a_329,Add<real4>(l_a1_311,Mul<real4>(l_a_329,Add<real4>(l_a2_312,Mul<real4>(l_a_329,l_a3_313)))))),<real4>{Dot<4>(l_v0_324,l_hx_332),Dot<4>(l_v1_325,l_hx_332),Dot<4>(l_v2_326,l_hx_332),Dot<4>(l_v3_327,l_hx_332)}));
      l_score_334 = Add<real>(l_score_294,Mul<real>(l__t_333,l__t_333));
      l_score_335 = l_score_334;
    } else {
      l_score_335 = l_score_294;
    }
    l_x_336 = PosToImgSpace<IMAGE2D<float>>(::_t,Add<real2>(<real2>{Dot<2>(l_r0_7,::v08),Dot<2>(l_r1_8,::v08)},l__t_9));
    if (Inside<IMAGE2D<float>,2>(l_x_336,::_t)) {
      l__t_337 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v08),::_t);
      l__t_338 = l__t_337;
    } else {
      l__t_338 = false;
    }
    if (l__t_338) {
      l_nd_339 = Floor<2>(l_x_336);
      l_f_340 = Sub<real2>(l_x_336,l_nd_339);
      l_n_341 = RealToInt<2>(l_nd_339);
      l_ix_342 = Add<int>(-1,Index<int{2},0>(l_n_341));
      l_t2_343 = Index<int{2},1>(l_n_341);
      l_imgBaseAddr_344 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_345 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_344,Add<int>(l_ix_342,Mul<int>(21,Add<int>(-1,l_t2_343)))));
      l_v1_346 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_344,Add<int>(l_ix_342,Mul<int>(21,Add<int>(0,l_t2_343)))));
      l_v2_347 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_344,Add<int>(l_ix_342,Mul<int>(21,Add<int>(1,l_t2_343)))));
      l_v3_348 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_344,Add<int>(l_ix_342,Mul<int>(21,Add<int>(2,l_t2_343)))));
      l_fy_349 = Index<real2,1>(l_f_340);
      l_a_350 = <real4>{Add<real>(l_fy_349,0.1e1),l_fy_349,Sub<real>(l_fy_349,0.1e1),Sub<real>(l_fy_349,0.2e1)};
      l_a0_351 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_352 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_353 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_354 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_355 = Index<real2,0>(l_f_340);
      l_a_356 = <real4>{Add<real>(l_fx_355,0.1e1),l_fx_355,Sub<real>(l_fx_355,0.1e1),Sub<real>(l_fx_355,0.2e1)};
      l_hx_357 = Add<real4>(l_a0_351,Mul<real4>(l_a_356,Add<real4>(l_a1_352,Mul<real4>(l_a_356,Add<real4>(l_a2_353,Mul<real4>(l_a_356,l_a3_354))))));
      l_x_358 = PosToImgSpace<IMAGE2D<int>>(::_t,::v08);
      l_nd_359 = Floor<2>(l_x_358);
      l_f_360 = Sub<real2>(l_x_358,l_nd_359);
      l_n_361 = RealToInt<2>(l_nd_359);
      l_ix_362 = Add<int>(-1,Index<int{2},0>(l_n_361));
      l_t2_363 = Index<int{2},1>(l_n_361);
      l_imgBaseAddr_364 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_365 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_364,Add<int>(l_ix_362,Mul<int>(21,Add<int>(-1,l_t2_363)))));
      l_v1_366 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_364,Add<int>(l_ix_362,Mul<int>(21,Add<int>(0,l_t2_363)))));
      l_v2_367 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_364,Add<int>(l_ix_362,Mul<int>(21,Add<int>(1,l_t2_363)))));
      l_v3_368 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_364,Add<int>(l_ix_362,Mul<int>(21,Add<int>(2,l_t2_363)))));
      l_fy_369 = Index<real2,1>(l_f_360);
      l_a_370 = <real4>{Add<real>(l_fy_369,0.1e1),l_fy_369,Sub<real>(l_fy_369,0.1e1),Sub<real>(l_fy_369,0.2e1)};
      l_fx_371 = Index<real2,0>(l_f_360);
      l_a_372 = <real4>{Add<real>(l_fx_371,0.1e1),l_fx_371,Sub<real>(l_fx_371,0.1e1),Sub<real>(l_fx_371,0.2e1)};
      l_hx_373 = Add<real4>(l_a0_351,Mul<real4>(l_a_372,Add<real4>(l_a1_352,Mul<real4>(l_a_372,Add<real4>(l_a2_353,Mul<real4>(l_a_372,l_a3_354))))));
      l__t_374 = Sub<real>(Dot<4>(Add<real4>(l_a0_351,Mul<real4>(l_a_350,Add<real4>(l_a1_352,Mul<real4>(l_a_350,Add<real4>(l_a2_353,Mul<real4>(l_a_350,l_a3_354)))))),<real4>{Dot<4>(l_v0_345,l_hx_357),Dot<4>(l_v1_346,l_hx_357),Dot<4>(l_v2_347,l_hx_357),Dot<4>(l_v3_348,l_hx_357)}),Dot<4>(Add<real4>(l_a0_351,Mul<real4>(l_a_370,Add<real4>(l_a1_352,Mul<real4>(l_a_370,Add<real4>(l_a2_353,Mul<real4>(l_a_370,l_a3_354)))))),<real4>{Dot<4>(l_v0_365,l_hx_373),Dot<4>(l_v1_366,l_hx_373),Dot<4>(l_v2_367,l_hx_373),Dot<4>(l_v3_368,l_hx_373)}));
      l_score_375 = Add<real>(l_score_335,Mul<real>(l__t_374,l__t_374));
      l_score_376 = l_score_375;
    } else {
      l_score_376 = l_score_335;
    }
    l_pos_377 = Add<real2>(<real2>{Dot<2>(l_r0_7,::v09),Dot<2>(l_r1_8,::v09)},l__t_9);
    l_x_378 = PosToImgSpace<IMAGE2D<float>>(::_t,l_pos_377);
    if (Inside<IMAGE2D<float>,2>(l_x_378,::_t)) {
      l__t_379 = Inside<IMAGE2D<int>,2>(PosToImgSpace<IMAGE2D<int>>(::_t,::v09),::_t);
      l__t_380 = l__t_379;
    } else {
      l__t_380 = false;
    }
    if (l__t_380) {
      l_nd_381 = Floor<2>(l_x_378);
      l_f_382 = Sub<real2>(l_x_378,l_nd_381);
      l_n_383 = RealToInt<2>(l_nd_381);
      l_ix_384 = Add<int>(-1,Index<int{2},0>(l_n_383));
      l_t2_385 = Index<int{2},1>(l_n_383);
      l_imgBaseAddr_386 = ImageAddress<IMAGE2D<float>>(::_t);
      l_v0_387 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_386,Add<int>(l_ix_384,Mul<int>(21,Add<int>(-1,l_t2_385)))));
      l_v1_388 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_386,Add<int>(l_ix_384,Mul<int>(21,Add<int>(0,l_t2_385)))));
      l_v2_389 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_386,Add<int>(l_ix_384,Mul<int>(21,Add<int>(1,l_t2_385)))));
      l_v3_390 = LoadVoxels<IMAGE2D<float>,4>(Add<addr(IMAGE2D<float>)>(l_imgBaseAddr_386,Add<int>(l_ix_384,Mul<int>(21,Add<int>(2,l_t2_385)))));
      l_fy_391 = Index<real2,1>(l_f_382);
      l_a_392 = <real4>{Add<real>(l_fy_391,0.1e1),l_fy_391,Sub<real>(l_fy_391,0.1e1),Sub<real>(l_fy_391,0.2e1)};
      l_a0_393 = <real4>{0.133333333333e1,0.666666666667e0,0.666666666667e0,0.133333333333e1};
      l_a1_394 = <real4>{-0.2e1,0.0,0.0,0.2e1};
      l_a2_395 = <real4>{0.1e1,-0.1e1,-0.1e1,0.1e1};
      l_a3_396 = <real4>{-0.166666666667e0,0.5e0,-0.5e0,0.166666666667e0};
      l_fx_397 = Index<real2,0>(l_f_382);
      l_a_398 = <real4>{Add<real>(l_fx_397,0.1e1),l_fx_397,Sub<real>(l_fx_397,0.1e1),Sub<real>(l_fx_397,0.2e1)};
      l_hx_399 = Add<real4>(l_a0_393,Mul<real4>(l_a_398,Add<real4>(l_a1_394,Mul<real4>(l_a_398,Add<real4>(l_a2_395,Mul<real4>(l_a_398,l_a3_396))))));
      l_x_400 = PosToImgSpace<IMAGE2D<int>>(::_t,::v09);
      l_nd_401 = Floor<2>(l_x_400);
      l_f_402 = Sub<real2>(l_x_400,l_nd_401);
      l_n_403 = RealToInt<2>(l_nd_401);
      l_ix_404 = Add<int>(-1,Index<int{2},0>(l_n_403));
      l_t2_405 = Index<int{2},1>(l_n_403);
      l_imgBaseAddr_406 = ImageAddress<IMAGE2D<int>>(::_t);
      l_v0_407 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_406,Add<int>(l_ix_404,Mul<int>(21,Add<int>(-1,l_t2_405)))));
      l_v1_408 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_406,Add<int>(l_ix_404,Mul<int>(21,Add<int>(0,l_t2_405)))));
      l_v2_409 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_406,Add<int>(l_ix_404,Mul<int>(21,Add<int>(1,l_t2_405)))));
      l_v3_410 = LoadVoxels<IMAGE2D<int>,4>(Add<addr(IMAGE2D<int>)>(l_imgBaseAddr_406,Add<int>(l_ix_404,Mul<int>(21,Add<int>(2,l_t2_405)))));
      l_fy_411 = Index<real2,1>(l_f_402);
      l_a_412 = <real4>{Add<real>(l_fy_411,0.1e1),l_fy_411,Sub<real>(l_fy_411,0.1e1),Sub<real>(l_fy_411,0.2e1)};
      l_fx_413 = Index<real2,0>(l_f_402);
      l_a_414 = <real4>{Add<real>(l_fx_413,0.1e1),l_fx_413,Sub<real>(l_fx_413,0.1e1),Sub<real>(l_fx_413,0.2e1)};
      l_hx_415 = Add<real4>(l_a0_393,Mul<real4>(l_a_414,Add<real4>(l_a1_394,Mul<real4>(l_a_414,Add<real4>(l_a2_395,Mul<real4>(l_a_414,l_a3_396))))));
      l__t_416 = Sub<real>(Dot<4>(Add<real4>(l_a0_393,Mul<real4>(l_a_392,Add<real4>(l_a1_394,Mul<real4>(l_a_392,Add<real4>(l_a2_395,Mul<real4>(l_a_392,l_a3_396)))))),<real4>{Dot<4>(l_v0_387,l_hx_399),Dot<4>(l_v1_388,l_hx_399),Dot<4>(l_v2_389,l_hx_399),Dot<4>(l_v3_390,l_hx_399)}),Dot<4>(Add<real4>(l_a0_393,Mul<real4>(l_a_412,Add<real4>(l_a1_394,Mul<real4>(l_a_412,Add<real4>(l_a2_395,Mul<real4>(l_a_412,l_a3_396)))))),<real4>{Dot<4>(l_v0_407,l_hx_415),Dot<4>(l_v1_408,l_hx_415),Dot<4>(l_v2_409,l_hx_415),Dot<4>(l_v3_410,l_hx_415)}));
      l_score_417 = Add<real>(l_score_376,Mul<real>(l__t_416,l__t_416));
      l_score_418 = l_score_417;
    } else {
      l_score_418 = l_score_376;
    }
    self.score = l_score_418;
    self.r0 = l_r0_7;
    self.r1 = l_r1_8;
    self.pos = l_pos_377;
    stabilize;
  }
  Stabilize () {
    self.score = self.score;
    self.r0 = self.r0;
    self.r1 = self.r1;
    self.pos = self.pos;
    exit();
  }
}
//***** INITIALLY *****
  ARRAY {
    for i_i_422 = 0 .. 60
      for i_j_421 = 0 .. 60
        for i_k_420 = 0 .. 60
          {
            new R(i_i_422,i_j_421,i_k_420);
          }
  }
/usr/bin/gcc -m64 -std=gnu99 -c -Wformat -Wreturn-type -Wuninitialized -O3 -DNDEBUG -I/home/nseltzer/svn/diderot/branches/vis12/src/include -I/home/nseltzer/teem/build/include square_score-10.c
/usr/bin/ld -r -o /tmp/file84GrGZ.o square_score-10.o /home/nseltzer/svn/diderot/branches/vis12/lib/diderot-rt-c-f.o
rename /tmp/file84GrGZ.o to square_score-10.o
low-il:redundant-assign         1200
mid-opt:unused                  1
mid-il:redundant-assign         750
high-opt:unused                 5
high-il:redundant-phi           1
high-il:redundant-assign        151
                      Phase                         Exclusive    Total  
  compiler .........................................   0.000     3.408
    front end ......................................   0.036     0.104
      parser .......................................   0.041     0.041
      typechecker ..................................   0.007     0.007
      simplify .....................................   0.021     0.021
    translate ......................................   0.010     0.010
    High IL optimization ...........................   0.112     0.112
    Mid IL optimization ............................   1.452     1.452
    Low IL optimization ............................   0.843     0.843
    code generation ................................   0.041     0.886
      Low IL to Tree IL ............................   0.048     0.048
      C compiler ...................................   0.797     0.797

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